Sprint 27 server team deliverables — all 5 tickets complete:
#669 — Move content/ under server/ (colocate with consumer)
#663 — Add ZoneTypeTemplate, LocationSpec, and supporting structs for D-142 zone-type architecture. Both existing RON files validate and deserialize correctly.
#635 — Fix all Clippy warnings (84 files, 2411+/1341-). Server now passes cargo clippy -- --deny warnings cleanly. Tuned .clippy.toml thresholds for Bevy ECS signatures.
#637 — Add cargo audit with make audit target, wired into make pre-pr and pre-commit hook (conditional on Cargo.toml/Cargo.lock changes). RUSTSEC-2025-0141 (bincode) ignored pending #636.
Content files (RON templates, YAML campaigns, gauntlet data) are consumed
exclusively by the server. Colocate them at server/content/ and update all
path references in Rust source, tooling scripts, and schema files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement the zone-type template architecture: ZoneTypeTemplate (behavior
pools per zone category), LocationSpec (instance metadata with role weights),
SocialSiteTypeSpec, RoleWeight, and LocationSocialSite. Add deserialization
tests for rural_agricultural.ron and industrial_freight.ron. Existing ZoneSpec
kept for backward compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix all Clippy warnings across the server codebase (2411 insertions, 1341
deletions). Raise type-complexity-threshold to 750 and too-many-arguments
to 12 in .clippy.toml for idiomatic Bevy ECS system signatures. The server
now passes `cargo clippy -- --deny warnings` cleanly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `make audit` target running `cargo audit` with an advisory ignore for
RUSTSEC-2025-0141 (bincode, tracked by #636). Wire audit into `make pre-pr`
and `make pre-pr-server`. Add conditional cargo audit to the pre-commit hook
(triggers only when Cargo.toml/Cargo.lock are staged).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Well-executed sprint. ZoneTypeTemplate/LocationSpec structs are clearly specified and thoroughly tested. Clippy enforcement banning HashMap/HashSet is the right call for determinism. Cargo audit setup is correctly scoped. All changes are suggestion-level only.
#
File
Severity
Issue
1
blueprint.rs:~299
suggestion
No test for modifier hint matching a category with zero entries then falling back with trace log firing.
2
generator_spike.rs:~514
suggestion
pick_role unreachable fallback to roles[0] — should be unreachable!() or commented.
3
generator_spike.rs:~541
suggestion
build_behavior_pools calls assemble_behaviors with context_filter: None — needs a note that production will need context from NPC assignment.
4
.config/hooks/pre-commit:24
suggestion
Hook calls tooling/check-decision-ids which doesn't exist yet. Degrades gracefully but will warn on every commit.
5
server/audit.toml:9
suggestion
Ignored advisory has no expiry mechanism. Add sprint target comment.
6
v01-yaml-content-audit.md:89
suggestion
Grep command targets data/templates but actual path is server/data/templates/.
7
triangle_escalation.rs:333-340
suggestion
Dead first world/entity setup — only second world is asserted against.
8
storyteller/mod.rs:~554
suggestion
f32 exact equality comment relies on weights being powers of two. Add constraint note.
Tyre (Architecture): APPROVE
Clean D-142 implementation. Template/instance separation is correct — ZoneTypeTemplate (behavior pool, no weights) vs LocationSpec (weights, overrides, concrete sites). All new code uses BTreeMap/VecDeque — D-010 determinism compliance intact. No HashMap anywhere.
#
File
Severity
Issue
1
generator_spike.rs:312-318
suggestion
Hardcoded min_npcs: 1, max_npcs: 6 for all social sites. Add TODO pointing at LocationSocialSite as eventual source.
2
generator_spike.rs:356
suggestion
traits_contradict duplicated from npc/generate.rs. Flag for integration ticket to expose as pub(crate).
3
blueprint.rs module
suggestion
ZoneSpec (legacy) and ZoneTypeTemplate (D-142) coexist. Add #[deprecated] to ZoneSpec once LocationSpec can fully drive the generator.
4
validate_ron.rs:125-137
suggestion
No referential integrity check — eligible_roles values aren't validated against RoleSpec.id in the same template. Easy win for copy team authoring errors.
5
audit.toml
suggestion
Add expected resolution sprint to the ignored advisory comment.
6
storyteller/mod.rs header
suggestion
Module docs still reference v0.1 detective arc framing. Known debt, audit flagged it.
7
.config/hooks/pre-commit:30
suggestion
Add comment clarifying why cd "$REPO_ROOT/server" is needed for worktree compatibility.
Verdict: APPROVED
All issues are suggestion-level only. Both reviewers approve. Clean merge.
Three easy-win suggestions will be applied post-merge:
eligible_roles referential integrity in validate_ron
## Review: server → main (type: code) — PR #94
### Hoshe (Code Quality): APPROVE
Well-executed sprint. ZoneTypeTemplate/LocationSpec structs are clearly specified and thoroughly tested. Clippy enforcement banning HashMap/HashSet is the right call for determinism. Cargo audit setup is correctly scoped. All changes are suggestion-level only.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | blueprint.rs:~299 | suggestion | No test for modifier hint matching a category with zero entries then falling back with trace log firing. |
| 2 | generator_spike.rs:~514 | suggestion | `pick_role` unreachable fallback to `roles[0]` — should be `unreachable!()` or commented. |
| 3 | generator_spike.rs:~541 | suggestion | `build_behavior_pools` calls `assemble_behaviors` with `context_filter: None` — needs a note that production will need context from NPC assignment. |
| 4 | .config/hooks/pre-commit:24 | suggestion | Hook calls `tooling/check-decision-ids` which doesn't exist yet. Degrades gracefully but will warn on every commit. |
| 5 | server/audit.toml:9 | suggestion | Ignored advisory has no expiry mechanism. Add sprint target comment. |
| 6 | v01-yaml-content-audit.md:89 | suggestion | Grep command targets `data/templates` but actual path is `server/data/templates/`. |
| 7 | triangle_escalation.rs:333-340 | suggestion | Dead first world/entity setup — only second world is asserted against. |
| 8 | storyteller/mod.rs:~554 | suggestion | f32 exact equality comment relies on weights being powers of two. Add constraint note. |
### Tyre (Architecture): APPROVE
Clean D-142 implementation. Template/instance separation is correct — `ZoneTypeTemplate` (behavior pool, no weights) vs `LocationSpec` (weights, overrides, concrete sites). All new code uses BTreeMap/VecDeque — D-010 determinism compliance intact. No HashMap anywhere.
| # | File | Severity | Issue |
|---|------|----------|-------|
| 1 | generator_spike.rs:312-318 | suggestion | Hardcoded `min_npcs: 1, max_npcs: 6` for all social sites. Add TODO pointing at `LocationSocialSite` as eventual source. |
| 2 | generator_spike.rs:356 | suggestion | `traits_contradict` duplicated from `npc/generate.rs`. Flag for integration ticket to expose as `pub(crate)`. |
| 3 | blueprint.rs module | suggestion | `ZoneSpec` (legacy) and `ZoneTypeTemplate` (D-142) coexist. Add `#[deprecated]` to `ZoneSpec` once LocationSpec can fully drive the generator. |
| 4 | validate_ron.rs:125-137 | suggestion | No referential integrity check — `eligible_roles` values aren't validated against `RoleSpec.id` in the same template. Easy win for copy team authoring errors. |
| 5 | audit.toml | suggestion | Add expected resolution sprint to the ignored advisory comment. |
| 6 | storyteller/mod.rs header | suggestion | Module docs still reference v0.1 detective arc framing. Known debt, audit flagged it. |
| 7 | .config/hooks/pre-commit:30 | suggestion | Add comment clarifying why `cd "$REPO_ROOT/server"` is needed for worktree compatibility. |
### Verdict: APPROVED
All issues are suggestion-level only. Both reviewers approve. Clean merge.
Three easy-win suggestions will be applied post-merge:
1. `eligible_roles` referential integrity in validate_ron
2. Grep path fix in v01-yaml-content-audit.md
3. Pre-commit hook — remove nonexistent `check-decision-ids` call
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Sprint 27 server team deliverables — all 5 tickets complete:
content/underserver/(colocate with consumer)ZoneTypeTemplate,LocationSpec, and supporting structs for D-142 zone-type architecture. Both existing RON files validate and deserialize correctly.cargo clippy -- --deny warningscleanly. Tuned.clippy.tomlthresholds for Bevy ECS signatures.cargo auditwithmake audittarget, wired intomake pre-prand pre-commit hook (conditional on Cargo.toml/Cargo.lock changes). RUSTSEC-2025-0141 (bincode) ignored pending #636.Verification
cargo check— cleancargo clippy -- --deny warnings— zero warningscargo test --lib— 1147 tests passcargo audit— 0 vulnerabilities (1 allowed warning)tooling/validate-ron server/content/global/zone-types/rural_agricultural.ron zone_type— passesTest plan
make pre-pr-serverpassesmake auditruns without errorcontent/→server/content/moveReview: server → main (type: code) — PR #94
Hoshe (Code Quality): APPROVE
Well-executed sprint. ZoneTypeTemplate/LocationSpec structs are clearly specified and thoroughly tested. Clippy enforcement banning HashMap/HashSet is the right call for determinism. Cargo audit setup is correctly scoped. All changes are suggestion-level only.
pick_roleunreachable fallback toroles[0]— should beunreachable!()or commented.build_behavior_poolscallsassemble_behaviorswithcontext_filter: None— needs a note that production will need context from NPC assignment.tooling/check-decision-idswhich doesn't exist yet. Degrades gracefully but will warn on every commit.data/templatesbut actual path isserver/data/templates/.Tyre (Architecture): APPROVE
Clean D-142 implementation. Template/instance separation is correct —
ZoneTypeTemplate(behavior pool, no weights) vsLocationSpec(weights, overrides, concrete sites). All new code uses BTreeMap/VecDeque — D-010 determinism compliance intact. No HashMap anywhere.min_npcs: 1, max_npcs: 6for all social sites. Add TODO pointing atLocationSocialSiteas eventual source.traits_contradictduplicated fromnpc/generate.rs. Flag for integration ticket to expose aspub(crate).ZoneSpec(legacy) andZoneTypeTemplate(D-142) coexist. Add#[deprecated]toZoneSpeconce LocationSpec can fully drive the generator.eligible_rolesvalues aren't validated againstRoleSpec.idin the same template. Easy win for copy team authoring errors.cd "$REPO_ROOT/server"is needed for worktree compatibility.Verdict: APPROVED
All issues are suggestion-level only. Both reviewers approve. Clean merge.
Three easy-win suggestions will be applied post-merge:
eligible_rolesreferential integrity in validate_roncheck-decision-idscallPull request closed