Skip to content

test: re-baseline post-propagation in-air fraction after TauRunner decay fix - #103

Merged
thomwg11 merged 3 commits into
mainfrom
test/rebaseline-in-air-fraction
Sep 4, 2026
Merged

thomwg11 merged 3 commits into
mainfrom
test/rebaseline-in-air-fraction

Conversation

@thomwg11

@thomwg11 thomwg11 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Context

Post-propagation in-air fraction (test/test_injection_regression.jl) has been failing on every PR branch since late July:

Evaluated: isapprox(0.24050632911392406, 0.2; atol = 0.02)

Identical to the digit across four CI runs on three branches — deterministic, not noise.

Root cause: upstream TauRunner, not TamboSim

icecube/TauRunner#72 (361661f, 2026-07-22) replaced the charged-lepton decay test in both SlabPropagator.jl and SphericalBodyPropagator.jl:

if particle.energy <= particle.mass * (1.0 + 1e-6)          # old — never fired
if Base.invokelatest(PROPOSAL_FN[:has_decay], secondaries)  # new

Taus decay in flight while still carrying nearly all their energy, so the old rest-mass test almost never fired: PROPOSAL decayed the tau, but TauRunner handed back a surviving tau at the decay vertex. Upstream's own regression test records 0/5 decays before, 5/5 after.

Downstream, this flips the branch at src/injection/inject.jl:265 — TauRunner now returns a ν_τ rather than a τ, so inject_neutrino_event no longer returns early and instead samples a vertex via force_interaction_vertex. That moves where PROPOSAL starts relative to the terrain, which is exactly what this test measures.

Last green main run was 2026-07-21, the day before the fix landed. It only bites CI because Manifest.toml is untracked (df53a9e) and Project.toml pins TauRunner by URL with no rev, so CI resolves upstream HEAD every run while local checkouts stay on whatever they last resolved.

Changes

The new TauRunner behavior is the physically correct one, so the regression values are re-baselined against it:

old measured new
γ=1.0 0.200 0.2405 (95/395) 0.240
γ=2.0 0.197 0.2047 (79/386) 0.205

γ=2.0 had drifted for the same reason and was still inside the ±0.02 tolerance; re-baselined too rather than left to fail later. Tolerance unchanged.

Also adds an @info line printing the measured fraction and its numerator/denominator, so the next drift is readable straight off a CI log instead of needing a probe branch.

Verification

Measured on run 33823627332 (4151 pass / 1 fail — the single failure being this assertion), confirmed green on 33824911441: 4152 pass / 0 fail, both fractions reproducing exactly.

Note

TauRunner is deliberately left unpinned, per discussion. Anyone with a stale local Manifest.toml should Pkg.update("TauRunner") (in the repo and in examples/) — on the pre-fix tree the old 0.200 baseline is what reproduces.

🤖 Generated with Claude Code

thomwg11 and others added 2 commits September 3, 2026 20:53
Print the measured fraction (and its numerator/denominator) for each
spectral index before asserting, so a drift in this regression number is
readable straight off a CI log instead of needing a probe branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…y fix

icecube/TauRunner#72 (361661f, 2026-07-22) detects charged-lepton decay via
PROPOSAL's has_decay flag instead of testing whether the energy fell to the
rest mass. Taus decay in flight while still carrying nearly all their energy,
so the old test almost never fired and TauRunner returned a surviving tau at
the decay vertex.

With the fix TauRunner hands back a nu_tau, so inject_neutrino_event no longer
returns early at src/injection/inject.jl:265 and instead samples a vertex via
force_interaction_vertex. That moves where PROPOSAL starts relative to the
terrain and raises the post-propagation in-air fraction:

  gamma=1.0  0.200 -> 0.240  (95/395)
  gamma=2.0  0.197 -> 0.205  (79/386)

Both measured on CI run 33823627332. The gamma=2.0 value was still inside the
0.02 tolerance but had drifted for the same reason, so both are re-baselined.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thomwg11
thomwg11 marked this pull request as ready for review September 4, 2026 01:33
@kcarloni
kcarloni self-requested a review September 4, 2026 12:32
Updated baseline date and comments for tau decay detection.

@kcarloni kcarloni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing this! I changed the wording because I often feel like Claude is too wordy in describing previous errors, which only adds unnecessary confusion.

@kcarloni
kcarloni self-requested a review September 4, 2026 12:37

@kcarloni kcarloni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved

@thomwg11
thomwg11 merged commit 862af1c into main Sep 4, 2026
1 check passed
@thomwg11
thomwg11 deleted the test/rebaseline-in-air-fraction branch September 4, 2026 13:15
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.

2 participants