milestone-prune returns ok:true after a directory operation fails #128
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#128
Loading…
Add table
Add a link
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?
Source: deep dive F5; strict re-review C-03 (independent convergence)
Verdict: AGREE - high
Claim as reviewed
Milestone pruning deletes or moves phase directories before writing the updated roadmap and requirements. Failed directory operations become warnings, but the documents are still pruned for every completed phase, and the envelope still reports
ok:true, action:"pruned".At HEAD
f354864(v3.3.0)cadence-core/bin/planning.mjs:3579-3609. The per-phase directory op sits in atry/catchwhosecatchpushes a string intowarningsand lets the loop continue.atomicWrite(roadmapFile, pruned.text)then runs unconditionally, followed byok({action:'pruned', ...}).The comment at
:3579-3580- "Directories third, writes last: a rename that throws leaves both docs untouched on disk rather than half a close" - is contradicted by the code: the throw never escapes the loop, so the writes always land.cadence-core/workflows/milestone.md:103says "Relaywarnings[]" and enumerates only the two benign classes (a missing detail section, an unreadable REQUIREMENTS.md). It does not halt, so the close proceeds to commit a roadmap that disagrees with the tree.cadence-core/bin/milestone-prune.test.mjshas no forced directory-failure case; its only warning test is the missing-REQUIREMENTS one at:279.Note
Blast radius is bounded: with
planning.commit_docsat its defaulttruethe phase dirs are in git history, so--mode deleteloses no work. The damage is a ROADMAP/REQUIREMENTS pair that disagrees with.planning/phases/at the moment a milestone closes.Fix shape: stage both document outputs, apply directory operations first, write documents only for phases whose directory op succeeded, and return
ok:falseon partial application. See the journal proposal issue.