Capstone test for the T-974 tile-derivation epic. New server/tests/derivation_harness.rs (29 tests) plus its seed→tile golden fixture, covering four domains:
Golden-seed determinism regression (D-239 §1 / D-010) — pins (seed, region, chunk_pos, tile_pos) → VoxelColumn as a JSON golden; any drift in the derivation chain trips it.
Per-family <5 ms/chunk budget (D-239 §10) — derives a full 64×64 chunk per family; hard gate under BUDGET_ASSERT=1.
Validation bodies (D-239 §1) — lore-anchored, DB-free: Kallast/Glødberg/Marevna validated; Velen/Gruenfeld skipped (not in wiki) with logged reason.
D-240 alignment
This branch was rebased onto the merged T-1033 class-envelope temperature work:
Validation-body fixtures no longer set the removed BodyParams orbit/star fields (orbital_period_days, axial_tilt_deg, spectral_class, star_type).
Marevna's temperature note/assertion rewritten for the envelope model: oceanic band [-12, 28]°C + maritime factor 0.6 + standard-atmosphere greenhouse → ~+26°C at the equator (replacing the stale ~-56°C orbit-equilibrium note).
Harness fmt'd + one clippy lint fixed (the file predated the gate's cargo-test/clippy coverage).
## T-1031 — D-239 Tile-Derivation Verification Harness
Capstone test for the **T-974** tile-derivation epic. New `server/tests/derivation_harness.rs` (29 tests) plus its seed→tile golden fixture, covering four domains:
1. **Golden-seed determinism regression** (D-239 §1 / D-010) — pins `(seed, region, chunk_pos, tile_pos) → VoxelColumn` as a JSON golden; any drift in the derivation chain trips it.
2. **§8 binding-law sweeps** (D-239 §8) — drainage monotonicity, lithology→landform, glaciation→form (FjordWall only at GlaciationGrade ≥ 2), climate→vegetation no-skip + riparian band.
3. **Per-family <5 ms/chunk budget** (D-239 §10) — derives a full 64×64 chunk per family; hard gate under `BUDGET_ASSERT=1`.
4. **Validation bodies** (D-239 §1) — lore-anchored, DB-free: Kallast/Glødberg/Marevna validated; Velen/Gruenfeld skipped (not in wiki) with logged reason.
### D-240 alignment
This branch was rebased onto the merged **T-1033** class-envelope temperature work:
- Validation-body fixtures no longer set the removed `BodyParams` orbit/star fields (`orbital_period_days`, `axial_tilt_deg`, `spectral_class`, `star_type`).
- Marevna's temperature note/assertion rewritten for the envelope model: oceanic band `[-12, 28]°C` + maritime factor `0.6` + standard-atmosphere greenhouse → **~+26°C at the equator** (replacing the stale ~-56°C orbit-equilibrium note).
- Harness `fmt`'d + one clippy lint fixed (the file predated the gate's cargo-test/clippy coverage).
Closes **T-1031**. Completes epic **T-974**.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adapt the believability/budget verification harness to the T-1033 BodyParams
strip: validation-body fixtures (Kallast/Glødberg/Marevna) no longer set the
removed orbit/star fields (orbital_period_days, axial_tilt_deg, spectral_class,
star_type). Temperature is now derived from the planet_class envelope (D-240),
so the Marevna validation note/assertion is rewritten — oceanic band [-12,28]°C
+ maritime 0.6 + standard-atmosphere greenhouse yields ~+26°C at the equator
(was a stale ~-56°C orbit-equilibrium note). Add the seed→tile golden fixture
(tests/golden/derivation_harness.json) that the determinism regression locks.
Also fmt the harness and fix one clippy lint (iter().copied().collect() ->
to_vec()) — the file predated the pre-push gate's cargo-test/clippy coverage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two code reviewers (Hoshe — code quality/QA, Tyre — architecture). Both APPROVE; Hoshe raised three actionable findings, all addressed in 5cc4ff6c.
Hoshe (code quality / test correctness): APPROVE
The harness covers all four stated domains; the golden is a real regression surface (double-derivation equality + JSON value comparison). Three silent-pass / dead-code issues:
#
File
Issue
Resolution
1
derivation_harness.rsassert_drainage_monotonicity + the 3 sweep tests
Helper returns early when a chunk has no wet tiles; sweeps couldn't guarantee any chunk exercised the law → could pass with zero assertions
Helper now returns whether it actually checked; each sweep asserts ≥1 chunk hit the wet path. Fixed.
Single-row Y=32 probe may miss the trough → sea-level law silently skipped
Scans the full 64×64 chunk and asserts the deep-water trough exists. Fixed.
3
derivation_harness.rsmake_test_terrain_analysis
Dead code behind #[allow(dead_code)] + "future use" comment
Removed. Fixed.
Tyre (architecture): APPROVE
The harness faithfully encodes the D-239 contract — the four §8 laws map onto real classifier behavior (not tautologies), the FjordWall GlaciationGrade ≥ 2 gate is tested on both sides against the actual gate, the golden pins the integer-discriminant surface per D-010, and the D-240 class-envelope alignment is sound. Making derive_morphology_zonepub is the correct minimal exposure (integration tests are a separate crate; pub(crate) would not link). All notes were informational/non-blocking:
Marevna temp comment (~+26°C) — verified against the runtime value (26.225°C); accurate. (Tyre's hand-calc of ~28°C assumed a flat greenhouse add + warm-end clamp that the implementation doesn't produce.)
+3 m levee tolerance and the fjord-floor ≤5 m asymmetry are correctly grounded in D-239 §9. No change.
Brittleness note: has_active_channel coupling may shift when Phase 4 BraidedPlain/lithology lands — harness degrades gracefully; re-confirm golden cases hit the wet path then. (Informational.)
Verdict: APPROVED (findings addressed in 5cc4ff6c)
Closes T-1031; completes epic T-974. Pre-push gate green (fmt, clippy -D warnings, full cargo test).
## Review: verification-harness → main (type: code)
Two code reviewers (Hoshe — code quality/QA, Tyre — architecture). Both **APPROVE**; Hoshe raised three actionable findings, all addressed in `5cc4ff6c`.
### Hoshe (code quality / test correctness): APPROVE
The harness covers all four stated domains; the golden is a real regression surface (double-derivation equality + JSON value comparison). Three silent-pass / dead-code issues:
| # | File | Issue | Resolution |
|---|------|-------|------------|
| 1 | `derivation_harness.rs` `assert_drainage_monotonicity` + the 3 sweep tests | Helper returns early when a chunk has no wet tiles; sweeps couldn't guarantee any chunk exercised the law → could pass with zero assertions | Helper now returns whether it actually checked; each sweep asserts ≥1 chunk hit the wet path. **Fixed.** |
| 2 | `derivation_harness.rs` `law_drainage_monotonicity_fjord_floor_at_sea_level` | Single-row `Y=32` probe may miss the trough → sea-level law silently skipped | Scans the full 64×64 chunk and asserts the deep-water trough exists. **Fixed.** |
| 3 | `derivation_harness.rs` `make_test_terrain_analysis` | Dead code behind `#[allow(dead_code)]` + "future use" comment | Removed. **Fixed.** |
### Tyre (architecture): APPROVE
The harness faithfully encodes the D-239 contract — the four §8 laws map onto real classifier behavior (not tautologies), the FjordWall `GlaciationGrade ≥ 2` gate is tested on both sides against the actual gate, the golden pins the integer-discriminant surface per D-010, and the D-240 class-envelope alignment is sound. Making `derive_morphology_zone` `pub` is the correct minimal exposure (integration tests are a separate crate; `pub(crate)` would not link). All notes were informational/non-blocking:
- Marevna temp comment (~+26°C) — verified against the **runtime** value (`26.225°C`); accurate. (Tyre's hand-calc of ~28°C assumed a flat greenhouse add + warm-end clamp that the implementation doesn't produce.)
- `+3 m` levee tolerance and the fjord-floor `≤5 m` asymmetry are correctly grounded in D-239 §9. No change.
- Brittleness note: `has_active_channel` coupling may shift when Phase 4 BraidedPlain/lithology lands — harness degrades gracefully; re-confirm golden cases hit the wet path then. (Informational.)
### Verdict: APPROVED (findings addressed in `5cc4ff6c`)
Closes **T-1031**; completes epic **T-974**. Pre-push gate green (fmt, clippy `-D warnings`, full `cargo test`).
Hoshe review findings — close silent-pass gaps in the §8 drainage tests:
- assert_drainage_monotonicity now returns whether it actually checked (chunk
had both wet and dry tiles); the three sweep tests (Alluvial/Meander/Braided
Delta) assert at least one chunk exercised the law, so a regression that
zeroes all channels fails loudly instead of passing vacuously.
- The fjord-floor test scans the full 64x64 chunk instead of a single Y=32 row
and asserts the deep-water trough exists, so the sea-level floor law can no
longer be skipped by a probe that missed the trough.
- Remove the unreferenced make_test_terrain_analysis helper (was behind
#[allow(dead_code)] with a 'future use' comment — the maintenance trap the
review flagged); make_dry_terrain_analysis covers the validation bodies.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
T-1031 — D-239 Tile-Derivation Verification Harness
Capstone test for the T-974 tile-derivation epic. New
server/tests/derivation_harness.rs(29 tests) plus its seed→tile golden fixture, covering four domains:(seed, region, chunk_pos, tile_pos) → VoxelColumnas a JSON golden; any drift in the derivation chain trips it.BUDGET_ASSERT=1.D-240 alignment
This branch was rebased onto the merged T-1033 class-envelope temperature work:
BodyParamsorbit/star fields (orbital_period_days,axial_tilt_deg,spectral_class,star_type).[-12, 28]°C+ maritime factor0.6+ standard-atmosphere greenhouse → ~+26°C at the equator (replacing the stale ~-56°C orbit-equilibrium note).fmt'd + one clippy lint fixed (the file predated the gate's cargo-test/clippy coverage).Closes T-1031. Completes epic T-974.
🤖 Generated with Claude Code
Review: verification-harness → main (type: code)
Two code reviewers (Hoshe — code quality/QA, Tyre — architecture). Both APPROVE; Hoshe raised three actionable findings, all addressed in
5cc4ff6c.Hoshe (code quality / test correctness): APPROVE
The harness covers all four stated domains; the golden is a real regression surface (double-derivation equality + JSON value comparison). Three silent-pass / dead-code issues:
derivation_harness.rsassert_drainage_monotonicity+ the 3 sweep testsderivation_harness.rslaw_drainage_monotonicity_fjord_floor_at_sea_levelY=32probe may miss the trough → sea-level law silently skippedderivation_harness.rsmake_test_terrain_analysis#[allow(dead_code)]+ "future use" commentTyre (architecture): APPROVE
The harness faithfully encodes the D-239 contract — the four §8 laws map onto real classifier behavior (not tautologies), the FjordWall
GlaciationGrade ≥ 2gate is tested on both sides against the actual gate, the golden pins the integer-discriminant surface per D-010, and the D-240 class-envelope alignment is sound. Makingderive_morphology_zonepubis the correct minimal exposure (integration tests are a separate crate;pub(crate)would not link). All notes were informational/non-blocking:26.225°C); accurate. (Tyre's hand-calc of ~28°C assumed a flat greenhouse add + warm-end clamp that the implementation doesn't produce.)+3 mlevee tolerance and the fjord-floor≤5 masymmetry are correctly grounded in D-239 §9. No change.has_active_channelcoupling may shift when Phase 4 BraidedPlain/lithology lands — harness degrades gracefully; re-confirm golden cases hit the wet path then. (Informational.)Verdict: APPROVED (findings addressed in
5cc4ff6c)Closes T-1031; completes epic T-974. Pre-push gate green (fmt, clippy
-D warnings, fullcargo test).Pull request closed