engine-adapters: store-runtime-ledgers — the runtime ledgers become state-directory documents #165
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#165
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?
Parent
Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.
What to build
Every runtime Load/Save ledger port gets its durable backing (ADR 0103 §1):
jsonstore.Filedocuments in the control plane's state directory — the member, invite, reset-link and enrollment-code ledgers plus monitoring's expected-pattern tunings. Whole-document single-writer discipline, Check-refused corruption, restart survival. Deliberately lost-in-rebuild (ADR 0078 §3); no live token ever reaches the repo replica.Acceptance criteria
Blocked by
Task manifest
Done in
8126d60(onorigin/main).ADR 0103 §1's mechanics — every runtime Load/Save ledger port now has a
jsonstore.Filedurable variant beside its seam-testjsonstore.Memory, delivered as durable types with contracts unchanged (no schema-version fields — a corrupt document is refused via the JSON-parse failurejsonstore.decodealready gives):member.NewFileLedger/NewFileInviteLedger/NewFileResetLedger(internal/member/{ledger,invite,reset}.go).internal/enroll/store.go—Memory/FileStoreoverenroll.StateplusPersist(l, store)andOpenLedger(cfg, store)wrapping the existingExport/NewLedgerFromState(ADR 0043) handover.internal/monitor/patternstore.go—Memory/FilePatternStoreover aPatternDoc, plusSnapshotPatterns/ResumePatternson the orchestrator (mirroring the alert set'sStandingAlerts/Resume).Acceptance criteria — proven at each owning package's seam re-run over
jsonstore.File(member/filestore_test.go,enroll/store_test.go,monitor/patternstore_test.go) and by a cross-ledger restart-survival integration test (control-plane/cmd/control-plane/ledgers_restart_integration_test.go):Scope note (agent-decided, spec #161): this slice ships the durable types + seam/integration proof.
main.gois deliberately untouched — the composition-root wiring of the state directory (systemdStateDirectory) rides the compose slices (#155 members, #181 aggregation root), and enroll/monitor's save-trigger their transport slices. The member composition is still honest-resting (fail-loudSave) until #155; the config-repo half of ADR 0103 (§2) is #166/#102's.go build,go vet,golangci-lintand the full test suite are clean.