review-state write cannot record phase, step or branch, so the fast path stays dead at analysis_ready #505

Closed
opened 2026-09-02 22:13:37 +00:00 by mph · 0 comments
Owner

#487 added --phase, --step and --branch to review-state update only. That was a deliberate call at the time — update was where the reported gap was, and update-only was the smaller change.

Evidence since says it is not enough.

What is missing

Every analysis_ready transition in the kanon plugin uses write, not update:

  • commands/wf-create-analysis.md:180
  • commands/ag-create-analysis.md:190
  • commands/dx-analyze.md:187
  • commands/sl-define.md:230

write cannot record the three fields, so a card created at analysis_ready carries phase: null, step: null, branch: null. wf-implement Step 1 sanity-checks all three, so the fast path still cannot pass at that transition. It now works from context_ready onward, where update is used — so the fix is partial in exactly one place, and it is the first transition of every workflow.

What to do

Add --phase, --step and --branch to review-state write, with the same semantics update has.

ReviewStateUpdater.scala:148 stores the value verbatim as ujson.Str, so --phase 3 writes "3" and not 3. wf-implement Step 1 compares state.phase against the first unchecked phase parsed out of tasks.md. If that comparison is numeric on either side, the fast path stays dead for a second, independent reason after both halves ship. Either the comparison is defined as string equality and documented as such, or the CLI needs a typed phase.

Origin

Found by the kanon session while aligning the plugin to iw-cli 0.11.0, by compiling the consumer against a core jar built from this tree. Recorded in that alignment work; not caused by it.

#487 added `--phase`, `--step` and `--branch` to `review-state update` only. That was a deliberate call at the time — `update` was where the reported gap was, and update-only was the smaller change. Evidence since says it is not enough. ## What is missing Every `analysis_ready` transition in the kanon plugin uses `write`, not `update`: - `commands/wf-create-analysis.md:180` - `commands/ag-create-analysis.md:190` - `commands/dx-analyze.md:187` - `commands/sl-define.md:230` `write` cannot record the three fields, so a card created at `analysis_ready` carries `phase: null`, `step: null`, `branch: null`. `wf-implement` Step 1 sanity-checks all three, so the fast path still cannot pass at that transition. It now works from `context_ready` onward, where `update` is used — so the fix is partial in exactly one place, and it is the first transition of every workflow. ## What to do Add `--phase`, `--step` and `--branch` to `review-state write`, with the same semantics `update` has. ## Related, and worth deciding together `ReviewStateUpdater.scala:148` stores the value verbatim as `ujson.Str`, so `--phase 3` writes `"3"` and not `3`. `wf-implement` Step 1 compares `state.phase` against the first unchecked phase parsed out of `tasks.md`. If that comparison is numeric on either side, the fast path stays dead for a second, independent reason after both halves ship. Either the comparison is defined as string equality and documented as such, or the CLI needs a typed phase. ## Origin Found by the kanon session while aligning the plugin to iw-cli 0.11.0, by compiling the consumer against a core jar built from this tree. Recorded in that alignment work; not caused by it.
mph closed this issue 2026-09-03 05:55:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#505
No description provided.