Repository navigation
[M1.3c] Resume or compensate interrupted operations - #39
Merged
Merged
Conversation
samuelmbabhazi
force-pushed
the
feat/m1.3b-local-state
branch
from
November 5, 2026 13:27
33460fe to
2cf6bbd
Compare
samuelmbabhazi
force-pushed
the
feat/m1.3c-operation-recovery
branch
from
November 5, 2026 13:29
ab5aeec to
8f09d5f
Compare
Collaborator
Author
|
Rebased onto the updated #38; additive THREAT_MODEL conflict kept from both sides. Review follow-ups added as commit 8f09d5f:
Each has a regression test, checked to fail without the fix. SPEC 3.4 updated. |
samuelmbabhazi
force-pushed
the
feat/m1.3b-local-state
branch
from
November 5, 2026 14:01
2cf6bbd to
06f4e34
Compare
samuelmbabhazi
force-pushed
the
feat/m1.3c-operation-recovery
branch
from
November 5, 2026 14:20
8f09d5f to
5ec511d
Compare
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes M1.3 with the resumable/compensating executor and daemon-owned SQLite lifecycle. Depends on #38 and targets its branch.
The executor records each step before its side effect and checkpoints completion afterwards. After an uncertain interruption it retries explicitly retry-safe steps; otherwise it compensates the uncertain step and completed predecessors in reverse order. Compensations must be idempotent and are checkpointed themselves. Idempotency binds the payload to a versioned plan and its ordered recovery policy, and concurrent execution is serialized. Committed transitions are delivered through an ActionUpdate callback; delivery failures pause further effects and retry republishes the latest durable state.
The daemon acquires the journal's exclusive process lock at startup and closes SQLite during shutdown. It reports unfinished operations for later registered handlers; this foundation introduces no Docker/Caddy action or stream dispatcher. Those remain their own planned milestones.
Validation: crash injection after every one of three steps for both recovery policies; interruption during compensation; concurrent duplicate execution; cached outcomes; changed-plan rejection; notification failure; cancellation preserving intent; real SQLite reopen. Go race suite and golangci-lint pass. The startup test now waits for actual readiness instead of a fixed sleep, covering the new SQLite initialization. TypeScript/protobuf checks and the binary-size budget pass.
No merge requested. This independent M1.3 stack is based on main; the separate M1.2c daemon changes will need their ordinary review-time integration.