review-state update cannot write phase or step, so wf-implement's fast-path resume never fires #487
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#487
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
wf-implementStep 1 ("Fast Path Resume") resumes fromstate.phaseandstate.step. Neitherfield can be written by
iw review-state update, so no workflow run ever produces a state thatStep 1 accepts, and every resume falls through to the slow path.
Observed
The
updateflag list carries no--phaseand no--step:Confirmed end to end on MEDECA-447 (
CMI/mdr/medeca-modul-poptavky). After a full waterfall phase— context, tasks, implementation, review, PR —
review-state.jsonheld:Step 1's sanity check ("phase file existence matches
state.step", "first unchecked phase intasks.md matches
state.phase") cannot pass againstnull, so the run fell back to Step 2auto-detection: re-read the branch, re-query the forge for the phase MR, re-run
phase-advance.Effect
Resume is correct but never fast. Step 1 is dead code in practice: it is written, documented and
executed, and its only reachable outcome is the fallback. Two consequences:
would be caught (if at all) by Step 2's looser reasoning instead.
Expected
Either
review-state updategains--phase/--stepand thewf-*command blocks set them ateach transition, or Step 1 stops reading fields nothing writes and resumes from what the state
actually carries (
statusplusphase_checkpoints). The current arrangement documents a fast paththat cannot fire.
Distinct from #436, which lists five review-state flag/update defects but not this one.
Found during MEDECA-447 (medeca-modul-poptavky); recorded in that issue's
LESSONS.mdand promotedat triage.
The CLI half landed in PR #501 (merge
d1eba9c4):review-state updategains--phase,--stepand--branch, plus--clear-*for each. Values are stored verbatim as JSON strings, so--phase 3writes"3". The schema accepts integer-or-string forphaseso older numeric cards still validate.Note the scope was widened beyond this issue on purpose:
--branchwas added as well, becausewf-implementStep 1 sanity-checksstate.branch(wf-implement.md:69) alongsidestate.step(:71) andstate.phase(:72). Restoring only two of the three would have left the fast path falling through anyway.Deliberately left open. Nothing yet writes these fields. The
wf-*command blocks live in the kanon plugin, outside this repo, and must set them at each transition before Step 1 can ever fire. Until then this issue is exactly half fixed: the card can record the position, but nothing asks it to. Guidance has been sent to the kanon session.Intake: fixed by
d1eba9c4Both halves of the fix are on main:
d1eba9c4(PR #501):review-state updategains--phase,--stepand--branch, with--clear-*flags (core/commands/ReviewState.scala:305-318,:513-526).origin/main: thewf-*blocks now write--phase,--stepand--branchat each transition (for exampleblueprints/snippets/review_state_tasks_ready.md:8-10,review_state_context_ready.md,review_state_phase_tasks_ready.md,implementation-workflow-pipeline.md,skills/wf-implementation-workflow/SKILL.md).commands/wf-implement.mdStep 1 comparesstate.phaseas text, which matches the string values the CLI writes.The half that the 2026-09-02 comment left open has landed, so nothing in this repository is still open. Reopen if a resume still falls through to Step 2.