docs(rust): the Backpacks spike and its design — D337–D339 (PLAN_REDESIGNS §11.3) #340

Merged
whitlocktech merged 1 commits from docs/rust-backpacks-decisions into main 2026-10-12 18:56:33 +00:00
Member

PLAN_REDESIGNS §11.3, the same shape as §11.2: the spike (§11.3.1), the design to build (§11.3.2) and the walk rows deferred to the end (§11.3.3, D331).

The spike (2026-10-12; Rust 25877464, Oxide 2.0.7826, Carbon 2.0.262, Backpacks 3.17.8), both rigs, with stand-in players:

  • The Carbon restart loss did not reproduce. An unsaved change survived a panel restart and a plugin reload on both frameworks, with the owner online and offline. The only loss came from the spike itself: killing a player counts as a death, and Drop on death empties the backpack.
  • Reading: API_ReadBackpackContentsAsJson returns Backpacks' own item data (item ids rather than shortnames, positions that run across pages, nested contents). It returns null for a player who has never had a backpack. It takes 0.2–7 ms once loaded and 55–117 ms on the first read after a boot.
  • Capacity: API_AddBackpackCapacity / SetBackpackCapacity throw unless the owner has turned on Dynamic Size (EXPERIMENTAL), and they need the player online. A backpacks.size.N permission takes effect at once for a player whose backpack is loaded. Trap: if a capacity was read while the backpack wasn't loaded, a later grant doesn't show until the player reconnects. The bridge must read capacity only through a backpack it has just loaded.
  • Take-back, which the org lead asked to see: when page 2 holds items and the size is revoked, nothing moves until the owner opens the backpack. Then the overflow goes to their inventory, or drops at their feet if the inventory is full. Identical on both frameworks.

Decisions (answered 2026-10-12):

  • D337 — the extra space is a backpacks.size.N permission leased for the run through rust_perm_run_grants, the same path as a kit reward. It works for offline players and needs no plugin code. This replaces the +N slots call.
  • D338 — Backpacks' own take-back stands. The step's default message warns about it.
  • D339 — the Carbon leak (a permission granted to a never-seen Steam id leaks onto every never-seen id) is filed as Rust-Plugins#32 and kept out of §11.3.

Rigs: Backpacks, the spike, and their data, config, lang files and stand-in permissions are removed from both. Each rig still runs its protocol 13 bridge.

  • AI-assisted: written by Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

PLAN_REDESIGNS §11.3, the same shape as §11.2: the spike (§11.3.1), the design to build (§11.3.2) and the walk rows deferred to the end (§11.3.3, D331). **The spike** (2026-10-12; Rust 25877464, Oxide 2.0.7826, Carbon 2.0.262, Backpacks 3.17.8), both rigs, with stand-in players: - **The Carbon restart loss did not reproduce.** An unsaved change survived a panel restart and a plugin reload on both frameworks, with the owner online and offline. The only loss came from the spike itself: killing a player counts as a death, and *Drop on death* empties the backpack. - **Reading:** `API_ReadBackpackContentsAsJson` returns Backpacks' own item data (item ids rather than shortnames, positions that run across pages, nested contents). It returns `null` for a player who has never had a backpack. It takes 0.2–7 ms once loaded and 55–117 ms on the first read after a boot. - **Capacity:** `API_AddBackpackCapacity` / `SetBackpackCapacity` throw unless the owner has turned on *Dynamic Size (EXPERIMENTAL)*, and they need the player online. A `backpacks.size.N` permission takes effect at once for a player whose backpack is loaded. **Trap:** if a capacity was read while the backpack wasn't loaded, a later grant doesn't show until the player reconnects. The bridge must read capacity only through a backpack it has just loaded. - **Take-back, which the org lead asked to see:** when page 2 holds items and the size is revoked, nothing moves until the owner opens the backpack. Then the overflow goes to their inventory, or drops at their feet if the inventory is full. Identical on both frameworks. **Decisions (answered 2026-10-12):** - **D337** — the extra space is a `backpacks.size.N` permission leased for the run through `rust_perm_run_grants`, the same path as a kit reward. It works for offline players and needs no plugin code. This replaces the +N slots call. - **D338** — Backpacks' own take-back stands. The step's default message warns about it. - **D339** — the Carbon leak (a permission granted to a never-seen Steam id leaks onto every never-seen id) is filed as Rust-Plugins#32 and kept out of §11.3. Rigs: Backpacks, the spike, and their data, config, lang files and stand-in permissions are removed from both. Each rig still runs its protocol 13 bridge. - [x] AI-assisted: written by Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-12 18:22:31 +00:00
The spike on both rigs (Rust 25877464, Oxide 2.0.7826, Carbon 2.0.262,
Backpacks 3.17.8): the Carbon restart loss did not reproduce; the read
API's shape and cost; the capacity calls need an experimental setting;
a capacity cached without its backpack pins a size until reconnect; and
the take-back the org lead asked to see (overflow to inventory, or the
ground when full, on the owner's next open).

D337 leases a backpacks.size.N permission for the run through
rust_perm_run_grants instead of +N slots; D338 keeps Backpacks' own
take-back; D339 files the Carbon never-seen-id permission leak as
Rust-Plugins#32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 634db5b30e into main 2026-10-12 18:56:33 +00:00
whitlocktech deleted branch docs/rust-backpacks-decisions 2026-10-12 18:56:34 +00:00
Sign in to join this conversation.
No description provided.