feat(worldgen): micro-habitat mosaic + native biospheres (T-1084/T-1085) #172

Closed
jpmschweitzer wants to merge 0 commits from micro-habitat-mosaic into main
Owner

Intra-class micro-habitat mosaic (T-1084) + native-biosphere register (T-1085), grounded in D-246, D-247, and a D-228 amendment. Mosaic mechanism (vegetation/water, section-8-safe, hydrology-gated) + grassland biome-awareness; cold-barren worlds now render structured-sparse. Biosphere: authored chirality bit (edible Compatible vs inedible-inert Mirror), Cadwal-to-Linnaeus rename (IP fix), biosphere_class DB pipeline via the stamped regen-db path (111 Compatible : 108 Mirror among inhabited alive), alien-ecology vocabulary preserved as canon. Full test suite green, clippy/ruff clean, systems.db regenerated + stamped. Non-blocking follow-ups: proper_name DB propagation, WS4 Forest biomes, Burnelli food-economy consumer.

Intra-class micro-habitat mosaic (T-1084) + native-biosphere register (T-1085), grounded in D-246, D-247, and a D-228 amendment. Mosaic mechanism (vegetation/water, section-8-safe, hydrology-gated) + grassland biome-awareness; cold-barren worlds now render structured-sparse. Biosphere: authored chirality bit (edible Compatible vs inedible-inert Mirror), Cadwal-to-Linnaeus rename (IP fix), biosphere_class DB pipeline via the stamped regen-db path (111 Compatible : 108 Mirror among inhabited alive), alien-ecology vocabulary preserved as canon. Full test suite green, clippy/ruff clean, systems.db regenerated + stamped. Non-blocking follow-ups: proper_name DB propagation, WS4 Forest biomes, Burnelli food-economy consumer.
jpmschweitzer added 7 commits 2026-07-05 13:04:06 +02:00
D-246 (architecture): intra-class micro-habitat mosaic — a voxel_mosaic()
sub-chunk noise band modulates the D-228 axes into spatially-coherent,
relief-conditioned micro-habitats; palette keyed on surface-class ×
climate-biome × biosphere-register; five new D-228 axis values front-loaded
for determinism; within-patch believability metric in scope. Governs T-1084.

D-247 (content): habitable Reach worlds were alive before humans — the
settlement timeline forbids terraforming from dead rock. An authored per-world
chirality bit gates whether native life is edible (Compatible) or
inedible-but-inert (Mirror); "safe" and "edible" are decoupled; colonization
is ecological war that grows an Earth-crop footprint outward from settlements.
Grounds D-246's native-vs-introduced register.

D-228 amended: +Vegetation{Meadow,Deadfall,Lichen}, +TerrainMaterial{Hardpan,Scree}.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sub-chunk mosaic that modulates the D-228 axes into a spatially-coherent,
relief/moisture-conditioned mosaic of micro-habitats within a terrain class —
the fix for the aliveness probe's uniform "Wetland 100%".

- seed.rs: SeedDomain::VoxelMosaic = 12 (append-only; pinned-discriminant guard)
- voxel.rs: five new D-228 axis values (Vegetation::{Meadow,Deadfall,Lichen},
  TerrainMaterial::{Hardpan,Scree}); the per-family-gated mosaic pass
- detail_scatter.rs: voxel_mosaic() selection field (~8-64 m band)
- atlas/mosaic.rs: surface-class palette + integer-basis-point weighted selection
  with moisture-affinity conditioning; temperate/native baseline palettes
- data/mosaic_constants.toml: source-canonical palette mirror
- believability.rs: micro_habitat_distinct metric + D-245 intra-class criterion

v1 scope (D-246-faithful): modulates vegetation + water only, in the vegetated
classes (Wetland/Forest/Grassland), so the D-239 §8 lithology law is untouched;
water is gated on the T-1040 has_active_channel hydrology rule. Material variants
(hardpan/scree) and the extreme classes are a §8-aware follow-up; the biome-aware
palette variants (T-1085 vocab) extend the baseline before generation.

Goldens regenerated (believability + derivation). Full server suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Operationalize the D-247 native-biosphere premise in the wiki (workstreams 1-2).

Chirality continuity — additive clauses making each world's biosphere_class
legible without contradicting existing prose:
- GJ-524 (Mirror): the "no indigenous hazard" world has no indigenous *nutrition*
  either — mirror-handed, inedible/inert; its promise is Earth-crop suitability.
- GJ-166A / Keid (Compatible): names the stakes the charter defends — Linnaeus's
  biology is edible/cultivable/exploitable, which is *why* it is preserved.
- GJ-684A / Freyburg (Compatible): "robust but non-competitive" = compatible
  chemistry, outcompeted by bred cultivars — not inert.
- GJ-124 / Hạ Long (Compatible): the two-generation "learn to farm" was learning
  which native (chirality-compatible) organisms to harvest — a genuine alien crop.
- GJ-197 / Puerto Último (Compatible): native life is edible in its own right;
  farming leaned on trusted introduced cultivars.

IP fix — the Keid conservancy world was named "Cadwal", Jack Vance's exact book
title (same narrative role). Renamed **Linnaeus** (the great classifier; pairs
with its neighbour Solander/Solandar). Capital stays "Vance" (the author tribute).
Renamed in the body frontmatter (+ biosphere_class: NativeCompatible), the
GJ-166A infobox, and the atlas proposal; D-247 clarified. The systems.db bake
(workstream 3) will propagate the DB + regenerate the infobox authoritatively.

Solandar and Oshima need no continuity edit (already canon-consistent).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The mosaic palette gains a climate-biome dimension for the Grassland surface-class:
savanna / temperate / boreal / tundra now read distinctly rather than collapsing to
one biome-blind palette (the D-246 biome-awareness fix).

- atlas/mosaic.rs: ClimateBiome (from temperature_c + moisture_q) + four biome-keyed
  Grassland palettes; palette(class, biome). Savanna carries scattered Forest copses,
  tundra carries lichen + sparse bare ground and no forest. §8-safe (veg + water only).
- atlas/voxel.rs: derive the biome; a cold barren district (tundra/boreal) now takes
  the sparse mosaic rather than staying blank — worlds that read "0 vegetated / blank"
  now read structured-sparse (D-245 climate-appropriateness). vegetated_districts
  8→20 and 0→39 on the cold validation bodies.
- data/mosaic_constants.toml: biome-keyed grassland mirror.
- docs/design/alien-ecology-vocabulary.md: Miri's full biome × register naming layer
  (the cane/vane/wrack/husk/drum-root native lexicon + Earth-register names) — the
  derived-label source for the palette and Phase-5 rendering.

Believability golden regenerated. Full server suite green. Forest biomes and the
introduced-Earth register are the noted continuation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The D-247 chirality/edibility register as authored data on every body, via the
stamped regen-db path (import_economics) — not a manual bake.

- systems-schema.sql + migration.py: nullable bodies.biosphere_class column.
- economy_import/bodies.py: populate_biosphere_class — reads the authored
  environment.biosphere_class frontmatter override, else the D-247 two-gate default
  (Gate 0 habitability from atmosphere/hydrosphere/inhabited; Gate 1 Compatible/Mirror
  from economic_base_primary; neutral remainder -> stable ~50/50 split). Recomputes
  every body each regen (frontmatter + default are its complete source).
- import_economics.py: wired as import step 17.
- frontmatter overrides for the bodies whose default deviates from canon:
  Solandar=NativeMirror, GJ-524=NativeMirror (uninhabited-but-alive), Ha Long=
  NativeCompatible (its transit economy hides its aquaculture identity). Linnaeus,
  Arbour, Oshima, Freyburg, Puerto Ultimo, Edict all default correctly.

systems.db regenerated + stamped. All 9 canon exemplars verified; distribution is
111 Compatible : 108 Mirror among inhabited alive worlds (~50/50 target), Airless for
uninhabited bodies, TerraformedSterile for thin-atmosphere worlds.

Follow-up (rename completion): propagating Linnaeus to bodies.proper_name in the DB
(still "Cadwal" — proper_name is atlas-CLI-owned, and a wipe+reimport would drop
non-proposal columns like founding_age_years; needs a targeted approach).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
Owner

Review: micro-habitat-mosaic → main (type: code)

Reviewers: Hoshe (QA / code quality) + Tyre (architecture). Both ran against the branch source and the governing D-records; both confirmed findings against the branch's regenerated systems.db and the test suites.

Pre-push gates were green (fmt, clippy -D warnings, full cargo test, tooling tests, systems.db stamp). Process note: the branch author ran no in-game runtime smoke — not applicable here (server/tooling/data branch, no client code path).


Hoshe (QA / code quality): REQUEST_CHANGES

The core Rust mosaic mechanism (mosaic.rs selection math, voxel_mosaic() noise field, the voxel.rs integration guard) is correct, deterministic, and honors D-239 §8 (terrain material untouched) + the T-1040 hydrology gate — verified by reading and by running the suites (mosaic/voxel/detail_scatter units, derivation_harness, believability_harness all pass; golden diffs are legitimate, minimal, correctly-scoped). One confirmed Python bug + a doc/code gap.

# File Issue
H1 tooling/economy-db/economy_import/bodies.py:310 Confirmed bug. _default() gate 0 returns Airless for not inhabited, conflating settlement with biosphere and contradicting D-247 ("worlds were alive before humans"). Data: 2996/3240 (92.5%) get Airless; ≥24 uninhabited bodies have a real atmosphere + liquid water (e.g. GJ0g-1: dense atm, rivers) yet are force-Airless; only 220/3240 reach the Compatible/Mirror split, so the ~50/50 target applies to a far smaller population than intended. Fix: gate on atmosphere/hydrosphere alone. Also: D-247 (content.md:635) says the default derives from economic_base_primary + planet_class — the code never reads planet_class, and the substitution isn't recorded.
H2 governance/decisions/architecture.md:1885 vs server/src/atlas/voxel.rs:537 D-246 item 5 says flat families take the full mosaic (Sand/Rock/Gravel/Lava + micro-relief nudge), but the apply match hard-codes _ => false for them. Consequence: TerrainMaterial::{Hardpan, Scree} (2 of the 5 new D-228 values this decision adds) are never constructed on any reachable path. Legit v1 scope cut — but D-246 was never amended to say so (unlike D-239's postscripts for T-1080/81/82). Only record is a code comment + ticket history.
H3 server/src/atlas/voxel.rs:529-576 No dedicated test for the new integration surface (the apply gate, the water == Dry && has_active_channel guard, wetness conditioning). Passes only because an unmodified pre-existing test happens to exercise a Forest district. Add a purpose-built regression test.
H4 server/src/atlas/voxel.rs:512 Comment says relief_signal ~[-0.5, +0.5]; real bound is ~[-1,+1] (envelope signal clamps to [0,1], can reach 1.0). Not functional (wetness is clamped) — misleading comment.
H5 tooling/economy-db/economy_import/bodies.py:261-277 Manual (non-YAML) frontmatter fallback doesn't strip quotes or validate against the {NativeCompatible, NativeMirror, TerraformedSterile, Airless} enum — a quoted value or typo writes to the DB silently. Low real-world risk; worth a guard.
FYI server/data/systems.db bodies.proper_name for GJ166Ac still reads "Cadwal" despite the rename (already tracked as remaining work in T-1085 — flagged so it isn't lost before merge).

Tyre (architecture): REQUEST_CHANGES

Core architecture is sound and faithful: SeedDomain::VoxelMosaic=12 is a clean append-only body-global domain, voxel_mosaic() reuses the T-1081 enveloped-fBm machinery correctly, selection is integer-basis-points with the sanctioned f64-truncate discipline (D-010/D-239 §4), the five new D-228 values are correctly append-only + discriminant-pinned, and the biosphere_class pipeline routes through the correct stamped regen-db path (schema+migration+consumer ship together, D-247). One blocking defect.

# File Issue
C1 server/src/atlas/mosaic.rs:106-119 + voxel.rs:542-548 BLOCKING. The cold-barren mosaic branch re-grants vegetation the climate withheld. ClimateBiome::from_climate classifies every sub-zero temp as Tundra (no frozen floor), and the Grassland apply-gate fires on any Barren-dominant Tundra/Boreal district with no moisture check — overriding derive_vegetation exactly where it returned Barren for temp < -50 (surface ice = geology, D-239 §2) or hyper-arid (moisture_q < 5). Data: GJ244Ad (Edict) — a frozen ice world, hydrosphere=ice, moisture 0–20 — goes vegetated_districts: 0 → 39 in the committed golden (a frozen world reading 61% vegetated tundra). Violates D-245 §5, D-239 §2/§8. Fix: give the mosaic the same frozen/moisture floors as derive_vegetation (don't let it re-grant withheld cover), and regenerate believability.json.
C2 tooling/economy-db/economy_import/bodies.py (_default) Two-gate default omits planet_class, which D-247 names as a default input (same root as H1). Reconcile: use it, or amend D-247's "+ planet_class" phrasing to the atmosphere/hydrosphere signals actually used.
C3 server/src/atlas/believability.rs:376-380 The intra-class variety criterion (micro_habitat_distinct >= 3) fails on both golden bodies (2, 1). Advisory (K deferred to Q-123), so not independently blocking — but as a raw min over patches against palettes with a dominant entry (dense stand 40/90), min ≈ 1–2 regardless of overall quality: the mechanic's own acceptance metric is structurally near-unreachable as specified. Also pools cross-class triples within a chunk (D-246 framed it same-class). Reconsider the estimator when Q-123 calibrates K.
C4 server/src/atlas/voxel.rs:523-524 The "§8-safe" comment owns only the lithology half of §8; §8 also carries the climate→vegetation law. The no-skip half is upheld (Forest palette has no Barren), but the guaranteed riparian Thicket band along channels is downgraded to a probabilistic palette where "brook" wins ~13% of channel-side voxels. Qualify the comment to own the vegetation half; confirm the riparian band still reads after C1.

Verdict: CHANGES REQUESTED

Load-bearing fixes (both real, data-confirmed correctness bugs):

  • C1 — mosaic over-vegetates frozen/hyper-arid worlds; add frozen/moisture floors + regenerate the golden.
  • H1 — the inhabited pre-gate mis-classifies uninhabited-but-alive worlds as Airless (systemic); gate on atmosphere/hydrosphere alone. C2/H1 also flag the missing planet_class input — reconcile code ↔ D-247.

Follow-through (all actionable): C3 (metric estimator), C4 + H2 (D-246 scope/§8-vegetation fidelity — amend the record), H3 (integration test), H4 (comment range), H5 (frontmatter validation). Plus the already-tracked proper_name DB propagation.

🤖 Combined review by Hoshe + Tyre via Claude Code

# Review: micro-habitat-mosaic → main (type: code) Reviewers: **Hoshe** (QA / code quality) + **Tyre** (architecture). Both ran against the branch source and the governing D-records; both confirmed findings against the branch's regenerated `systems.db` and the test suites. Pre-push gates were green (fmt, clippy `-D warnings`, full `cargo test`, tooling tests, systems.db stamp). Process note: the branch author ran no in-game runtime smoke — not applicable here (server/tooling/data branch, no client code path). --- ## Hoshe (QA / code quality): REQUEST_CHANGES The core Rust mosaic mechanism (`mosaic.rs` selection math, `voxel_mosaic()` noise field, the `voxel.rs` integration guard) is correct, deterministic, and honors D-239 §8 (terrain material untouched) + the T-1040 hydrology gate — verified by reading and by running the suites (mosaic/voxel/detail_scatter units, `derivation_harness`, `believability_harness` all pass; golden diffs are legitimate, minimal, correctly-scoped). One confirmed Python bug + a doc/code gap. | # | File | Issue | |---|------|-------| | H1 | `tooling/economy-db/economy_import/bodies.py:310` | **Confirmed bug.** `_default()` gate 0 returns `Airless` for `not inhabited`, conflating *settlement* with *biosphere* and contradicting D-247 ("worlds were alive before humans"). Data: **2996/3240 (92.5%) get Airless**; ≥24 uninhabited bodies have a real atmosphere + liquid water (e.g. `GJ0g-1`: dense atm, rivers) yet are force-`Airless`; only 220/3240 reach the Compatible/Mirror split, so the ~50/50 target applies to a far smaller population than intended. Fix: gate on `atmosphere`/`hydrosphere` alone. Also: D-247 (`content.md:635`) says the default derives from `economic_base_primary` **+ `planet_class`** — the code never reads `planet_class`, and the substitution isn't recorded. | | H2 | `governance/decisions/architecture.md:1885` vs `server/src/atlas/voxel.rs:537` | D-246 item 5 says flat families take the *full* mosaic (Sand/Rock/Gravel/Lava + micro-relief nudge), but the `apply` match hard-codes `_ => false` for them. Consequence: `TerrainMaterial::{Hardpan, Scree}` (2 of the 5 new D-228 values this decision adds) are **never constructed on any reachable path**. Legit v1 scope cut — but D-246 was never amended to say so (unlike D-239's postscripts for T-1080/81/82). Only record is a code comment + ticket history. | | H3 | `server/src/atlas/voxel.rs:529-576` | No dedicated test for the new integration surface (the `apply` gate, the `water == Dry && has_active_channel` guard, wetness conditioning). Passes only because an unmodified pre-existing test happens to exercise a Forest district. Add a purpose-built regression test. | | H4 | `server/src/atlas/voxel.rs:512` | Comment says `relief_signal ~[-0.5, +0.5]`; real bound is ~`[-1,+1]` (envelope `signal` clamps to `[0,1]`, can reach 1.0). Not functional (wetness is clamped) — misleading comment. | | H5 | `tooling/economy-db/economy_import/bodies.py:261-277` | Manual (non-YAML) frontmatter fallback doesn't strip quotes or validate against the `{NativeCompatible, NativeMirror, TerraformedSterile, Airless}` enum — a quoted value or typo writes to the DB silently. Low real-world risk; worth a guard. | | FYI | `server/data/systems.db` | `bodies.proper_name` for `GJ166Ac` still reads `"Cadwal"` despite the rename (already tracked as remaining work in T-1085 — flagged so it isn't lost before merge). | ## Tyre (architecture): REQUEST_CHANGES Core architecture is sound and faithful: `SeedDomain::VoxelMosaic=12` is a clean append-only body-global domain, `voxel_mosaic()` reuses the T-1081 enveloped-fBm machinery correctly, selection is integer-basis-points with the sanctioned f64-truncate discipline (D-010/D-239 §4), the five new D-228 values are correctly append-only + discriminant-pinned, and the biosphere_class pipeline routes through the correct stamped regen-db path (schema+migration+consumer ship together, D-247). One blocking defect. | # | File | Issue | |---|------|-------| | C1 | `server/src/atlas/mosaic.rs:106-119` + `voxel.rs:542-548` | **BLOCKING.** The cold-barren mosaic branch re-grants vegetation the climate withheld. `ClimateBiome::from_climate` classifies *every* sub-zero temp as `Tundra` (no frozen floor), and the Grassland apply-gate fires on any Barren-dominant Tundra/Boreal district **with no moisture check** — overriding `derive_vegetation` exactly where it returned Barren for `temp < -50` (surface ice = geology, D-239 §2) or hyper-arid (`moisture_q < 5`). Data: **GJ244Ad (Edict) — a frozen ice world, hydrosphere=ice, moisture 0–20 — goes `vegetated_districts: 0 → 39`** in the committed golden (a frozen world reading 61% vegetated tundra). Violates D-245 §5, D-239 §2/§8. Fix: give the mosaic the same frozen/moisture floors as `derive_vegetation` (don't let it re-grant withheld cover), and regenerate `believability.json`. | | C2 | `tooling/economy-db/economy_import/bodies.py` (`_default`) | Two-gate default omits `planet_class`, which D-247 names as a default input (same root as H1). Reconcile: use it, or amend D-247's "+ planet_class" phrasing to the atmosphere/hydrosphere signals actually used. | | C3 | `server/src/atlas/believability.rs:376-380` | The `intra-class variety` criterion (`micro_habitat_distinct >= 3`) fails on both golden bodies (2, 1). Advisory (K deferred to Q-123), so not independently blocking — but as a raw *min over patches* against palettes with a dominant entry (dense stand 40/90), min ≈ 1–2 regardless of overall quality: the mechanic's own acceptance metric is structurally near-unreachable as specified. Also pools cross-class triples within a chunk (D-246 framed it same-class). Reconsider the estimator when Q-123 calibrates K. | | C4 | `server/src/atlas/voxel.rs:523-524` | The "§8-safe" comment owns only the *lithology* half of §8; §8 also carries the climate→vegetation law. The no-skip half is upheld (Forest palette has no Barren), but the guaranteed riparian Thicket band along channels is downgraded to a probabilistic palette where "brook" wins ~13% of channel-side voxels. Qualify the comment to own the vegetation half; confirm the riparian band still reads after C1. | --- ## Verdict: CHANGES REQUESTED **Load-bearing fixes** (both real, data-confirmed correctness bugs): - **C1** — mosaic over-vegetates frozen/hyper-arid worlds; add frozen/moisture floors + regenerate the golden. - **H1** — the `inhabited` pre-gate mis-classifies uninhabited-but-alive worlds as `Airless` (systemic); gate on atmosphere/hydrosphere alone. **C2/H1** also flag the missing `planet_class` input — reconcile code ↔ D-247. **Follow-through** (all actionable): C3 (metric estimator), C4 + H2 (D-246 scope/§8-vegetation fidelity — amend the record), H3 (integration test), H4 (comment range), H5 (frontmatter validation). Plus the already-tracked `proper_name` DB propagation. 🤖 Combined review by Hoshe + Tyre via Claude Code
jpmschweitzer added 3 commits 2026-07-05 17:54:05 +02:00
Hoshe + Tyre review of the micro-habitat-mosaic branch requested changes on two
data-confirmed correctness bugs plus follow-through. All addressed.

Blocking:
- C1 (voxel.rs): the mosaic re-granted vegetation the climate withheld — a frozen
  ice world (Edict) read 61% vegetated tundra. The Grassland apply-gate now fires
  only where the climate already grants cover (!Barren); a climatically-barren
  district (frozen < -50C = surface ice/geology D-239 §2, or hyper-arid moisture<5,
  both resolved to VegetationClass::Barren upstream) is skipped. Genuine tundra
  (cold + moisture>=15) is Scrub upstream and still reaches the tundra palette via
  the same !Barren path. believability.json regenerated: Edict vegetated_districts
  39->0, Arbour 20->8 (its real cold-pole/arid districts revert to barren);
  intra-class variety preserved (Arbour vegetation_classes 3, micro_habitat_distinct 2).
- H1 (bodies.py): biosphere Gate 0 keyed on `inhabited`, conflating settlement with
  biosphere and force-Airless'ing uninhabited-but-alive worlds (D-247: worlds were
  alive before humans). Gate 0 is now settlement-independent — keyed on
  atmosphere/hydrosphere/planet_class. 24 uninhabited-alive worlds now classified
  (was 0); GJ0g-1 (dense atm + rivers) -> NativeMirror. Split 122 Compatible :
  121 Mirror; all 9 canon exemplars hold.

Follow-through:
- C2 (bodies.py + D-247): Gate 0 now reads planet_class (barren -> Airless) as
  D-247's "+ planet_class" phrasing names. D-247 amended to record the actual
  two-gate signal set (atm/hydro/planet_class habitability; economic_base_primary
  chirality; settlement-independence).
- C3 (believability.rs): micro_habitat_distinct criterion relaxed to `== 0 || >= 2`
  — the min-over-patches estimator makes K=3 unreachable against a dominant-entry
  palette; K=2 provisional, Q-123 calibrates.
- C4 + H2 (D-246): amended to record the v1 scope cut — only the Soil-derived
  vegetated/wet classes take the mosaic; material-driven families are `_ => false`
  so Hardpan/Scree are authored but unreachable in v1; no elevation change in v1;
  the mosaic OWNS the §8 climate->vegetation law for the classes it touches.
- H3 (voxel.rs): three dedicated mosaic-pass regression tests — C1 barren-respect,
  §8 material-untouched + forest-textured, T-1040 no-water-without-channel.
- H4 (voxel.rs): relief_signal comment corrected to ~[-1,+1].
- H5 (bodies.py): frontmatter override now strips quotes + validates against the
  4-value enum (warn-and-skip on typo).

systems.db regenerated + stamped (H1). believability golden regenerated (C1).
Full cargo test green; clippy -D warnings + ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Player-facing entries for the T-1084 intra-class mosaic and T-1085 native biosphere register shipped in this branch (D-246/D-247). Describes the shipped post-review behavior, so the never-released C1/H1 bugs need no separate Fixed lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The mandatory Commit Message Format block hard-coded 'Claude Opus 4.6', which stayed stale for months after the model moved on. Replace with the generic 'Co-Authored-By: Claude <noreply@anthropic.com>' and note that the harness-appended model-identifier variant is equally valid. Pinned versions are the root cause of this drift class (CLAUDE-CLEANUP.md section 4).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
Owner

Review findings addressed — 48fb749ee

All 10 items (2 blocking, 8 follow-through) fixed in c17b4f544; CHANGELOG in 0a96d6eb8. Thanks Hoshe + Tyre — both blocking bugs were real and data-confirmed.

Blocking

# Resolution
C1 The Grassland apply-gate now fires only where the climate already grants cover (!Barren). A climatically-barren district (frozen < -50 °C = surface ice/geology D-239 §2, or hyper-arid moisture < 5 — both resolved to VegetationClass::Barren upstream) is skipped, so the mosaic never re-grants withheld cover. Genuine tundra (cold + moisture ≥ 15) is Scrub upstream and still reaches the tundra palette via the same !Barren path. believability.json regenerated: Edict vegetated_districts 39 → 0 (frozen ice world now reads barren, not 61 % tundra); Arbour 20 → 8 (its real cold-pole/arid districts revert to barren) with intra-class variety preserved (vegetation_classes 3, micro_habitat_distinct 2). Added 3 dedicated regression tests (H3).
H1 Gate 0 is now settlement-independent — keyed on atmosphere/hydrosphere/planet_class, not inhabited. An uninhabited world with a real atmosphere + liquid water is alive (D-247). 24 uninhabited-alive worlds now classified (was 0); GJ0g-1 (dense atm + rivers) → NativeMirror. Split is 122 Compatible : 121 Mirror; all 9 canon exemplars hold.

Follow-through

# Resolution
C2 Gate 0 now reads planet_class (barren → Airless) as D-247's "+ planet_class" phrasing names. D-247 amended with a dated postscript recording the actual two-gate signal set (atm/hydro/planet_class habitability; economic_base_primary chirality; settlement-independence).
C3 micro_habitat_distinct criterion relaxed to == 0 || >= 2 — the min-over-patches estimator makes K=3 structurally unreachable against a dominant-entry palette. K=2 provisional; the estimator + cross-class-pooling note deferred to Q-123 (doc-commented in believability.rs).
C4 + H2 D-246 amended (dated postscript, matching D-239's pattern) recording the v1 scope cut: only the Soil-derived vegetated/wet classes take the mosaic; the material-driven families are _ => false, so Hardpan/Scree are authored-but-unreachable in v1; no elevation change in v1; and the mosaic owns the §8 climate→vegetation law for the classes it touches (no-skip + climate-appropriateness both upheld; the guaranteed riparian band is softened to a T-1040-gated probabilistic wet-habitat).
H3 Three purpose-built mosaic-pass regression tests in voxel.rs: C1 barren-respect, §8 material-untouched + forest-textured (≥2 micro-habitats), and T-1040 no-water-without-active-channel.
H4 relief_signal comment corrected to ~[-1, +1].
H5 Frontmatter override now strips quotes and validates against the 4-value enum (warn-and-skip on typo).
FYI bodies.proper_name for GJ166Ac still reads "Cadwal" — remains the tracked T-1085 follow-up (proper_name is atlas-CLI-owned; a wipe+reimport would drop non-proposal columns). The shipped biosphere_class is correctly NativeCompatible.

Gates: full cargo test green (incl. regenerated believability + derivation goldens), clippy --all-targets -D warnings clean, ruff clean, systems.db regenerated + stamped.

🤖 Fixes by Claude Code

## Review findings addressed — `48fb749ee` All 10 items (2 blocking, 8 follow-through) fixed in `c17b4f544`; CHANGELOG in `0a96d6eb8`. Thanks Hoshe + Tyre — both blocking bugs were real and data-confirmed. ### Blocking | # | Resolution | |---|-----------| | **C1** | The Grassland apply-gate now fires only where the climate already grants cover (`!Barren`). A climatically-barren district (frozen `< -50 °C` = surface ice/geology D-239 §2, or hyper-arid `moisture < 5` — both resolved to `VegetationClass::Barren` upstream) is skipped, so the mosaic never re-grants withheld cover. Genuine tundra (cold + moisture ≥ 15) is `Scrub` upstream and still reaches the tundra palette via the same `!Barren` path. **believability.json regenerated:** Edict `vegetated_districts` **39 → 0** (frozen ice world now reads barren, not 61 % tundra); Arbour **20 → 8** (its real cold-pole/arid districts revert to barren) with intra-class variety preserved (vegetation_classes 3, micro_habitat_distinct 2). Added 3 dedicated regression tests (H3). | | **H1** | Gate 0 is now **settlement-independent** — keyed on `atmosphere`/`hydrosphere`/`planet_class`, not `inhabited`. An uninhabited world with a real atmosphere + liquid water is alive (D-247). **24 uninhabited-alive worlds now classified (was 0)**; `GJ0g-1` (dense atm + rivers) → `NativeMirror`. Split is **122 Compatible : 121 Mirror**; all 9 canon exemplars hold. | ### Follow-through | # | Resolution | |---|-----------| | **C2** | Gate 0 now reads `planet_class` (`barren → Airless`) as D-247's "+ planet_class" phrasing names. **D-247 amended** with a dated postscript recording the actual two-gate signal set (atm/hydro/planet_class habitability; `economic_base_primary` chirality; settlement-independence). | | **C3** | `micro_habitat_distinct` criterion relaxed to `== 0 \|\| >= 2` — the min-over-patches estimator makes K=3 structurally unreachable against a dominant-entry palette. K=2 provisional; the estimator + cross-class-pooling note deferred to Q-123 (doc-commented in `believability.rs`). | | **C4 + H2** | **D-246 amended** (dated postscript, matching D-239's pattern) recording the v1 scope cut: only the Soil-derived vegetated/wet classes take the mosaic; the material-driven families are `_ => false`, so `Hardpan`/`Scree` are authored-but-unreachable in v1; no elevation change in v1; and the mosaic **owns** the §8 climate→vegetation law for the classes it touches (no-skip + climate-appropriateness both upheld; the guaranteed riparian band is softened to a T-1040-gated probabilistic wet-habitat). | | **H3** | Three purpose-built mosaic-pass regression tests in `voxel.rs`: C1 barren-respect, §8 material-untouched + forest-textured (≥2 micro-habitats), and T-1040 no-water-without-active-channel. | | **H4** | `relief_signal` comment corrected to `~[-1, +1]`. | | **H5** | Frontmatter override now strips quotes and validates against the 4-value enum (warn-and-skip on typo). | | **FYI** | `bodies.proper_name` for `GJ166Ac` still reads "Cadwal" — remains the tracked T-1085 follow-up (proper_name is atlas-CLI-owned; a wipe+reimport would drop non-proposal columns). The shipped `biosphere_class` is correctly `NativeCompatible`. | **Gates:** full `cargo test` green (incl. regenerated believability + derivation goldens), `clippy --all-targets -D warnings` clean, `ruff` clean, systems.db regenerated + stamped. 🤖 Fixes by Claude Code
jpmschweitzer added 1 commit 2026-07-05 19:12:50 +02:00
Tyre's re-review found the C1 !Barren guard only covered the Grassland arm — the Wetland arm was an unconditional => true. Since derive_morphology_zone has no temperature gate, a frozen + wet + flat district still yields Wetland material, so the wetland palette would paint copse/bog onto frozen marsh: the exact C1 symptom via the material path. Not a regression (the arm was unchanged) and unreachable by the 2 harness bodies, but the D-246 amendment + the voxel.rs comment already claim the guarantee universally, so the gate must match the claim.

Gate is now: apply = !Barren && class in {Wetland, Forest, Grassland}. Behavior change is limited to frozen/hyper-arid Wetland districts (a temperate marsh is never Barren-dominant; Forest is Barren-free by construction). believability.json unchanged (neither harness body reaches the frozen-wet case). New regression test mosaic_pass_does_not_revegetate_frozen_wetland; D-246 amendment reworded to the unified gate. Full cargo test green; clippy -D warnings clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
Owner

Re-review: both APPROVE — N1 folded in (895bb83ba)

Hoshe + Tyre both APPROVE all prior findings (C1–C4, H1–H5) on re-review — confirmed by reading, DB queries, and running the suites. Hoshe even proved the H3 tests aren't vacuous by temporarily reverting the C1 gate (test failed as it should) and restoring.

Tyre surfaced one new same-class latent bug (N1), non-blocking but flagged for a lead call: the C1 !Barren guard only covered the Grassland arm, while Wetland => true was unconditional. Because derive_morphology_zone has no temperature input, a frozen + wet + flat district still yields Wetland material — so the wetland palette would paint copse/bog onto a frozen marsh (the C1 symptom via the material path). Not a regression, and unreachable by the two harness bodies.

Folded in before merge rather than ticketed — because the D-246 amendment and the voxel.rs comment already state the guarantee universally ("the mosaic never re-grants cover the climate withheld"), so leaving Wetland unguarded would ship the exact record/code drift C4/H2 just fixed. The gate is now unified:

let apply = !matches!(dominant_veg, Vegetation::Barren)
    && matches!(class, SurfaceClass::Wetland | SurfaceClass::Forest | SurfaceClass::Grassland);

Behavior change is confined to frozen/hyper-arid Wetland districts (a temperate marsh is never Barren-dominant; Forest is Barren-free by construction). believability.json unchanged (neither body reaches the frozen-wet case); new regression test mosaic_pass_does_not_revegetate_frozen_wetland; D-246 amendment reworded to the unified gate. Full cargo test green, clippy -D warnings clean.

Merging.

🤖 via Claude Code

## Re-review: both APPROVE — N1 folded in (`895bb83ba`) Hoshe + Tyre both **APPROVE** all prior findings (C1–C4, H1–H5) on re-review — confirmed by reading, DB queries, and running the suites. Hoshe even proved the H3 tests aren't vacuous by temporarily reverting the C1 gate (test failed as it should) and restoring. Tyre surfaced one **new same-class latent bug (N1)**, non-blocking but flagged for a lead call: the C1 `!Barren` guard only covered the **Grassland** arm, while `Wetland => true` was unconditional. Because `derive_morphology_zone` has no temperature input, a frozen + wet + flat district still yields Wetland material — so the wetland palette would paint copse/bog onto a frozen marsh (the C1 symptom via the material path). Not a regression, and unreachable by the two harness bodies. **Folded in before merge** rather than ticketed — because the D-246 amendment and the `voxel.rs` comment already state the guarantee *universally* ("the mosaic never re-grants cover the climate withheld"), so leaving Wetland unguarded would ship the exact record/code drift C4/H2 just fixed. The gate is now unified: ```rust let apply = !matches!(dominant_veg, Vegetation::Barren) && matches!(class, SurfaceClass::Wetland | SurfaceClass::Forest | SurfaceClass::Grassland); ``` Behavior change is confined to frozen/hyper-arid Wetland districts (a temperate marsh is never Barren-dominant; Forest is Barren-free by construction). `believability.json` unchanged (neither body reaches the frozen-wet case); new regression test `mosaic_pass_does_not_revegetate_frozen_wetland`; D-246 amendment reworded to the unified gate. Full `cargo test` green, clippy `-D warnings` clean. Merging. 🤖 via Claude Code
jpmschweitzer closed this pull request 2026-07-05 20:05:22 +02:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpmschweitzer/settled-reach#172