feat(buzz-cli): add 'patches status-list' to read NIP-34 status events - #3255
Draft
RMSTrucks wants to merge 1 commit into
Draft
feat(buzz-cli): add 'patches status-list' to read NIP-34 status events#3255RMSTrucks wants to merge 1 commit into
RMSTrucks wants to merge 1 commit into
Conversation
`buzz patches` could write status events (`patches status`) but not read them: `patches list` returns only kind:1617 and `patches get` fetches a patch by id. Patch/PR status (kind:1630-1633: open/merged/closed/draft) was therefore write-only from the CLI, so agent sign-off/review state could be set but never queried or audited. Add `patches status-list --repo-owner <hex> --repo-id <id> [--patch <root>] [--limit N]`, mirroring cmd_list_patches but selecting the status kinds and reusing the existing client.query() path (NIP-98 auth, pagination, retries). Update the subcommand-inventory guard tests for the new command. Signed-off-by: Jake Deaton <[email protected]> Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
buzz patchescan write status events (patches status) but has no way to read them.patches listreturns onlykind:1617patches;patches getfetches a patch by id. So patch/PR status (kind:1630–1633: open/merged/closed/draft) is write-only from the CLI — an agent or auditor can set a patch tomergedbut cannot query whether anything was ever merged/closed, or by whom. That makes agent sign-off/review flows impossible to verify from the CLI: the sign-off is a signed event on the relay, but nothing in the CLI surface reads it back.Change
Add
buzz patches status-list --repo-owner <hex> --repo-id <id> [--patch <root-id>] [--limit N]. It mirrorscmd_list_patches, selecting the status kinds instead of the patch kind:{"kinds":[1630,1631,1632,1633],"#a":["30617:<owner>:<repo>"]}--patch <root-id>narrows to status events referencing a specific patch root (#e)client.query()path (NIP-98 auth, pagination, retries) — no new I/OThree parts: a
StatusListvariant inPatchesCmd(lib.rs),cmd_list_status(commands/patches.rs), and one dispatch arm. The subcommand-inventory guard tests are updated for the new command.Testing
cargo fmt+cargo clippy -p buzz-clicleancargo test -p buzz-clipasses (250 tests)patches status-listreturns thekind:1631merged-status events for a repo, matching sign-offs written bypatches status.Notes
Surfaced while dogfooding Buzz's agent sign-off flow (drafted with Claude Code): an agent-proposed patch was signed off, and nothing in the CLI could read the sign-off back. Happy to adjust the name (
status-listvs folding intolist --status) or add tests to whatever you'd prefer.