Skip to content

fix(cli): --annotate and --annotate-block refuse a type they do not know - #184

Merged
backnotprop merged 1 commit into
mainfrom
fix/annotate-unknown-type
Nov 22, 2026
Merged

backnotprop merged 1 commit into
mainfrom
fix/annotate-unknown-type

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

Behaviour change. --annotate and --annotate-block now refuse a type word they do not know. Before this, any other word (bogus, a typo like looks-good, Comment, an empty string) quietly saved a comment. An agent that calls the tool with a typo got the wrong kind of note and no sign of it.

  • Accepted words: comment, looks_good, delete. No type still means a comment.
  • approve still means looks_good. It has been accepted since the rebuild, so a caller may pass it. It stays out of the usage text and README: approve is also the gated-review action (A), and a second documented spelling for "looks good" would only add confusion.
  • Any other word fails with exit code 1, saves nothing, and prints the usage text after:
    unknown type "bogus": use comment, looks_good or delete
  • parse_kind is the one place both commands read the type, so the change is in one function.

Callers checked: nothing in the repo passes another word. The tests pass comment or no type, scripts/smoke-musl.sh passes no type, and the herdr, rex, hc and pi launchers do not call --annotate or --annotate-block.

Tests (tests/annotate_block.rs, through the real binary and a private data dir): bogus, looks-good, Comment and "" fail for both commands with that wording and leave no annotations. approve still saves a looks-good note for both.

@backnotprop
backnotprop added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit ba6540c Nov 22, 2026
3 checks passed
@backnotprop
backnotprop deleted the fix/annotate-unknown-type branch November 22, 2026 03:46
@backnotprop backnotprop mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant