Skip to content

id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317

Open

Description

@dezren39

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

Scope

The control-plane registry that owns the meaning of a TigerBeetle ledger u32.

  • Schema + migrations for ledger_allocation, currency, currency_issuer, account (design §2.1–§2.2).
  • The ledger-u32 allocator: monotonic, never recycled, documented range split (tenancy/system vs currency) (design §6).
  • currency_id minting; symbol unique per issuer, not globally.
  • currency.graph_object_id linkage to the signed graph object that is the canonical record (§2.4).

Acceptance

  • A migration creates the four tables with the uniqueness constraints the design names.
  • An allocator API hands out non-zero u32s monotonically and refuses to recycle.
  • A test proves two issuers may both register symbol ABC but a duplicate currency_id is rejected.

Depends on

Nothing. Blocks F2, F4.

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

  5. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  6. 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

  7. 22 remaining items

  8. added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Lane M claimed task 9207 for #2317; execution-lane assignment returned opencode, so this task is handed off to the laptop claimant (opencode-claimant), which launches the bound session. Attempts 15/16 — near cap; if the claimant does not bind before lease expiry, a cap raise may be needed (fleet-monitor repair pattern).

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  13. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · blocked

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane bf419306-c4ef-470f-a553-beabf93239de
    • Session / ID: task 9207
    • Found via: atomic repo-queue claim
    • Task: F1 registry and ledger-u32 allocator for issue id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317. Baseline confirms the registry and allocator are absent; no code changes were made.
    • Blocker (packet_defect): The design leaves permanent-contract choices unresolved: Postgres vs libsql; exact u32 range split and representation (Postgres integer is signed); conflicting currency_id uniqueness scope (issuer-scoped pair vs global); and missing currency_issuer / account columns and constraints.
    • Needed: Clarify those choices in the issue/design before implementing irreversible ledger allocation and migrations.
    • Links: id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317
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)queue/blockedQueue or user escalation statesource/queue-workerFiled or worked by the queue/worker pilotstatus/blockedQueue or user escalation statetask/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