docs(rust): protocol 14 — Economics, as built (PROTOCOL §20.3, PLAN_REDESIGNS §11.2.4)

PROTOCOL.md §20.3 specifies what §11.2.2 designed and the code now does:
integrations.economics, economics.pay / .balances / .adjust and their replies
and refusals, the tally's `balance` (a value; a nameless frame is an offline
player), economics.wiped with `newSave`, the three sidecar forwards, and the
website's half. §20's heading now covers the optional plugins too.

PLAN_REDESIGNS §11.2.4 records the build (compiled on both rigs, then given
back their protocol 13 bridge) and names the six points the design left open
that the code settled, so the org lead can overrule any of them. The app
plan's Rust account row gains GET /player/rust/economics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
2026-10-12 07:14:51 -05:00
parent 0f4d99c9fa
commit 6fad1f07af
3 changed files with 130 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ rows still to come (§3.4); §4, built 2026-09-29 (§4.1). **§6 was spiked on 2
chose neither route: Runic Gateway writes its own NPC plugin, RunicNPC, planned in
[`../../runicnpc/PLAN.md`](../../runicnpc/PLAN.md) (D214–D314), and the rest of this plan waits for it.** RunicNPC v1.0.0 shipped on 2026-10-09, and the plan
resumed with §2 the same day (D331–D334); §2 was built on 2026-10-12, and §11's Economics spike the same day
raised D335–D336 (§11.2.1). **Every item left is built, tested and PR'd first; every walk —
raised D335–D336 (§11.2.1). Economics was built on 2026-10-12 too (§11.2.4). **Every item left is built, tested and PR'd first; every walk —
theirs and the ones still owed by §3 and §5 — happens together at the end (D331, §9).**
This is a companion to [`PLAN_FIXES.md`](PLAN_FIXES.md) and [`PLAN.md`](PLAN.md). Where they disagree, this
@@ -1173,6 +1173,27 @@ On both rigs, with Economics installed:
- run `ecowipe`, and see the column clear;
- read a balance on the account page and in the app.
#### 11.2.4 Built (2026-10-12)
Built to §11.2.2 on protocol 14, and specified in [PROTOCOL.md](../../rust-link/PROTOCOL.md) §20.3. The
bridge compiled on both rigs (Rust 25877464; Oxide 2.0.7826, Carbon 2.0.262), which were then given back their
protocol 13 bridge. Six points the design left open were settled in the code, and are named here so they can
be overruled:
- **`economics.wiped` carries `newSave`.** After `ecowipe` the site clears the wipe's balances; at a new save it
clears nothing, because the new map's balances arrive as players connect, and the last wipe's stay as the
record of how it ended.
- **A balance frame with no `name` is not play.** The plugin names only a connected player, and the site writes
such a frame's balance without moving anybody's last-seen.
- **The Coins column is per wipe.** A balance is a value, so there is no all-time one: the column and
`sort=balance` exist only when one wipe of a server that reports Economics is shown.
- **A payment's `failed` reasons** are `at-limit`, `refused`, `unmeasured` (deposited, but not measured — remembered
with the key so a retry pays nothing more) and `bad-id`.
- **Payments and adjustments keep their keys apart**, so a step's key can never be answered with a staff
adjustment's reply. The admin form sends a fresh key with each submission.
- **The step spends a new `rust.coins` budget**, priced like the kit reward: the amount times the count, or
times the recipient bound for a mode that is not a count.
### 11.3 Backpacks (D201)
- **Read, never write (R2).** A new verb, `backpacks.read {steamId}`, returns