Repository navigation
feat(id-store): durable file outbox journal for admission (#17179 slice 3) - #17246
Merged
Merged
Conversation
…ce 3) FileOutboxJournal: append-only log of pending-delivery snapshots and clear tombstones, fsynced per mutation, folded last-wins per (event ID, hook ID) — at-least-once delivery survives restart, retries update the same record (dedupe on replay), clears never resurrect. Fail-closed on a corrupt record, mirroring the ledger adapter (slice 2). Completes the #17179 adapter set (policy-epoch slice 1, ledger slice 2).
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
What
Slice 3 of #17179 — the durable outbox adapter, completing the issue's adapter set (slice 1 policy-epoch: PR #17187; slice 2 ledger: PR #17207).
FileOutboxJournalinpkgs/id/crates/id-store/src/admission.rs: a durableOutboxJournalbacked by one append-only log file (adm-outbox-v1), the production counterpart ofMemoryOutboxJournal, mirroringFileOperationLedger's pattern:record_pendingappends a full pending-delivery snapshot (stable event ID, hook ID, operation/envelope/receipt fields, annotations, attempts, last error — hex-encoded fields, one line per record) and fsyncs before returning.clearappends a tombstone;pending()folds the log in order, last-record-wins per (event ID, hook ID), tombstones remove — so at-least-once delivery survives a restart, a retry's updated snapshot replaces rather than duplicates (dedupe on replay by the same stable ID), and a cleared delivery never resurrects.outbox_fail_closed), for the same reason as the ledger adapter: the trait has no error channel and guessing at delivery state either loses a committed side-effect or duplicates one.Verification (remote dispatch, GitHub-hosted)
cargo test --test admission_outbox --test admission_ledger --test admission_hooks— admission_hooks 7 passed, admission_ledger 3 passed, admission_outbox 4 passed (restart-retry-clear, retry dedupe/attempt accumulation, stable fold + selective clear, corrupt-record halt), 0 failed, exit 0.cargo clippy -p id-store --all-targets— exit 0.(Two earlier dispatches, 46449727947/46451615090, died pre-test on a runner rustup-cache permission error under the runuser form — infra only, no code signal; the plain form above is the evidence run.)
Closes #17179
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-30T15:53:20Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "1afb80aa405c56b71c8a63176670cb22ba449a92" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.