fix(rust): protocol 13 — a configuration save that settles after its reload (F9, D179) #20

Merged
whitlocktech merged 2 commits from fix/protocol-13-config-reload into edge 2026-09-26 22:41:18 +00:00
Member

The website half of protocol 13's first piece (PLAN_FIXES.md F9, D179; spec docs#286 §19.3). Pairs with Rust-Plugins#16 and Rust-Link's PR.

Server

  • Schema: rust_config_writes gains write_id, settle_by, settled_at, log_tail and restored, plus an index on (server_id, write_id). All are ALTER … IF NOT EXISTS below the CREATE. There's a new outcome, reloading.
  • Save: a pending report is recorded reloading with the plugin's writeId. settle_by is two ceilings plus 20 s (80 s at 30 s), computed on the database's clock. The response is { changed, pending: true, write: { id, writeId }, report }.
  • Ingest: config.outcome settles the row by (server_id, write_id) only while it's still reloading. A replayed frame moves nothing, and a late one still lands. applied or rolled-back, plus restored, the reason and the log tail.
  • Poll route: GET /admin/rust/config/:serverId/writes/:writeId (admin). A row past settle_by reads as lost; that's computed in the SELECT, so the stored value stays reloading.
  • config.outcome is a staff kind, because it carries the server's log tail. The classification test lists it.
  • PROTOCOL_VERSION is 13, and the swagger fragment is regenerated (44 paths).

Page (ModConfig.jsx)

  • It shows "Saved. Reloading Kits…" and polls every 2 s until the write settles, then re-reads the file and the history.
  • The Save button is held while it waits; it would only get busy otherwise.
  • A rollback says whether the plugin came back on its old file. lost tells the admin to re-read.

Checks

Server: 391/391 tests pass; check:swagger, check:imports and check:engagement pass. Client: the build works, 56/56 tests pass, and check:externals passes. Not walked yet. The rig walk is PLAYER_WALK.md configuration steps 2, 2a, 2b and 4.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

The website half of protocol 13's first piece (`PLAN_FIXES.md` F9, **D179**; spec docs#286 §19.3). Pairs with Rust-Plugins#16 and Rust-Link's PR. ### Server - **Schema:** `rust_config_writes` gains `write_id`, `settle_by`, `settled_at`, `log_tail` and `restored`, plus an index on `(server_id, write_id)`. All are `ALTER … IF NOT EXISTS` below the CREATE. There's a new outcome, `reloading`. - **Save:** a `pending` report is recorded `reloading` with the plugin's `writeId`. `settle_by` is two ceilings plus 20 s (80 s at 30 s), computed on the database's clock. The response is `{ changed, pending: true, write: { id, writeId }, report }`. - **Ingest:** `config.outcome` settles the row by `(server_id, write_id)` only while it's still `reloading`. A replayed frame moves nothing, and a late one still lands. `applied` or `rolled-back`, plus `restored`, the reason and the log tail. - **Poll route:** `GET /admin/rust/config/:serverId/writes/:writeId` (admin). A row past `settle_by` reads as **`lost`**; that's computed in the SELECT, so the stored value stays `reloading`. - `config.outcome` is a **staff kind**, because it carries the server's log tail. The classification test lists it. - `PROTOCOL_VERSION` is 13, and the swagger fragment is regenerated (44 paths). ### Page (`ModConfig.jsx`) - It shows "Saved. Reloading Kits…" and polls every 2 s until the write settles, then re-reads the file and the history. - The Save button is held while it waits; it would only get `busy` otherwise. - A rollback says whether the plugin came back on its old file. `lost` tells the admin to re-read. ### Checks Server: 391/391 tests pass; `check:swagger`, `check:imports` and `check:engagement` pass. Client: the build works, 56/56 tests pass, and `check:externals` passes. **Not walked yet.** The rig walk is PLAYER_WALK.md configuration steps 2, 2a, 2b and 4. - [x] AI-assisted: 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-09-26 22:20:30 +00:00
fix(rust): protocol 13 — a configuration save that settles after its reload (F9, D179)
Some checks failed
PR Checks / server-tests (pull_request) Failing after 16s
PR Checks / client-build (pull_request) Successful in 17s
PR Checks / frozen-manifest (pull_request) Failing after 37s
654a24585d
The plugin now answers a save once the files are written, with pending and
a writeId, and reports the reload later as a config.outcome event. The save
is recorded as reloading with a settle_by of two plugin ceilings plus slack
on the database's clock; ingest settles the row by (server, writeId), only
while it is still reloading, so a replay moves nothing and a late outcome
still lands. A row past settle_by reads as lost.

GET /admin/rust/config/:serverId/writes/:writeId serves the poll; the page
polls it every two seconds, holds the Save button while it waits, and says
whether a rolled-back plugin came back on its old file. config.outcome is
a staff kind: it carries the server's log tail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-09-26 22:34:18 +00:00
fix(rust): freeze the write-poll route in routes.manifest.json
All checks were successful
PR Checks / client-build (pull_request) Successful in 16s
PR Checks / server-tests (pull_request) Successful in 19s
PR Checks / frozen-manifest (pull_request) Successful in -1m3s
fee0b294a9
The new GET /admin/rust/config/:serverId/writes/:writeId was documented in
swagger-fragment.json but not in the committed manifest, so the frozen-
manifest job and frozenManifest.test.js both failed. Regenerated against
core at the pinned ref (efa9db7), exactly as the job does: one route added,
nothing of core's moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 80c05a3c1e into edge 2026-09-26 22:41:18 +00:00
whitlocktech deleted branch fix/protocol-13-config-reload 2026-09-26 22:41:18 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-Rust#20
No description provided.