ad713af8

By: ValentinHirschi <valentin.hirschi@gmail.com>

cache sampling programs and focus both sides of thresholds

Compile the canonical graph bridge transactionally during warmup and borrow
it in sampling, summed evaluation and direct-momentum partitions. Invalidate
on mutable settings and refresh improved external data after in-place edits.
Give worker clones independent eager score buffers; evaluate borrowed channel
scores without per-draw program clones through one partition reduction.

Focus the inner radial branch on the distance to the threshold, sharing a
stable native inverse with implicit maps. Add signed-distance, tiny/subnormal,
Jacobian, reference, cache-lifecycle and worker-independence regressions.

Re-read and coordinate the amplitude and cross-section plan: cap amplitude
benchmarks at the kite and double box, develop LU-h and conditional host/side
maps in parallel, and run full GL638 pilots before automatic discovery is
finished. Record native sampling rescue as the next shared gate; document
actual double-box intersections and missing production cut-context bindings.
No amplitude or GL638 physical variance improvement is claimed yet.

Validation: core/API test compilation, 154 library sampling tests, both
saved-state/summed API regressions, core/API clippy, cargo fmt --all --check,
and git diff --check pass. No lint warnings on changed lines; unrelated old
warnings remain. API formatting follows its declared edition 2021. Runtime
caches are not serialized; state reload requires warmup, with no cache-payload
migration. The f64 bridge's rounded-seam error still needs native rescue.

User request:
Continue as planned, but re-read the plan, and establish how to best orchestrate progress on both front of amplitude surface advanced sampling, but also the overall goal of cross-section advanced sampling, that must eventually apply to GL638 and demonstrate improvement there.

Earlier amplitude request:
Continue as planned, but also add that the advanced sampling implementation should also be tested for amplitude multiloop graphs (not just the cross-section ones), where it is of course simpler as there are no cuksosky cuts. Spawn a subagent to propose good candidates, but the 6-photons 2-loop graphs in the presence of thresholds is an idea, but it may be slow to generate, I would then rather consider some UV finite scalar 2-loop amplitude topologies. Let a subagent what would be best.
This allows to not only test the implementation of advanced sampling on amplitude, but also test the new advanced surface maps in a simpler context with not cutkosky cut rescaling, and also monitor the impact on the variance for these cases.