Journaled transaction: stage-then-switch install with rollback and resume-on-boot #285

Closed
opened 2026-10-27 13:35:42 +00:00 by sam · 0 comments
Owner

Design: docs/prds/self-update-transaction.md#journaled-transaction-804-item-3. Replaces archie-update-install's copy-and-trap body (confirmed self-refresh trap at lines 195-199: new adapter copies land on disk but bash keeps executing the in-memory copy). Adds: intent journal outside replaced paths, atomic stage-then-rename per binary, health verification against the candidate (reusing the health registry, not a new check), bounded post-promotion observation window, transaction-wide rollback (binaries + units + config), single-writer flock, and daemon-boot resume-on-boot when a journal is found uncommitted.

Acceptance criteria

Stage-then-rename and rollback logic covered by fixture-based tests in task check. A simulated crash mid-transaction resumes and completes rollback on next daemon boot. Two concurrent update attempts: the second refuses immediately, naming the lock holder.

Notes

Suggested council lenses: lens-operator (crash-mid-update is the core failure mode), lens-maintainer (journal must be readable during an incident).

Close reason

Closed


Imported from beads archie-core-hj1t.3 · GitHub #932 · type task · priority P2 · created 2026-09-19 · closed 2026-10-05

Design: docs/prds/self-update-transaction.md#journaled-transaction-804-item-3. Replaces archie-update-install's copy-and-trap body (confirmed self-refresh trap at lines 195-199: new adapter copies land on disk but bash keeps executing the in-memory copy). Adds: intent journal outside replaced paths, atomic stage-then-rename per binary, health verification against the candidate (reusing the health registry, not a new check), bounded post-promotion observation window, transaction-wide rollback (binaries + units + config), single-writer flock, and daemon-boot resume-on-boot when a journal is found uncommitted. ### Acceptance criteria Stage-then-rename and rollback logic covered by fixture-based tests in task check. A simulated crash mid-transaction resumes and completes rollback on next daemon boot. Two concurrent update attempts: the second refuses immediately, naming the lock holder. ### Notes Suggested council lenses: lens-operator (crash-mid-update is the core failure mode), lens-maintainer (journal must be readable during an incident). ### Close reason Closed --- _Imported from beads `archie-core-hj1t.3` · GitHub #932 · type task · priority P2 · created 2026-09-19 · closed 2026-10-05_
sam added the mediumepictask labels 2026-10-27 13:35:42 +00:00
sam self-assigned this 2026-10-27 13:35:42 +00:00
sam closed this issue 2026-10-27 13:35:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#285