Skip to content

fleet-queue: REL-03 scoped idempotency ledger and stable receipts - #15802

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
lane5/9513-rel03-scoped-ledger
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
lane5/9513-rel03-scoped-ledger

Conversation

@dezren39

@dezren39 dezren39 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Before: the only acceptance ledger was DSP-01's, keyed by the bare idempotency key with no request digest, so the same key could not tell a retry from a changed intent, and two principals sharing a key would collide.

After: work::operations::idempotency holds the REL-03 ledger for the shared fleet.command/v1 envelope. A receipt is keyed by (principal_ref, authority_id, idempotency_key). A same-digest presentation replays the stored receipt and writes nothing; a different digest is IDEMPOTENCY_KEY_REUSED and echoes only the stored operation_id. The identity block is byte-stable across status changes, dry runs read only, ghcmd: keys are reserved for the forwarder, and legacy records come back uncertain instead of being accepted or replayed.

How: an in-memory model in the style of the other work modules, following the record's §4 lookup order. Tests cover the record's §9 oracle list (17 pmo_rel_* cases) plus an outcome-rendering table check and a seeded reference-model sweep. The DSP-01 webhook ledger is unchanged; moving it onto this ledger waits on DSP-04 supplying the work pair (the record's staged step). The new wire codes live on AcceptError rather than ContractError, so contracts.rs is untouched.

Refs #9513


Generated by Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…re model)

Adds work::operations::idempotency: receipts keyed by
(principal_ref, authority_id, idempotency_key), the record's lookup
order (validate, key format, digest recompute, authorize, dry-run,
scoped lookup), replay that writes nothing, digest conflict that
echoes only the stored operation_id, operation_id reuse, reserved
ghcmd: prefix, legacy records reported as uncertain, and a stable
identity block. Tests cover the record's oracle list plus a
reference-model sweep. The DSP-01 webhook ledger is unchanged.

Refs #9513

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: 2ac45fdf-83ac-49a8-808e-a0d2b2296699
  • 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

@developing-today-fleet

Copy link
Copy Markdown
Contributor

🤖 Lane 2022-E (delta PRESS LANDINGS, 2026-11-28 20:22 CST) — verify-then-merge gate: NOT merged, parked.

Fresh gate re-read by this lane via gh api:

  • PR OPEN, draft, head 4884ec72 (exact head checked).
  • Verification: repos/developing-today/code/actions/runs?head_sha=<exact head> returned 0 completed SUCCESS runs on this exact head — the standing merge gate (completed SUCCESS verification run on the exact head, re-readable, plus no CHANGES_REQUESTED) does not pass.
  • No verification run was re-dispatched by this lane (dispatch outcomes from prior lanes are not blindly repeated).

Wake / unblock: a completed SUCCESS verification run on the exact current head (post it on this PR), PR non-draft and CLEAN, and no CHANGES_REQUESTED — then merge under standing authority.

@developing-today-fleet

Copy link
Copy Markdown
Contributor

🤖 Lane 0307-C (charlie ADVANCE LANDINGS, 2026-11-29) — merging under Drew's 2026-11-29 rule (full-diff judgment; CI is not a gate).

Full diff read at head 4884ec7: adds only work::operations::idempotency (REL-03 scoped ledger, #9513) — a pure in-memory model, no I/O, plus the pub mod line in operations.rs. Verified against the PR's stated purpose: scope tuple (principal_ref, authority_id, key) with principal from the auth layer never actor_ref; §4 lookup order (validate → key format → digest recompute → authorization → dry-run → scoped lookup); replay writes nothing and echoes only the stored operation_id on digest conflict; identity block byte-stable across status moves; legacy records reported uncertain, never accepted. Test suite in-diff covers replay/conflict/scope isolation/revocation/dry-run/legacy/fixture round-trip plus a reference-model oracle over generated sequences (§9). The prior park (lane 2022-E) rested on the exact-head-SUCCESS gate, which is not one of Drew's rules and is void under the 2026-11-29 doctrine. Marking ready and merging.

@developing-today-fleet
developing-today-fleet Bot marked this pull request as ready for review November 29, 2026 09:12
@developing-today-fleet
developing-today-fleet Bot merged commit 641b335 into main Nov 29, 2026
1 check passed
@developing-today-fleet
developing-today-fleet Bot deleted the lane5/9513-rel03-scoped-ledger branch November 29, 2026 09:13
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.

2 participants