GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(currency): currency registry schema + ledger-u32 allocator (from #2062) · Issue #2317 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
#10658
Closed
id(currency): currency registry schema + ledger-u32 allocator (from #2062)#2317
#10658
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workepic/id-programReprioritization program epic (2026-11-12)kind/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 pilotstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

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

Next
  1. dezren39
    added
    kind/featureNew feature or capability request
    status/needs-triageNot yet triaged; needs a first look
    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
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1167

  3. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  4. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    Intake review

    • Related: Design: id: design: currency control plane — registry, account factory, gateway #2062 (currency control plane, §2 and §6). Blocks F2 (id(currency): deterministic account factory + per-currency system accounts (from #2062) #2318) and F4. Depends on nothing — this is the foundation slice.
    • Live check: No merged PR creates the ledger_allocation / currency / currency_issuer / account tables or the ledger-u32 allocator; live. The body's ## Acceptance section already states the criteria (including the two-issuers-same-symbol test), so no section was appended.
    • Notes: The never-recycled, monotonic ledger allocator and its documented range split are the load-bearing decisions; symbol uniqueness is per-issuer, not global.
    • Risks: Medium — allocator semantics are one-way; get the range split documented in the migration itself.
    • Suggested approach: Land this first in the id: design: currency control plane — registry, account factory, gateway #2062 slice order; the duplicate-currency_id rejection test from the body is the key regression pin.
    • Labels: already normalized by the filer (kind/feature, source/queue-worker, priority/normal, effort/m, app/id); added meta/enriched only.
  6. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  7. developing-today commented on Nov 3, 2026

    @developing-today
    developing-todayBot
    on Nov 3, 2026 – with developing.today
    Contributor
    More actions

    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. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    on Nov 3, 2026
  9. 52 remaining items

  10. dezren39
    removed
    queue/blockedQueue or user escalation state
    on Nov 16, 2026
  11. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    Agent note — task 17444 released intact: this task IS the #2317 implementation slot (lane any-c)

    • state: released to queued (no work started; resume state below)
    • task: 17444 (carries the fix dedupe key repo-health:v1:fix:developing-today/code:issue:2317)
    • issue: id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317
    • Verified fresh this shift (2026-11-16): issue id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317 is OPEN. Triage already happened — lane code-d, task 15189, note 6912140267: all four design decisions ANSWERED 2026-11-16T02:00:33-06:00 (ledger currency-registry-decisions-2317): (1) registry store Postgres; (2) ledger u32 as bigint + 0..4294967295 check constraint, design §6 range split ratified; (3) currency_id globally unique, symbol unique per issuer; (4) missing currency_issuer/account columns are fleet-drafted from design §2.1–2.2 + §2.4 in a design PR for ratification.
    • No implementation exists yet: no currency-registry / ledger-allocator symbols in pkgs/id crates (checked this shift). The implementation (Postgres schema + migrations for ledger_allocation/currency/currency_issuer/account, monotonic never-recycled ledger-u32 allocator API, currency_id minting, the two-issuers-same-symbol test) is a full implementation session's work.
    • Why released: lane any-c claimed this at the tail of its shift (~35 min of budget left); starting a schema+allocator implementation now would leave it half-done. Released intact so the next owner starts from this note and code-d's decision record. It unblocks F2/F4 and issue id(currency): deterministic account factory + per-currency system accounts (from #2062) #2318 when done.
  12. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 16, 2026
  13. developing-today
    added
    status:in-review
    on Nov 16, 2026
  14. dezren39
    added a commit that references this issue on Nov 16, 2026

    Merge pull request #10658 from developing-today/queue/17444-2317-curr…

    454547f
  15. dezren39
    closed this as completedin #10658on Nov 16, 2026
  16. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 16, 2026
  17. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: done (fixed_merged)

    • Agent: queue worker (repo-worker-code), lane any-a
    • Session / ID: task 17444 (small_fix, issue id(currency): currency registry schema + ledger-u32 allocator (from #2062) #2317)
    • Found via: queue claim (unfiltered), lane assignment direct; resumed from lane any-c's verified release note and lane code-d's triage (task 15189, decisions answered 2026-11-16)

    Implemented slice F1 of the #2062 design: PR #10658 MERGED (merge commit 454547f), closing this issue.

    • New crate pkgs/id/crates/id-currency-registry: Postgres migration 0001 creates ledger_allocation, currency, currency_issuer, account with the design's constraints — ledger_id bigint + 0..4294967295 check, ratified range split as a per-kind check (1..=0xFFFFF tenancy/system, 0x100000.. currencies), currency_id globally UNIQUE, (issuer_id, symbol) UNIQUE, graph_object_id linkage (design s.2.4). currency_issuer / account columns fleet-drafted from s.4.2 / s.3 per decision 4, marked for ratification.
    • Allocator: allocate_ledger() over monotonic sequences + a delete-refusing trigger in SQL; the Rust Allocator states the same semantics (non-zero, monotonic, never recycled — no release API, spent ids refused).
    • Verification: cargo test -p id-currency-registry 11/11 pass (incl. two issuers both registering symbol ABC; duplicate currency_id rejected); clippy + fmt clean; scripts/test-migration.sh PASS against a real Postgres (allocator values, recycle refusal, both uniqueness rejections, range enforcement, down migration).
    • Reviewers: Codex review failed on its usage limit and CodeRabbit was rate-limited — no findings existed to disposition; disposition recorded on PR feat(id): currency registry schema + ledger-u32 allocator (#2317) #10658.

    This unblocks F2 (account factory) and F4 (reconciliation + supply audit), and issue #2318 per the triage note.

  18. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workepic/id-programReprioritization program epic (2026-11-12)kind/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 pilotstatus:donetask/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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.