feat(variation): bind runtime replay identity - #4431
Draft
d-sorgcodexagent[bot] wants to merge 2 commits into
Draft
feat(variation): bind runtime replay identity#4431d-sorgcodexagent[bot] wants to merge 2 commits into
d-sorgcodexagent[bot] wants to merge 2 commits into
Conversation
31 tasks
This was referenced Aug 13, 2026
dieterolson
pushed a commit
that referenced
this pull request
Aug 14, 2026
The web build was broken and two React tests failed once the whole family was integrated. Both are genuine cross-slice defects that no individual PR could expose, because each slice only ever ran against its own parent. 1. `npm run build` (tsc) failed, which is why "Rate web production Worker E2E" could not even start its preview server. #4431 made `executionMetadata` required on `VariationExecutionRequest`/`VariationExecutionResult`, but four test fixtures introduced by the #4444 chain construct those objects without it. Supplied it the way the already-updated fixtures in the same file do -- from the request under test, which also satisfies `validateResult`'s request/result metadata equality check. For the two unsupported-flight-model cases the request is now spread from `jointRequest()` with only the plan overridden; `validateExecutionRequest` runs `validatePlan` before the metadata comparison, so the assertion still exercises the flight-model rejection it was written for. 2. A real behavioural regression. `importPlan` sets the plan, clears results, then reports provenance -- either "resolves against the current variable registry ... not evidence of historical reproducibility" for a raw plan, or "Execution sidecar verified against the current registry" for a signed document. The #4444 chain added an effect that calls `invalidateResults` on every configuration-identity change. Changing the plan changes that identity, so the effect ran after commit and overwrote the provenance message with the generic "Ready: configuration changed; run again." The user was silently denied the one message that tells them a loaded plan was re-resolved against today's registry rather than its recorded one. `invalidateResults` now announces only a discard that actually happened, decided from refs so the callback identity stays stable and the effect cannot re-trigger itself. Nothing else references that string, and the invalidation tests assert visual state and heading removal rather than status text, so they are unaffected -- they invalidate with results present, where the message still appears. Verified in the web workspace: tsc clean, eslint clean (--max-warnings 0), vite build succeeds, and vitest is 1084/1084 across 126 files (was 1082/1084).
dieterolson
pushed a commit
that referenced
this pull request
Aug 14, 2026
…esign seam Two slices in this family carry contracts that are mutually exclusive as written, and neither branch contained both, so both slices' tests passed in isolation and the contradiction only appears once they are integrated: - #4426 added `build_simulation_ensemble_request_from_samples`, whose entire purpose is deterministic experimental designs "whose rows are the scientific authority (for example, planted baseline/perturbation pairs), rather than pseudorandom Monte Carlo draws". - #4428/#4431 made `SimulationEnsembleRequest.__post_init__` require unconditionally that `sampled_inputs` equal `sample_inputs(plan)` -- the plan-derived RNG stream. Together, the request contract rejects exactly the designs the seam exists to carry. Measured: 7 tests in test_localized_attribution_producer.py failed with "sampled_inputs must exactly match the plan-derived RNG stream and order", which is the whole paired-attribution producer being non-functional. Reconciled by making the provenance explicit rather than implied. `SimulationEnsembleRequest.sample_provenance` defaults to `plan_rng`, so every existing caller and test keeps the reproducibility guarantee unchanged, and the RNG-stream equality check is enforced exactly as before. The explicit seam passes `explicit_design`, which skips only that one check; shape, finiteness, and crucially `_require_config_sample_binding` -- the check that actually proves each row was executed as written -- all still apply. The Monte Carlo seam now passes `plan_rng` explicitly, because it delegates through the explicit builder and must not inherit its default. Verified with the pinned toolchain: the 7 producer tests pass, and 626 tests across the variation, reference, flight, solver and impact suites pass with no new failures. Confirmed the 5 unrelated failures in this area are pre-existing on the pushed branch by re-running them with these two files reverted to HEAD.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the strict resolved-execution sidecar with explicit runtime, RNG stream, executor, and solver identities. Python requests recompute and bind the exact PCG64 sample matrix and executed configuration rows; injected executors are relabeled rather than falsely carrying production identity. React and Python retain deliberately distinct runtime identities and reject cross-runtime documents. Legacy metadata v1 fails closed with migration guidance. Validation includes 54 focused Python tests, 37 focused React tests, Ruff, TypeScript/ESLint, and an exact hosted-shaped Ubuntu Python 3.12 / NumPy 2.3.5 / Mypy 1.13 gate over all five changed Python sources. This remains partial R10.4/R10.5 evidence: archive and paired-production persistence, historical migration, and portable cross-runtime numerical replay remain open.