refactor(simulation): rename DistrictSkeleton→QuarterSkeleton per D-222 (#950)
D-222 renamed the 512m generation cell from District to Quarter (District is now a new 2048m tier above it). Align the generation skeleton code to the canonical vocabulary. Pure naming — no behavior change; all 1296 lib tests + integration tests pass unchanged. Renamed (spatial-cell identifiers): - DistrictSkeleton → QuarterSkeleton, DistrictWorldState → QuarterWorldState - DistrictId → QuarterId, DistrictContext/DistrictBoundaries → Quarter* - field district_id → quarter_id, district_type → quarter_type - BodyWorldState.districts map → .quarters - generate_skeleton → generate_quarter_skeleton Deliberately left as-is (these name functional ZONING, not the spatial tier — orthogonal to D-222): DistrictType, DistrictLayoutMode, the district_mix module (DistrictMix/compute_district_mix), and the GenWorkItem::GenerateSkeleton / GenCompletion::SkeletonGenerated variants. Also aligned the perception "sim tile" → "subtile" vocabulary (D-222: Subtile = 0.5m) in decisions/perception.md and the generation-cascade code comments. Historical D-066/D-094/D-201/D-220 decision bodies keep their existing D-222 amendment notes (not rewritten in place); the public max_offset_sim_tiles fn name is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -93,16 +93,16 @@ fn drain_generation_completions(
|
||||
} => {
|
||||
if !body_id.is_empty() {
|
||||
if let Some(body_state) = cache.peek_mut(&body_id) {
|
||||
// Key by state.skeleton.district_id (D-194/D-230): a city has many
|
||||
// districts, each with its own DistrictId. `city_id` is only the
|
||||
// Key by state.skeleton.quarter_id (D-194/D-230): a city has many
|
||||
// quarters, each with its own QuarterId. `city_id` is only the
|
||||
// dispatch key used in the work item — the canonical insert key is
|
||||
// the district's own stable id. TODO(#957): the stub GenerateSkeleton
|
||||
// returns a default skeleton with district_id=0; real gen (#957) will
|
||||
// the quarter's own stable id. TODO(#957): the stub GenerateSkeleton
|
||||
// returns a default skeleton with quarter_id=0; real gen (#957) will
|
||||
// populate it from CityGenerationContext.
|
||||
let _ = city_id; // used as dispatch key only; district_id is the map key
|
||||
let _ = city_id; // used as dispatch key only; quarter_id is the map key
|
||||
body_state
|
||||
.districts
|
||||
.insert(state.skeleton.district_id, *state);
|
||||
.quarters
|
||||
.insert(state.skeleton.quarter_id, *state);
|
||||
} else {
|
||||
tracing::warn!(
|
||||
city_id,
|
||||
|
||||
Reference in New Issue
Block a user