Skip to content

id(currency): gateway request envelope — canonical encoding, verify_strict, nonce window, idempotency IDs (from #2062) #2319

Open

Description

@dezren39

Follow-up from the currency control plane design (#2062), §4 of
doc/2026-10-29T12-42-21Z_design_currency_control_plane/.

Scope

The gateway's signed request envelope and the pre-ledger write path.

  • Reuse the existing pkgs/id scheme: directory_auth.rs Signed { key, at, nonce, signature } over id-request-v1\n{method}\n{target}\n{at}\n{nonce}\nsha256(body), 5-minute window, ReplayGuard, verify_strict (never verify) (design §4.1, §4.6).
  • Per-op canonical CBOR bodies, domain-tagged (id.currency.request.v1), with strict decoding like chain.rs.
  • Device → account resolution before authorization; issuance binds to the account key (design §4.1b).
  • Deterministic idempotency-ID derivation and the typed-error surface (design §4.3).
  • Resolve the idempotency-ID vs TigerBeetle monotonic-ID guidance tension (design §9.3).

Acceptance

  • A signed request round-trips: sign in a client, verify in the gateway, reject a tampered body, a stale at, and a replayed nonce.
  • A forgery fixture proves the gateway rejects a signature that only plain verify would accept.
  • Signature verification alone never authorizes: a valid signature from a non-minter is rejected.

Depends on

Nothing hard; F1/F2 for the end-to-end path.

Refs #2062

Activity

  1. added
    kind/featureNew feature or capability request
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    meta/follow-upFollow-up spun out of earlier work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: #2062 (design §4), #2317/#2318 (sibling slices), #2321 (the PoC that consumes this envelope)

    Notes: Gateway request envelope: canonical CBOR bodies, verify_strict only, nonce window + ReplayGuard, deterministic idempotency IDs. The body carries a full ## Acceptance list (round-trip + tamper/stale/replay rejections, forgery fixture, valid-signature-from-non-minter rejection), so this pass is labels-only.

    Risks: The verify-vs-verify_strict distinction and the idempotency-ID vs TigerBeetle monotonic-ID tension (§9.3) are the two places a quiet shortcut becomes a security or correctness hole.

    Suggested approach: Reuse directory_auth.rs's Signed scheme as scoped; resolve the §9.3 tension explicitly in the implementation note; test the forgery fixture first.

    🤖 Agent note · filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-10-29T18:12Z (13:12 CDT)
    • Found via: monitor reconciliation
    • Task: Duty 2 intake enrichment — labels normalized and meta/enriched applied; acceptance criteria appended to the body only where no acceptance section existed (original body preserved verbatim above it). Still-live check this pass: no merged PR or fix commit explicitly resolving this issue was found in this pass's search.
    • Expectation: see the effort label; done = the acceptance criteria are met.
    • Links: this issue
  5. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  7. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  8. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions