test(client): the Atlas Global goldens have been measuring nothing
Every atlas capture scenario built its body dict without body_radius_km. Radius is Global's ONLY spacing input (2*pi*R / width), so every Global golden has been a degenerate block since these scenarios were created — the map rendered at 0.000 km/gridunit. The fixed rungs were unaffected, since they derive spacing from the rung's own cell size rather than the body. That means the "eyeball check against .cache/screenshots baselines" discipline has been hollow at Global specifically: a baseline that is a solid rectangle diffs clean against a new solid rectangle. It is how a 2x1 canvas survived in front of two verification layers. Adds the real radii to all ten scenarios (Lendel 6238.4, Vethis 6959.3, Arbour 6711.0, Ferrath 6062.0, Threshold 5503.5), and makes the capture log course and settlement counts alongside canvas_cells — an empty annotation layer was previously indistinguishable from a populated one in the log, which is exactly the signal needed to tell "no rivers" from "rivers not drawn". Also updates three suites to the corrected Global cache contract: the key now honours extent (collapsing it meant a resize could never miss), so the shared _land_global_canvas helper must cache under the extent the viewer will actually request, and the two make_key tests now assert the real rule — centre collapsed, extent honoured — instead of the retired sentinel. Client suite 1830 total / 1804 passed / 0 failed / 26 skipped. Pair session with Jeroen, 2026-07-27. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -586,10 +586,30 @@ func test_size_bytes_matches_actual_payload_file_length_on_disk() -> void:
|
||||
# =============================================================================
|
||||
|
||||
|
||||
func test_make_key_global_ignores_center_and_extent() -> void:
|
||||
var k1 := StepCanvasDiskCache.make_key("GJ1c", "Global", Vector2i(10, 20), Vector2i(64, 64))
|
||||
var k2 := StepCanvasDiskCache.make_key("GJ1c", "Global", Vector2i(999, -999), Vector2i(1, 1))
|
||||
assert_str(k1).is_equal(k2)
|
||||
## Global collapses the CENTRE to a sentinel (its canvas is whole-body and
|
||||
## origin-anchored, so the server genuinely ignores `center`) but NOT the
|
||||
## extent. Zeroing the extent was correct while Global had exactly one
|
||||
## possible size per body; since the D-255 extent inversion made it
|
||||
## viewport-sized, collapsing it meant the first canvas cached for a body
|
||||
## answered every later request — so a window resize could never take effect,
|
||||
## because the differently-sized request was a HIT on the stale one.
|
||||
func test_make_key_global_ignores_center_but_honours_extent() -> void:
|
||||
var same_size_a := StepCanvasDiskCache.make_key(
|
||||
"GJ1c", "Global", Vector2i(10, 20), Vector2i(64, 64)
|
||||
)
|
||||
var same_size_b := StepCanvasDiskCache.make_key(
|
||||
"GJ1c", "Global", Vector2i(999, -999), Vector2i(64, 64)
|
||||
)
|
||||
assert_str(same_size_a).override_failure_message(
|
||||
"Global must ignore centre — its canvas is origin-anchored"
|
||||
).is_equal(same_size_b)
|
||||
|
||||
var other_size := StepCanvasDiskCache.make_key(
|
||||
"GJ1c", "Global", Vector2i(10, 20), Vector2i(960, 480)
|
||||
)
|
||||
assert_str(same_size_a).override_failure_message(
|
||||
"Global must NOT ignore extent — a resize has to be able to miss"
|
||||
).is_not_equal(other_size)
|
||||
|
||||
|
||||
func test_clear_all_removes_every_body_and_the_root_directory() -> void:
|
||||
|
||||
Reference in New Issue
Block a user