feat: stage 9b hardening — cost warning, update surface, rnt.cost (D306, D315) #14

Merged
whitlocktech merged 2 commits from feat/stage-9 into edge 2026-10-07 02:42:38 +00:00
Member

What & why

Phase 9b of docs/runicnpc/PLAN.md stage 9.

  • The cost warning says what stage 9 measured (D315). About 3 ms per 100 idle while a player keeps them awake, 0.5 ms once they sleep with nobody near, and 9 ms fighting, with each NPC reacting about every 3 s. These are the worst of the two rigs, rounded up. The awake-idle overhead over the bare swap is filed as #13 (the org lead's call: an optimisation issue, not a v1.0.0 blocker). Only the wording changes; nothing parses it.
  • README: status is stage 9; the installer and egg install it now; API 6; swap fields: npc=55/55. Links to the new docs/runicnpc/COMMANDS.md and INSTALL.md (docs#325). The update surface is a table of every Rust type and member the swap and the brain depend on, where it is used, and what catches a change: compiling, the field list, or only a running server. The staging drill (9c) checks exactly that list.
  • tools/RunicNpcTest.cs 0.7.0, rnt.cost: 100 of RunicNPC's own NPCs against the same session's empty server, idle (awake) and fighting 20 invulnerable stand-ins, with a second empty window at the end. The bar is taken against the lower of the two empty windows. idle skips the fight, sentry makes them stand still, and asleep leaves out the keeper.

What it measured (100 NPCs, increase of the median frame, 6000 map)

Oxide: bare NPC (rnh.cost) Oxide: RunicNPC Carbon: bare NPC Carbon: RunicNPC
Idle, awake +0.96 ms +2.65 / +2.92 ms +0.97 ms +1.52 ms
Idle, asleep +0.52 ms
Fighting 20 stand-ins +7.53 ms +7.19 ms +7.96 ms +9.04 ms

Fighting costs what Rust's own AI costs. Stage 1's own NPC is over stage 1's +5.2 ms bar too, because the rigs are slower than in September.

Companion PRs (phase 9b)

docs#325, website#211, Module-Rust, Rust-Plugins and installer, all linked from docs#325.

How it was tested

  • node scripts/checkPlugin.js: plugin ok, API 6.
  • The warning compiled on the Carbon rig and reads as above in rnpc.status. rnt.cost and rnh.cost ran on both rigs, one at a time, with the other stopped. Rust 25681086, Oxide 2.0.7801, Carbon 2.0.262.
  • Both rigs' data/RunicNPC/ were backed up first and restored afterwards; the harnesses were removed.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why Phase 9b of `docs/runicnpc/PLAN.md` stage 9. - **The cost warning says what stage 9 measured** (D315). About 3 ms per 100 idle while a player keeps them awake, 0.5 ms once they sleep with nobody near, and 9 ms fighting, with each NPC reacting about every 3 s. These are the worst of the two rigs, rounded up. The awake-idle overhead over the bare swap is filed as #13 (the org lead's call: an optimisation issue, not a v1.0.0 blocker). Only the wording changes; nothing parses it. - **README:** status is stage 9; the installer and egg install it now; API 6; `swap fields: npc=55/55`. Links to the new `docs/runicnpc/COMMANDS.md` and `INSTALL.md` (docs#325). **The update surface** is a table of every Rust type and member the swap and the brain depend on, where it is used, and what catches a change: compiling, the field list, or only a running server. The staging drill (9c) checks exactly that list. - **`tools/RunicNpcTest.cs` 0.7.0, `rnt.cost`:** 100 of RunicNPC's own NPCs against the same session's empty server, idle (awake) and fighting 20 invulnerable stand-ins, with a second empty window at the end. The bar is taken against the lower of the two empty windows. `idle` skips the fight, `sentry` makes them stand still, and `asleep` leaves out the keeper. ### What it measured (100 NPCs, increase of the median frame, 6000 map) | | Oxide: bare NPC (`rnh.cost`) | Oxide: RunicNPC | Carbon: bare NPC | Carbon: RunicNPC | |---|---|---|---|---| | Idle, awake | +0.96 ms | +2.65 / +2.92 ms | +0.97 ms | +1.52 ms | | Idle, asleep | | | | +0.52 ms | | Fighting 20 stand-ins | +7.53 ms | +7.19 ms | +7.96 ms | +9.04 ms | Fighting costs what Rust's own AI costs. Stage 1's own NPC is over stage 1's +5.2 ms bar too, because the rigs are slower than in September. ## Companion PRs (phase 9b) docs#325, website#211, Module-Rust, Rust-Plugins and installer, all linked from docs#325. ## How it was tested - `node scripts/checkPlugin.js`: plugin ok, API 6. - The warning compiled on the Carbon rig and reads as above in `rnpc.status`. `rnt.cost` and `rnh.cost` ran on both rigs, one at a time, with the other stopped. Rust 25681086, Oxide 2.0.7801, Carbon 2.0.262. - Both rigs' `data/RunicNPC/` were backed up first and restored afterwards; the harnesses were removed. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 2 commits 2026-10-07 02:37:21 +00:00
- README: status is stage 9; the installer and egg install it now; API 6; the
  swap reports 55/55 npc fields; COMMANDS.md and INSTALL.md are linked; a new
  "update surface" table lists every Rust type and member the swap and the
  brain depend on, where, and what catches a change (compile, the field list,
  or only a running server). The staging drill checks exactly that list.
- tools/RunicNpcTest.cs 0.7.0: rnt.cost measures 100 of RunicNPC's own NPCs
  against the same session's empty server, idle (awake) and fighting 20
  invulnerable stand-ins, with a second empty baseline at the end and the bar
  taken against the lower. `idle` skips the fight, `sentry` makes them stand
  still, `asleep` leaves out the keeper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
feat: the cost warning says what stage 9 measured (D306)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 6s
b5e7ecc4ed
Stage 9 measured the released NPC on both frameworks (6000 map): about 3 ms of
median frame per 100 idle while a player keeps them awake, 0.5 ms once they
sleep with nobody near, and 9 ms per 100 fighting, with each NPC reacting about
every 3 s under Rust's shared AI budget. The warning now says idle twice
(awake and asleep) and uses those figures, the worst of the two rigs rounded up.
The awake-idle overhead over the bare swap is runicnpc-rust#13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 9b316c6266 into edge 2026-10-07 02:42:38 +00:00
whitlocktech deleted branch feat/stage-9 2026-10-07 02:42:39 +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/runicnpc-rust#14
No description provided.