chore(meta): T-1042/T-1078 -> done (PR #167 merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2060,3 +2060,5 @@ INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, chang
|
||||
INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, changed_by, changed_at, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FBPTXP19FFZEVED140S1708W', 'status', 'review', 'done', NULL, '2026-06-15 11:32:22', '2026-06-15 11:32:22', '2026-06-15 11:32:22', NULL, 'b8b2ec70d7657c3ccfb70560912251a1', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, changed_by, changed_at, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FBPQ0308CFF9WKNGBBYQ763W', 'status', 'in_progress', 'review', NULL, '2026-06-15 12:05:57', '2026-06-15 12:05:57', '2026-06-15 12:05:57', NULL, '6562430e4adf95d5d6e780916e1f1263', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, changed_by, changed_at, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FCF56ED5ZJZRXFMF3PNSNZF0', 'status', 'in_progress', 'review', NULL, '2026-06-15 12:05:57', '2026-06-15 12:05:57', '2026-06-15 12:05:57', NULL, 'd71059f27a38312075006f184d16385b', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, changed_by, changed_at, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FBPQ0308CFF9WKNGBBYQ763W', 'status', 'review', 'done', NULL, '2026-06-15 15:42:21', '2026-06-15 15:42:21', '2026-06-15 15:42:21', NULL, '31bbc234714975c19e0f4b02181edb79', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
INSERT INTO ticket_history (ticket_record_id, field, old_value, new_value, changed_by, changed_at, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FCF56ED5ZJZRXFMF3PNSNZF0', 'status', 'review', 'done', NULL, '2026-06-15 15:42:21', '2026-06-15 15:42:21', '2026-06-15 15:42:21', NULL, 'dd0d8b519cda12a9d76690da7833efa0', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
|
||||
@@ -2560,3 +2560,60 @@ D-243 §4 / D-239 §7 RECONCILIATION (no conflict): D-243 §4''s continuous edge
|
||||
API SHAPE (follow the ticket''s own mechanism): ChunkContext gains `secondary: Option<DistrictProfile>` + `blend_weight: u8` (255 = fully primary). The caller of derive_chunk_context detects a chunk lying within one chunk of a district boundary and supplies the adjacent DistrictProfile; derive_voxel_column reads secondary+blend_weight off ChunkContext and integer-blends (D-010: integer arithmetic; f64 only for position per D-239 §4) BEFORE material selection, reusing the same warp offset so the blend seam cannot align with the chunk edge. No new parameter on derive_voxel_column — it reads the context.
|
||||
|
||||
ACCEPTANCE (concrete): add a cross-district chunk-pair test to server/tests/derivation_harness.rs (alongside channel_continuous_across_chunk_boundary_far_from_origin:1054). Pass condition — the elevation step across a district seam is no larger than the typical step between adjacent INTERIOR chunks within a district (i.e. the seam is invisible — operationalizes D-243 "the grid must be invisible"); morphology family seams remain sharp; golden-seed determinism unchanged for chunks far from any district border. No fixed metre threshold (D-239 §8 is qualitative per lithology) — assert continuity relative to interior variation, not an absolute bound.', 'review', 'medium', NULL, 'server', 'D-239', '2026-06-12 10:23:50', '2026-06-15 12:05:57', NULL, 'd61b0595ecc6d66929b7ecabf32a6d63', 2) ON CONFLICT(record_id) DO UPDATE SET type=excluded.type, parent_record_id=excluded.parent_record_id, title=excluded.title, description=excluded.description, status=excluded.status, priority=excluded.priority, assigned_to=excluded.assigned_to, team=excluded.team, decision_ref=excluded.decision_ref, updated_at=excluded.updated_at, deleted_at=excluded.deleted_at, hash=excluded.hash, canonical_version=excluded.canonical_version WHERE excluded.updated_at > tickets.updated_at OR (excluded.updated_at = tickets.updated_at AND excluded.hash > tickets.hash);
|
||||
INSERT INTO tickets (record_id, type, parent_record_id, title, description, status, priority, assigned_to, team, decision_ref, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FBPQ0308CFF9WKNGBBYQ763W', 'task', '06FB0TNSRZXCHGS16BFHSSGSV4', 'Cross-region parameter blending at chunk/voxel scale (replace single-profile walking skeleton)', 'Workshopped-but-unticketed cascade work captured 2026-06-12 (cascade-refocus grounding pass). Full grounded scope follows.
|
||||
|
||||
Implement cross-region parameter blending at the chunk/voxel scale, replacing the walking-skeleton single-profile restriction (server/src/atlas/chunk_context.rs:119-123: ''in the future a blend of adjacent profiles will handle cross-region chunk seams''). Today every voxel generator reads the one covering RegionProfile''s values directly (region.elev_q at voxel.rs:614, :731, :1067-1068; channel/meander params likewise), so continuous parameters step discontinuously at every region-grid border — elevation cliffs at the region pitch, visible as a grid at Atlas/voxel scale.
|
||||
|
||||
Design is decided — stay inside the D-239 §7 seam policy:
|
||||
- NEVER blend morphology family selection. Family seams are prevented at source (gate ordering + build-time compatibility matrix) or kept sharp (cliff-fjord, lithology faults are real geology). Tyre''s cross-family elevation-blend was explicitly resolved against (D-239 dissent line).
|
||||
- DO blend continuous positional parameters: elevation, channel width, meander wavelength/phase, freeze/moisture scalars. Mechanism from tile-derivation-contract/tyre-round1.md: ChunkContext gains secondary: Option<RegionProfile> + blend_weight: u8 (255 = fully primary; :123-125), blend zone one chunk (64 m) each side of the region border (:101-102); derive_voxel resolves parameters from both profiles and integer-blends BEFORE material selection (:217-220), reusing the same warp offset so the blend seam cannot align with the chunk edge; elevation sampled bilinearly from the region grid to chunk resolution (:130, the elevation_grid sketch).
|
||||
- D-010 discipline: integer blend arithmetic; the f64 path only for position math per D-239 §4.
|
||||
|
||||
Note: region size in metres is currently ambiguous (see the scale-anchoring Q-record) — the blend can be implemented against the region grid index regardless, but the Q should be resolved before tuning blend-zone width in metres.
|
||||
|
||||
Acceptance: T-1031 harness cross-region chunk pairs show no elevation step exceeding the lithology-permitted slope (D-239 §8) at region borders; family seams remain sharp; determinism golden-seed unchanged for chunks far from borders. Parent: T-750. Refs: D-239 §4/§7/§8, D-010; Q-102; T-1026/T-1028/T-1029 (predecessors).
|
||||
|
||||
---
|
||||
Refinement (2026-06-15, /whats-next Si pass) — supersedes the stale code/scale refs above. The original scope was authored 2026-06-12, BEFORE T-1077 landed (RegionProfile→DistrictProfile rename + D-243 re-scale). Design intent unchanged; the references below are the current tree.
|
||||
|
||||
REFRAME — this is cross-DISTRICT blending, not cross-region. After T-1077 the per-voxel carrier is the DistrictProfile (2,048 m district), so the single-profile "walking skeleton" restriction is a single-DISTRICT-profile restriction and the visible step is at the 2 km district pitch (finer / more visible than the old "region grid" framing). There is no RegionProfile / region.elev_q in the tree anymore.
|
||||
|
||||
CURRENT REFS (use these):
|
||||
- Carrier: server/src/atlas/district_profile.rs (DistrictProfile).
|
||||
- The "future blend" TODO: server/src/atlas/chunk_context.rs:166-168 ("in the future a blend of adjacent profiles will handle cross-district chunk seams, but for the walking skeleton one profile is sufficient").
|
||||
- Per-voxel elevation reads: server/src/atlas/voxel.rs:443/515/605/723/808/984/1062-1063/1157 (all district.elev_q).
|
||||
- channel width / meander wavelength+phase already live ON ChunkContext (precomputed from DistrictProfile) — blend them on the context, do NOT re-read them from the profile in the blend path.
|
||||
- derive_chunk_context entry: chunk_context.rs:176. derive_voxel_column entry: voxel.rs:330.
|
||||
|
||||
SCALE-Q RESOLVED: D-243 fixed district=2,048 m, region=~205 km — the "region size in metres ambiguous" note is obsolete. Q-102 (noise-basis algorithm) stays open but does NOT block blend-zone arithmetic. Blend zone = one chunk (64 m) each side of the district border, against the district grid index.
|
||||
|
||||
D-243 §4 / D-239 §7 RECONCILIATION (no conflict): D-243 §4''s continuous edge-fuzz mandate governs CLIMATE scalars — that is T-1078''s job. T-1042 blends continuous TERRAIN positional params only: elevation, channel width, meander wavelength/phase, freeze/moisture scalars. Morphology FAMILY selection is NEVER blended — it stays sharp per D-239 §7 (gate ordering + compatibility matrix; cliff-fjord/lithology faults are real geology). The two decisions partition cleanly: family sharp, continuous params feathered.
|
||||
|
||||
API SHAPE (follow the ticket''s own mechanism): ChunkContext gains `secondary: Option<DistrictProfile>` + `blend_weight: u8` (255 = fully primary). The caller of derive_chunk_context detects a chunk lying within one chunk of a district boundary and supplies the adjacent DistrictProfile; derive_voxel_column reads secondary+blend_weight off ChunkContext and integer-blends (D-010: integer arithmetic; f64 only for position per D-239 §4) BEFORE material selection, reusing the same warp offset so the blend seam cannot align with the chunk edge. No new parameter on derive_voxel_column — it reads the context.
|
||||
|
||||
ACCEPTANCE (concrete): add a cross-district chunk-pair test to server/tests/derivation_harness.rs (alongside channel_continuous_across_chunk_boundary_far_from_origin:1054). Pass condition — the elevation step across a district seam is no larger than the typical step between adjacent INTERIOR chunks within a district (i.e. the seam is invisible — operationalizes D-243 "the grid must be invisible"); morphology family seams remain sharp; golden-seed determinism unchanged for chunks far from any district border. No fixed metre threshold (D-239 §8 is qualitative per lithology) — assert continuity relative to interior variation, not an absolute bound.', 'done', 'medium', NULL, 'server', 'D-239', '2026-06-12 10:23:50', '2026-06-15 15:42:21', NULL, 'c91397fc200682ad0f6122ab54b877db', 2) ON CONFLICT(record_id) DO UPDATE SET type=excluded.type, parent_record_id=excluded.parent_record_id, title=excluded.title, description=excluded.description, status=excluded.status, priority=excluded.priority, assigned_to=excluded.assigned_to, team=excluded.team, decision_ref=excluded.decision_ref, updated_at=excluded.updated_at, deleted_at=excluded.deleted_at, hash=excluded.hash, canonical_version=excluded.canonical_version WHERE excluded.updated_at > tickets.updated_at OR (excluded.updated_at = tickets.updated_at AND excluded.hash > tickets.hash);
|
||||
INSERT INTO tickets (record_id, type, parent_record_id, title, description, status, priority, assigned_to, team, decision_ref, created_at, updated_at, deleted_at, hash, canonical_version) VALUES ('06FCF56ED5ZJZRXFMF3PNSNZF0', 'task', '06FB0TNSRZXCHGS16BFHSSGSV4', 'Region climate stack — weather/season/temperature baseline + district modulation + edge fuzz', 'Per D-243 §3/§4 (refines D-239 §2; contributes the region-clock toward Q-105).
|
||||
|
||||
Three-level climate stack:
|
||||
- REGION (~205km): the climate context — latitude-driven temperature baseline, weather state, seasonal clock. Resolved ONCE per region (the Q-105 cheap-dynamism source); inherited by every district/tile inside. ''Region temperature'' = context, not a uniform slab.
|
||||
- DISTRICT (2km): local temperature = region baseline + elevation lapse + slope aspect (D-239 §2''s district temperature, now a MODULATION of the region rather than derived from scratch).
|
||||
- CHUNK/VOXEL: D-239 §3 freeze/snow scatter on the local temperature.
|
||||
|
||||
EDGE FUZZ (D-243 §4): climate does not change on a line. A tile''s climate is a continuous warp-perturbed blend of surrounding regions'' baselines (bilinear across region centres + noise displacement so the boundary is ragged); same at district edges. The region/district grid must be invisible in the output. This is the climate counterpart to D-239 §4''s domain warp — climate is feathered/blended (continuous field), unlike morphology which stays sharp-but-organic (D-239 §7).
|
||||
|
||||
---
|
||||
Refinement (2026-06-15, /whats-next Si pass) — READY. Implementer brief against the current tree (post-T-1077).
|
||||
|
||||
NET-NEW vs REFACTOR:
|
||||
- NET-NEW: the region (~205 km) climate tier is new structure. RegionPos + district_to_region/chunk_to_region already exist (server/src/atlas/scale.rs:70/82/91, from T-1077) — addressing skeleton is laid. There is NO RegionProfile/RegionClimate struct, no weather state, and no seasonal clock in the tree today; this ticket introduces them.
|
||||
- REFACTOR: derive_temperature_c (server/src/atlas/district_profile.rs:792) currently derives district temperature FROM SCRATCH (D-240 class-envelope latitude lerp + greenhouse nudge + lapse + seed nudge, per district). Split it into (a) a region-baseline fn (latitude + greenhouse + nudge, keeping the D-240 planet_class envelope anchoring) and (b) a district-modulation fn (elevation lapse + slope aspect on top of the baseline) per D-239 §2 — district temperature becomes a MODULATION of the region baseline, not an independent derivation.
|
||||
|
||||
DOWNSTREAM (no signature change): derive_cover freeze/snow scatter (voxel.rs:1408, reads district.temperature_c at :1417, from T-1030) consumes the post-refactor per-district value as-is.
|
||||
|
||||
EDGE FUZZ (D-243 §4): climate is a continuous warp-perturbed bilinear blend of surrounding region baselines (+ noise displacement so the boundary is ragged) — the climate counterpart to D-239 §4''s domain warp. Resolved UPSTREAM of build_district_profile, so ChunkContext is unaffected.
|
||||
|
||||
RELATION TO T-1042 (independent — do NOT share the mechanism): T-1078 blends CLIMATE scalars at the region→district seam (205 km); T-1042 blends TERRAIN scalars at the district→chunk seam (2 km). Separate mechanisms — do NOT reuse ChunkContext.secondary/blend_weight for climate. Both proceed in parallel.
|
||||
|
||||
Q-105 DEFERRAL: build the static/mean-state region baseline + edge-fuzz blend + the region-clock STRUCTURE. The transient clock-phase callbacks (seasonal frost form/melt, crop-cycle cadence, recompute schedule) are deferred to Q-105 per the two-phase convention already established in the derive_cover docblock (voxel.rs:185-189). This ticket CONTRIBUTES the region-clock toward Q-105; it does not resolve it.
|
||||
|
||||
FILES: district_profile.rs (split derive_temperature_c; refactor build_district_profile to take a region baseline); new region_profile.rs (RegionProfile/RegionClimate + baseline derivation + edge-fuzz blend); scale.rs (no change — RegionPos/addressing already present); cascade.rs (wire the region tier into the derivation chain). Governing: D-243 §3/§4 (primary), D-239 §2/§3, D-240 (class-envelope anchoring), Q-105 (deferred transient clock).', 'done', 'medium', NULL, 'server', 'D-243', '2026-06-14 19:21:18', '2026-06-15 15:42:21', NULL, 'd89530be1679ff1513ed790d838f216c', 2) ON CONFLICT(record_id) DO UPDATE SET type=excluded.type, parent_record_id=excluded.parent_record_id, title=excluded.title, description=excluded.description, status=excluded.status, priority=excluded.priority, assigned_to=excluded.assigned_to, team=excluded.team, decision_ref=excluded.decision_ref, updated_at=excluded.updated_at, deleted_at=excluded.deleted_at, hash=excluded.hash, canonical_version=excluded.canonical_version WHERE excluded.updated_at > tickets.updated_at OR (excluded.updated_at = tickets.updated_at AND excluded.hash > tickets.hash);
|
||||
|
||||
Reference in New Issue
Block a user