office: 12 game-only tools incl. validated guide/set_spawn, nix-anchored tests (#52) #280
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
key-store/key.store!280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "infra/office-sight-52"
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?
Residents can inspect the Minecraft office, check their inventory, escort a player, guide a player to a checked destination, and set a personal spawn through the shared MCP hub. The worker exposes 12 typed game tools; the hub discovers and forwards all 12 under the caller's identity.
Observation returns actual nearby blocks, players and entities with explicit unknown-chunk and truncation fields (radius at most 8; detailed block list at most 1024). Escort moves the caller to a safe adjacent cell. Guide validates loaded, in-campus footing and verifies arrival. Spawn accepts integer block coordinates and reports submission honestly; an actual respawn is required to prove effective respawn behavior. Commands remain typed and scoped to the office world under the founder's existing game authority.
Validation: canonical Nix worker and hub builds passed on
62e9beee. The worker build runs syntax checks and all 10 validation tests against the real site-plan schema. A packaged MCP client canary discovered all 12 tools, observed the manager's furnished home with zero unknown blocks, read inventory, guided and escorted the temporary manager avatar, and submitted its personal spawn. The Minecraft server confirmed spawn [514,129,-239] at 2026-09-14 04:48:22 UTC. The temporary client disconnected; no other player was moved and no blocks were changed. No death/respawn test was performed.Final head
416eb143rebases onto merged shared hub maina20029b1. All six office files are byte-identical to the canary-tested head; exact-head senior review confirms that comparison. The new tools are source-ready; deployment and live resident discovery remain tracked in #52/#51 under KSE-0197. The existing sent_commands counter counts build commands only and will need a separate instrumentation follow-up.5e8812259ato668fe3b77eoffice: look/inventory/escort game-only observation tools (#52)to office: 12 game-only tools incl. validated guide/set_spawn, nix-anchored tests (#52)Per founder review of the actual site-plan.json v2 contract: - checkFooting/chooseAdjacent take plan.campus as the single {min,max} box it actually is (was: invented array-of-boxes insideCampus stub). - Tests load the real site-plan.json campus bounds as the fixture (embedded copy is a fallback for the Nix sandbox only), 10/10 green. - set_spawn sends integer dest to spawnpoint (block coords); centerOn stays tp-only. - sand/red_sand/gravel removed from SAFE_GROUND so behavior matches the allowlist comment (refusal is the fail-safe direction). Rollback: revert this commit; guide/set_spawn/go_home return to prior helpers. Verify: node --check on the three .mjs files plus node --test office-validate.test.mjs (10/10). Logs: not applicable (sandbox unit tests); on-host: journalctl -u nix-worker - Redmine #52.[SECURITY SENIOR REVIEW @
62e9beee] APPROVED for merge. Exact-head source review (4 infra@ Good-signed commits, base49f3d43, mergeable=true; merge-tree vs main818fad9clean, no conflicts). (1) Typed game commands only: no raw-command tool; worldCommand takes only constructed strings via server-console FIFO wrapped inexecute as <user> at @s run, 1024-byte atomic cap; username from strict identity regex; player args regex ^[A-Za-z0-9_]+$<=16; coords zod-int tuples (+0.5 centering for tp); build materials pass block-syntax regex + live-registry check + denylist (command/structure/jigsaw/tnt/lava/fire/portals/respawn_anchor) + requireRegion to own home/office components + 64-op/32768-block caps. (2) Plan bounds: move/look/escort/guide/set_spawn all enforce the real single-box campus (site-plan.json min [480,80,-272] max [824,176,24], verified on main); checkFooting refuses unloaded chunks (null=refuse), non-air feet/head, and non-allowlisted ground (liquids/hazards/gravity blocks excluded); guide verifies arrival +/-1 and errors otherwise; set_spawn honestly reports verified:false with death-respawn verification required. (3) Tests: office-validate.test.mjs 10 tests executed by reviewer with system node against the REAL site-plan.json — 10/10 pass; Nix checkPhase (node --check both modules + node --test) anchors the same suite in worker build iij7j8a. (4) prompts/roles delta in the diff is main-side PR281 content (branch base predates it; branch touches no prompts/ files) — merges clean, no governance revert. Notes (non-blocking, founder-accepted): guide teleports another player without their in-world consent — covered by founder's broad game-only authority, destination-validated + arrival-verified; live canary/04:48:22 server confirmation and Nix build hash taken as reported (source supports both, not independently executed here); sent_commands counter only increments on build (status understates other tools). Merge stays with the authorized merger; no deploy action.62e9beeee0to416eb14301[SECURITY SENIOR REVIEW @
416eb14— REBASE CONFIRMATION] APPROVED for merge. Rebase of canary-tested62e9beeeonto merged maina20029b1(merge-base verified =a20029b1; PR283 merge confirmed on main). All six office files byte-identical between62e9beeeand416eb14(empty diff on office-server.mjs, office-validate.mjs, office-validate.test.mjs, default.nix, package.json, hub office-world.ts); the only delta is the already-approved merged PR283 hub content now in base. 4 rebased commits all infra@ Good-signed; prompts/roles match main exactly (stale-governance concern closed). Prior exact-head findings (review 4832: typed-commands-only, real campus bounds, fail-safe footing, guide arrival-verified, honest set_spawn, 10/10 validation tests executed by reviewer) stand unchanged. Merge stays with the authorized merger; no deploy action.APPROVED on exact head
416eb143. Independently verified tracked infra SSH signature, clean six-file comparison with tested62e9beeeand ancestry on shared-hub maina20029b1. Canonical Nix worker iij7j8a and hub x20h7q passed. Root ran the packaged 12-tool MCP world canary and verified the actual Minecraft server spawn confirmation. Typed command validation, real campus bounds, safe footing, honest submitted-vs-verified result, packaging and tests were inspected in the preceding review. Senior APPROVED exists on this exact head. This is source approval; deployment and all-resident acceptance remain open.