You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI codex R4 caught two real gaps in the drift coverage:
P2 (Maintainability): the test file's docstring claims the DGP-builder
is duplicated "verbatim" from the notebook §2 cell, but only the
parameter CONSTANTS are pinned (`test_dgp_true_parameters_match_quoted`).
Non-constant edits (coordinate ranges, lambda_t, row construction)
could drift silently if the headline numbers stay within tolerance.
Adds `test_notebook_dgp_ast_matches_test_fixture` — parses the
notebook JSON, extracts the §2 `build_t23_panel` FunctionDef, and
compares its AST (with docstring stripped, function name normalized)
against `_build_t23_panel`'s. Uses `ast.dump` for whitespace- and
comment-agnostic semantic equality. Any DGP-logic divergence between
the two copies now fails loudly; cosmetic-only edits (whitespace,
comments) don't trigger spurious failures.
P3 (Documentation/Tests): §2 quotes seed-specific geometry numbers
(max ~12 km, cluster diameter ~22 km, near 12-82 km, far 224-331 km)
and §6 quotes pair-support percentages (far×far ~95% within 100 km,
near×near 100%). Drift tests only pinned the band counts and lat
bounds, so those prose details could drift silently.
Adds `test_seed_specific_geometry_pins_match_quoted` — recomputes
each quoted value from the seed-23 panel using haversine-deg-to-km
arithmetic and asserts they match the notebook narrative integers
(rounded). If a future RNG/geometry change shifts any number outside
the rounded value, the test fails and the maintainer must update
either the prose or the layout parameters.
20 drift tests pass (16 → 20: +AST sync, +geometry pin, +
`test_rings_grid_d_bar_100_to_200_identical_delta_1` from R3, +
the R3 §6 warning-policy guard).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments