ac2c553c

By: Lucien Huber <im@lcnbr.ch>

document the raised-energy stack and performance evidence

Preserve historical reviews and document the reconstructed stack, source mapping, per-commit findings, Rust patterns, test contracts and recorded validation limits.

User request:

PLEASE IMPLEMENT THIS PLAN:
# Rebuild the reviewed stack as seven compilable commits

## Summary

Duplicate the entire stack from `main` through the phase-fix branch using jj, incorporate our five review changes, then squash and split the combined result into seven commits. Review every resulting commit for correctness, Rust idiomaticity, KISS, and tests of outward behavior.

“Compilable separately” means each commit builds with its ancestors, without needing any later commit.

## History and integration

- Pin the inspected inputs: `main` at `39561014`, raised-energy at `91142139`, optimized at `ac99d32d`, phase fixes at `32f27225`, and the five named review changes ending at `ce6654cc`.
- Record source revisions, trees, and a jj operation checkpoint. Use `jj duplicate` for the 37 remote commits and five review commits, preserving the originals. Exclude the empty intermediary from the review payload.
- Apply the duplicated review changes to the duplicated stack. Reconcile overlaps by behavior: retain optimized occurrence handling, integrate rational coefficients throughout its consumers, preserve owner-specific UV mass handling, and retain both the shared contour normalization and physical-phase corrections.
- Record the reconciled tree, squash only the duplicated history, and use hunk-level jj splits to construct the sequence below. Keep signature changes, callers, tests, and required dependency metadata together.
- Use `Lucien Huber <im@lcnbr.ch>` for the reconstructed commits and `codex/raised-energy-cff-reviewed` for the final local bookmark. Do not push or modify the thermal and threshold branches.
- Verify that splitting preserves the reconciled tree exactly. Record any subsequent review fixes explicitly.

## Commit sequence

| # | Commit | Included behavior and verification |
|---|---|---|
| 1 | **fix symbolic and tensor foundations** | Symbolica dependency fixes, Spenso/Idenso algebra and tensor bookkeeping, corresponding consumer migrations, and tests of contraction results. Include foundational build/tooling changes needed by subsequent commits. |
| 2 | **add exact generalized CFF generation** | Shared `three-dimensional-reps` engine with rational coefficients, independent repeated occurrences, validated inputs, arithmetic parsing, and optimized generation/cache paths. Verify complete signed contour results, repeated poles, malformed inputs, and equivalent results across execution strategies. |
| 3 | **integrate raised-energy CFF and local UV reconstruction** | GammaLoop adapters, energy assignments, exact source reconstruction, direct/projected UV routes, evaluator construction, and owner-specific integrated-mass correction. Include complete GL00/GL04 certificates and nested/disjoint UV regressions. |
| 4 | **extend command execution and evaluation workflows** | Command templates and scope, state/history/output handling, 3D representation commands, benchmarks, stability reporting, schemas, and CLI tests. Check observable execution, exported functions, persistence, and restoration after success or failure. |
| 5 | **correct physical phases and model sewing** | Amplitude/LU normalization, conjugation and gauge sewing, propagator/model contracts, and numerator-aware matching. Include independent signed contours, left/right mirrors, model parity, and signed LO/NLO acceptances. |
| 6 | **complete d-dimensional integrated UV algebra** | Both Vakint input modes and forest owners, settings, pole/finite/evanescent contributions, and analytic/backend adapter tests. Keep the full API migration together. |
| 7 | **document the reviewed CFF stack and validation** | Preserve historical review documents and update the Markdown, Typst, and PDF reports with source-to-new-commit mapping, per-commit findings, Rust patterns and their effectiveness, and actual validation evidence. |

Behavioral tests and current architecture documentation accompany their owning functional commit. No temporary compatibility layers are introduced to make a split compile.

## Validation and final review

- At **each commit**, run formatting checks, `cargo check --workspace --all-targets --locked`, a workspace build including all targets, Clippy, and the relevant behavioral tests. Check shared CFF with both all features and default features disabled.
- Review the **entire diff of every new commit**, including tests, configuration, fixtures, and documentation. Use independent reviewers for bounded commits and record coverage so no files are silently omitted.
- Replace tests that constrain private storage, map/cache counts, traversal order, or expression formatting with checks of complete values, errors, or supported public contracts. Preserve independent mathematical oracles. Follow the repository’s confirmation requirement before changing a failing test.
- Resolve findings in the owning commit and revalidate affected descendants. Document ownership, conversions, builders, enums, error handling, and iterator patterns only where they clarify an actual design choice.
- On the final tree, run the curated GammaLoop suite, full scalar LU matrix including slow cases, shared CFF feature matrix, and phase/Vakint regressions. Use the existing license and concurrent execution, retaining memory/resource limits. Run the scalar matrix’s underlying selection without its wrapper’s forced single-test setting.
- Disable snapshot updates and retries. Keep manual PySecDec integrations outside the automatic suite and state that coverage limit explicitly.
- Compile the Typst documents and inspect the rendered PDFs. Report fresh commands, counts, results, and remaining limitations; earlier test totals do not certify this reconstructed stack.

Follow-up user instruction:
1. Yes 2. yes , Then 3-8 all seem about comparing atoms. If these are only tests (and the expressions are small) the most straightforward is to expand and subtract and check for zero, unless we are testing for factorization, in which case you just want to test for equality. I agree that you need to revise 4,6,7,10

User approval for proposal 9:

Assistant proposal: Change the Arb baseline test to describe decimal promotion and use independent expectations 1/10 and -3/10, retaining exact full-result equality. Fold the approved correction into its owning commit and revalidate affected descendants and reports.

User prompt:
yes

Additional authorized test corrections

Full user prompt:
I agree with 11-13 btw

Applies to proposal 11: explicit unit loop normalization for the nested conversion fixture; proposal 12: move the existing external-quark color-basis alignment into owning commit 3 while preserving later physical-phase and Vakint-mode changes; proposal 13: replace seven vertex formatting snapshots with complete tensor value oracles. Preserve the earlier preference for expanding small complete expression differences and checking zero.

Current report instruction

Full user prompt:
Strip any historical statement just mention the current state of

Integrate the change-motivation audit, physical benchmarks, powered-dot evidence and remaining review fixes into the seven-commit stack. Preserve the original history and record fresh validation and exact tree-preservation evidence.

User request:
yeah go!

Integrated follow-up descriptions:
audit change motivations and benchmark physical contractions

User request:
For each indentified change then, benchmark with a physical g - g double triangle with a 3g vertex an quark loop, or other representative input/ find the bug that lead to the change

cover powered scalar sums at the FORM boundary

Retain powered-dot freshening: disabling it drops diagonal angular-average factors in whole-numerator FORM reduction. Add an outward regression, retain the exact public-API reproducer, and correct the review reports. Production logic is unchanged.

Validation: 44 Vakint unit and tensor-reduction tests pass; formatting, locked check, all-target Clippy and both Typst compilations pass.

User request:
owered-dot freshening actually seems interesting to maybe remove..

User request:
jj git fetch, and then lets review that latest commit, as we selectively squash it into the 7, (we can add a commit or two if the functionality added is very different to what was already there

Consolidate the original stack review, performance investigation, benchmark evidence and restoration plan. Historical measurements retain their original source identities.

History organization requested by the user: "can we squash the performance restoration into the feature-stack?"
Approved correction: fold fixes into their owning feature commits and keep parametric numerator/series work separate. User: "sounds better yes"

Total

8m12s

Time to Start Worker time Duration Time to finish Idle
Config 1s 3s 3s 4s 1s
Eval 6s 1m20s 1m20s 1m26s 1s
Build 1m20s 0s 0s 1m20s 0s
Test 1m26s 21m13s 6m19s 7m46s 0s
Deploy 7m53s 20s 20s 8m13s 7s
Suite 1s 22m57s 8m12s 8m13s 10s

Timeline

Config Eval Build Test Deploy Compressed gap
0s1m2m3m4m5m6m7m8m