forked from unimatrix/web
26 lines
3 KiB
Markdown
26 lines
3 KiB
Markdown
# Private kit delivery receipt reads
|
|
|
|
The existing local account in `DUNE_INVENTORY_DATABASE_URL` also needs column-scoped SELECT on `dune_exchange_inventory_ops(id, actor_uuid, kind)`. This allows the private game API to omit gifts already delivered by any server. It does not require INSERT, UPDATE, DELETE, access to item payloads, or remote login privileges.
|
|
|
|
Apply with the existing database administrator, substituting the reviewed existing local reader account and host:
|
|
|
|
```sql
|
|
GRANT SELECT (id, actor_uuid, kind)
|
|
ON dunegameplay.dune_exchange_inventory_ops
|
|
TO '<existing game API reader>'@'<existing local host>';
|
|
```
|
|
|
|
The production reader's existing localhost and 127.0.0.1 accounts received this grant on 22 November 2026. Both pending gift requests then returned HTTP 200 with ten items each. Native delivery still requires its separate once-only inventory receipt; an HTTP response alone does not confirm physical delivery.
|
|
|
|
# Native item lore reads
|
|
|
|
The same local reader needs `SELECT (payload)` on `dunegameplay.dune_exchange_listings`. Only the private server decodes this column. Both authenticated and public listing responses strip the serialized payload and expose a bounded presentation whitelist. This additional column grant was applied to the same two existing local accounts and verified against live stock.
|
|
|
|
## Paid published kitsets
|
|
|
|
`kitset-commerce.mjs` uses one verified MySQL transaction across the existing bank and central JARVIS schemas. The bank's normal double-entry posting and a `kit-purchase` event in `organisation_key_events` commit together. No extra wallet, stock copy or website delivery queue is created. The beneficiary is the kit's organisation, never the player who clicked Publish. Buyer authority, available balance, immutable source hash, active bank accounts, current price/version and recipient game link are checked before charging.
|
|
|
|
A paid source remains owed if its original definition is later revoked or the catalogue is changed. Native inventory receipts filter completed orders before pagination; the connector delivers the complete kit atomically with Core's shared inventory. Unsupported items or sets needing over 36 inventory slots cannot be bought. Website and ingame purchases use the same commerce service; the connector checks online recipients every 30 seconds and on join.
|
|
|
|
The DBA applies SQL emitted by `website/scripts/kitset-commerce-migration.mjs` with the existing production environment. It grants the bank app SELECT on the three published-definition tables, SELECT/INSERT on the key-event journal, and column-scoped native receipt reads. The script verifies all three stores share the same MySQL server before emitting grants. No new table is required.
|
|
The live rollback probe also verifies the bank account can perform source locks. Definition and journal reads use `FOR SHARE`, which protects immutable source/price consistency without granting the bank app UPDATE on the website definition tables. Banking rows retain their normal `FOR UPDATE` locks.
|

Staff