Skip to content

Add Dart inventory transfer API with PostgreSQL - #459

Draft
sdairs wants to merge 3 commits into
mainfrom
codex/inventory-transfers
Draft

sdairs wants to merge 3 commits into
mainfrom
codex/inventory-transfers

Conversation

@sdairs

@sdairs sdairs commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Moves synthetic stock between organization-scoped warehouses through a Dart/Shelf API. Retained UUIDs return matching immutable transfers, while one transaction session locks the balance pair in canonical order and commits the transfer, debit and credit together. Separate read endpoints report current balances with bounded keyset pagination.

Uses locked Dart/PostgreSQL dependencies, explicit verified Cloud TLS, separate migration/runtime roles, narrow runtime grants and loopback defaults. The shared operator tokens and runtime role are trusted; conservation is an application transaction protocol, not an independently enforced ledger.

Validated natively on Linux ARM 64 with Dart 3.13.5/Shelf 1.4.2/postgres 3.5.18/PostgreSQL 18.6: frozen restore, format/analyze,3 domain/HTTP checks, compiled server/worker and 8 real Cloud acceptance cases. Cloud checks include organization boundaries, retained replay, prefix-key pagination, actual blocked independent workers and opposite-direction HTTP concurrency, competing withdrawals/capacity, post-debit rollback, grants, certificate controls and old-process exit before persisted restart/replay. Scoped CI needs no Cloud secrets. Article and raw infrastructure evidence remain local outside this PR.

Follow-up: qualify numeric identity ordering when projecting IDs as text. Dart actual compiled API created 12 transfers and returned IDs 12 through 1 in two-row pages without gaps or duplicates. The old unqualified text alias control disagreed with numeric order. This is one targeted ninth Cloud case, not a repeat of the original eight-case suite. Existing native local checks pass at the corrected head.

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