Skip to content

Type-check send receipt cases in the static egress suite - #6763

Open
freeqaz-openai wants to merge 3 commits into
mainfrom
codex/static-egress-receipt-tests-ts
Open

freeqaz-openai wants to merge 3 commits into
mainfrom
codex/static-egress-receipt-tests-ts

Conversation

@freeqaz-openai

Copy link
Copy Markdown
Collaborator

Move six send receipt test bodies into TypeScript so the strict test project checks the receipt fields, transaction faults, and assertions together. static-egress.test.mjs still registers each case in its original position.

The capacity test now pauses operations on the in-memory receipt store and checks that a cancelled or denied exchange holds its slot until the pending work settles. The persistence cases distinguish a write failure from a lost acknowledgment after commit. They check replay refusal after restart and when a provider rejection fences the affected credential version.

Verification

  • On bd4d02d7, pnpm typecheck, pnpm lint, pnpm format:check, and pnpm check:workspace passed.
  • On the candidate combined with main at 39f03946, the strict build and focused checks-baseline-1 run passed. All 76 cases in tests/integration/static-egress.test.mjs passed in their original order, with zero skips and successful cleanup.
  • On both the base and the candidate, deliberately allowing a Secret read at the exact deadline failed the refusal check. Releasing capacity early failed the saturation check in all five phases.

The focused run uses an in-process authority, in-memory transactions, and a synthetic provider on loopback. Its persistence checks cover the in-memory adapter.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves six static-egress receipt cases into TypeScript and replaces capacity-test receipt stubs with the real in-memory receipt store.

Example: An exchange is cancelled while receipt authorization is paused.

  • Before: The capacity case checks slot retention using handwritten receipt responses.
  • After: The case pauses the real in-memory receipt implementation and checks that capacity returns only after pending work settles.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused test maintenance with no concrete defect found; confidence rests on source review, reported focused runs, and passing CI rather than independently executed validation.
Proof confidence 🦐 gold shrimp (3/6) Test-only changes require no shipped-entry-point demonstration; reported focused runs exercise the in-process authority, synthetic loopback provider, and real in-memory transactions, with no PostgreSQL or deployment claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: Strict checking adds maintenance value for consequential receipt assertions, and the maintainer-authored direction follows the existing suite migration pattern.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides useful test type coverage, and no actionable defect was found in the introduced changes.

Priority: P3
Reviewed head: bd4d02d7ea8c587bbbea586a2e7ac326d54bf484

Before merge

None.

Findings

None.

Agent review details

How this fits together

The static-egress suite exercises OCC credential resolution, send authorization, and response receipts through in-process authorities and synthetic loopback providers.

flowchart LR
  A[JavaScript test registration] --> B[Typed receipt cases]
  B --> C[Credential Proxy]
  C --> D[Send receipt owner]
  D --> E[In-memory platform state]
  B --> F[Synthetic loopback provider]
Loading

Technical review

Best possible solution:

Retain the typed cases and real in-memory receipt operations, then land through the normal workflow when the author considers the draft ready.

Do we have a high-confidence way to reproduce the issue?

This test-only PR reports no runtime bug requiring reproduction; source inspection confirms that current main still contains the untyped receipt bodies.

Is this the best way to solve the issue?

The extraction preserves registration order and scenario assertions while making receipt fields and fault injection typechecked through the existing test project.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b21aafafd0a2.

Provenance checked

  • Receipt case extraction and transaction fault injection keeps the original intent (8c77641: Share receipt staging while keeping fresh inputs and scenario-specific assertions visible; preserve actual memory-adapter transactions and distinguish their scope from PostgreSQL proof.)
  • Capacity retention during pending receipt operations keeps the original intent (3115679: Keep cancelled, denied, and expired exchanges charged until outstanding receipt work settles.)
  • Authorization persistence and lost acknowledgments keeps the original intent (c98be20: Order authorization with withdrawal and refuse permits after uncertain commits without replacing the original receipt.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit a6daf7b adds tests/integration/static-egress-request-capacity-cases.ts:851 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a6daf7b29758; files: tests/integration/static-egress-request-capacity-cases.ts)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change scope Production +0/-0; tests +695/-524 The net 171 test lines support explicit typing, evidence-shape checks, and typed transaction fault injection without adding production machinery.

Labels

Label changes:

  • add P3: This is test-maintenance work with no changed user-facing runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is test-maintenance work with no changed user-facing runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 20, 2026, 10:32 AM ET / 15:32 UTC.

@freeqaz-openai
freeqaz-openai marked this pull request as ready for review November 20, 2026 15:46
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 20, 2026 15:46

This branch has not been deployed

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

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant