Hoshe REQUEST_CHANGES + Tyre APPROVE:
- Cache key omitted world_seed → a cache reused across worlds could return
another seed's column. CacheKey is now (world_seed, body_id_hash, voxel_pos).
(Hoshe #1)
- Sub-chunk voxel seed reused SeedDomain::ChunkContext (tier-collision risk vs
the region meander seed). Add SeedDomain::Voxel = 9 (append-only, pin test
updated) and use it. (Hoshe #2, Tyre #1)
- get_or_derive forced callers to pre-compute body_id_hash while fnv1a_64 is
pub(crate). Drop the param; compute the hash internally. (Tyre #2)
- Fix two inaccurate comments (micro-relief range [-4,+3] not ±2; scatter mask
is 4-bit [0,15] not bits [4:6]). (Hoshe #3/#4)
- Strengthen the LRU eviction test: add a test-only contains_voxel() helper and
assert WHICH entry was evicted (refreshed pos survives, LRU pos evicted). (Hoshe #5)
- LRU O(capacity)-scan perf flagged on T-1031 (Tyre #3, deferred to the budget harness).
cargo test passes, clippy -D warnings clean, fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
D-239 §1/§7/§10 — the lower derivation chain end-to-end with the AlluvialPlain
fallback only (specialized families are T-1029).
- chunk_context.rs: ChunkContext (64m) — basin_direction + meander phase/wavelength
+ active-channel params. NO per-tile flow_direction[64x64] (D8 ~152m coarser than
a chunk, D-239 §10); features >64m seed from Region-or-higher. SeedDomain::ChunkContext=8.
- voxel.rs: VoxelColumn (1m) composing the D-228 tile axes (TerrainMaterial /
FloorMaterial=None / Vegetation / Water / elevation_m). Derive-on-demand + VoxelCache
(LRU BTreeMap, never persisted per D-227). Domain warp (T-1026) wired through:
f64 warp -> as-i32 truncation to the voxel address; all material/morphology gates
integer (D-010 — the meander wavelength f64 is truncated before the Water decision).
- AlluvialPlain generator: Soil/Wetland terrain, climate vegetation, integer-meander
channel (Shallow/Deep) from ChunkContext. The other 7 families are dispatch stubs
(canonical terrain material, fall back to AlluvialPlain geometry) — no panic.
29 new tests incl end-to-end determinism (same seed/pos -> identical column),
cache hit/miss/eviction/re-derivation, warp-applied. cargo test 1563 pass,
clippy -D warnings clean, fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hoshe REQUEST_CHANGES + Tyre APPROVE:
- Riparian vegetation logic was doubly-wrong: it granted the micro-oasis only
in the impossible cold case (temp < -50, no liquid water) and DENIED it in the
intended hyper-arid case. Split: extreme cold -> Barren always; hyper-arid ->
RiparianScrub iff near perennial water. (Hoshe #2)
- morphology_zone_has_exactly_17_variants was misleading (asserted >=16). Rename
to morphology_zone_region_scale_emits_16_of_17, tighten to ==16, and document
that BraidedPlain is the lone region-unreachable zone (needs lithology, deferred
to ChunkContext) and that Lake IS reachable. Tyre's 'Lake also deferred' was a
false positive (ocean 60-79 -> Lake). (Hoshe #1, Tyre #1)
- derive_morphology_zone docstring now lists the real multi-path emission sites
for TidalFlat/Wetland, ValleyFloor/RiverBank as their own gates, and BraidedPlain's
deferral — the §6 parent-family names are descriptive, not exhaustive. (Hoshe #3, Tyre #2/#3/#4)
- D-239 record: added a T-1025/T-1027 implementation note (enum freeze location,
16/17 region reachability + BraidedPlain deferral, §7 gate-ordering interpretation).
No vocabulary change. cargo test passes, clippy -D warnings clean, fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Hoshe: body_without_system_row test inserted a NULL system_id, impossible
under production schema (system_id NOT NULL REFERENCES star_systems). Rewrite
as body_with_orphan_system_id_* — non-NULL system_id with no matching
star_systems row (the real case the LEFT JOIN guards) + NOT NULL in the test
schema + corrected comment.
- Tyre: cascade.rs PERF/TODO comment said the region path 'defers to T-1032';
T-1032 IS this PR, so production dispatch is now live. Update to track T-1028
only and note the cost is live in production.
No production logic change. cargo test body_params_reader 7 pass, clippy clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The D-239 carrier layer (T-1023/1024/1026) only ran in tests because every
production AnalyzeBody enqueue passed body_params: None. Wire the real path:
- New BodyParamsReader (server/src/atlas/body_params_reader.rs): read-only
systems.db reader, joins bodies -> star_systems (LEFT JOIN) for the climate/
tectonic inputs. SQL verified against systems-schema.sql. All fields Option,
NULLs handled; tectonic_activity absent from schema -> None (derives from
planet_class). 5 unit tests.
- layer_proxy.rs: on cache miss, read the body's params and pass
Some(Box::new(..)). On read error, warn + fall back to None (cascade stops at
Settlement, no panic) — graceful degradation.
- plugin.rs / main.rs: register BodyParamsReaderResource (CityContextReader
pattern) and thread it through serve_atlas_requests.
BodyWorldState.regions now populates for real bodies in the D-206 background
pass. End-to-end tests cover wired (regions populated) + unwired (empty) paths.
cargo test 1504 pass, clippy -D warnings clean, fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
D-239 three-carrier foundation merged to main. Review found a correctness
bug (per-region elevation) + hollow determinism tests, both fixed before merge.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-review (Hoshe + Tyre, both APPROVE) caught one stale comment: after the
per-region elevation fix, derive_region_profile owns elevation_km (from elev_q),
not the caller. Update the comment so maintainers don't read it as caller-supplied.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hoshe + Tyre review (CHANGES REQUESTED):
- domain_warp golden tests were hollow (discarded values, only asserted
dx!=dy). Consolidate into one real golden_vector test with pinned f64
literals as the regression anchor. (Hoshe #1, Tyre #2)
- Per-region temperature used body-level elevation_km for every region, so
alpine and sea-level regions on a body got identical lapse — defeats the
D-239 §2 per-district temperature. Derive elevation_km per region from the
region's own elev_q (× MAX_REGION_ELEVATION_KM). (Tyre #1)
- Region seed was derived under SeedDomain::DomainWarp (collision risk with
the tile warp) and discarded unused. Remove it + the orphaned region_pos_id
and SeedDomain import; keep a reserved _seed param for T-1027/T-1028. (Hoshe #2)
- Fix inverted tilt_factor comment. (Hoshe #3)
- ClimateConstants doc referenced a load() that doesn't exist; correct it —
embedded default() is authoritative today, climate_constants.toml is the
canonical mirror, runtime load lands with T-1032. (Hoshe + Tyre)
- cascade.rs: drainage re-run was mislabeled 'cheap'/'no drainage needed';
document the real cost + PERF/TODO(T-1028/T-1032) against the D-239 §10
budget. (Tyre #3)
cargo test 1497 pass, clippy -D warnings clean, fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add step 1a: check open PRs first and recommend /pr-review (review -> merge)
before selecting a batch. Open PRs are in-flight WIP; starting new work on top
piles up the board, and the cascade-correct next batch is often dependency-gated
on an in-review PR (won't show as --unblocked, or must stack on an unmerged
branch). Renumber the existing 1a-1d substeps to 1b-1e.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add `cargo test --quiet` to the pre-push Rust block (sharing clippy's
target/ guard) so the suite runs automatically on every push touching
server/. Nothing ran the tests before — pre-push did only fmt/clippy/deny
and there is no CI — so a Rust regression could reach main unverified.
Document the resulting agent-spawn rule in team-patterns.md: don't have
implementation agents pre-run fmt/clippy/test pre-emptively, since the push
gate now enforces all three. The gate is authoritative; the lead patches any
fallout at push.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
T-1023/1024/1026 implemented and pushed as PR #158; moved to review.
T-1032 (new, under T-974) tracks wiring the production AnalyzeBody dispatch
to read BodyParams from the DB — currently always None, so the carrier layer
only runs in tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First foundation slice of the Atlas-to-tile derivation model (epic T-974),
building the carrier layer ahead of its T-1027+ consumers.
T-1026 — Anti-squaring domain warp (D-239 §4): stateless pure
fn(seed,body_id,pos)->(f64,f64), ±8m, f64 to the final voxel then as-i32
truncation for IEEE-754 cross-target determinism. New domain_warp.rs,
SeedDomain::DomainWarp; golden-vector + cross-thread tests. Position math
only — D-010 integer discipline preserved downstream. Marked dead_code
until the T-1028 VoxelColumn pipeline consumes it.
T-1023 — RegionProfile carrier (D-239 §1,§10): new RegionProfile +
TectonicClass/GlaciationGrade/PrecipitationClass enums + BodyParams; derived
per-region river_threshold replacing the global 200 for tile consumers.
regions: BTreeMap on BodyWorldState, populated via the cascade's new
RegionProfile layer (runs when body_params is Some, else falls back to
Settlement). D-010 integer discipline, BTree ordering.
T-1024 — District climate primitives (D-239 §2): nullable temperature_c +
moisture on RegionProfile, mean-annual scalar (no clock dep; dynamic branch
deferred to Q-105). Hybrid inputs — new bodies.axial_tilt_deg column imported
from planet-gen body-defs (populate_axial_tilt_deg, 2611 bodies), luminosity
and orbital distance derived at runtime; greenhouse + diurnal-swing tables in
source-canonical climate_constants.toml. D-239 implementation note added.
cargo test: 1498 passed, 0 failed. clippy clean (pre-existing
large_enum_variant only). make check-systems-db: stamp fresh.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR #157 merged -> T-1022 done. Activate the D-239 three-carrier foundation
batch via /whats-next: T-1023 (RegionProfile), T-1026 (domain warp), and
T-1024 (district climate) with refinement notes. T-1024 blocked-by T-1023
(temperature fields live on the RegionProfile struct).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The file was last updated 2026-04-05 (Sprint 32) and had gone
comprehensively stale: it claimed Phase 1 active / Sprint 32 current,
listed D-001..D-170 (now D-239), and showed the pre-D-166 phase
ordering (player control before world gen, with a 2-floor test map) —
directly contradicting the canonical cascade in CLAUDE.md. All of its
content is canonical elsewhere (cascade in CLAUDE.md, phase + decision
status in pql/governance), and no briefing references it anymore.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The repo moved to /var/mnt/data/projects/settled-reach (flat layout,
no more /main worktree subdir). Drop the stale autoMemoryDirectory
override (pointed at the old /home path; revert to the native
per-slug memory store) and gitignore .worktrees/, which now holds
per-machine git worktrees under the repo root.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Layer-4 quarter-skeleton geometry (D-234: morphology-correct streets +
the D-234b waterfront rule) was fully implemented but dormant — no
production call site dispatched GenerateSkeleton from a settlement
placement, so founding_orientation stayed pinned to the
context_from_read_set Cardinal stub.
Expand the BodyAnalyzed arm of drain_generation_completions to, before
caching the body, submit one GenerateSkeleton per CityPlacement: build the
D-199 context from the read-set, override founding_orientation with the
attractor-matched value carried on the placement (D-213), and derive a
canonical namespace-isolated quarter_id from (world_seed, body, city)
(D-194/D-230) instead of the city_id*10 placeholder. Dispatch logic is
extracted into the pure build_skeleton_work_item helper for DB-free testing.
Reader + world seed are optional system params (mirrors serve_atlas_requests);
absent either, dispatch is skipped and the body is still cached. Empty
placements and per-placement read_set errors are handled (warn + skip).
Station/multi-source dispatch (Q-109) is out of scope — BodyAnalyzed only
fires on the planetary AnalyzeBody path.
Tests: orientation-override + canonical-quarter_id unit test and a
determinism/city-scoping test on the helper. Full lib suite green (1327).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
T2: background agent / lead writes are confined to the session root, so an
out-of-root sibling worktree (.worktrees/<branch>) is unwritable — the
agent could design but not write, and there's no permission to grant. Fix
options for clide noted. Plus a positive: clide image show works first-try.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Architecture diagram for D-239: inputs -> three-carrier refinement chain
(RegionProfile -> ChunkContext -> VoxelColumn), the district-temperature
climate primitive + derived freeze/snow, the 8 gated morphology families
over the frozen 17-zone vocabulary, and the anti-squaring domain warp.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hand-off material for the clide team. Headline: team mode works at the
Claude layer but is invisible in clide's UI — teammates ran in-process
(no pane), the Team Chat view stayed inert, no `clide team` verb. Captured
live during the Q-101 workshop; suggested fixes included.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- T-1017: removed 5 stale done-blocker edges (T-957/993/1005/1010/1016); only
T-977 (architecture-flavor pipeline) genuinely blocks it now, so it auto-unblocks
when T-977 ships.
- T-999: resolved the description contradiction — appended a clarification that the
condition overlay does NOT feed D-100 DamageOverlay (the T-979 refinement is
authoritative); BuildingConditionState is standalone.
- T-960: noted the sole remaining gap to close (gen_l0_heightmap overlay absent from
OVERLAY_DEFS, required by D-226 acceptance criteria).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Si one-pass sweep of T-750's 38 open children (2026-06-07) found 3 more done-but-open:
- T-958 block irregularity (block_irregularity.rs, tested, wired)
- T-983 CityGenerationContext extension (all 4 fields, PR #145)
- T-975 ocean/lake water mask (features.rs, D-209/D-223)
Rest of T-750 is genuinely open or blocked — drift was concentrated in the #957
walkable-quarter merge.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Si vet (2026-06-07) of the next batch found the same drift as T-985/986: the street &
footprint geometry already landed under T-957. Marked done with evidence notes:
- T-989 morphology->street-pattern lookup (street_topology/derive_corridors)
- T-990 corridor/access-point network (Prim-MST, ±45° snap)
- T-991 BSP footprint subdivision + D-233 coverage + D-234b waterfront rule
- T-976 (parent) — all four geometry deliverables done+tested
Filed T-1022 for the genuine residual: the Layer-3 -> Layer-4 GenerateSkeleton
dispatch (founding_orientation wiring) that activates the dormant geometry in
production. A distinct cross-layer concern, not street geometry.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
D-229 makes BuildingPropertyTag the typed step-3 output that replaces the era/
society_profile/zone_palette String stubs on the skeleton. The tag + its derivation
(zone_type_id, flavor_ref, era/ConstructionEra, FloorExtent) all landed under T-957/
T-1006; this removes the now-dead stub fields they superseded:
- BlockSkeleton.era_modifications: Vec<EraModification> (era is per-footprint on
BuildingPropertyTag.era now; era_cause retained as the block-level cause)
- QuarterSkeleton.society_profile: SocietyProfileRef (culture → tag.flavor_ref)
- QuarterSkeleton.zone_palette: Vec<ZoneDefinition> (zoning → tag.zone_type_id;
distinct from FloorZone.zone_palette: ZonePalette, the real D-101 palette, kept)
- the now-orphaned `EraModification` and `SocietyProfileRef` String aliases
Kept: chunk_layout (real ChunkLayout / D-234 street network), z_band_zones (still
uses the ZoneDefinition alias), boundaries (separate stub, not D-229 scope).
cargo check + clippy -D warnings --all-targets clean; full server lib suite
1325 passed / 0 failed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Board cleanup surfaced by /whats-next + Si refinement: both tasks' work was already
merged (QuarterWorldState{skeleton,block_tags} + assign_all_block_tags + GenCompletion
state carrying for T-985; the four zone/entry/era/condition derivation fns + 31 D-142
RON files for T-986), but the tickets had drifted in backlog. Marked done with notes;
verified against server/src. T-984's residual (society_profile/zone_palette/EraModification
String stubs) is genuine remaining work — handled next on its own branch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Log the pql migration (PR #154/#155): planning system moved off settledreach.db
onto pql (governance DQR tree + git-tracked changelog, T-NNN ids, phases gated on the
cascade hierarchy), the clide IDE skill, and the Phase-6 removal of the legacy SQLite
ticket/decision tooling. Corrected the unreleased D-221 entry's stale "many-to-many
milestones" claim.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The migration shipped (Phases 0-5 in PR #154; phases-as-hierarchy + Phase-6 SQLite
retirement in PR #155), so the plan is done. Moved pql-migration.md from the repo root
to docs/architecture/, flipped status approved -> completed, and added a header pointing
to the current-usage docs (CLAUDE.md, ticket-cli.md, governance/README.md) and the
tooling/pql-migrate/ transforms. Kept as a why/how record of the move off the binary
SQLite DB. pql-requirements.md stays at root — still-open feedback for the pql team.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>