Skip to content

M5d: parity-gated off-call quote delivery#6

Merged
owieschon merged 5 commits into
mainfrom
codex/m5d-delivery-worker-v4
Jul 11, 2026
Merged

M5d: parity-gated off-call quote delivery#6
owieschon merged 5 commits into
mainfrom
codex/m5d-delivery-worker-v4

Conversation

@owieschon

Copy link
Copy Markdown
Owner

What changed

  • add the SQLite-backed quote delivery queue and explicit off-call worker
  • render PDF/XLSX, run the document parity guard, and fail closed before delivery
  • add the offline Deliverer protocol and SimulatedDeliverer
  • enqueue on caller assent without rendering on the call path
  • add HMAC-signed quote retrieval URLs that expire with valid_until
  • validate SKU_QUOTE_PUBLIC_BASE_URL and serve /quote/{token} only for valid quotes
  • add a 50-run, 1–6 line issuance latency baseline and M5 build-journal receipt

Why

M5c ended with proven renderers and a document guard but no live caller. This
closes the delivery half of M5d while preserving the talk-first latency boundary:
assent only freezes, numbers, journals, and enqueues; document work occurs later.

The safety differentiator is executable. A planted altered-price document invokes
the real parity guard once, reaches no deliverer, blocks the queue row, and records
the failure. A separate frozen oracle drives live assent, proves zero in-call
renderer calls, then retrieves the exact PDF through the delivered URL and rejects
tampered and expired tokens.

Validation

  • 754 tests collected: 729 passed, 25 skipped
  • python3 -m ruff check .
  • python3 -m mypy (78 source files)
  • frozen fail-closed and live-route worker oracles
  • 50-run latency harness plus independent frozen latency oracle, spanning 1–6 lines
  • round-trip, noise-resilience, and independent-resolution audits

The final machine gates are green. Dispatch state is intentionally UNVERIFIED
because the route-probe correction landed after the bounded two-pass cold review;
this draft PR review is the remaining human control.

Out of scope

  • live email/SMS providers or credentials
  • production worker scheduling
  • quote revisions (the next sequential dispatch, after this PR is merged)

@owieschon owieschon closed this Jul 11, 2026
@owieschon owieschon reopened this Jul 11, 2026
@owieschon
owieschon marked this pull request as ready for review July 11, 2026 01:57
@owieschon
owieschon merged commit 15b2c8f into main Jul 11, 2026
1 check passed
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.

1 participant