phase-done claims all-or-nothing over two independent writes #140
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#140
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 F8
Verdict: AGREE - low
Claim as reviewed
cmdPhaseDonevalidates both edits and comments "all-or-nothing", then performs separate atomic renames for ROADMAP.md and REQUIREMENTS.md. An atomic rename protects one file from torn bytes; it cannot create a transaction across files.At HEAD
f354864(v3.3.0)cadence-core/bin/planning.mjs:572-575:If the second write throws, the roadmap marks the phase complete while its traceability rows stay Pending.
Note
Low consequence:
/cad-auditreports the divergence and a re-run repairs it. The defect is the claim, not the damage.Minimum fix: drop the all-or-nothing wording. Better fix: fold into the shared journal proposal.
Shipped in v3.5.8 as JRN-02, merged via #229.
cmdPhaseDonenow runs its whole write set through therunTransitionprimitive: every edit is validated before the firstatomicWrite, and the envelope carries awrotefield naming which of ROADMAP.md and REQUIREMENTS.md actually moved. The "all-or-nothing" comment is gone rather than qualified -sed -n '/^function cmdPhaseDone/,/^}/p' cadence-core/bin/planning.mjs | grep -c "all-or-nothing"prints 0.REQUIREMENTS.md is read as a three-state fact: absent keeps the roadmap-only write, present-but-unreadable refuses before ROADMAP.md is touched. A test drives a directory at REQUIREMENTS.md and asserts ROADMAP.md's sha256 is byte-identical across the run.
Known gap: the
partial-fliparm - the envelope for a write that fails past the pre-flight - is probe-proven only and ships with no committed regression test.