chore(meta): T-1083/T-1082/T-1080 -> done (believability stack merged)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2768,3 +2768,6 @@ DEFERRED (ticket item 3 — explicitly optional): per-layer PNG maps (the T-960
|
||||
This is the D-245 enforcer; advisory now, ratchets to strict (BELIEVABILITY_STRICT) once Q-123 calibrates thresholds and T-1080/1081/1082 flip the criteria.
|
||||
|
||||
Stack-review note (2026-06-28): the believability sampling-bias fix (contiguous-prefix -> seeded Fisher-Yates spread in sample_indices) is logically a T-1083 enforcer-correctness fix but landed in the T-1082 commit cdc55032d (found while verifying T-1082). git history records it accurately under the water-body work; flagged so a bisect lands in the expected place. The Fisher-Yates termination fix + drainage-proxy exclusion of water districts (stack review) are in the T-1080 review-fix commit.', NULL, '2026-06-28 15:38:18', '2026-06-28 15:38:18.309', '2026-06-28 15:38:18.309', NULL, '4b9f44267a786f912a1d4744ee1aa36b', 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 ('06FGSJTXTADJRHYEE1WTAENYAG', 'status', 'in_progress', 'done', NULL, '2026-06-28 16:02:46', '2026-06-28 16:02:46.330', '2026-06-28 16:02:46.330', NULL, '66fcb4c2c045444b78cfc270ba3e14b7', 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 ('06FGSJWWZNWYT3C4T828ZF1QCG', 'status', 'in_progress', 'done', NULL, '2026-06-28 16:02:46', '2026-06-28 16:02:46.337', '2026-06-28 16:02:46.337', NULL, '3d4736181c620fea8037c2e863bb4a89', 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 ('06FGSJZG3WFPQ3VXBFQFM4YEWW', 'status', 'in_progress', 'done', NULL, '2026-06-28 16:02:46', '2026-06-28 16:02:46.338', '2026-06-28 16:02:46.338', NULL, 'fe177606db9f2ee174a5cc0131ec8b64', 2) ON CONFLICT(hash) DO NOTHING;
|
||||
|
||||
@@ -3688,3 +3688,53 @@ DEFERRED (ticket item 3 — explicitly optional): per-layer PNG maps (the T-960
|
||||
This is the D-245 enforcer; advisory now, ratchets to strict (BELIEVABILITY_STRICT) once Q-123 calibrates thresholds and T-1080/1081/1082 flip the criteria.
|
||||
|
||||
Stack-review note (2026-06-28): the believability sampling-bias fix (contiguous-prefix -> seeded Fisher-Yates spread in sample_indices) is logically a T-1083 enforcer-correctness fix but landed in the T-1082 commit cdc55032d (found while verifying T-1082). git history records it accurately under the water-body work; flagged so a bisect lands in the expected place. The Fisher-Yates termination fix + drainage-proxy exclusion of water districts (stack review) are in the T-1080 review-fix commit.', 'in_progress', 'high', NULL, 'server', 'D-239', '2026-06-28 05:55:19.712', '2026-06-28 15:38:18.308', NULL, '0b6572cca4a24c9658cf4751d7573add', 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 ('06FGSJTXTADJRHYEE1WTAENYAG', 'story', '06FGSJNP8YM537DJCC82ZD6544', 'District climate fields lack spatial gradient — uniform moisture/precip/vegetation yields monotone terrain', 'Probe evidence (Arbour @ yolo): moisture_q=80, precip=SuperHumid, veg_class=Forest in ~every one of 2048 districts; the voxel layer then derives terrain=Wetland 100% everywhere. The derivation is LAW-CORRECT (flat + wet -> Wetland, D-239 section 8) — the defect is upstream: the district-scale climate/moisture field has near-zero cross-district variance, so there is no gradient to drive ecotones, material variety, or vegetation bands. Without gradient the ''edge-fuzzed climate'' promise is invisible (nothing to fuzz). Direction to discuss: where moisture/precip SHOULD vary (latitude, orography/rain-shadow, continentality, distance-to-water) and how to introduce believable spatial gradient into the district derivation. Believability gap, not a crash.
|
||||
|
||||
---
|
||||
Refinement (Si pass, 2026-06-28) — READY (no design fork; localized fix).
|
||||
|
||||
ROOT CAUSE: derive_moisture_q (district_profile.rs) takes only &BodyParams → returns a body-scale constant (ocean → 80) identical for all districts. Structurally cannot vary.
|
||||
|
||||
FIX: restructure derive_moisture_q to body-ceiling (from hydrosphere) modulated by per-district factors, mirroring derive_temperature_c''s shape (envelope → latitude lerp → elevation lapse → seed nudge), integer/D-010:
|
||||
- LATITUDE band: equator wetter → pole drier (uses latitude_deg, already threaded for temperature).
|
||||
- ELEVATION lapse: high elev_q → drier (orographic/rain-shadow).
|
||||
- CONTINENTALITY: far from water → drier, via TerrainAnalysis.water_dist (Chebyshev cells-to-water, already computed in features.rs; aggregate a per-district mean in the existing derive_district_profile cell loop).
|
||||
- small deterministic seed nudge (±N) for per-district variety.
|
||||
Signature: derive_moisture_q(params, elev_q, ocean_fraction_q, water_dist_q). build_district_profile forwards them; derive_district_profile accumulates water_dist.
|
||||
|
||||
PROPAGATION: precipitation_class (derive_precipitation_class_from_climate) + vegetation_class (derive_vegetation) + morphology Wetland gate (slope_q<=5 && moisture_q>=60) all read moisture_q → diversify automatically.
|
||||
|
||||
TUNING: add [moisture_gradient] to server/data/climate_constants.toml + matching ClimateConstants struct defaults (kept in sync by hand until T-1032 wires TOML loading, per the existing constraint).
|
||||
|
||||
DETERMINISM: integer (water_dist u16, integer division, clamp 0..100). D-010 ok.
|
||||
|
||||
VERIFY: believability harness gate moisture_q.distinct>=3 flips FAIL→PASS; vegetation-present should rise too. Magnitude calibration is Q-123 (provisional coefficients now). Files: district_profile.rs, climate_constants.toml.', 'done', 'high', NULL, 'server', 'D-239', '2026-06-28 05:54:42.258', '2026-06-28 16:02:46.330', NULL, 'a58653ebc014cfa374fcf62f736f6f18', 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 ('06FGSJWWZNWYT3C4T828ZF1QCG', 'story', '06FGSJNP8YM537DJCC82ZD6544', 'No water-body voxel generator — OpenOcean/Lake/TidalFlat render as dry land', 'Probe evidence (Arbour @ yolo, an OCEAN world): OpenOcean districts derive water=Dry 100% with vegetation Forest 62% on Wetland substrate — i.e. the sea is painted as dry forested land. Root cause (voxel.rs zone_to_family): OpenOcean/Lake/TidalFlat/Wetland fall back to the AlluvialPlain (dry-land) generator; there is no water-body generator that lays Water::Deep/Shallow for water zones, sets a sea/lake surface elevation, or forms coastlines. On an ocean world this means the majority of the surface renders wrong. Known incompleteness (the fallback is documented), filed so it has a home. Direction to discuss: a water-body morphology family (ocean / lake / tidal-flat) that sets Deep/Shallow water + substrate + coast, and how sea level (heightmap sea_level threshold) feeds it.
|
||||
|
||||
---
|
||||
Refinement (Si pass + user ruling, 2026-06-28) — resolves the ''direction to discuss'':
|
||||
|
||||
- FAMILY: dedicated WaterBody family (9th D-239 family) for OpenOcean/Lake/TidalFlat, branching internally on morphology_zone (like IncisedGorge covers MountainPass/ValleyFloor/Alpine). Amend D-239 §5/§6 (8→9 families) + zone_to_family.
|
||||
- FIDELITY: RICHER — a Shallow fringe along the district-anchored shoreline (ChunkContext.coast_anchor_m, as CliffCoast uses) + Deep toward the interior; TidalFlat = all Shallow (intertidal).
|
||||
- SUBSTRATE: reuse existing TerrainMaterial (no new variant). Rock seabed/shore where slope_q is steep (Rock IS in the enum — rocky available both above and below water, per user), Sand where gentle; TidalFlat = Wetland (mud). Vegetation = Barren in all water voxels (fixes ''Forest on the sea'').
|
||||
- SURFACE: water surface elevation_m = 0 (the sea-level convention the existing coastal families already use — raw heightmap sea_level does NOT reach the voxel tier; only ocean_fraction_q/elev_q do). Depth is conveyed by the Water axis (Deep/Shallow), not by elevation_m.
|
||||
- COVER: reuse derive_cover so cold-body water gets Ice (frozen seas on Edict) — important for the frozen-world believability case.
|
||||
- SCOPE: Wetland zone STAYS AlluvialPlain (it is land — a marsh, not open water; only the 3 named zones get WaterBody). Transient tidal wet/dry alternation deferred to Q-105.
|
||||
- DETERMINISM: integer arithmetic only (D-010); warp before the integer voxel address, as the other families.
|
||||
- VERIFICATION: the T-1083 believability harness must flip ''water renders wet'' toward green for Arbour + Edict; update the golden (UPDATE_GOLDEN) to capture the improvement.', 'done', 'high', NULL, 'server', 'D-239', '2026-06-28 05:54:58.429', '2026-06-28 16:02:46.337', NULL, 'bf04f9dee586698f22aeebd9d2cb81b3', 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 ('06FGSJZG3WFPQ3VXBFQFM4YEWW', 'story', '06FGSJNP8YM537DJCC82ZD6544', 'Repeatable believability test protocol — cross-district contrast + coherence metrics (promote aliveness_probe)', 'Promote the throwaway probe (server/src/bin/aliveness_probe.rs) into a committed, repeatable believability test protocol — the instrument that found T-1080/T-1081/T-1082. For a body+seed it runs the deterministic cascade and emits: (1) cross-district CONTRAST/variance metrics — moisture, elevation/relief, slope, morphology-zone diversity, terrain-material diversity, vegetation gradient — the screen that catches ''uniform/dead'' worlds; (2) COHERENCE checks with pass/fail — water zones must render wet, vegetation must correlate with moisture/water-distance/slope/aspect, drainage monotonic; (3) optional per-layer PNG maps (a stopgap for the T-960 Atlas viewer). LESSON BAKED IN: the first naive ''is it vegetated'' metric reported a broken uniform world as ALIVE — so the protocol MUST measure CONTRAST + COHERENCE across samples, never marginal per-tile counts. Make it runnable per-body, deterministic (string seed -> u64), snapshot a baseline for regression. This is the D-245 ENFORCER. NOTE: today it samples at the DISTRICT tier because no production code maps a world chunk -> covering DistrictProfile yet (voxel layer is a walking skeleton). Distinct from T-1031 (binding-LAW harness); believability sibling. Relates to T-960.
|
||||
|
||||
---
|
||||
Implemented 2026-06-28 (branch believability-harness).
|
||||
|
||||
- server/src/atlas/believability.rs (new): the enforcer core. BelievabilityReport (serde, golden-able) + analyze() = CONTRAST (per-field min/max/distinct over ALL districts for moisture/elev/slope/ocean; distinct morphology-zones/vegetation-classes/terrain-materials) + COHERENCE (water-renders-wet [T-1082], drainage-monotonic, vegetation-present). evaluate_criteria() = advisory D-245 checks (thresholds Q-123-TBD). cascade_for_body()/seed_to_u64() loader shared by bin + harness. Unit tests prove the metric distinguishes uniform (fails) vs varied (passes) — the ''never marginal per-tile counts'' lesson — + determinism.
|
||||
- server/src/bin/aliveness_probe.rs: refactored to a thin CLI over the module; prints the body-level report + advisory D-245 criteria; dropped the naive per-tile ''reads ALIVE'' verdict.
|
||||
- server/tests/believability_harness.rs (+ tests/golden/believability.json): real cascade for Arbour (temperate/ocean) + Edict (frozen/ice); determinism assert; golden regression (updates when T-1080/T-1082 land); BELIEVABILITY_STRICT=1 fails on unmet criteria. Skips if data absent. x86_64 golden.
|
||||
|
||||
BASELINE @ believability-v1: Arbour 3/7, Edict 3/7. FAIL: moisture gradient (distinct=1, T-1080), water-renders-wet (T-1082), drainage-monotonic. Edict vegetation 0/64 = blank tundra (the frozen ''reads dead'' case). PASS: elevation relief, morphology variety, vegetation-present (Arbour only).
|
||||
|
||||
DEFERRED (ticket item 3 — explicitly optional): per-layer PNG maps (the T-960 Atlas-viewer stopgap). The contrast+coherence metrics are the core enforcer; maps are a follow-up if the human-gate review wants them before T-960.
|
||||
|
||||
This is the D-245 enforcer; advisory now, ratchets to strict (BELIEVABILITY_STRICT) once Q-123 calibrates thresholds and T-1080/1081/1082 flip the criteria.
|
||||
|
||||
Stack-review note (2026-06-28): the believability sampling-bias fix (contiguous-prefix -> seeded Fisher-Yates spread in sample_indices) is logically a T-1083 enforcer-correctness fix but landed in the T-1082 commit cdc55032d (found while verifying T-1082). git history records it accurately under the water-body work; flagged so a bisect lands in the expected place. The Fisher-Yates termination fix + drainage-proxy exclusion of water districts (stack review) are in the T-1080 review-fix commit.', 'done', 'high', NULL, 'server', 'D-239', '2026-06-28 05:55:19.712', '2026-06-28 16:02:46.338', NULL, '682f72f4c7d0310247d4cfe20a2f347e', 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