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.
GitHub
gammaloop-checkgammaloop-clippygammaloop-docgammaloop-fmtgammaloop-guppy-workspace-graphgammaloop-nextest-binaries-clinnetgammaloop-nextest-binaries-coregammaloop-nextest-binaries-integrationgammaloop-nextest-binaries-linnetgammaloop-nextest-binaries-python-apigammaloop-nextest-binaries-spensogammaloop-nextest-binaries-vakintlinnest-wasmconfiguredeploy:nix-ci-passedclinnetdevShellfullcargoArtifactsci-workspace-graph-jsonclinnetclinnet-clicrate-deps-gammaloop-workspace-hackcrate-deps-gammalooprscrate-deps-three-dimensional-repscrate-test-binaries-clinnetcrate-test-binaries-gammaloop-apicrate-test-binaries-gammaloop-integration-testscrate-test-binaries-gammaloop-tracing-filtercrate-test-binaries-gammaloop-tracing-filter-macroscrate-test-binaries-gammalooprscrate-test-binaries-idensocrate-test-binaries-kurvstcrate-test-binaries-linnestcrate-test-binaries-linnetcrate-test-binaries-linnet-pycrate-test-binaries-python-api-gammaloop-integration-testscrate-test-binaries-spensocrate-test-binaries-spenso-hep-libcrate-test-binaries-spenso-macroscrate-test-binaries-symbolica-utilscrate-test-binaries-three-dimensional-repscrate-test-binaries-vakintcrate-test-dependencies-clinnetcrate-test-dependencies-gammaloop-apicrate-test-dependencies-gammaloop-integration-testscrate-test-dependencies-gammaloop-tracing-filtercrate-test-dependencies-gammaloop-tracing-filter-macroscrate-test-dependencies-gammalooprscrate-test-dependencies-idensocrate-test-dependencies-kurvstcrate-test-dependencies-linnestcrate-test-dependencies-linnet-pycrate-test-dependencies-python-api-gammaloop-integration-testscrate-test-dependencies-spensocrate-test-dependencies-spenso-hep-libcrate-test-dependencies-symbolica-utilscrate-test-dependencies-three-dimensional-repscrate-test-dependencies-vakintcrate-three-dimensional-repsgammaloopgammaloop-python-modulegammaloopApiPackageArtifactslinnest-wasmlinnestWasmCargoArtifactsnix-ci-check-gammaloop-doctestnix-ci-check-gammaloop-nextest-clinnetnix-ci-check-gammaloop-nextest-corenix-ci-check-gammaloop-nextest-integrationnix-ci-check-gammaloop-nextest-linnetnix-ci-check-gammaloop-nextest-python-apinix-ci-check-gammaloop-nextest-spensonix-ci-check-gammaloop-nextest-vakintnix-ci-passedx86_64-linuxtest:nix-ci-check-gammaloop-doctesttest:nix-ci-check-gammaloop-nextest-clinnettest:nix-ci-check-gammaloop-nextest-coretest:nix-ci-check-gammaloop-nextest-integrationtest:nix-ci-check-gammaloop-nextest-linnettest:nix-ci-check-gammaloop-nextest-python-apitest:nix-ci-check-gammaloop-nextest-spensotest:nix-ci-check-gammaloop-nextest-vakint