Files
jpmschweitzer 8b3baf511f chore(meta): plan Sprint 37: Sweep — 25-ticket spring-clean sprint
Tickets:
- ci (7): #854, #855, #856, #857, #858, #859, #723
- server (9): #853, #860, #862, #863, #874, #877, #878, #789, #847
- client (6): #866, #869, #870, #872, #873, #875
- copy (3): #861, #865, #876

Themes: asset pipeline discipline, PROTOCOL_VERSION removal (D-192),
D-167 HeritageRoot purge, D-032 smuggler/detective enum audit, New Game
regression fix + merge-path test coverage, copy wiki residue purge,
bookmark save-state, generator quality patches.

Debt surfaced from Q/D-record sweep: Q-095 Commission name, D-167 and
D-032 residue, plus spring-cleaning pulls from stale backlog (#789,
#847, #723, #862).

#868 cancelled (superseded by #874 + #875).
2026-04-21 16:00:22 +02:00

6.3 KiB

Sprint 37: Sweep — Server Tasks

Goal: Spring-clean accumulated debt: asset pipeline discipline, PROTOCOL_VERSION removal, D-167/D-032 dead-code purge, New Game regression fix, copy wiki residue, bookmark save-state, and generator quality patches.

Branch: sprint-37/server Agents: Dudley (dev), Tyre (arch), Hoshe (QA)

New Tickets

# Title Priority Blocked by
#863 Wire SelectedBookmark into SaveState medium
#874 Drop PROTOCOL_VERSION on server (D-192) medium
#853 Generator-patch follow-up: dedup, mountains, suffix, compass medium
#860 Resolve 21 raw-commodity / system coverage gate gaps medium
#877 Remove HeritageRoot type alias and Heritage enum variant (D-167) medium
#878 Audit and purge dead smuggler/detective character enum (D-032) medium
#847 Determinism smoke test for generate_atlas.py low
#789 fix(simulation): storyteller activation_pass log DEBUG not WARN low
#862 Refactor BookmarkPlugin to accept injected registry low

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

Key Decisions

  • decisions/architecture.md — D-192 (drop PROTOCOL_VERSION lockstep handshake), D-005 (IPC protocol)
  • decisions/content.md — D-167 (corridors replace heritage roots, 2026-03-24)
  • decisions/perception.md — D-032 (smuggler/detective enum obsolete post-D-117; D-121 culture-driven voice)

Notes

#863 — Wire SelectedBookmark into SaveState

  • Add Serialize, Deserialize derives to SelectedBookmark in server/src/bookmark/mod.rs.
  • Register SelectedBookmark as a serializable resource in server/src/simulation/save_state.rs.
  • Round-trip test: save with bookmark selected → load → SelectedBookmark survives.
  • Update bookmark spec §4.4 (docs/architecture/sprint-36-bookmark-spec.md) — remove the v0.2-deferred scope note.
  • Replaces inline TODO at server/src/bookmark/mod.rs:95-99.

#874 — Drop PROTOCOL_VERSION on server (D-192)

  • Remove: version field from snapshot envelope in server/src/bridge/types.rs, PROTOCOL_VERSION constant, and version stamp in encode path.
  • Keep all field-presence and roundtrip behavioral tests. Tautological version-literal assertions were already deleted in Sprint 36.
  • Client ticket #875 is blocked by this — server PR merges first.
  • After this lands, genuine schema drift surfaces as MessagePack missing-field errors downstream. That is the intended signal.

#853 — Generator-patch follow-up

  • Patch tooling/planet-gen/generate_atlas.py and tooling/planet-gen/gemma_naming.py for 7 systematic issues documented in docs/design/atlas-generator-refinement-notes.md:
    1. Cross-body city name dedup (49 collisions — 'Jade Harbor' on 20 bodies, 'Fort Iron' on 10)
    2. Cross-body mountain name dedup (186 bodies with empty names, 'Riverbend' on 39)
    3. Suffix monotony (-rant/-berg clustering)
    4. Compass-direction defaults — forbid 'Eastern X / Western Y' pattern in few-shot
    5. Cultural crossmix gap — thread corridor + cultural-history context into naming prompt
    6. River vocabulary bleeding from navigational terms (blocklist circumflex/contraflow)
    7. Unnamed infrastructure — emit <City-A>-<City-B> convention for roads/rail at generation time
  • Verification: re-run Paula's analysis script after patching; confirm collision counts drop.

#860 — Resolve 21 coverage gate gaps

  • make economy-db Phase 2 coverage gate fails on 21 raw-commodity/system gaps in tier1 corp tags. The brand layer (V-B01..V-B06) passes cleanly — this is upstream.
  • Identify the 21 specific gaps. Either backfill tier1 corp tags or relax the gate if gaps are intentional (e.g. commodity deliberately imported from outside the Reach).
  • make economy-db must pass end-to-end before Phase 2 demand simulation can run in anger.

#877 — Remove HeritageRoot + Heritage variant (D-167)

  • D-167 (2026-03-24) retired the 7 abstract heritage roots in favor of corridors. Two dead stubs remain:
    • pub type HeritageRoot = String; at server/src/simulation/generator.rs:76
    • ZonePaletteModifier::Heritage(HeritageRoot) variant at generator.rs:369
  • Delete the type alias, drop the enum variant, remove all Heritage modifier construction sites.
  • Verify no external consumer before deleting. Same pattern as D-192 cleanup.

#878 — Audit and purge D-032 dead enum

  • D-032 is marked "[Obsolete post-D-117: smuggler/detective eliminated. v0.2 uses culture-driven voice per D-121; this enum is unused.]"
  • Known reference sites: server/src/bridge/types.rs, server/src/perception/observer/mod.rs, server/tests/archetype_monologue.rs, and content schemas.
  • Audit first — some usages may be load-bearing (e.g. a wider pattern match). Remove confirmed-dead surface only. Do not mass-delete before reading each callsite.

#847 — Determinism smoke test for generate_atlas.py

  • ~60 lines of bash or pytest. Place in tests/ consistent with project test layout.
  • Run generate_atlas.py --body <small-body> --force --seed 42 twice; diff markers.json byte-for-byte.
  • Fails if output differs. Guardrail against determinism regressions in terrain analysis, city placement, A*, and naming.

#789 — Storyteller log level fix

  • activation_pass: no Simmering triangles — holding fires as WARN every few seconds during early gameplay when no NPC relationships have escalated. This is normal state, not an error condition.
  • Change to DEBUG or TRACE. One-line fix.

#862 — BookmarkPlugin registry injection

  • BookmarkPlugin::build calls register_default_bookmarks(&mut registry) unconditionally — no hook for a test registry.
  • Proposed: BookmarkPlugin::new(registry) injection. Default constructor still wires the canonical tycoon registry; injection variant is for tests and future TOML loading.
  • File: server/src/bookmark/mod.rs:107-118. Flagged in PR #132 review; accepted as follow-up.

Dependency Chain

#874 (server PROTOCOL_VERSION drop) → unblocks #875 (client)
#877, #878, #789, #847, #862 → standalone, parallel
#863, #853, #860 → standalone, parallel

PR Workflow

tea pr create --repo jpmschweitzer/settled-reach --login schweitz \
  --title "refactor(server): sprint 37 — dead code purge, protocol cleanup, generator patches" \
  --description "body" \
  --base main --head sprint-37/server