Skip to content

feat(id-store): durable file outbox journal for admission (#17179 slice 3) - #17246

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/0900ag-17179-outbox
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/0900ag-17179-outbox

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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).

FileOutboxJournal in pkgs/id/crates/id-store/src/admission.rs: a durable OutboxJournal backed by one append-only log file (adm-outbox-v1), the production counterpart of MemoryOutboxJournal, mirroring FileOperationLedger's pattern:

  • record_pending appends 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.
  • clear appends 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.
  • Fail-closed on an unreadable/corrupt record via a documented halt (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.
  • No trait or gate-ordering change; the two stale "follow-on slice" doc mentions on slices 1/2 updated to name slice 3.

Verification (remote dispatch, GitHub-hosted)

  • Run 46453162295 at head 5a89d69: 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.
  • Run 46454549652: cargo clippy -p id-store --all-targets — exit 0.
  • Full diff read against the issue's acceptance criteria.

(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-bot with what you need.

…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).
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c3af1f70-a3d9-43f2-a90a-1cdea26ab196

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id admission: durable policy-epoch / ledger / outbox adapters (slice of #10192)

1 participant