Review-state cards of finished issues are never removed #706
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#706
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?
Filed from IW-702 follow-ups. Once the card lives in the git dir (IW-702), cards of finished issues stay behind in two places:
main(84 in iw-cli). — evidence:git ls-files 'project-management/issues/*/review-state.json'lists them (73 on the IW-702 branch on 2026-10-04)iw rmremoves their worktree. — evidence:iw rmleaves the out-of-tree card behindIntake: needs-input
1. Is item 1 a one-time cleanup commit in iw-cli, or a command that any repository can run?
74
review-state.jsonfiles are still tracked onmain(git ls-filestoday). After IW-702, nothing reads them: the dashboard reads only the card in the git dir. IW-702's analysis called a bulk tool "new scope" and said the cleanup is a one-line command that a human can run. It also says other repositories have the same problem. Git history keeps the files after either option.Recommended: a) — nothing breaks without a tool, and a) changes the least.
2. When must
iw rmdelete the card in the git dir, if ever?IW-702 made the card survive
iw rmon purpose.iw rmkeeps the branch, andiw starton that branch then resumes with the card's PR link, phase checkpoints and workflow type. Ifiw rmalways deletes the card, a resume afterrmloses that state.iw rm. This is simple, but a resume afterrmloses its state.all_complete). A resume of unfinished work still has its state.iw rmflag. Nothing is deleted unless the human asks.Recommended: b) — it removes the cards of finished issues and keeps the resume behaviour that IW-702 chose.
Answer in a comment on this issue, per number, for example "1: a", or in your own words; intake reads it on its next iteration.
1: a, 2:b
Intake: needs-input
Workflow: waterfall
Reason: G7 (1 [human] finding), and one fact the earlier answer to question 2 rested on
Analysis: project-management/issues/IW-706/analysis.md on branch IW-706
1. Should the cleanup commit also delete the 11 effort slice cards, or only the 74 issue cards? (G7)
You chose option a: one cleanup commit that "removes the 74 files", meaning the issue cards. The analysis adds 11 more files to that commit. They are the slice cards of the effort
dashboard-control-plane, underproject-management/efforts/dashboard-control-plane/slices/*/review-state.json, so the commit deletes 85 files. No reader uses these 11 cards, and all 11 slice trackers saystatus: closed. But you did not approve them. See analysis.md L78.FOLLOW-UPS.mdrecords them. This does exactly what you approved, but it needs a second cleanup later.Recommended: a): the slice cards are dead for the same reason as the issue cards, and keeping them saves nothing.
2. Should
iw rmdelete a card marked "finished" while its final pull request is still open? (G7)You chose this rule:
iw rmdeletes the card only when its status isall_complete. But kanon (at commit a0ffcfc) setsall_completewhen the final PR is created, not when it is merged. If you runiw rmbefore the merge, the card is deleted, and with it the PR link and the phase checkpoints. The review-state schema has no status that means "final PR merged". Todayiw rmdoes not ask the forge about PRs.rmbefore the merge, the card is lost andiw starton that branch starts with no saved state.iw rmasks the forge for the state of the card'spr_url. If it cannot tell, it keeps the card. This adds a forge call and a test fake torm.rmdeletes nothing.Recommended: b): it closes the gap and keeps the "if unsure, keep the card" rule, and it needs no change to kanon.
Answer in a comment on this issue, per number, for example "1: a", or in your own words; intake reads it on its next iteration.
iw finishcommand: merge final PR and remove worktree #249