feat(rust): mod configuration from the site, and an editor that will not rewrite a float #9
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/phase-7b-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 7b, the website half of R18 — Admin → Rust mod config. As built:
PLAN.md§21.The trap this is mostly about
JavaScript cannot tell
1from1.0.JSON.parse('{"Rate":1.0}')is1,JSON.stringifywrites1, and both mod frameworks deserialize a config into typed C# classes — so a naive read-modify-write silently rewrites every whole-numbered float as an integer on fields nobody touched, and a plugin that throws at load does not come back. Gather rates and multipliers are exactly the fields at risk.server/configEdit.jsnever parses, mutates and re-serialises. It records the source span of every value and splices literals into them from the end of the document backwards, so everything a save did not touch is byte-identical — indentation, key order, and the.0on a float. A number's new value travels as the text an admin typed, from the browser to disk, and never becomes aNumberanywhere (D35/D36).Its suite asserts the failure as well as the fix, and a live walk wrote
2.50into a realZoneManager.jsonwhile500.0and anullstayed exactly as they were.The rest of the surface
edits(the generated form, type-preserving) ortext(raw JSON). A version from the host must come back with a save, or it is a 409 with the current file attached so a person can merge rather than retype.Host,Port,ServerId— in the form and in the raw tier, which submits a whole document and so is checked by comparing literals (D38).rust_config_writesnever records the values, and does record the refused and the rolled-back — an operator asking why a setting is not what they set needs to see that somebody tried.report.rolledBackand the server's own log line. It is a round trip that worked carrying bad news, and a 5xx would throw away the only diagnosis there is.Three defects a browser walk found that 179 green tests did not
RunicGateway— deliberately not in the dropdown — and a<select>whose value matches no<option>displays the first one. The screen read "nothing — just write the file" while the request carriedreload: RunicGateway. D38's "editable except three keys" was worth nothing.btn ghostis not a class this platform defines (.btn-ghostis), so every secondary button in this module has rendered as a primary one since phase 7 — here it made the open file and the active tier indistinguishable. Fixed on the three pages phases 6 and 7 shipped too.Walked against the real sidecar with a stand-in plugin over a real directory: the recursive walk incl. a nested
Kits/kits.json, a form save that reloaded, a rollback, areload-selfrefusal, a write with no reload, a conflict, and the locked keys. 162 server + 39 client tests,check:imports,check:bundle,check:externalsandcheck:swaggergreen;routes.manifest.jsonregenerated against the pinned core.🤖 Generated with Claude Code
https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM