Files
settled-reach/docs/sprints/sprint-11/server.md
T
jpmschweitzerandClaude Opus 4.6 6f9a53cb1f docs(briefings): add Sprint 11 Combine briefings
Server (5 tickets), client (2 tickets), and joint coordination
briefings for the Gauntlet completion sprint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:54:08 +01:00

9.2 KiB

Sprint 11: Combine — Server Tasks

Goal: Complete the Gauntlet test matrix with final interaction-combination rooms and cross-room scenarios, deliver the WRONG-button bug-capture system, resolve open implementation questions OQ-07 and OQ-18, and add contraband detection — hardening the system as a fully covered, testable unit.

Branch: server Agents: Dudley (simulation), Tyre (arch review), Hoshe (QA)


New Tickets

# Title Blocked by
#504 Gauntlet rooms: Sprint Gauntlet, Eavesdrop Alcove, Confrontation Stage #487 (done)
#506 Cross-room transition test scenarios (T1-T8 from Gestalt) #498 (done), #504
#513 Content scaling stress test (100 ticks, max-NPC pack, tick budget) #487 (done), #499 (done)
#425 Contraband detection — NPC scan checks carried items + KG #424 (done)
#524 Resolve OQ-18: dialogue access tiers vs D-041 confidence hierarchy

Use db/connectors/ticket show <id> for full details.


Key Decisions

  • decisions/architecture.md — D-010 (deterministic simulation), D-026 (100ms tick budget), D-041 (knowledge graph — 4-level confidence hierarchy, BTreeMap requirement, dialogue tier mapping)
  • decisions/perception.md — D-055 (sprint suppresses interaction buffer — Sprint Gauntlet room), D-059 (fog/shader five layers — Eavesdrop Alcove), D-060 (cognitive delay — Eavesdrop Alcove), D-070 (confrontation as cognitive vulnerability — Confrontation Stage)
  • decisions/content.md — D-028 (dialogue access layers — OQ-18 resolution), D-065 (contraband spec)
  • decisions/scope.md — D-065 (contraband detection scope)

Open Questions to Resolve Early

  • OQ-18 (#524): Dialogue access tiers vs D-041 confidence hierarchy — Resolve in the first half of the sprint. The decision affects #305 (dialogue selection pipeline filtering logic) which may need updating. Document result as a new D-NNN decision. Consult Gestalt and Nigel on the archetype dimension before closing.

Notes

#504 — Gauntlet rooms: Sprint Gauntlet, Eavesdrop Alcove, Confrontation Stage

  • Existing: server/src/test_world/rooms/ has 7 rooms: hub.rs, fog_theater.rs, occlusion_corridor.rs, inventory_warehouse.rs, interaction_gallery.rs, pause_chamber.rs, dialogue_room.rs, crowd_plaza.rs. Constants live in server/src/test_world/constants.rs. The ROOMS array there is additive-only — append new entries at the end or StableId ranges will shift and break all existing golden files.
  • Deliver three new room modules, each following the exact pattern of existing rooms:
    • Sprint Gauntlet (~28x20): Tests D-055 sprint suppression. Player sprints past a visible NPC; interaction buffer must be empty during sprint, anomaly monologue must fire retroactively after sprint ends. Include a sprint-trigger tile and a reset plate.
    • Eavesdrop Alcove (~24x16): Tests eavesdrop positioning and ListeningFocus (D-071). Player in Careful stance at a corner within audible range of two NPCs in conversation. Test: World SFX boost observable, conversation murmur event emitted (D-072), interaction buffer suppressed at eavesdrop distance.
    • Confrontation Stage (~32x24): Tests D-070 confrontation vulnerability. Player confronts an NPC target; peripheral NPC movement that occurs during confrontation should not trigger anomaly monologue (suppressed by confrontation dip). Post-confrontation delayed monologue fires for the missed event.
  • Each room needs constants in server/src/test_world/constants.rs (GauntletRoom struct + StableId range). Append after RESET_PLATE_STABLE_IDS. Update ROOMS array and EXPECTED_ENTITY_COUNT.
  • Blocks #506 — complete #504 before the sprint midpoint.

#506 — Cross-room transition test scenarios (T1-T8 from Gestalt)

  • Existing: tooling/test-client/src/replay.rs is complete (Sprint 10 #483). tooling/test-client/src/golden.rs has snapshot diffing infrastructure. All 7 Sprint 10 rooms (#498) are done; all 3 new Sprint 11 rooms (#504) must be done first.
  • Deliver 8 cross-room transition tests covering system combination bugs at room boundaries. Source: gestalt-round3.md scenarios T1-T8. Approximate scope:
    • T1 Sprint Exit: Player sprints out of Sprint Gauntlet room into corridor, asserts interaction buffer clears on entry, restores on exit.
    • T2 Inventory Interact: Player picks up item in Inventory Warehouse, carries it to adjacent room, verifies CarriedBy survives room transition (tile presence removed, item appears in player inventory in new room snapshot).
    • T3 Pause Anywhere: Player pauses mid-corridor (between rooms), asserts tick stops, resumes cleanly.
    • T4-T8: Refer to gestalt-round3.md for full scenario specs (knowledge state persistence, fog carry-over, eavesdrop cut on transition, confrontation interrupt on room change).
  • Write tests in server/tests/ or as a dedicated integration test file. Tests must use the replay system or cargo nextest ECS world setup — no ad-hoc test harness.
  • Blocked by #504. Start after Sprint Gauntlet, Eavesdrop Alcove, and Confrontation Stage are wired and the server boots without panic.

#513 — Content scaling stress test (100 ticks, max-NPC pack, tick budget)

  • Existing: server/src/content/ has the content loader. tooling/perf-baseline script exists (Sprint 10 #499). The baseline NPC pack is in place. tests/perf/baseline.json committed.
  • Deliver: A test that spawns the maximum entity count (Active tier ceiling per D-026: 80 NPCs), runs 100 ticks, and asserts that each tick completes within the 100ms budget. Also asserts no behavioral regression on the baseline NPC subset (same positions and knowledge state at tick 100 as in the baseline run). Run via make test-server — not a separate script.
  • Integration: Compare output against tests/perf/baseline.json. The perf baseline tool (#499, done) already defines the output format; match it.
  • Standalone, no cross-team dependency. Can run in parallel with #504.

#425 — Contraband detection: NPC scan checks carried items + KG

  • Existing: server/src/simulation/inventory.rs has CarriedBy, InventorySlot, ItemName, and collect_inventory_for(). The inventory system is complete (#424 done). D-065 defines contraband as unlicensed lattice components. server/src/knowledge/ has graph.rs, registry.rs, types.rs.
  • Deliver: An NPC scan system that, when an NPC with scan authority is within interaction range of the player, queries the player's carried items for contraband flag. If a contraband item is in inventory, update the NPC's KnowledgeGraph (KnowsDetails, source DirectObservation) for the player entity with fact: HasContraband. Emit a scan event to the ObserverSnapshot for client-side rendering (no client ticket required — use existing event wire).
  • Specifics: Define a Contraband marker component on item entities. Define ScanAuthority component on NPC entities with scan permissions. The scan check runs in a dedicated system scheduled after the perception phase, before the snapshot phase. Use StableId references throughout — no raw bevy Entity handles in the knowledge entry.
  • Standalone. No cross-team dependency.

#524 — Resolve OQ-18: dialogue access tiers vs D-041 confidence hierarchy

  • Existing: D-028 defines 4 dialogue access layers: surface/real/secret/unprompted. D-041 defines 4 KG confidence tiers: Suspects < KnowsOf < KnowsDetails < Direct. The dialogue selection pipeline (#305) already filters by confidence tier. OQ-18 asks whether character-archetype dialogue access tiers are the same system or a layered system on top.
  • Deliver: A written decision (commit to decisions/content.md or decisions/architecture.md as appropriate as a new D-NNN) resolving one of: (a) same system — archetype access tiers map directly 1:1 to KG confidence tiers (surface=Suspects+, real=KnowsOf+, secret=KnowsDetails+), or (b) layered — character archetype adds a second gating dimension independent of KG confidence (e.g., detective can always access surface regardless of KG confidence because institutional authority, smuggler needs KnowsOf minimum for surface because outsider). If the decision changes the filtering logic in #305, update that system accordingly.
  • This is a design resolution ticket, not a large implementation task. The output is a decision document + any follow-on code change to the dialogue filter. Time estimate: 0.5d for discussion + decision write-up, up to 1d if #305 needs updating.
  • Resolve early — day 1 or 2 — so downstream content work can proceed with confidence.

Dependency Chain

#504 (Sprint Gauntlet, Eavesdrop Alcove, Confrontation Stage)
    → #506 (cross-room transitions T1-T8)

#513 (stress test 100 ticks) — standalone, parallel
#425 (contraband detection) — standalone, parallel
#524 (OQ-18 resolution) — standalone, resolve day 1-2

Critical path: #504 → #506. Complete #504 before sprint midpoint. All other tickets are parallel tracks.


PR Workflow

When ready to submit, create a PR with tea CLI. All flags are required to avoid TTY prompts (see CLAUDE.md "Gitea access" section):

tea pr create --repo jpmschweitzer/settled-reach --login schweitz \
  --title "feat(simulation): sprint 11 combine — server" \
  --description "body" --base main --head server