BOHICA-LABS / BOHICA-LABS/vsdd-factory
process-gap(state-manager): post-merge STORY-INDEX status field not flipped to 'completed'
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 29
Description
## Class of failure
After a story PR merges, the state-manager updates `STATE.md` with the merge SHA + decisions-log entry, but does NOT update the story's `status` field in `STORY-INDEX.md` from `in-progress`/`draft` to `completed`.
A resume orchestrator reading STORY-INDEX as the canonical lookup sees stale status and may propose dispatching a story that's already merged, or get confused about which stories are dispatchable.
## Pattern observed
In an external pilot project, 4 of 11 merged stories carried stale STORY-INDEX status until the orchestrator manually flipped them via state-manager:
| Story | STORY-INDEX status | Actual state | Cycle |
|---|---|---|---|
| STORY-A.AA.XXX (HUD) | `draft` | MERGED (squash sha redacted) | Prior cycle |
| STORY-B.BB.YYY (char-switch cue) | `draft` | MERGED | Prior cycle |
| STORY-A.AA.ZZZ (traversal) | `in-progress` | MERGED | Current cycle |
| STORY-B.BB.WWW (physics state transfer) | `in-progress` | MERGED | Current cycle |
The earlier-pipeline state-manager dispatches DID flip status correctly for stories 1-7 (which all show `completed` in STORY-INDEX). The post-Phase-2 state-manager dispatches stopped doing this — pattern is in the post-merge state-manager template, not in the underlying agent.
## Root cause
Per-story-delivery's post-merge step (step 9 — "post-merge cleanup") doesn't include an explicit substep to flip STORY-INDEX status. The state-manager dispatch language at this step lists STATE.md updates but not STORY-INDEX entry update.
## Proposed remediation
Add explicit substep to `workflows/code-delivery.lobster` (or wherever per-story-delivery encodes the 9-step PR process):
```
Step 9.5: state-manager — flip STORY-INDEX entry for the merged story from
'in-progress'/'draft' → 'completed'; bump STORY-INDEX frontmatter version;
add changelog row citing the PR # and merge SHA. Commit + push.
```
Optionally enforce via consistency-validator: post-merge consistency check that asserts STORY-INDEX status field matches the latest Decisions-Log entry for that story (if D-NNN says "merged via PR #X", index must say `completed`).
## Labels
- `process-gap`
- `state-manager`
- `per-story-delivery`
- `post-merge`
Contributor guide
Assessment
This issue has not been assessed yet.