I3237 — A derive publishes its whole output set at once after validating it, and a killed derive leaves the previous set
Compute every node into staging, validate the affected set as a whole, then publish. Detect inputs that changed during the run and refuse or retry. A run that dies mid-way leaves the tree as it was.
BLOCKED wave 2 · p1 · deep-work profile · parallel safe
Blocked. This issue cannot start until I2522, I2521, milestone:a-derive-answers-within-a-second are done. The status is derived from that, not declared.
Objective
Compute every node into staging, validate the affected set as a whole, then publish. Detect inputs that changed during the run and refuse or retry. A run that dies mid-way leaves the tree as it was.
Why
c208#4 and c292#2 ask for atomic publication. Today each file is atomic but the set is not, so a derive stopped during stage B leaves A's new outputs beside B's old ones. Sources: chatgpt-majordomus:c208#4, chatgpt-majordomus:c292#2.
Current state
generate::write stages each file as a temporary sibling and renames it; stages A-D publish separately.
Desired state
One publish step per derive, with a recovery path where a multi-file atomic replace is unavailable.
Scope
- apps/majordomus-cli/src/generate.rs
- scripts/derive
- apps/majordomus-cli/src/commands/generate.rs
- scripts/derive-check
- scripts/generate-site-data
- test/cases/400_derivation_is_one_graph.sh
Out of scope
- Changing what the derive lock serialises
Dependencies
- I2522BLOCKED The derivation is a typed graph in the crate: every producer is a node with declared inputs and outputs, answered by one capability
- I2521READY What a derive costs is measured per stage and per kind of change, and every file a stage reads is listed
Acceptance criteria
- A derive killed at each stage leaves a tree derive-check judges as before the run
- An input changed during the run is refused by name
- Published bytes equal today's full derive
Validation
- scripts/derive-check
- bash test/run.sh 400_derivation_is_one_graph
Evidence required
- killed_derive_leaves_prior_set_case
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I3237.yaml. Read it back with majordomus plan show I3237.