Commit eb39b71
committed
feat(delivery): durable delivery ledger, newest-format only
Replace the two per-driver single-binding `delivery-state.json` guards
(`CodexDeliveryState` in `src/codex_app_server.rs`, `DeliveryState` in
`src/opencode_session.rs`) with one canonical module, `src/delivery_ledger.rs`,
holding `st2.delivery-ledger.v1` at `<state-dir>/delivery-ledger.json`.
The ledger owns persistence, phase grading, retry authority, binding
isolation, validation, quarantine, and durable replacement. Codex and
OpenCode only translate their provider observations into `Evidence`.
Kept from the design: `Profile::proves`, the monotone phase lattice
(attempted < transportAccepted < persisted < consumed), typed `Evidence`,
per-filename entries, quarantine, and archive reconciliation via `prune`.
Dropped deliberately: every predecessor reader, rollback floor, adoption
path, and dead configuration axis. Writers emit the newest format only.
Load validation is stricter than the reviewed draft: every entry must
rederive its own correlation from its own binding and filename, so an
injected entry that merely shares another entry's correlation value can no
longer wedge a transport. The atomic write also keeps the `0600`
`create_new` hardening the Codex record had, under a temp name unique per
process and per write.
agent-identity: dev3.direct.omp.43sz6ujq
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.1.7
agent-runtime: OMP 18.1.7
tooling-profile: dotfiles@39a19af1 parent 2c6f67b commit eb39b71
5 files changed
Lines changed: 1098 additions & 585 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments