Repository navigation
[M1.3b] Persist versioned local state and confirmation consumption - #38
Merged
Merged
Conversation
4 of 5 tasks
samuelmbabhazi
force-pushed
the
feat/m1.3a-operation-journal
branch
from
November 5, 2026 12:50
1e8d1f9 to
c07c4a0
Compare
samuelmbabhazi
force-pushed
the
feat/m1.3b-local-state
branch
from
November 5, 2026 13:27
33460fe to
2cf6bbd
Compare
Collaborator
Author
|
Rebased onto the current main (after the M2.2/M2.3 stack merged); the only conflict was additive THREAT_MODEL text, kept from both sides. Review follow-up added as commit 2cf6bbd: |
samuelmbabhazi
force-pushed
the
feat/m1.3a-operation-journal
branch
from
November 5, 2026 13:59
c07c4a0 to
ba48cbf
Compare
samuelmbabhazi
changed the base branch from
feat/m1.3a-operation-journal
to
main
November 5, 2026 14:00
samuelmbabhazi
force-pushed
the
feat/m1.3b-local-state
branch
from
November 5, 2026 14:01
2cf6bbd to
06f4e34
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
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. - [x] M1.3 acceptance criteria and recovery framework tests - [x] Durable transition history and callback notifications - [x] No new action, shell execution or raw payload/error persistence - [x] Plan, spec and threat model updated - [ ] CI and maintainer review 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.
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.
Implements M1.3b: durable desired, actual, routing, lease and confirmation state. Depends on #37 and targets its branch.
Typed protobuf snapshots are cloned and recursively stripped of debug_redact fields and unknown fields before bounded, canonical JSON persistence. Secret references keep their name/version while values never enter SQLite. Desired/routing versions and observation timestamps reject rollback or conflicting same-version replacement; lease epochs/expiry cannot regress. Confirmation consumption is atomic and single-use across restarts, after signature/scope verification by the future handler.
Validation: real SQLite migration and restart tests; secret fixtures absent from the database and WAL/sidecars; concurrent confirmation replay; stale/conflicting snapshots; oversized state; Go race tests and golangci-lint. Schema v1 upgrades transactionally to v2 without losing operations. No new external service, shell execution or lease issuance is introduced.
Resume/compensation execution and daemon ownership follow in M1.3c. No merge requested.