Files
CelerisLab/docs/validation/refined_dfg_window.md
T

3.8 KiB

Opt-in observation-window ledger in the DFG runner

This test-only integration adds --exchange-window to run_refined_dfg.py. It uses the existing production ledger; no collision, boundary, transfer, physical setup, reference, periodicity gate or acceptance threshold changes. Default remains the historical per-base-step observation path. Uniform stepping/force accumulation is unchanged.

For the refined case, each existing observation interval opens a new ledger at completed base step begin, advances exactly the same n base intervals, and reads the integrated root-lattice impulse for [begin, begin+n]. The contract requires root units, window kind, 2*n fine samples, matching endpoints, and fine dt=.5. The existing coefficient calculation still divides this impulse by n and .5*U_lattice**2*D_root; force timestamps remain (begin+n/2)*U_lattice/D_root. It does not divide an already averaged force again. Pressure/macro/physical-leaf mass measurements and safety checks remain at the original interval end. Pilot interval is 80 root steps; early full-run intervals remain 2000, and any final shortened interval uses its actual n.

The opt-in uses one step(n) call and one window read per observation, rather than n Python calls/readbacks. Internal subcycling and per-base synchronization remain owned by the same backend. Cooperative deadline checks surround that complete interval; unlike the default path they cannot interrupt between base steps inside step(n). The existing external hard watchdog is still required. The full-run cadence/cap is documented here, but this preparation does not admit a full run or a GPU operation.

Provenance and receipt separation

source_manifest_window.json pins the reviewed a233c90324 snapshot (production ledger origin d930) plus existing helper/reference files. Both SRT and MRT are supported by this explicit opt-in source pin; collision selection remains independent and shared by the two cases. Existing SRT and MRT manifests are untouched. Default mode continues to reject the changed candidate under those historical pins; use a matching historical --source checkout to run its default path. There is no silent repinning, source fallback, or reuse of historical outputs as candidate evidence.

Plan, READY, summaries, timeout/comparison receipts now record observation_mode as last_base_step or window, alongside collision and actual checkout provenance. On a uniform receipt this labels its paired campaign's refined observation mode, not a change to uniform observation. Full-mode pilot validation rejects missing or mismatched mode labels in the plan, either case summary, and either READY receipt. Source/runner hash, collision, completeness and health checks remain. Cross-mode pilot reuse is denied.

The earlier short A/W/W1 timing/capability evidence is not a full-run speedup or accuracy claim. Mathematical impulse integration/units are unchanged; floating-point reduction order can differ, so bitwise equality of force sums is not promised. Physics acceptance continues to use the existing frozen gates. Historical failures/results are untouched.

CPU preparation commands, from the repository root:

python tests/unit/test_refined_dfg.py
PYTHONPATH=src python -m unittest tests.unit.test_raw_exchange_window tests.unit.test_time_window_dfg -v
python tests/validation/run_refined_dfg.py --collision MRT --exchange-window --mode plan --output /tmp/new-window-dfg-plan

Root must independently review and admit any execution. An admitted paired pilot uses the existing watchdog, device selection, --gpu-gates-approved, positive --max-wall-seconds and a new output directory, adding only --exchange-window to the selected collision's pilot command. No GPU or remote action was performed for this patch.