[fix] One harness normalizer, shared by every identity view - #6399
Conversation
Cold/warm audit findings 3 and 6. Three call sites re-derived the wire-spelling map with inline literals, which is the exact shape of #6364 (a literal plus a silent fall-through). And the config fingerprint normalized the Codex harness mode while the facet digest took it raw, so the two views could disagree and poison later plans into rebuilding. harness-kind.ts is now THE normalizer: harnessKindOf resolves every wire spelling (with #6364's non-string fail-closed guard inside it) and normalizedHarnessMode resolves the one effective mode. The router, run-plan, pi-model-config, the fingerprint and the facet digests all delegate. A round-trip test pins every spelling, a drift test pins that the fingerprint and the facets move together on a mode change. Claude-Session: https://claude.ai/code/session_0165tsjmvf3qvTPFcb9EV44g
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Cold/warm audit findings 3 and 6 (docs/design/lifecycle-cold-warm-audit).
What was wrong
Three call sites re-derived the harness wire-spelling map with their own inline literals. That is the exact shape of the #6364 bug: a literal plus a silent fall-through. On top of that, the config fingerprint normalized the Codex harness mode while the facet digest took the raw value, so the two identity views could disagree about whether anything changed and poison later plans into rebuilding.
The fix
src/harness-kind.tsis THE one normalizer.harnessKindOfresolves every wire spelling, with the non-string fail-closed guard from [fix] Key the lifecycle capability table by the wire harness spellings #6364 inside it.normalizedHarnessModeresolves the one effective mode (Codex resolves defaults, every other harness getsnull).run-plan.ts,pi-model-config.ts, the config fingerprint, and the facet digests all delegate to it.null/0/false. A drift test pins that a mode change moves the fingerprint and the facets together.How to verify
Run
pnpm exec vitest run tests/unit/harness-kind.test.ts tests/unit/lifecycle-desired-state.test.tsinservices/runner.Stacked on #6398.
https://claude.ai/code/session_0165tsjmvf3qvTPFcb9EV44g