Repository navigation
Detector Phase 1 Stage 0 (#263): merged pairs, horizon band simulation, 0c script - #295
Conversation
…, 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
left a comment
There was a problem hiding this comment.
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 --checkandhorizon_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 --touchingon each new script lists its own entry.check_all.py --cion 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-standardprints nothing,pytest -qgives 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_sampleandtest_stage1_bearing_residual.py::test_great_circle_matches_the_geodesic_used_by_stage_1), so they are not findings,check_all.py --cigives 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_panofor 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
contrastfunction, 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 withband_mergeforCORES["narrow"]andCORES["wide"], score withhb.scored, and callhb.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_8pxat 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). extracttakes every path as an argument, has no personal path, checks every pano before loading the model, refuses--usage-log nonewithout--allow-unrecorded-spend, and writespaid: falserows with GPU-side seconds andrun_wall_s. I ran its guards against an empty--panos-root: the preflight, the held-out refusal, the--limitrefusal on the default cache root and the usage-log refusal all fire before any model load.- The
.gitignoreblock un-ignores exactly the seven named outputs andcache_0c/*.json; nothing tracked is ignored on the merged tree. docs/README.mdhas the row (status "in progress") anddocs/replication.mdhas 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
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>
Review 1: answers, item by itemHead after these fixes: 1. Sources not reachable from a clone. Fixed in 2. 1.5x rows use real pixels. Fixed in 3. LOSO interval and the imagery caveat. Fixed in 4. Where the 0c panos come from. Fixed in 5. 6. 7. The decision line ignores the cost limit. Fixed in 8. Amendment 4's reason. Fixed in 9. CI had not run. Fixed in 10. Unpinned 0c rules. Fixed in 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;
11. A failed extract under-records GPU time. Fixed in 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 Nits
One more, found while fixing item 3
Left for Jon
Not verifiedThe 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
left a comment
There was a problem hiding this comment.
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 --checkandhorizon_band_263.py simulate --check: both OK.pytest -q tests/test_merged_separation_263.py tests/test_horizon_band_263.py: 44 passed.pytest -qon the clean tree: 3980 passed, 10 skipped, 2 failed. The two aretest_mix_training_dirs.py::test_mix_has_every_sparse_pano_and_a_seeded_gsv_sampleandtest_stage1_bearing_residual.py::test_great_circle_matches_the_geodesic_used_by_stage_1. I ran those two files onorigin/main(2a52673) in the same interpreter: the same two fail there. Not findings.check_all.py --cion 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)andpytest (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.jsonandmerged_pairs.mdare byte-identical toe1f20eac(no diff in the range).simulate.json: parsed, the new file without its last keynarrow_minus_wide_S7equals 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.pngis byte-identical;merged_separation.pngchanged and now draws the pairs at 23 to 24 and 25 to 26 px.narrow_minus_wide_S7matches 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.tmpand are renamed at the end, and a leftover.tmpdoes 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:
reportwith only manual_gold read fails on the missing juneau cache (probed). - The remaining splits cannot be read by
run0cunder 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 ifcalibration.jsonno 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 andreport_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.mdactually 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 = Noneafter a finished split makes a cleanextractfold its last split into the ledger twice. Only the failing run is tested; a clean run's row count is not. - d16:
run0ctreating a smokecalibration.jsonas frozen. - d20:
run0ccallingextractwith 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.jsonorcache_0cfile is committed.run0cnow takes--outand passes it toreport, 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
- A (should-fix, small): one sentence in the doc on the double rounding, or the six-decimal fix later.
- B, C and the guard gap (nits). None affects a 0a or 0b number; all are in code that has not run.
- For Jon, unchanged from the fix comment: commit the full plan as
docs/detector_phase1_263.mdor 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-benchmarkholds at commit63d5ffd0: 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
… 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>
Review 2: answersHead after this round: A. Double rounding. Fixed in B. C. Four unpinned lines. Fixed in
Guard gap. Not changed in code, by the scope of this round; listed for Jon. Agreed that it predates this range and that For Jon, before 0c runs
Checks on the clean tree at 🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5 |
…'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>
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>
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.mdAppendix 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.Chebyshev and Euclidean give the same 0a verdicts. Paterson holds 80 of the 136 pairs.
Review 1 fixes. main merged in (the
.gitignoreconflict kept both blocks). The 0c script no longer writesgit_headintocalibration.json, socalibrate --checkpasses after the commit;run0cchecks 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.calibraterefuses 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.jsongains 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 incheck_all.py.🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5
review-1 fixes by claude-opus-5-5