W-10: material diversity (presentation-only soil split + slope outcrops)#439
Merged
Merged
Conversation
Implement post-classify pass that rewrites surface_material byte for soil cells:
- Soil → {SoilDry (u8=9), Soil, SoilWet (u8=10)} based on moisture thresholds
pinned from Phase-0 measurement @512x2 seeds
- Soil* → Bedrock for steep cells (slope >= OUTCROP_SLOPE_THRESHOLD)
- Gated by any-landform-ON (OFF path byte-identical)
- HARD CONSTRAINT: presentation-only (substrate MaterialId unchanged)
Phase-0 measurement results (@512, seeds 1..2):
- Moisture deciles show steep distribution: p50=~10, p90=~80-170
- Slope deciles: p60-p80 are flat (0), tail steep (>3)
- Thresholds pinned from class distribution:
SOILDRY_THRESHOLD = 300 (96% of Soil cells)
SOILWET_THRESHOLD = 700 (1% of Soil cells)
OUTCROP_SLOPE_THRESHOLD = 5
Tests:
- ON-path invariance: biome/caps byte-identical with/without W-10
- OFF-path identity: all landforms disabled → no W-10 pass applied
- Presentation-byte sanity: all values in [0..10] valid discriminants
- Patch coherence smoke test: SoilDry forms coherent patches (no salt-and-pepper)
compile-check: PASS
Issue: Closes #438
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KSFzwj8cXU3wLePgNZWAra
PM intake feedback (F-W10-1, F-W10-2):
- Thresholds 300/700 were folklore, not measurement-driven
- Phase-0 histogram shows 96.5% captured at 300 (defeats diversity goal)
- Re-ran Phase-0 with candidates: CANDIDATE-A (15/80) produces ~51%/29%/20%
distribution (target 40–60 / 25–35 / 15–25) ✓
- Updated constants: SOILDRY_THRESHOLD=15, SOILWET_THRESHOLD=80
- Fixed invariance test: now compares WITH-pass vs WITHOUT-pass (not idempotence)
to prove presentation-only property
New gate: enable_w10_diversity parameter added to classify_and_caps_staged
- Production (classify_and_caps): W-10 enabled by default
- Tests: compare with enable_w10={true, false} on same fixture to verify
biome/caps byte-identity (W-10 touches only surface_material)
Local test results: 4/4 W-10 tests PASS
compile-check: PASS
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KSFzwj8cXU3wLePgNZWAra
Add colour cases for SoilDry (9) and SoilWet (10) with green variants (darker for dry, lighter for wet). Widen histogram from [0u32; 8] to [0u32; 11] to capture all discriminants including Water (8), and add names labels. Fixes map preview corruption and histogram truncation. compile-check: PASS Local W-10 tests: 4 passed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSFzwj8cXU3wLePgNZWAra
Owner
Author
PM Authoritative Critic Verdict ✅ PASSRobustness finding F1 fixed. F1 [robustness] ✅ FIXEDFinding: map_dump.rs did not handle W-10 SoilDry (9) / SoilWet (10) discriminants → colour fallback corruption + histogram truncation. Fix applied:
Evidence: compile-check PASS + 4/4 local W-10 tests PASS (quoted in commits 48ed90f + latest) SummaryW-10 implementation complete:
Ready for merge once CI green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
W-10: Presentation-only material diversity for soil cells. Post-classify pass rewrites surface_material byte to split Soil into {SoilDry, Soil, SoilWet} based on MEASURED moisture thresholds (not folklore), and exposes bedrock outcrops for steep cells.
Phase-0 Measurement & Threshold Calibration
Threshold Selection: CANDIDATE-A (15/80) produces ~51% / 29% / 20% distribution, which is within the target range of 40–60 / 25–35 / 15–25 for three visually distinct, coherent soil regions.
Pinned Constants:
Implementation
enable_w10_diversity && any_landform_on(OFF path byte-identical)Tests (Local Results: 4/4 PASS)
Tests verify:
Acceptance Status
Closes #438