fix: reconcile RALPLAN HUD phase with canonical run state#771
fix: reconcile RALPLAN HUD phase with canonical run state#771mastertyko wants to merge 1 commit into
Conversation
Yeachan-Heo
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES
Thanks for the targeted fix, but this is not merge-ready. I independently checked the diff against dev, the RALPLAN active-state precedence path, canonical mode-state handling, doctor reporting, and the new tests.
Blocker:
- The HUD/status read path still does not actually enforce canonical RALPLAN mode-state precedence.
readVisibleSkillActiveState()now lets.gjc/state/active/ralplan.jsonoverride staleskill-active-state.json, but it never reads.gjc/state/ralplan-state.json. If both the derived snapshot and the raw per-skill active entry are stale atrevisionwhile canonicalralplan-state.json.current_phaseis alreadyfinal, the HUD still rendersralplan:revision. That is the core contract from #770: canonical RALPLAN final must win whenever canonical run state is final. The new regression only covers a stale snapshot after a normal--write final, where the raw active entry has already been updated to final, so it misses this failure mode.
Required change:
- Make visible active-state/HUD reconciliation consult canonical RALPLAN mode-state, at least for terminal/locked RALPLAN phases such as
final/handoff, so stale per-skill active entries cannot override the canonical run state. - Add a regression that writes
ralplan-state.jsonwithcurrent_phase: "final"and leaves.gjc/state/active/ralplan.jsonplusskill-active-state.jsonatrevision;readVisibleSkillActiveState()/HUD must renderralplan:final, and doctor should report the drift.
Verification notes:
bun run test packages/coding-agent/test/gjc-runtime/ralplan-runtime.test.ts packages/coding-agent/test/gjc-runtime/state-doctor.test.ts packages/coding-agent/test/skill-active-state.test.tsdid not run a focused subset; the repo script expanded to the full suite and failed on existing missing workspace dependencies/modules.- Direct
bun test packages/coding-agent/test/gjc-runtime/ralplan-runtime.test.ts packages/coding-agent/test/gjc-runtime/state-doctor.test.ts packages/coding-agent/test/skill-active-state.test.tsalso failed before running tests because this checkout is missing linked workspace deps (@gajae-code/utils/fs-error,zod). I did not treat skipped CI as validation.
External PR policy: this should remain REQUEST_CHANGES and should be closed if the author does not update it to satisfy the canonical mode-state precedence requirement.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]
Yeachan-Heo
left a comment
There was a problem hiding this comment.
MERGE_READY
Reviewed the 7-file diff against origin/dev, including the RALPLAN runtime, state doctor, active-state merge path, and the added regression tests. Focused local coverage passes:
bun test packages/coding-agent/test/gjc-runtime/ralplan-runtime.test.ts packages/coding-agent/test/gjc-runtime/state-doctor.test.ts packages/coding-agent/test/skill-active-state.test.ts→ 68 pass / 0 fail.
I also ran bun run check:tools; it fails only on pre-existing unrelated findings outside this PR (packages/tui/test/viewport-virtualization-redteam.test.ts, packages/coding-agent/src/gjc-runtime/ultragoal-runtime.ts). GitHub Dev CI is skipped, so I did not count it as green.
No blocking regressions found in the PR diff.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]
|
Closing this external PR for now because the review verdict is If you want to continue this, please reopen or send a follow-up PR that:
— |
What
skill-active-state.jsonwhen reading visible skill state.phaseor legacy/run-stylecurrent_phase.revisionwrite cannot visually reopen afinalrun.gjc ralplan doctordelegation togjc state doctor --skill ralplan.Why
Fixes #770.
Follow-up to #638 / #639. That fix made canonical RALPLAN run-state phase coherent and terminal-locked; this closes a remaining display reconciliation path where derived active-state cache could still show
ralplan:revisionafter canonical state reachedfinal.Testing
bun test test/skill-active-state.test.ts test/gjc-runtime/ralplan-runtime.test.ts test/gjc-runtime/state-doctor.test.tsfrompackages/coding-agent→ 68 pass, 0 fail, 299 expect() calls.bun run checkfrompackages/coding-agent→ completed; existing Biome warnings remain insrc/gjc-runtime/ultragoal-runtime.ts.git diff --cached --check→ pass.Notes:
bun run checkwas attempted from a cleandevworktree but is blocked by pre-existing baseline issues outside this PR: out-of-dateschemas/config.schema.jsonplus existing warnings unrelated to this diff.bun checkpasses