feat(ui): the Atlas ladder bottoms out at Quarter (D-255, T-1213)

Quarter becomes the deepest navigable rung. Block and Chunk leave the ladder.

The rule, from the amendment: the deepest Atlas rung is the one at which a
screen pixel shows one subtile. At the uniform 2x2 px display ratio a
3440x1440 window gives 540 gridunits on the short axis, so Quarter's 512 m
extent draws 0.948 m per gridunit -- about one voxel per gridunit and one
0.5 m subtile per pixel. Block (0.237) and Chunk (0.119) magnify beneath the
finest datum that can exist, and measured as exactly that on Ferrath: one
morphology zone, one vegetation class, an unbroken colour field. They were not
missing a feature; there was nothing left to show them.

CHUNK ITSELF IS UNTOUCHED. It remains D-243's 64 m stream/derive unit and is
where Phase 5 derives first-person walkable content -- D-012's
load-around-the-player is expressed in chunks. Block remains the 128 m
generator planning unit. Both keep their enum variants, their extent_m answers
and their wire vocabulary. What was retired is the claim that a MAP of one is
worth looking at.

DEEP_RUNGS moved with the floor, and this is the part worth reading twice. It
is a mandatory D-255(d) hardening: a per-body retention cap bounding how much
ground an exhaustive pan can hold resident at fine spacing. Left as
[Block, Chunk] it would have guarded rungs no client can request -- dead code
-- while the accumulation gap silently re-opened under Quarter, now the finest
navigable rung at ~0.95 m per gridunit. It is now [District, Quarter]. A
control that names its targets by rung has to follow the ladder when the
ladder moves.

Six tests pinned the old floor and were updated rather than deleted, since
each was protecting a real property: the clamp tests now clamp at Quarter, and
the disk-cache tests use Region for "shallow" (District is capped now) and
Quarter for "deep". One new test pins the distinction the change turns on --
the retired rungs are absent from RUNG_LADDER but still present in
RUNG_EXTENT_M, because viewability was retired, not vocabulary.

Also removes the four capture scenarios for the retired rungs, including the
two blank goldens that had been passing against blank captures.

1838 client tests, 0 failed. Server clippy clean, step_canvas suite green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-07 14:38:47 +02:00
co-authored by Claude Opus 5
parent b429f633e6
commit 8eb5cb9ff7
10 changed files with 212 additions and 86 deletions
+18 -9
View File
@@ -254,13 +254,18 @@ func test_capacity_sweep_never_touches_an_entry_under_budget() -> void:
func test_deep_rung_cap_evicts_oldest_deep_rung_entry_when_exceeded() -> void:
var cache := StepCanvasDiskCache.new(_test_root)
# Fill past the cap: MAX_DEEP_RUNG_ENTRIES_PER_BODY + 2 distinct Chunk
# Fill past the cap: MAX_DEEP_RUNG_ENTRIES_PER_BODY + 2 distinct Quarter
# windows for one body, backdating each so eviction order is
# deterministic (oldest last_read_at goes first).
#
# Quarter, not Chunk: DEEP_RUNGS became [District, Quarter] when the ladder
# floor moved (D-255 amendment 2026-08-07). Quarter is now the finest
# navigable rung and therefore the exhaustive-pan accumulation case this
# cap exists to bound.
var cap: int = StepCanvasDiskCache.MAX_DEEP_RUNG_ENTRIES_PER_BODY
for i in range(cap + 2):
cache.put("GJ1c", "Chunk", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
var key := StepCanvasDiskCache.make_key("GJ1c", "Chunk", Vector2i(i, 0), Vector2i(64, 64))
cache.put("GJ1c", "Quarter", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
var key := StepCanvasDiskCache.make_key("GJ1c", "Quarter", Vector2i(i, 0), Vector2i(64, 64))
cache._debug_backdate_entry("GJ1c", key, i, i) # strictly increasing "recency"
assert_int(cache.entry_count("GJ1c")).override_failure_message(
@@ -268,20 +273,24 @@ func test_deep_rung_cap_evicts_oldest_deep_rung_entry_when_exceeded() -> void:
).is_equal(cap)
# The two OLDEST (i=0, i=1) must have been evicted; the newest must survive.
assert_bool(cache.has("GJ1c", "Chunk", Vector2i(0, 0), Vector2i(64, 64))).is_false()
assert_bool(cache.has("GJ1c", "Chunk", Vector2i(1, 0), Vector2i(64, 64))).is_false()
assert_bool(cache.has("GJ1c", "Quarter", Vector2i(0, 0), Vector2i(64, 64))).is_false()
assert_bool(cache.has("GJ1c", "Quarter", Vector2i(1, 0), Vector2i(64, 64))).is_false()
assert_bool(
cache.has("GJ1c", "Chunk", Vector2i(cap + 1, 0), Vector2i(64, 64))
cache.has("GJ1c", "Quarter", Vector2i(cap + 1, 0), Vector2i(64, 64))
).override_failure_message("the most-recently-written deep-rung entry must survive").is_true()
## Region, not District: the ladder floor moved on 2026-08-07 and DEEP_RUNGS
## moved with it, from [Block, Chunk] to [District, Quarter]. District is now a
## capped rung, so it can no longer stand for "shallow" — Region is the finest
## rung the cap does not apply to.
func test_deep_rung_cap_does_not_apply_to_shallow_rungs() -> void:
var cache := StepCanvasDiskCache.new(_test_root)
var cap: int = StepCanvasDiskCache.MAX_DEEP_RUNG_ENTRIES_PER_BODY
for i in range(cap + 5):
cache.put("GJ1c", "District", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
cache.put("GJ1c", "Region", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
assert_int(cache.entry_count("GJ1c")).override_failure_message(
"District is not a DEEP_RUNGS member — the deep-rung cap must not evict it"
"Region is not a DEEP_RUNGS member — the deep-rung cap must not evict it"
).is_equal(cap + 5)
@@ -290,7 +299,7 @@ func test_deep_rung_cap_never_evicts_the_global_floor_entry() -> void:
cache.put("GJ1c", "Global", Vector2i.ZERO, Vector2i.ZERO, _stub_canvas())
var cap: int = StepCanvasDiskCache.MAX_DEEP_RUNG_ENTRIES_PER_BODY
for i in range(cap + 3):
cache.put("GJ1c", "Chunk", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
cache.put("GJ1c", "Quarter", Vector2i(i, 0), Vector2i(64, 64), _stub_canvas({"i": i}))
assert_bool(cache.has("GJ1c", "Global", Vector2i.ZERO, Vector2i.ZERO)).override_failure_message(
"the Global floor entry must survive deep-rung cap eviction regardless of fill order"
).is_true()