fix: audit batch 2 — locale-reset bug, config unification, legacy cleanup, 1M statusline#69
Merged
Merged
Conversation
…ows; mark usage endpoint experimental
…dd settings/manifest consistency check
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.
Summary
Second fix batch from the 2026-07 audit (
docs/audit-cafekit-vs-claude-code-2026-07.md) plus the bugs discovered while dogfooding the 0.14.x upgrades. Six commits, one concern each. Full suite: PASS 152 tests on the final tree.🐛 Dogfood bug: upgrade reset the configured language (
10fa843)Reproduced twice in the field (0.14.0 and 0.14.1 upgrades): every non-interactive upgrade reset
locale.responseLanguage("Tiếng Việt") toen.Root cause:
selectLanguagereturned before its saved-locale restore whenever!ctx.interactive— so--yesruns never learned the configured label, the runtime.json copy overwrote it with template nulls, andpatchRuntimeLocalethen wrote theendefault.Fix: hoist the saved-locale restore above the interactivity check + a no-downgrade guard in
patchRuntimeLocale. Proof: new live installer regression fixture — fails on the unpatched code (responseLanguage became "en"), passes after the fix.Config unification (
1b450ad) — closes PR #67 follow-up #1runtime.jsondocumentsspec.{scaffold_guard, completion_gate, tollgate}; Claudespec-state.cjsnow honorsspec.tollgate: false(same key as the OpenCode plugin — one semantic across platforms). Deadskills.research.useGeminiremoved (research uses native WebSearch);paths.plansdocumented. (plugins/.logs/gitignore — follow-up #3 — was already covered by the delegate-branch hardening; verified.)Legacy cleanup (
ec7948c,c83659f) — audit §3.3 leftovers + §3.4.7/8archive-command/removed (1,680 dead lines; pre-skill command workflow, never installed by the manifest). VestigialsourceSubdir+ self-test assertion cleaned; zero references remain.Task-tool prose →Agenttool in develop/test/hotfix text (deliberate backward-compat notes kept).inspector/debuggeragents gainmemory: user(researcher pattern).Statusline 1M-context (
e28d6e1) — audit §3.4.3/4Autocompact reserve was hard-coded 45000 (22.5% of a 200k window) — 1M windows rendered misleading percentages. Now proportional to the payload's
context_window_size; 200k behavior unchanged (smoke-tested: 100k used → 73% on 200k, 33% on 1M).usage.cjsOAuth endpoint marked experimental with its degradation contract.New guardrail (
c83659f) — audit §3.4.6Self-test consistency check: settings-template hooks ↔ manifest
runtime.files↔ payload files must agree (11 hooks verified) — schema drift now fails the suite.Verification
npm test: PASS 152 (151 after archive-command assertion removal + locale fixture + consistency check)grepsweeps: zeroarchive-command/useGeminireferencesOut of scope (tracked)
/hapo:specsnextSessionStart(compact)insession.cjsalready fires the post-compact warning; new events add no capability hereDEFAULT_CONFIG.hooksname map inconfig.cjs— cosmetic, deferred