Skip to content

id: design: graph token object formats + snapshot anchoring spec (from #2041) #2251

Closed

Description

@dezren39

From the #2041 investigation (token issuance in the ID graph)

Investigation #2041 (queue task 3352, result posted on that issue 2026-10-29) designed the graph-side token model on top of the #2040 TigerBeetle findings: currency identity = (issuer ID, definition hash); signed definition/issuance/transfer/burn/rate-offer/conversion-receipt/snapshot objects; two bindings (graph-native folds vs ledger-anchored via TigerBeetle user_data_128 cross-links); snapshot anchoring; the app-facing function surface (define_currency, issue, award, pay, accept_payment, convert, snapshot). This issue is the design spec that makes those shapes concrete. Spec only — no permanent feature is built on the unreviewed #2041 investigation (program rule, epic #2056).

Spec to produce (doc in pkgs/id/doc/ per repo convention, linked from this issue)

  1. Wire formats for the seven object types from id: investigate: token issuance in the ID graph — per-ID issuance, issuer snapshots, authorized conversion rates #2041, as extensions of the existing signed-event envelope (pkgs/id/src/chain.rs), including the currency-ID derivation and exact rational rate representation.
  2. Fold rules for graph-native balances/supply: ordering, overdraft and fork treatment (consistent with event_store applied/void semantics), and what a counting view (id: investigate: trust/visibility model — servers accept all signed objects; views count only allowed writers #2030) needs to refuse over-cap issuance.
  3. Snapshot format + anchoring join: fields, balance-root construction, cadence options, and the mechanical reconciliation between graph objects and TigerBeetle transfers via user_data_128 (per id: investigate: TigerBeetle — multi-currency ledgers, conversions, per-coin vs balance model, 3-node cluster topology #2040).
  4. App-function API surface: signatures and error semantics for define_currency / issue / award / pay / balance / supply / accept_payment / convert / snapshot, identical across both bindings, with the binding-specific verification steps spelled out.
  5. Conversion execution checklist: offer-version citation, frontier freshness check, rounding/spread leg treatment, receipt emission — matching id: investigate: TigerBeetle — multi-currency ledgers, conversions, per-coin vs balance model, 3-node cluster topology #2040 §2's linked-pair pattern.

Acceptance criteria


Program: ID platform expansion, epic #2056. Parent investigation: #2041. Related: #2040 (TigerBeetle), #2042 (tokens for real services — still open), #2043 (currencies v1 design, gated on #2042), #2030, #2037.

Activity

  1. added
    priority/highImportant and time-sensitive
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up (queue task 3406, openchamber scheduled lane)

    Claimed 2026-10-30 ~11:51Z for revalidation. Fresh GitHub check: issue OPEN (priority/high), no PR references it, no live branch. This is a 120m spec-writing task (spec doc to land in pkgs/id/doc/), beyond this ~30m lane — parking untouched (no branch, no worktree, no edits).

  4. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Agent note — parked untouched (needs a full-budget shift)

  5. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 30, 2026
  6. 36 remaining items

  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 3954
    • Found via: queue claim (resume from park)
    • Task: land the id: design: graph token object formats + snapshot anchoring spec (from #2041) #2251 graph token spec — PR id: graph token object formats + snapshot anchoring spec (#2251) #2741
    • Expectation: parked 30m on an infra blocker: laptop SSH unreachable for the whole attempt (6+ drops, Connection closed by UNKNOWN port 65535; tailscale status cannot finish connecting). Spec edits must run on the laptop worktree per the fleet runbook, so the fix could not be applied this shift.
    • Resume brief (verified fresh this shift): Codex round-5 on head a8c05171 raised exactly 2 P2s, both genuine, amendments drafted and recorded in the task checkpoint: (1) taker-signed authorization — §1.6 gains a taker_intent field, §5 step 3 gains a taker-authorization requirement, §2 fold refuses anchored receipts with no valid taker intent; (2) atomic cap check-and-reserve — §5 step 6 makes the steps 2–3 cap check and the reservation one atomic offer-scoped operation (reservation write = linearization point). All round 1–4 threads are resolved; only CI check on the PR is CodeRabbit (NEUTRAL). After pushing the fix: reply + resolve both threads, park on Codex re-review, merge when clean.
    • Links: PR id: graph token object formats + snapshot anchoring spec (#2251) #2741 @ a8c05171
  8. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  9. chatgpt-codex-connector commented on Oct 31, 2026

    @chatgpt-codex-connector
  10. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  11. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (resume)

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 3954
    • Found via: queue claim — resumed from checkpoint, did not restart
    • Task: land the id: design: graph token object formats + snapshot anchoring spec (from #2041) #2251 graph token spec — PR id: graph token object formats + snapshot anchoring spec (#2251) #2741
    • Expectation: Codex round-6 on head e1feebd97 completed clean ("Didn't find any major issues", codex-review-state has_unresolved_findings=false, zero unresolved review threads — verified fresh via gh). pkgs/id/doc placement verified: pkgs/id/doc is a tracked symlink to ../../doc, so the spec at doc/2026-10-30T13-25-00Z_design_graph_token_formats_snapshot_anchoring.md is reachable at the required path. Only check is CodeRabbit (skipping/neutral, docs-only PR). Proceeding to merge.
  12. added a commit that references this issue on Oct 31, 2026
  13. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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)priority/highImportant and time-sensitive

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions