Skip to content

Detector Phase 1 Stage 0 (#263): merged pairs, horizon band simulation, 0c script - #295

Merged
jonfroehlich merged 12 commits into
mainfrom
analysis/horizon-band-263
Nov 25, 2026
Merged

jonfroehlich merged 12 commits into
mainfrom
analysis/horizon-band-263

Conversation

@jonfroehlich

@jonfroehlich jonfroehlich commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Stage 0 of the plan "Detector Phase 1 arms and an upscaled horizon-band pass" (2026-11-15, #263). The plan file is not in the repository; docs/horizon_band_263.md Appendix A copies its Stage 0 rules (sections 3, 4 and 7) verbatim, and those are the record. The Phase 1 design doc the plan cites exists only on the unmerged branch of #270. CPU only, about 1 minute, committed caches, no spend.

stage status binds? verdict
0a merged-pair histogram run yes arm C not triggered (25 of 136 pairs under 8 px, 18%); arm A runs (38 pairs at ≥ 12 px outside paterson, ≥ 30 needed; 31 on S7 alone)
0b band simulation run no (exploratory) on S7 pooled, every band config beats the matched-recall threshold, and F1 vs the 1x pass is not above zero under the standard scorer. On Mapillary4 alone, three of the four configs are wholly below the 1x pass on F1; without paterson, both 2x configs are. Leave-one-split-out picks the narrow core on 7 of 7 splits at both scales, but narrow minus wide on F1 is +0.002 [−0.001, +0.005] at 1.5x and +0.003 [−0.000, +0.006] at 2x: it trades recall for precision. The 1.5x rows use real pixels; production and 0c upsample
0c real strips on the A40 script written, not run yes, the binding gate Jon decided this PR merges as Stage 0 with 0c not run. A run needs the native panos: S7 and sao_paulo from the Hub, manual_gold from the dataset's test split, and juneau and bayonne, which are not published (makelab2 archive). Commands in the doc

Chebyshev and Euclidean give the same 0a verdicts. Paterson holds 80 of the 136 pairs.

Review 1 fixes. main merged in (the .gitignore conflict kept both blocks). The 0c script no longer writes git_head into calibration.json, so calibrate --check passes after the commit; run0c checks a frozen calibration instead of rewriting it, resumes a partial held-out read without re-reading a finished split, and writes caches atomically. The decision line names a primary that passes the gate but is over the 1.75x limit, and a held-out read run under --despite-failed-context; the limit is still reported, not enforced. A failed extract's ledger rows count the split it died in. calibrate refuses when sao_paulo has no 1x in-core detection at 0.30. New tests pin the 0c bars and paths that mutants showed were unpinned. simulate.json gains one key (narrow_minus_wide_S7); every other value is unchanged. The 0a figure now draws all 136 pairs. The doc corrects amendment 4: the backbone's GlobalResponseNorm layers normalise over the whole feature map, so the context rule measures context plus that statistic.

Full write-up: docs/horizon_band_263.md. Reproduce: the two scripts are registered in check_all.py.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5
review-1 fixes by claude-opus-5-5

…, 0c strip script

0a (merged_separation_263.py): 136 merged pairs on US_SPLITS minus juneau
(held out until 0c). 25 under 8 px (18%): arm C not triggered. 38 pairs at
>= 12 px outside paterson (Chebyshev; 44 Euclidean): arm A runs.

0b (horizon_band_263.py simulate, exploratory, binds nothing): the band
simulated from the committed #196 r3072/u4096 caches on S7, with paired
split-stratified intervals, the matched-recall threshold baseline, both
far-field bounds and a leave-one-split-out core choice (narrow, 7 of 7, both
scales). Reproduces the plan's scratch table exactly.

0c (extract / calibrate / report / run0c): written, NOT run. Real strips on
the stride-32 grid, head at input/4, context and calibration rules frozen
in calibration.json before the one held-out read; extract refuses every
path that would read manual_gold, juneau or bayonne early or twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jonfroehlich jonfroehlich left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 1 of PR 295 (head e1f20eac, base main 2a52673c)

Verdict: no blocking finding. Every 0a and 0b number in the PR body and in docs/horizon_band_263.md re-derives, the triggers are coded as the plan states them, and the checks and tests pass on the head and on a local trial merge of main. Eleven should-fix items and some nits follow. Items 1 to 4 are about what the doc says; items 5 to 8 are defects in the 0c script that will bite when it runs; 9 to 11 are test and CI gaps. 0c was not run here and no remote host was contacted.

What I ran

  • merged_separation_263.py --check and horizon_band_263.py simulate --check: both OK on the head and on the trial merge.
  • pytest -q tests/test_merged_separation_263.py tests/test_horizon_band_263.py: 28 passed.
  • check_all.py --touching on each new script lists its own entry. check_all.py --ci on the head: 27 passed, 0 failed, 9 skipped (both new entries ran: 0.2 s and 45.3 s).
  • Trial merge of origin/main (2a52673) into the head, local only. The one conflict is .gitignore, both sides appended at the end of the file; keeping both resolves it. On the merged tree: both checks OK, git ls-files -ci --exclude-standard prints nothing, pytest -q gives 3964 passed, 10 skipped, 2 failed, and the two failures are ones that also fail on main on this machine (test_mix_training_dirs.py::test_mix_has_every_sparse_pano_and_a_seeded_gsv_sample and test_stage1_bearing_residual.py::test_great_circle_matches_the_geodesic_used_by_stage_1), so they are not findings, check_all.py --ci gives 43 passed, 0 failed, 12 skipped.
  • horizon_band_263.py figures --fig-dir <scratch>: both PNGs come out byte-identical to the committed ones on this machine.
  • An independent recount of 0b (my own cache reader and merge, rampnet.detection_eval.score_pano for scoring): base TP 1640 / FP 197, and gains / FPs added of 100/174, 89/146, 106/146, 95/120. Same as the doc.
  • 52 single-line mutants against the tests and checks (table at the end).

Numbers re-derived

0a. 136 pairs on the 8 splits; 25 under 8 px Chebyshev (0.184), 17 Euclidean (0.125); paterson holds 80 of the 136 and 20 of the 25. At 12 px or more outside paterson: 38 Chebyshev, 44 Euclidean, against a bar of 30. Both metrics give "arm C not triggered, arm A runs". The 9-split row (146 pairs, 25 under 8 px) also follows from a committed doc: open_rig_misses_258.md gives juneau 10 merged pairs, none under 8 px. Units are consistent: separations are GT-to-GT distances in px on the 512×1024 heatmap, the same space as the target sigma (stage_two/train.py, sigma 10 on 512×1024) and the 8-px cell (2048×4096 input, stride 32, ×8 upsample in rampnet/model.py). The pairs are measured without seam wrap, which is how miss_taxonomy.py defines them.

How far the 0a verdicts are from flipping (from merged_pairs.json, Chebyshev):

variant count verdict
arm C, share under 8 / 9 / 10 px 0.184 / 0.272 / 0.353 flips only at 10 px
arm A, bar at 12 / 13 / 14 / 15 px, 8 splits 38 / 34 / 31 / 26 holds to 14 px
arm A, S7 only (no laurens_mapillary), 12 / 13 / 14 px 31 / 30 / 27 holds to 13 px
arm A, pairs between 12 and 20 px (2σ at σ=6 to 2σ at σ=10) 31 (30 Euclidean) at the bar

The 38 pairs sit on 34 panos. None of this changes a verdict; the doc gives the S7 count (31) but not how thin that margin is.

0b. All four S7 rows, both bounds, the by-imagery paragraph, the range table and the LOSO table match simulate.md. "Every band config beats the matched-recall threshold" holds on S7 pooled under both bounds. "F1 against 1× not above zero under the standard scorer" holds (all four intervals include zero). LOSO picks narrow on 7 of 7 at both scales, by 0.0016 to 0.0037 at 1.5× and 0.0020 to 0.0037 at 2×, and also under the ignore bound. The LOSO choice for a split reads only the other six (loso_core_choice), and simulate reads no held-out split.

One extra check, in favour of the PR: a stronger baseline than the plan's is to lower the 1× threshold only inside the core and keep 0.30 elsewhere. That costs no compute, so it is the natural rival to an upscaled band. On S7 it needs +337 to +376 FPs to reach each config's recall (FP bound; for example 0.10 in the wide core gives +102 ramps for +337 FPs against 2x-wide's +100 for +174). So the band's advantage in 0b is not just a looser threshold near the horizon. This is from a scratch script, not from anything committed.

Should-fix

1. The doc's two sources are not reachable from a clone. docs/horizon_band_263.md lines 3 to 6 cite the plan as detector-phase1-horizon-2x-2026-11-15.md and the design as docs/detector_phase1_263.md. Reproduce: git ls-tree -r --name-only origin/main | grep -i detector and the same on this branch print nothing. The plan is a local file outside the repo; the design doc exists only on the unmerged branch docs/detector-phase1-263 (PR 270, whose 2026-11-17 review says it is superseded and that its useful content should move to that same path, in this PR or a small docs PR). The plan's filename is also written into both scripts' docstrings and into protocol.plan in merged_pairs.json and simulate.json. Every binding number here (one third under 8 px, 30 pairs at 12 px, the 0c gate, the 1.75× limit) comes from that plan. The doc does restate the rules, and I checked each one against the local plan file (sections 3, 4, 7): they match. Fix: commit the plan (as docs/detector_phase1_263.md, as the PR 270 review suggests) or say in the doc that the plan is not in the repo and that the rules as written here are the record. If protocol.plan changes, both JSON outputs need regenerating. The 9-split row can cite open_rig_misses_258.md instead of the plan.

2. The 1.5× rows of 0b use real pixels; production and 0c upsample. r3072 is native → 3072×6144 (input_res_sweep_25.md, arm table), while the 0c strip and production are native → 2048×4096 → bicubic 1.5×. The doc mentions "real pixels where the native image has them" in passing (line 45) but does not say that this makes the 1.5× rows an optimistic stand-in, or that 1.5× looking better than 2× in 0b (F1 0.8416 against 0.8343, wide) compares real pixels with upsampled ones. The plan says it directly: "The 1.5x cache is real pixels; production must upsample, which is untested at 1.5x". #196 found r4096 and u4096 indistinguishable at 2×, which is some comfort, but nothing measures it at 1.5×. Put that sentence beside the 1.5× rows and in the README row.

3. "LOSO picks narrow on 7 of 7" needs its interval, and the headline needs its imagery caveat.

  • The seven folds share five sixths of their data, so 7 of 7 is close to one comparison. The paired bootstrap of narrow minus wide on S7 (same contrast function, same seed) is ΔF1 +0.002 [−0.001, +0.005] at 1.5× and +0.003 [−0.000, +0.006] at 2× under the FP bound, with ΔR −0.005 [−0.009, −0.002] and ΔP +0.010 [+0.005, +0.014]. So narrow is not separated from wide on F1; it trades recall for precision. That supports keeping wide as the binding config, and the doc should say so next to the LOSO sentence. Reproduce: build the two merged lists with band_merge for CORES["narrow"] and CORES["wide"], score with hb.scored, and call hb.contrast(narrow, wide, sizes).
  • The pooled S7 reading leans on the GSV splits. In simulate.md, FP bound: on Mapillary4, ΔF1 against 1× is wholly below zero for three of four configs (2x-wide −0.022 [−0.033, −0.011], 2x-narrow −0.018 [−0.029, −0.008], 1.5x-wide −0.013 [−0.024, −0.002]) and 2x-narrow does not beat the matched threshold (+0.000 [−0.012, +0.013]). Without paterson, both 2× configs are wholly below zero (−0.016 [−0.025, −0.007], −0.013 [−0.021, −0.004]). The doc gives some of these figures in the "By imagery" paragraph, but the status table, the PR body and the README row say "every band config beats the matched-recall threshold" and "not above zero" without "on S7 pooled". "F1 against base not wholly below zero" is one of the three 0c gate conditions, so this matters for reading the 0c result on any non-GSV source.
  • Smaller: "only the ignore bound gives an F1 gain" is true for three of four configs; 2x-wide is +0.006 [−0.001, +0.014].

4. The 0c section does not say where the panos come from, and two of the five inputs are unpublished. The doc says only that --panos-root is "a RampNet checkout holding benchmark/<split>/panos/". The PR body's "from the 2026-11-12 archive" is not in the doc. docs/replication.md (the benchmark/*/panos/ row) says juneau and bayonne are not on the Hub. Those two are the whole open-rig claim. The doc should name the source of each split's panos, say that juneau and bayonne are not published and what would unblock them, and say that the extract needs the native files (it resizes native → 2048×4096 itself, so the Hub's 4096x2048 config would give different pixels). The gate itself (manual_gold) and what binds are stated clearly; the status table, the section title and the "What was verified locally" paragraph all say 0c was not run. Also stale: "0c between 11-16 and 11-18, the gate on 11-19" (those dates have passed) and "The Phase 1 design is ... PR 270" (see item 1).

5. calibrate --check cannot pass once calibration.json is committed, and re-running calibrate orphans the held-out caches. build_calibration writes git_head() into protocol.git_head, so the file's bytes depend on HEAD. The doc's last step is "commit the caches, calibration.json and the gate files, and confirm with calibrate --check"; the commit moves HEAD, so the check regenerates different bytes. Reproduced with the test suite's synthetic caches: write calibration.json with calibrate, calibrate --check → OK at the same HEAD; replace hb.git_head with a function returning another sha (which is all a commit does) → CHECK: FAIL, sha b18728184419 against d8561d2bc273. The same mechanism is worse after the held-out read: each held-out cache records the calibration's sha256, report refuses a cache whose sha differs, and run0c re-runs calibrate unconditionally. A second run0c at a different HEAD therefore rewrites calibration.json; report then refuses all three held-out caches, and the guard refuses to read them again while they exist. Restoring the committed calibration.json is the way out. Fix: take git_head out of the hashed file (or out of the bytes --check compares), and have run0c skip calibrate when a non-smoke calibration.json exists.

6. run0c does not resume a partly finished held-out read, though the doc says it resumes. guard_extract raises if any named held-out cache exists ("these splits were read once"), and run0c always passes --splits heldout. If manual_gold finishes and juneau dies, the next run0c stops at the guard. Reproduce: tests/test_horizon_band_263.py::test_guard_extract_refusals already shows the refusal with one of two caches present. The way out today is extract --splits juneau,bayonne --heldout-read-once by hand; either document that or make the held-out stage skip finished splits as the selection stage does. Related: a cache is written straight to its final name, so a crash during the write leaves a truncated file that counts as "cached" (selection) or "already read" (held out). Write to a temporary name and rename.

7. The decision line ignores the cost limit. build_gate sets decision from the gate verdict alone. cost.within_limit is computed and shown in the table, but a 1.5x-wide strip that passes the gate at 1.9× still prints "band kept for the shipped weights". The doc lists cost as a rule with a 1.75× limit, and amendment 4 already moved the estimate from 1.6× to 1.67×, so the margin is small. Reproduce: mutants b19 (limit 2.5×) and b33 (within_limit always true) pass every test. Either fold the limit into the decision text ("passes the gate; over the 1.75× limit, Jon's call") or say in the doc that the limit is reported, not enforced. A config whose context rule failed under --despite-failed-context gets the same unqualified decision line.

8. Amendment 4's reason is not right for this backbone. The doc says a stride-aligned strip's "interior features equal the full pass's and the context check measures context alone". The backbone is ConvNeXtV2, and each of its 36 blocks has a GlobalResponseNorm layer that scales by an L2 norm taken over the whole feature map (timm/layers/grn.py: x.norm(p=2, dim=spatial); counted on KeypointModel). A strip changes that statistic however much context it carries, so the context rule measures context plus this, and adding context rows would not necessarily cure a shortfall. The rule is still the right test of strip against full pass; only the explanation and the reading of a failure change. How large the effect is on the shipped weights I did not measure (it needs the checkpoint and a pano; the doc's one-pano smoke test reports peak positions, not score shift).

9. CI has not run on this head. gh pr checks 295 reports no checks, most likely because the branch conflicts with main. Local runs here are on Windows with one interpreter; CI is the authority for Python 3.10 and 3.12 on Linux. After the .gitignore conflict is resolved, wait for both jobs before merging.

10. Tests leave these 0c rules unpinned (each mutant passes all 28 tests and both checks): the context shift bar (0.05 → 0.20, b22), the 95% bar between 0.889 and 0.95 (b21 at 0.90), the cost limit (b19, b33), the binding config (wide → narrow, b32), the stop in run0c when the context rule fails (b31), the calibrated band threshold being used by report (b25), and an uncalibratable config being forced to FAIL (b26). The first five decide what 0c concludes. test_calibrate_then_report_end_to_end asserts only verdict in ("PASS", "FAIL"); its synthetic 1× pass has no in-core detection at 0.30, so precision_1x_in_core_at_030 is 0.0 from zero detections and the band threshold comes out at the grid floor, 0.05. That is also a real edge case: with no 1× in-core detections on the calibration split, the rule should refuse, not return 0.05.

11. A failed extract under-records its GPU time. all_stats gains a split's seconds only after that split's cache is written, so a run that dies in its second split writes ledger rows for the first split only (status failed). run_wall_s still covers the whole run. Add the partial split's seconds in the finally block.

Nits

  • merged_separation.png: the bins stop at 23 px, so two of the 136 pairs (one at 23 to 24 px, one at 25 to 26 px) are not drawn while the title says 136.
  • 0a: under_8px at exactly 8.0 is not tested (< → <= passes tests and check; the nearest real values are 7.9861 and 8.0319).
  • 0b LOSO: giving every split richmond's choice passes tests and check (b4), because all seven choices are the same. It cannot be caught on this data; a small synthetic test of the assembly would.
  • The context rule's literal reading counts a full-pass peak as reproduced by any strip peak of 0.05 or more within the match radius (about 22 heatmap px). The doc discloses this and reports the strict reading; I would bind on the strict one, since a 0.9 peak answered by a 0.06 peak 20 px away is not a reproduction.
  • "Compute for the results ... no ledger row": fine for a 1-minute CPU run. The 3.5-minute local GPU smoke run is disclosed under Deviations; it has no ledger row because it ran with --usage-log none.
  • "on main 8d8d8eef" in the Reproduction section will be stale after the merge.

Mutants

"Tests" is the 26 tests other than the two drift guards; "check" is the script's --check, which is what the drift guards run.

mutant tests check
0a cell 8 → 9 px pass fail
0a under-8 < → <= pass pass
0a bar 12 → 13 px; >= → > 12; ≥ 30 → 31, 38, 39; >= → > 30; paterson exclusion removed; bend excluded instead; one third > → >=; fraction 0.19, 0.18 fail (all) pass for > 12, ≥ 31, > 30 and >= one third; fail for the rest
0a Chebyshev column filled with Euclidean pass fail (cross-check assert)
0a pool without laurens_mapillary pass fail
0b LOSO includes the held-out split; picks lower F1; ties to narrow fail fail
0b LOSO every split gets richmond's choice pass pass
0b LOSO result always wide pass fail
wide core 0.44; exclusive bounds; band not restricted to core fail fail
narrow core 0.57 pass fail
strip context 0.03; wrap 64 px; min_distance not scaled fail fail
strip rows off by one; wrap offset not removed fail pass (0c only)
far bound 20 m; above-horizon not ignored fail fail
gate: F1 condition tightened or removed; recall may touch zero; either bound enough fail pass (0c only)
open rig +0.01; 2× ratio 1.0; calibration triggers 0.02 / 0.04; sha check removed; smoke calibration accepted; cost multiple without 1× fail pass (0c only)
matched threshold at the 1× recall; 1,999 draws pass fail
cost limit 2.5×; cost limit never applied; context 90%; context shift 0.20; calibrated threshold ignored; uncalibratable not forced to FAIL; no stop on failed context; binding config narrow pass pass

Checked and found sound

  • Triggers and bars as coded match the plan's section 4: more than one third under 8 px (strict), at least 30 pairs at 12 px or more outside paterson, context 95% and 0.05, calibration 0.03 and 0.05, the three gate conditions under both bounds, open rig +0.02 with an interval above zero, 1.75×, 1.25×.
  • Strip geometry in the doc's table matches strip_geometry (864×6528, 672×6528, 1056×8704; 5.64 / 4.39 / 9.19 MP) and the 1.67× estimate (5.64 / 8.39).
  • extract takes every path as an argument, has no personal path, checks every pano before loading the model, refuses --usage-log none without --allow-unrecorded-spend, and writes paid: false rows with GPU-side seconds and run_wall_s. I ran its guards against an empty --panos-root: the preflight, the held-out refusal, the --limit refusal on the default cache root and the usage-log refusal all fire before any model load.
  • The .gitignore block un-ignores exactly the seven named outputs and cache_0c/*.json; nothing tracked is ignored on the merged tree.
  • docs/README.md has the row (status "in progress") and docs/replication.md has both entries.
  • No licensing remarks, no session links, no personal paths in the diff.

Not verified

  • Anything in 0c: A40 time and memory, the 3 to 4 GPU-h estimate, the context effect, every gate number.
  • The size of the GlobalResponseNorm effect on the shipped weights (item 8).
  • Where manual_gold's benchmark/manual_gold/panos/ comes from; I did not check which nine splits the Hub dataset holds.
  • The doc's one-pano local smoke test (its outputs are not committed).
  • CI (item 9).

🤖 Generated with Claude Code — Fable 5.2, claude-fable-5-2

jonfroehlich and others added 6 commits November 25, 2026 00:04
The one conflict is .gitignore, where both sides appended a block at the end
of the file; both blocks are kept. On the merged tree
`git ls-files -ci --exclude-standard` prints nothing, and
merged_separation_263.py --check and horizon_band_263.py simulate --check
both pass. No pinned output was regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- calibration.json no longer records git_head, so its bytes (and the
  sha256 every held-out cache records) do not move when it is committed;
  `calibrate --check` passes after the commit.
- run0c checks an existing non-smoke calibration.json with
  `calibrate --check` instead of rewriting it, and stops if it does not
  reproduce.
- run0c resumes the held-out read: a held-out split whose cache exists
  (read under the current calibration) is not named again; one read under
  another calibration stops the run. extract's guard is unchanged and
  still refuses any named held-out split whose cache exists.
- Caches and --check outputs are written to a temporary name and renamed.
- The decision line names a primary that passes the gate but is over the
  1.75x limit, and a held-out read run under --despite-failed-context.
  No gate bar changes; the limit is reported, not enforced.
- The ledger rows of a failed extract include the split it died in.
- calibrate refuses when sao_paulo has no 1x in-core detection at 0.30
  (it returned the grid floor, 0.05, before).
- run0c takes --out for the gate files (a test run wrote into the repo).
- Tests pin the context bars, the cost limit, the binding config, the
  calibrated threshold in report, the forced FAIL of an uncalibratable
  config, run0c's stop and resume, and an end-to-end PASS on data with
  1x in-core detections. Eight of the new tests fail on the unfixed code.

simulate.json, merged_pairs.json and both .md files are unchanged
(both --check forms pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review-1 item 3 and its LOSO nit. simulate now writes the paired bootstrap
of the narrow-core band minus the wide-core band on S7 pooled, per scale
and bound (same contrast function, seed and draws), as a new last key
`narrow_minus_wide_S7` in simulate.json and a table after the LOSO table
in simulate.md. FP bound: dF1 +0.002 [-0.001, +0.005] at 1.5x and
+0.003 [-0.000, +0.006] at 2x; dR -0.005 [-0.009, -0.002] at both;
dP +0.010 [+0.005, +0.014] at 1.5x. These match the review's figures.

simulate.json and simulate.md were regenerated with
`horizon_band_263.py simulate`. Parsed, the new simulate.json minus the
new key equals the old one exactly, key order included; the .md diff is
9 added lines and no removed ones.

The per-split LOSO assembly moves into assemble_variants(), with a
synthetic test in which two splits get different cores (on the real data
all seven choices agree, so no real-data test can catch a wrong split's
choice). The drift guard also pins the qualitative reading: the F1
interval straddles zero, recall is wholly below and precision wholly
above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dary

The histogram's bins stopped at 23 px, so the pairs at 23.58 and 25.44 px
were not drawn while the title counts 136. Bins now run to the widest
pair. Regenerated with `horizon_band_263.py figures`:
merged_separation.png's bytes changed; band_vs_threshold.png came out
byte-identical and is not in this commit.

A new test pins that a pair exactly 8.0 px apart is not "under 8 px"
(the real data has pairs at 7.9861 and 8.0319, so `<` vs `<=` was
untested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Item 1: the plan file is not in the repo. The doc now says so, says the
  rules as written here are the record, and copies the plan's sections 3,
  4 and 7 verbatim in Appendix A (with its date). The citation of
  docs/detector_phase1_263.md now says where that file is (only on the
  unmerged branch of PR 270). The 9-split row cites open_rig_misses_258.md
  for juneau's 10 pairs. Both scripts' docstrings point at the appendix.
  protocol.plan in the JSON outputs is left as the plan's filename, which
  the doc explains, so merged_pairs.json and simulate.json keep their bytes.
- Item 2: the 1.5x rows use real pixels; production and 0c upsample.
- Item 3: the narrow-minus-wide interval beside the LOSO sentence;
  "on S7 pooled" with the Mapillary4 and no-paterson readings in the
  status table, the 0b text and the README row; the ignore-bound sentence
  corrected (2x-wide's interval includes zero).
- Item 4: where each split's panos come from, that juneau and bayonne are
  not published and what would unblock them, and that extract needs the
  native files. The stale 11-16..11-19 dates now say 0c was not run.
- Item 5-7, 11 text: run0c's resume, the frozen calibration, the decision
  line and the refusal on no 1x in-core detection (amendment 11).
- Item 8: amendment 4 and the strip paragraph no longer claim an aligned
  strip's interior features equal the full pass's. Each of the backbone's
  36 ConvNeXtV2 blocks has a GlobalResponseNorm layer, which normalises
  over the whole feature map, so the context rule measures context plus
  that statistic; its size on the shipped weights is unmeasured.
- Nits: the stale "on main 8d8d8ee" line; the 0a arm A margin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The re-run mutant harness found one survivor among the new code: run0c
recalibrating over an existing calibration.json passed every test,
because with git_head gone a recalibration of unchanged caches writes the
same bytes. The new test tampers with calibration.json and checks that
run0c stops, reads no held-out split and leaves the file as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich

Copy link
Copy Markdown
Member Author

Review 1: answers, item by item

Head after these fixes: 8881b94c. Commits: 91ea0cd1 (merge of main), b126ed7d (0c script, items 5, 6, 7, 10, 11), 5aab1151 (0b narrow minus wide, LOSO assembly test), aa7a4ff4 (figure and 8 px nits), 86055421 (doc, items 1 to 4 and 8), 8881b94c (a test for the one surviving new-code mutant). 0c was not run, the GPU was not used, and no remote host was contacted.

1. Sources not reachable from a clone. Fixed in 86055421, partly; the rest is Jon's call. Reproduced: no detector file on main or on this branch. The doc now says the plan file is not in the repository and that the rules as written in the doc are the record, and Appendix A copies the plan's sections 3, 4 and 7 verbatim with its date (checked line for line against the plan file: 37 lines, identical). The citation of docs/detector_phase1_263.md now says where it is: only on the unmerged branch of #270. The 9-split row cites open_rig_misses_258.md (juneau: 10 merged pairs, none under 8 px). protocol.plan in both JSON outputs stays as the plan's filename, which the doc explains, so merged_pairs.json keeps its bytes. Whether the whole plan goes into the repo as docs/detector_phase1_263.md (as #270's review suggests) is left for Jon.

2. 1.5x rows use real pixels. Fixed in 86055421. The caveat sits beside the 1.5x rows (with the plan's own sentence), in the status table, the README row and the PR body.

3. LOSO interval and the imagery caveat. Fixed in 5aab1151 and 86055421. simulate now computes narrow minus wide on S7 pooled with the same contrast, seed and draws, written to simulate.json (narrow_minus_wide_S7, appended as the last key) and to a table in simulate.md. My numbers match yours: FP bound, ΔF1 +0.002 [−0.001, +0.005] at 1.5x and +0.003 [−0.000, +0.006] at 2x; ΔR −0.005 [−0.009, −0.002] at both; ΔP +0.010 [+0.005, +0.014] at 1.5x. Parsed, the new simulate.json minus that key equals the old file exactly, key order included, and the .md diff is 9 added lines. The doc puts the interval beside the LOSO sentence and says it supports wide as the binding config. "On S7 pooled", with the Mapillary4 and no-paterson readings, is now in the status table, the 0b text, the README row and the PR body. The ignore-bound sentence now says three of four configs gain F1 and 2x-wide's interval includes zero.

4. Where the 0c panos come from. Fixed in 86055421. The doc has a table: S7 and sao_paulo from rampnet-benchmark (native, dataset commit 63d5ffd0, via unpack_benchmark_panos.py), manual_gold from the test split of rampnet-dataset (fetch_manual_gold.py --images-only; stored at 2048×4096 already), juneau and bayonne not published (makelab2 archive paths; bayonne also on Panoramax, byte identity of a re-fetch unchecked). It says that extract needs the native files, that a clean clone cannot re-run the open-rig part, and that uploading both splits to the Hub would unblock it (Jon's call). The stale 11-16 to 11-19 dates are replaced by "0c has not been run; Jon decided this PR merges as Stage 0 with 0c not run". The #270 reference is fixed (item 1). I dropped "from the 2026-11-12 archive" from the PR body rather than guess what it meant.

5. calibrate --check and the orphaned held-out caches. Fixed in b126ed7d. Reproduced with a new test that writes calibration.json, changes git_head and runs calibrate --check: FAIL on the old code (8ecfafcdf78d against 5f0a780bda8e), OK now. calibration.json no longer records git_head (each cache still records its own). run0c no longer re-runs calibrate when a non-smoke calibration.json exists: it runs calibrate --check and stops, rewriting nothing, if the file does not reproduce from the selection caches.

6. run0c does not resume the held-out read; caches written in place. Fixed in b126ed7d. Reproduced: a run that dies at juneau after manual_gold finished, then a second run0c, stopped at the guard on the old code (['manual_gold']: held-out cache already exists). I made it resume rather than document the manual way out, because the resume does exactly what the manual way does and leaves the guard as it is: run0c names only the held-out splits that have no cache, and stops if a finished split's cache records a different calibration sha256. extract's guard is unchanged and still refuses any named held-out split whose cache exists, so no split with a cache is read twice. A split that died part way wrote no cache, so it is read again from its first pano; nothing from the partial read was written or seen. If Jon would rather have a death mid-split stop for him, that is a one-line change. Caches and every --check output are now written to a temporary name and renamed (a test makes the rename fail and checks that no file exists under the final name).

7. The decision line ignores the cost limit. Fixed in b126ed7d. When 1.5x-wide passes the gate but its measured multiple is over 1.75x, the decision reads "passes the gate; over the 1.75x cost limit (1.800x), Jon's call". A held-out read under --despite-failed-context adds "the context rule failed for 1.5x-wide, so the held-out read ran under --despite-failed-context: Jon's call". No gate bar changed; the doc says the limit is reported, not enforced.

8. Amendment 4's reason. Fixed in 86055421 (docs only). Checked before writing: timm 1.0.28's GlobalResponseNorm.forward takes x.norm(p=2, dim=spatial) and scales each channel by it relative to the channel mean, and KeypointModel has 36 GRN layers, one per ConvNeXtV2 block. On random inputs a GRN layer's output on interior rows differs between a crop and the full map (max abs difference 0.17 in my probe). Amendment 4 and the strip paragraph now say grid alignment removes only the sampling-phase effect, that the context rule measures context plus the GRN statistic, that adding context rows would not necessarily cure a shortfall, and that the size of the effect on the shipped weights is unmeasured.

9. CI had not run. Fixed in 91ea0cd1. Merged main (merge commit; the .gitignore conflict kept both appended blocks). git ls-files -ci --exclude-standard prints nothing. CI ran on this head, 8881b94: checks, pytest (3.10) and pytest (3.12) all pass. Locally on the clean tree, check_all.py --ci gives 43 passed, 0 failed, 12 skipped, and pytest -q on test_docs_index.py, test_check_all.py, test_gitignore_tracked.py and the two #263 test files gives 187 passed.

10. Unpinned 0c rules. Fixed in b126ed7d. New tests pin the context shift bar (−0.06 fails, −0.049 passes), the 95% bar (94 of 100 fails, 95 passes), the cost limit (1.75x within, 1.80x over, gate verdict unchanged), the binding config (1.5x-wide fails while the others pass, and the band is dropped), the stop in run0c on a failed context rule (on a stand-in for extract; the held-out splits are never named), the calibrated threshold in report (0.41 keeps the band's 0.40 FP out: FPs added 0, where 0.30 would add 8), and the forced FAIL of an uncalibratable config (with gate_bound patched to pass). test_calibrate_then_report_end_to_end now runs on data with 1x in-core detections and asserts PASS on every config, band threshold 0.41, 30 ramps gained, 0 FPs added, OFFERED on the open rig, cost 1.5x and the exact decision text. Behaviour change: calibrate now refuses when sao_paulo has no 1x in-core detection at 0.30 for a config. The rule sets the band threshold to equal the 1x in-core precision at 0.30, which does not exist then; the old code used 0.0 for it and returned the grid floor, 0.05. Refusing stops run0c before the held-out read, so the one read is not spent on an undefined threshold (doc amendment 11). On real data this should never fire.

Mutants, re-run with your harness on this head (plus six for the new code):

58 mutants: your 52 plus six on the new code (c1 to c6). The table lists every mutant that passed the tests before, plus the new six; the other 35 still fail the tests as before. No mutant now passes both the tests and the check. Five still pass the tests and are caught only by the check (a11, a12, b5b, b28, b29), which is what the drift guards are for. c5 (run0c recalibrating over a frozen calibration) passed both in this run; 8881b94c adds a test that kills it (checked by applying the mutant by hand).

mutant tests before tests now check now
a1: 0a: cell 8 px -> 9 px pass fail fail
a2: 0a: under-8 '<' -> '<=' pass fail pass
a11: 0a: Chebyshev column filled with Euclidean pass pass fail
a12: 0a: pool drops laurens_mapillary pass pass fail
b4: 0b LOSO: every split gets richmond's choice pass fail pass
b4b: 0b LOSO: assembled result always uses wide pass fail fail
b5b: band: narrow core 0.56 -> 0.57 pass pass fail
b19: cost limit 1.75x -> 2.5x pass fail pass
b21: context rule: 95% -> 90% pass fail pass
b22: context rule: shift 0.05 -> 0.20 pass fail pass
b25: report: calibrated band threshold ignored pass fail pass
b26: report: uncalibratable config no longer forced to FAIL pass fail pass
b28: matched threshold matched to the 1x recall, not the band's pass pass fail
b29: bootstrap draws 2000 -> 1999 pass pass fail
b31: run0c: no stop when the context rule fails pass fail pass
b32: binding config wide -> narrow pass fail pass
b33: cost limit never applied pass fail pass
c1: calibrate: no refusal without 1x in-core detections new fail pass
c2: extract: partial split not folded into the ledger rows new fail pass
c3: run0c: resumes over a held-out cache from another calibration new fail pass
c4: report: decision ignores the cost limit new fail pass
c5: run0c: recalibrates over a frozen calibration new pass (fail after 8881b94c) pass
c6: report: failed-context override not named in the decision new fail pass

11. A failed extract under-records GPU time. Fixed in b126ed7d. The finally block now folds in the seconds of the split in progress. A new test runs cmd_extract on the CPU with a stand-in model and zero tensors and makes richmond's second pano fail: the r2048 ledger row counts 3 panos (2 sao_paulo, 1 richmond), against 2 on the old code.

Eight of the new tests fail on the unfixed code (the git_head check, the run0c resume and the refusal of another calibration's cache, the over-limit decision, the failed-context decision, the calibration refusal, the partial-split ledger and the atomic write). The rest (end to end, binding config, the 1.75x boundary, uncalibratable, the context bars, the run0c stop) pass on it, because they pin behaviour that was already right and that the mutants below break. None of these changes touch merged_pairs.json, simulate.json (beyond the one added key) or any 0a/0b number; both --check forms pass.

Nits

  • Figure bins. Fixed in aa7a4ff4. Bins now run to the widest pair, so all 136 are drawn. Regenerated with figures: merged_separation.png's bytes changed; band_vs_threshold.png came out byte-identical.
  • Exact 8.0 px. Fixed in aa7a4ff4. A test pins that 8.0 is not under 8 px.
  • LOSO assembly. Fixed in 5aab1151. The per-split assembly is now assemble_variants(), with a synthetic test in which two splits get different cores.
  • Strict reading of the context rule. Left for Jon, because it changes what 0c concludes. My recommendation: bind on the strict reading (the strip peak must also reach 0.30), and decide it before 0c runs. A 0.9 full-pass peak answered by a 0.06 strip peak 20 px away is not a reproduction, and the median-shift condition does not catch a minority of such cases.
  • "No ledger row" for the 1-minute CPU run. Agreed, no change.
  • "on main 8d8d8eef". Fixed in 86055421. The Reproduction section now points at the branch as merged by this PR.

One more, found while fixing item 3

simulate.md formats intervals from values that simulate.json has already rounded to 4 decimals, so a few are rounded twice: 32 of the 336 intervals in its tables show a third decimal that is 0.001 off the once-rounded value (S7 2x-wide, ignore bound, ΔF1 shows +0.006 [−0.001, +0.014]; once rounded it is +0.007). No interval bound changes sign and no verdict changes, since the rules read unrounded values. I left the existing tables alone, since fixing them means rewriting most of simulate.json; the new narrow-minus-wide table stores 6 decimals and is rounded once. Left for Jon whether a follow-up should do the same for the rest.

Left for Jon

  1. Whether to commit the full 2026-11-15 plan as docs/detector_phase1_263.md (and close Phase 1 design for the #263 detector campaign (proposed) #270). I would: the binding numbers come from it, and the appendix covers only Stage 0.
  2. The strict reading of the context rule (above): bind on it, decided before 0c.
  3. Publishing juneau and bayonne to the Hub, which a clean-clone re-run of the open-rig claim needs.
  4. Whether to fix the double rounding in simulate.md.

Not verified

The size of the GlobalResponseNorm effect on the shipped weights; anything in 0c; CI beyond the state above.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

@jonfroehlich jonfroehlich left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 2 of PR 295 (range e1f20eac..8881b94c, head 8881b94c, the merge of main left out)

Verdict: no blocking finding, and nothing from review 1 still stands as a defect. All eleven items are closed. Of the six nits, four are fixed, one needed no change, and one (bind the context rule on its strict reading) is left for Jon, correctly, because it changes what 0c concludes. The 0a and 0b numbers and verdicts are unchanged. Three small things are new in this round (one should-fix, two nits), and four lines of the new 0c code are not pinned by a test. This is the last review round; the list under "What still stands" is everything.

What I ran, on 8881b94c

  • merged_separation_263.py --check and horizon_band_263.py simulate --check: both OK.
  • pytest -q tests/test_merged_separation_263.py tests/test_horizon_band_263.py: 44 passed.
  • pytest -q on the clean tree: 3980 passed, 10 skipped, 2 failed. The two are test_mix_training_dirs.py::test_mix_has_every_sparse_pano_and_a_seeded_gsv_sample and test_stage1_bearing_residual.py::test_great_circle_matches_the_geodesic_used_by_stage_1. I ran those two files on origin/main (2a52673) in the same interpreter: the same two fail there. Not findings.
  • check_all.py --ci on the clean tree: 43 passed, 0 failed, 12 skipped; both #263 entries ran (0.2 s, 40.5 s).
  • CI on this head, run 45581896530: checks, pytest (3.10) and pytest (3.12) all pass. This is the first CI run on the PR, so review 1's item 9 is closed.
  • 37 mutants: the 17 from review 1 that passed the tests then, and 20 new ones on the code added in this range. Not run at the same time as the suite.
  • figures --fig-dir <scratch>: both PNGs byte-identical to the committed ones.

Do the 0a and 0b results stand

Yes.

  • merged_pairs.json and merged_pairs.md are byte-identical to e1f20eac (no diff in the range).
  • simulate.json: parsed, the new file without its last key narrow_minus_wide_S7 equals the old file exactly, and the remaining keys are in the old order. git diff --numstat: 75 added, 1 removed. simulate.md: 9 added, 0 removed.
  • band_vs_threshold.png is byte-identical; merged_separation.png changed and now draws the pairs at 23 to 24 and 25 to 26 px.
  • narrow_minus_wide_S7 matches what I computed in review 1 from a scratch script: 1.5× ΔF1 +0.002 [−0.001, +0.005], ΔR −0.005 [−0.009, −0.002], ΔP +0.010 [+0.005, +0.014]; 2× ΔF1 +0.003 [−0.000, +0.006].

Review 1 items

item state what I checked
1 sources not reachable closed The doc says the plan file is not in the repository and that the doc and Appendix A are the record. Appendix A is the plan's sections 3, 4 and 7, 37 lines, identical line for line to the plan file (compared by script). It holds nothing else from the plan. docs/detector_phase1_263.md is now described as existing only on the unmerged branch. The 9-split row cites open_rig_misses_258.md. Committing the whole plan is left for Jon.
2 1.5× real pixels closed Beside the 1.5× rows, in the status table, the README row and the PR body.
3 LOSO interval, imagery caveat closed Interval computed by the committed script and pinned by the drift guard; "on S7 pooled" with the Mapillary4 and no-paterson readings in the status table, 0b text, README row and PR body.
4 pano sources closed The table gives a source and a command for each split, names juneau and bayonne as unpublished with what would unblock them, and states the native-file requirement. Both commands exist with those flags (unpack_benchmark_panos.py --out --cities, fetch_manual_gold.py --images-only), and both archive paths are the ones juneau_split_254.md and benchmark/README.md give. This is enough to find the panos. Stale dates replaced.
5 calibrate --check and HEAD closed git_head is no longer written into calibration.json at all. Provenance that remains: the sha256 of each selection cache under protocol.inputs, and each cache's own git_head. run0c runs calibrate --check on an existing non-smoke calibration and stops without rewriting if it does not reproduce.
6 resume, atomic writes closed See "Does resuming weaken read-once" below.
7 decision and cost closed The decision names an over-limit pass and a failed-context override. gate_bound, gate_verdict and every bar are untouched in the diff.
8 amendment 4 closed Corrected in the amendment and in the strip paragraph, and it says the size on the shipped weights is unmeasured. The fixer's "0.17 on random input" figure is only in its PR comment, labelled as its probe; it is not in the doc, so nothing uncommitted is cited as a measurement.
9 CI closed Above.
10 unpinned 0c rules closed b19, b21, b22, b25, b26, b31, b32 and b33 now fail the tests.
11 failed extract's ledger closed The finally block folds in the split in progress; a test on a stand-in model counts 3 panos where the old code counted 2.
nit: figure bins closed
nit: exact 8.0 px closed a2 now fails the tests.
nit: LOSO assembly closed b4 now fails the tests.
nit: strict context reading left for Jon Agreed that it is his call. It should be decided before 0c runs.
nit: ledger note; 8d8d8eef no change needed; closed

"0c not run" is stated as plainly as before: the status table, the section title, the "What was verified locally" paragraph, the "What the plan says happens next" section and the PR body.

Does resuming weaken read-once

No. What I checked:

  • extract's guard is unchanged in the diff. A named held-out split whose cache exists is still refused, so no split with a cache is read twice by any path.
  • A split that died wrote nothing: caches go to <split>.json.tmp and are renamed at the end, and a leftover .tmp does not count as a cache (probed). So a partial held-out read leaves no peaks on disk to look at.
  • A partial result cannot be computed by the tool: report with only manual_gold read fails on the missing juneau cache (probed).
  • The remaining splits cannot be read by run0c under a different calibration: it stops, reading nothing, if a finished split's cache records another calibration sha256 (test, and mutant d7 fails it), and it stops rather than recalibrate if calibration.json no longer reproduces (test, and mutant d8 fails it).

One gap, which was there before this range and is not made worse by it: a hand-run extract --splits juneau,bayonne --heldout-read-once does not look at the caches of the other held-out splits. With manual_gold read under calibration A and calibration.json now B, the guard allows the read (probed: guard_extract returns B's sha256). report then refuses the mix, so no mixed result comes out, but the one read of juneau and bayonne would be spent. Moving run0c's sha256 comparison into guard_extract would close it. Nit.

New in this round

A. Should-fix (small): the double rounding is not mentioned in the doc, and its count in the fix comment is off. simulate.md formats to three decimals from values simulate.json already rounded to four. Rebuilding the simulation with the unrounded contrasts kept and formatting both ways gives:

  • 32 of 336 for every contrast stored in simulate.json (precision, recall and F1, pools and report_only). That is where the fix comment's number comes from, but those are not all "in its tables".
  • 10 of the 144 intervals that simulate.md actually prints in its pool tables, one number in each.
  • No bound changes sign, before or after rounding, and no verdict or sentence reads differently.

Four of the ten are quoted in docs/horizon_band_263.md, each 0.001 off the once-rounded value: S7 ignore bound 2x-wide ΔF1 (doc +0.006, once-rounded +0.007; twice in the doc), 1.5x-narrow ΔF1 (+0.013, +0.012), 1.5x-wide band minus matched (+0.051, +0.050), and the upper bound of GSV3 2x-wide ΔF1 (+0.021, +0.020). My review-1 remark that 2x-wide is "+0.006 [−0.001, +0.014]" carries the same last digit; its interval includes zero either way, so "three of four" stands. The doc says "every results table in this doc is pasted from simulate.md" and says nothing about the rounding. One sentence there would do; the fuller fix (store six decimals, as the new block does) rewrites most of simulate.json and can wait. Reproduce: build with round_contrast replaced by an identity copy and compare f"{x:+.3f}" on the raw value against the same on round(x, 4).

B. Nit: calibrate --smoke now refuses too. The new refusal (no 1× in-core detection at 0.30 on sao_paulo) is right for the real calibration and is covered by a test. It is not conditioned on --smoke, so the smoke path the doc describes, one pano per split, will often hit it. Reproduced on synthetic caches with one pano each for richmond and sao_paulo: calibrate --smoke exits with the refusal. In smoke mode it could record a null threshold instead; a smoke calibration can never gate a held-out read anyway.

C. Nit: four lines of the new code are not pinned. Each mutant passes the tests; the checks do not execute this code.

  • d3: dropping stats = None after a finished split makes a clean extract fold its last split into the ledger twice. Only the failing run is tested; a clean run's row count is not.
  • d16: run0c treating a smoke calibration.json as frozen.
  • d20: run0c calling extract with an empty list when every held-out split is already done (the third-run path).
  • d14: the figure's bins. No test draws the figures.

The code as written is correct in all four.

Mutants on 8881b94c

"Tests" is the two test files without their drift guards; "check" is the script's --check.

mutant tests check
a1 cell 8 → 9 px fail fail
a2 under-8 < → <= fail pass
a11 Chebyshev column filled with Euclidean; a12 pool without laurens_mapillary pass fail
b4 every split gets richmond's choice fail pass
b4b LOSO result always wide fail fail
b5b narrow core 0.57; b28 matched threshold at the 1× recall; b29 1,999 draws pass fail
b19 cost limit 2.5×; b21 context 90%; b22 context shift 0.20; b25 calibrated threshold ignored; b26 uncalibratable not forced to FAIL; b31 no stop on failed context; b32 binding config narrow; b33 cost limit never applied fail pass
d1 write_atomic writes to the final name; d21 os.rename in place of os.replace fail not run (0c code)
d2 partial split not folded; d17 finished splits not folded fail not run
d3 finished split not cleared (clean run counts its last split twice) pass not run
d4 no refusal without 1× in-core detections fail not run
d5 decision ignores the cost limit; d19 over-limit text without "Jon's call"; d6 failed-context override not named fail not run
d7 resume over a cache from another calibration; d8 goes on when the frozen calibration does not reproduce; d9 resume names every held-out split again fail not run
d16 smoke calibration treated as frozen; d20 extract called with nothing to read pass not run
d11 narrow minus wide with both sides wide; d11b sign flipped; d12 stored at 4 decimals pass fail
d13 LOSO assembly gives every split the first split's choice fail pass
d14 figure bins back to 0 to 23 pass not run (figure code)
d22 smoke calibration accepted for a held-out read (review-1 b34, as a control) fail not run

So the fix comment's mutant claims hold: of the review-1 survivors, a1, a2, b4, b19, b21, b22, b25, b26, b31, b32 and b33 now fail the tests; a11, a12, b5b, b28 and b29 pass the tests and are caught by the check; none passes both. Each new 0c behaviour (resume, the calibration refusal, the decision text, skip-calibrate, atomic writes, the partial-split ledger) has a test that fails without it.

Other claims checked

  • No gate_0c.json, gate_0c.md, calibration.json or cache_0c file is committed. run0c now takes --out and passes it to report, and the tests pass a temporary path.
  • No licensing remarks and no session links in the range, the PR body or the fix comment.
  • The doc's amendment 11 describes the calibration refusal as a behaviour change, which it is.

What still stands

  1. A (should-fix, small): one sentence in the doc on the double rounding, or the six-decimal fix later.
  2. B, C and the guard gap (nits). None affects a 0a or 0b number; all are in code that has not run.
  3. For Jon, unchanged from the fix comment: commit the full plan as docs/detector_phase1_263.md or not; bind the context rule on the strict reading or not, before 0c; publish juneau and bayonne or not.

Not verified

  • Anything in 0c: A40 time and memory, the 3 to 4 GPU-h estimate, the context effect, every gate number. Not run, by design.
  • The size of the GlobalResponseNorm effect on the shipped weights, and the fixer's 0.17 probe figure.
  • That the manual_gold panos on the Hub are stored at 2048×4096, and which splits rampnet-benchmark holds at commit 63d5ffd0: no network call was made.
  • The doc's one-pano local smoke test (its outputs are not committed).

🤖 Generated with Claude Code — Fable 5.2, claude-fable-5-2

jonfroehlich and others added 2 commits November 25, 2026 02:13
… d20)

- d3: a clean two-split extract counts each split once in the ledger.
- d16: run0c replaces a smoke calibration.json instead of treating it as
  frozen.
- d20: a run0c after every held-out split is read makes no held-out
  extract call (an empty --splits would trip extract's guard).
- d14: the 0a figure's bins reach past the widest pair; the test skips
  where matplotlib is not installed, as in CI.

Each test passes on this code and fails with its mutant applied. Tests
only; no code or committed output changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Where the doc says its tables are pasted from simulate.md: simulate.md
  rounds twice (four decimals, then three), 10 of the 144 intervals in
  its pool tables have one number 0.001 off the once-rounded value, the
  four quoted in this doc are named, and no bound or verdict moves.
  Re-derived by rebuilding the simulation with unrounded contrasts.
  simulate.json and simulate.md are unchanged.
- Step 2: a smoke calibration on a few panos can stop on the calibration
  refusal, and that is harmless.
- "Open before 0c runs": the strict context reading, the smoke refusal
  and the guard gap for a hand-run held-out extract, each with its fix.
  Docs only; no code changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich

Copy link
Copy Markdown
Member Author

Review 2: answers

Head after this round: 44b87279. Commits: 0d3ccc82 (tests for d3, d14, d16, d20) and 44b87279 (doc: the double rounding, the smoke refusal, the open items before 0c). Docs and tests only: no code, gate bar, 0a/0b number, committed output or figure changed, and both --check forms pass. 0c was not run, the GPU was not used, and no remote host was contacted.

A. Double rounding. Fixed in 44b87279 (doc), and a correction to my last comment. I re-derived the count by rebuilding the simulation with the unrounded contrasts kept and formatting each number both ways (your pr295_r2_rounding.py, pointed at this worktree). Of the 144 intervals that simulate.md prints in its pool tables, 10 have one number 0.001 off the once-rounded value. 32 of 336 is the count over every contrast stored in simulate.json (precision, recall and F1, pools and report_only). My earlier "32 of the 336 intervals in its tables" was wrong: the right figure for the tables is 10 of 144. No bound changes sign, either way. Where the doc says its tables are pasted from simulate.md, it now says they are rounded twice, gives the 10 of 144, names the four it quotes (S7 ignore-bound ΔF1 for 2x-wide, +0.006 against +0.007 once rounded and quoted twice; for 1.5x-narrow, +0.013 against +0.012; 1.5x-wide's ignore-bound band minus matched, +0.051 against +0.050; the upper bound of GSV3 2x-wide's ΔF1, +0.021 against +0.020), and says no verdict or sentence reads differently. simulate.json and simulate.md are unchanged. Storing six decimals for everything is still open (below).

B. calibrate --smoke refuses too. Not changed in code, by the scope of this round; documented, and listed for Jon. Step 2 of the doc's run0c list now says that a smoke calibration on a few panos can stop on the refusal when its sao_paulo pano has no 1x in-core detection at 0.30, that this is harmless because a smoke calibration can never gate a held-out read, and that extracting more sao_paulo panos (--limit) gets a smoke run through. The fix, in the doc's new "Open before 0c runs" list: in smoke mode, record a null band threshold instead of refusing.

C. Four unpinned lines. Fixed in 0d3ccc82 (tests only). Each new test passes on this code and fails with your mutant applied (applied one at a time by script, restored with git):

  • d3: a clean two-split extract on the stand-in model counts each split once (r2048 row: 4 panos; the mutant gives 6).
  • d16: run0c replaces a smoke calibration.json with the real one and goes on to the held-out read (the mutant stops at calibrate --check).
  • d20: a third run0c, after every held-out split is read, makes no held-out extract call and re-runs report (the mutant calls extract with an empty list, which the guard refuses).
  • d14: a test spies on Axes.hist while figures draws into a temporary directory and checks that the bins reach past the widest of the 136 pairs. It needs matplotlib, which requirements-dev.txt does not list, so it skips cleanly in CI and runs locally (it ran here). Nothing is written into the repo.

Guard gap. Not changed in code, by the scope of this round; listed for Jon. Agreed that it predates this range and that report refuses the mix, so no mixed result can come out; the one read of juneau and bayonne would still be spent. It is in the doc's "Open before 0c runs" list with its fix: move run0c's calibration-sha256 comparison into guard_extract, so a hand-run held-out extract refuses too.

For Jon, before 0c runs

  1. Bind the context rule on its strict reading or not (my recommendation: bind on it).
  2. Make the calibration refusal record a null threshold under --smoke (B).
  3. Move the calibration-sha256 comparison into guard_extract (guard gap).
  4. Unchanged from last time: commit the full plan as docs/detector_phase1_263.md or not; publish juneau and bayonne or not; store all of simulate.json's contrasts at six decimals or not.

Checks on the clean tree at 44b87279: both --check forms OK; pytest -q on test_docs_index.py, test_check_all.py, test_gitignore_tracked.py and the two #263 test files, 191 passed; check_all.py --ci, 43 passed, 0 failed, 12 skipped. CI on the final head: run 45595650960 on 44b8727, checks, pytest (3.10) and pytest (3.12) all pass.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

jonfroehlich and others added 2 commits November 25, 2026 05:01
…'s reading

Decided 2026-11-25, before any 0c data exists: the lenient reading (a strip
peak within the radius at the score floor, plus |median shift| < 0.05)
binds; the strict reading stays reported. Reasons in the doc. The two code
fixes to unrun 0c stay listed as open, for a follow-up PR before 0c runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonfroehlich added a commit that referenced this pull request Nov 25, 2026
B1: rung 1 reads manual_gold only; US7 and open-rig 3 stay held out for the
ship read; the open-rig 3 rung 1 guard is listed in section 11 as Jon's call.
S1/S2: both decisions dated 2026-11-25 and sourced to #295's 04d06c8; the
lenient-reading reasons are the ones Jon accepted, not his words. S3: the
cost floor for a Phase 1 that reaches rung 2 is about 340 GPU-h (README hook
too). S4: control arm on open-rig 3 quoted against the ship rule's floor.
S5: "B replaces the band" reads manual_gold (proposed). Nits: two before-0c
items, checkpoint size source, HELD_OUT wording, #263 scope wording,
"(proposed)" on C and D, where the strict-reading recommendation was made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich
jonfroehlich merged commit 2a3eff3 into main Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant