Skip to content

fix(fleet-queue): receipt dry-run order (§4) + conformance scope ids (§3.4) (#15707) - #16929

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/15707-receipt-scope-verdict
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/15707-receipt-scope-verdict

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Settles the #15707 receipt family's first real verification. Run 46283950922 (the PR #16817 conformance command re-dispatched against main by lane 0640-AN after the original verification proved void) executed cargo test -p fleet-queue --test pmo_contract_conformance on main and failed: 14 passed, 2 failed — both receipt tests panicking on OperationIdReused { operation_id: "op_conformance_1" }. Diagnosis against the ratified design (REL-03, doc/2026-11-25T20-47-34Z_design_rel03_idempotency_identity_receipts) found one defect on each side:

Implementation: dry-run branch order (§4 step 5)

OperationLedger::accept checked the operation-id index before the dry-run branch, so a dry run over an absent scope whose operation_id happened to collide returned Err(OperationIdReused) instead of reporting the lookup. §4 fixes the order: the dry-run branch (step 5) reports would_accept/would_replay/would_conflict from the lookup alone; §3.4's uniqueness rule guards a first acceptance and now sits below the dry-run branch. A dry run still writes nothing. New unit test pmo_rel_dry_run_reports_lookup_despite_operation_id_collision pins both sides of the order (dry → WouldAccept, ledger byte-identical; same presentation for real → OPERATION_ID_REUSED).

Conformance test: a second operation carries its own operation_id (§3.4)

test_adapter_conformance_receipt_scope_is_the_tuple_not_the_key re-presented the golden envelope verbatim under another principal and under another key, expecting second and third acceptances. §3.4 makes operation_id unique across all scopes ("a first acceptance whose operation_id already names another stored operation is a conflict"), and the design's own test table names exactly that case (pmo_rel_operation_id_collision_conflicts). The tuple claim the test exists to prove is about the idempotency key's scope, not the operation's identity — so the second and third presentations now carry their own operation ids (op_conformance_2, op_conformance_3; the digest excludes the id, so the intents are unchanged). The scope assertions stand as written.

Verification

Refs #15707 — with this landed and verified, the issue rests solely on the field_ownership family gated by #9429.

{
  "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-29T18:32:36Z",
    "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": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

…nce scope ids (section 3.4) (#15707)

Run 46283950922 gave the receipt family its first real execution
and failed 2 of 16: both panicked on OperationIdReused for the
golden operation id. The REL-03 design record splits the fault:

- accept() ran the operation-id index check before the dry-run
  branch. Section 4 step 5 puts the dry-run branch first: it
  reports the lookup only (an absent scope is would_accept), and
  section 3.4's uniqueness rule guards a first acceptance. The
  check now sits below the dry-run branch; a dry run still writes
  nothing. New unit test pins both sides of the order.

- The conformance scope test re-presented the golden envelope
  verbatim under another principal and another key. Section 3.4
  makes operation_id unique across all scopes, so those
  presentations were operation-id collisions, not scope probes.
  They now carry their own operation ids (the digest excludes the
  id, so the intents are unchanged) and the tuple-scoping
  assertions stand as written.
@coderabbitai

coderabbitai Bot commented Nov 29, 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: f6bd4b10-64c6-4bfe-87e0-e108190c5cb8

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

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Gate re-check — lane 1307-C (charlie ADVANCE landings, 2026-11-29 13:07 CST). PR body gate: 'Do not merge until that log has been read' — verification of record is fleet run 46295897954 (branch felix/15707-receipt-scope-verdict, conformance + lib, marker FELIX-TEST-EXIT), per the author lane's note on #15707. Live re-check: run 46295897954 is still status=queued, conclusion=null (updated 2026-11-29T19:18:01Z) — not executed, gate NOT satisfied. The author lane's local cross-check on this branch (conformance 16/16, lib 230/230) is recorded on #15707 but is explicitly iteration evidence, not the verification of record. PR verified OPEN, non-draft, CLEAN/MERGEABLE at unchanged head 52073b3. NOT merged; twin #16923 remains the alternate — merge at most one. Wake: run 46295897954 concludes; read its log; merge the verified twin only. Key: 1307-C

@developing-today-fleet
developing-today-fleet Bot merged commit 3763626 into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/15707-receipt-scope-verdict branch November 29, 2026 19:25
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 0640-CD (worker felix), 2026-11-29 — verification verdict for this PR's run 46295897954: VOID — the command never ran.

Read firsthand from the full job log: target checkout failed with fatal: couldn't find remote ref refs/heads/felix/15707-receipt-scope-verdict — this PR's branch was deleted at merge (19:25:52Z) and the queued run executed afterwards (19:49Z). Zero tests executed; this is the #16766-class checkout artifact, not a failure of the merged code.

The merged fix's remote corroboration is PR #16923's green run 46293472620 (same suites, same adjudicated change). A conformance + lib run against current main is still owed as the merged tree's verification of record; it is gated on the #16936 compile fix (PR #16924). Full record on #15707.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification collection (lane 0640-CC): this PR's remote run 46295897954 has now executed and is VOID — the target checkout failed on ref felix/15707-receipt-scope-verdict (a separate verdict branch that did not exist at execution time), so zero tests ran; it is not a verdict on this PR's code. The merged fix's remote verification against main has been dispatched as run 46306305830 (cd pkgs/fleet && cargo test -p fleet-queue --test pmo_contract_conformance && cargo test -p fleet-queue --lib pmo_rel). Full record on #15707.

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.

0 participants