test: fail when CONFIGURATION.md documents an acp.json key missing from KNOWN whitelist (#354) - #355
test: fail when CONFIGURATION.md documents an acp.json key missing from KNOWN whitelist (#354)#355ranxianglei wants to merge 1 commit into
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-355Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr355.tgz
pi install ./packageThis comment is automatically updated on each push. |
Reviewed PR #355 independently (checked out the head Verification (run on the PR head)
Root cause confirmed (independent of the issue's analysis)
Diff cleanlinessSingle new file Duplicate screeningNot a duplicate. Searched issues + PRs (all states) for consistency/whitelist/doc-drift — no existing item. Only this new test reads Design assessment
No defects found; I made no code changes (nothing warranted a commit).
|
What
New regression test
tests/user-config-doc-consistency.test.ts— the consistency test proposed in #354 (教训/建议).Why
#354:
repetitionGuardis documented in CONFIGURATION.md as acp.json-configurable (#308) but was missing from theKNOWNwhitelist insrc/user-config.ts, so user-written values were silently dropped with no log. No existing test could catch doc↔whitelist drift. This class of bug recurs every time a new config key lands in docs before (or without) the whitelist entry.How it works
## Parameter Referencesection of CONFIGURATION.md; collects keys from every parameter table whose header row starts with| Key(the status-legend and environment-variable tables are excluded automatically); top-level key = prefix before the first...pi/acp.json(valuetrueeach —pickKnowndoes no type validation) under an isolated HOME, callsloadUserConfig, asserts every key survives. Tests the user-visible "no silent drop" contract directly; immune to internal refactors.enabled,debug,autoUpdate,delegate,compress,prompts) so a broken parser cannot make the test pass vacuously.Verification
documented top-level key 'repetitionGuard' was silently dropped by loadUserConfig (missing from KNOWN whitelist?)— reproduces [bug] acp.json 的 repetitionGuard 键被静默丢弃(user-config KNOWN 白名单缺失)— 已修复于 #352 #354 precisely.origin/pr-352(temporary worktree at 54b9fbb): passes including PR fix: degeneration guard — collapse single-codepoint runs in assistant text/thinking + one-shot recovery notice #352's newly documenteddegenerationGuardrows.npm run typecheckclean,npm run buildclean.Fixes #354