Repository navigation
chore(memory): unknown flags must fail loudly, not fall through - #490
Merged
Merged
Conversation
Promotes the #487 arc decision to the curated shared tier: hasFlag matches exact tokens, so a near-miss flag is invisible and the command silently takes another branch (`kit upgrade --self.` rewrote lock-file timestamps instead of self-upgrading). The entry records the rule plus the two corollaries — command allowlists include GLOBAL_FLAGS, and leading globals are stripped before positional dispatch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
✅ Docker image built successfully
|
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
One-line append to the curated shared tier (
.kit/shared/memory.jsonl) — entry716c68, areacli, kindconvention.Why
The #487 arc found that
hasFlagmatches exact tokens, so a near-miss flag is simply not seen and the command silently takes a different branch:kit upgrade --self.(trailing period) skipped the self-upgrade path and rewrote everyinstalledAtin the lock file instead. The code fix landed in #487; the rule behind it is invisible in git, so it goes to the tier teammates and fresh sessions actually read.The entry records the rule plus two corollaries already enforced in code:
GLOBAL_FLAGS(--read-only/--readonly/--non-interactive/--env/--help/--version), or a documented global reads as unknown;Verification
kit memory verify→ 32 entries, 32 trusted, 0 bad-sig, 0 untrusted, 0 unsigned1 insertion(+))main:kit --read-only check,--readonly,--non-interactive,--env=prod check,check --read-only,--read-only check --category security,--read-only check verify-attestation— all dispatch correctly;kit upgrade --self.exits 1 listing accepted flags and writes nothingnode --teston the flag suites: 44 pass, 0 fail🤖 Generated with Claude Code