Repository navigation
fix: capture-fallback hint advertised --tags, which add rejects — now --tag - #355
Merged
Merged
Conversation
… — it now says --tag The injected capture-fallback line (ADR-0065 §1) is what an agent pastes when the kb_* tools are gone. It advertised `add <type> "…" [--tags a,b]`, and the CLI rejects that with "unknown flag --tags", the very trap args.ts names (four entries once landed untagged). So the fallback failed at the moment it was needed. Found by the #354 review. - src/engine.ts: [--tags a,b] -> [--tag a,b]. - test/capture-fallback.test.ts: a behavioural guard, not a source grep. It pulls every [--flag value] out of the rendered line and runs the real built CLI `add` with them against a temp brain, then asserts the entry landed with the tags. Observed RED before the fix ("unknown flag --tags"), green after. Suite 816/816.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
added 2 commits
October 19, 2026 17:44
…lower value] (review round 1 M1) The gate on #355 found that the guard extracted only bracketed lower-case flags. The same --tags bug written unbracketed, a capitalised --Tag, or a bare --bogus all stayed green. Every --flag token after `add` is now extracted. Each of those three mutants, plus the original [--tags a,b], was observed red; green after restore.
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.
What
The capture-fallback line injected into every session (ADR-0065 §1) is what an agent pastes when the
kb_*MCP tools are gone. It advertisedadd <type> "…" [--tags a,b], andaddrejects that withunknown flag --tags, so the fallback fails exactly when it's needed. This was found by the review of #354.src/engine.ts:[--tags a,b]becomes[--tag a,b].test/capture-fallback.test.ts: a behavioural guard. It extracts every[--flag value]the rendered line advertises, runs the real built CLIaddwith them against a temp brain, and asserts the entry landed with its tags. It does not grep the source.Observed red first
Before the fix the new test failed with
unknown flag --tags for 'add'. After the fix it passes. Full suite: 816/816.Delivery
This is an engine change, so it reaches consumers only through a plugin re-vendor and release, and through npm. It lands on
mainhere; the release follows the normal chain.🤖 Generated with Claude Code