Repository navigation
Stop the merged baseline pass at a refused post-export batch file - #1772
Merged
Merged
Conversation
_baseline_for caught every error from the merged baseline pass with `except Exception`, PostExportBatchFileError included, then logged a fallback and let each consumer score its own plan. The batch-file PR said whichever of it and the merged-pass PR landed second should re-raise the refusal there, as the two held-out writers do; neither did. A changed file still stopped certification one pass later, and a file that failed one read and passed the next let certification finish without the merged pass. Re-raise PostExportBatchFileError before the broad handler, say so in the docstring, and test both cases: a changed file (no fallback log, no fallback pass) and a file that fails one read only (now raises; main returned values through the fallback). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rule still said every stage runs its own pass when the shared pass raises. A refused batch file is now the exception: it stops certification there, and the cost is a rerun. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… directly The scoring-plan comment still said every consumer scores its own plan once the merged pass fails; a refused batch file is raised at once instead. The _baseline_for docstring now names the guard sweep's baseline worker, which registers its plans too. The changed-file test asserts that no consumer scored its own plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The review of this change returned REQUEST_CHANGES, and I'm going by its finding levels, which leave nothing that blocks the merge. Its one P2 asks certification to close the post-export scorer in a |
MaxGhenis
marked this pull request as ready for review
November 27, 2026 00:30
juaristi22
added a commit
that referenced
this pull request
Nov 27, 2026
…the e4d46c93 feed and the new CI caps (#931) Main took six pull requests since 4b78a9b: #1736 (LCFS spending drawn as a budget and a donor's mix, with a decile receipt beside ONS Family Spending, the UK feed re-pinned to Chronicle e4d46c93, and register renewals), #1779 (the CI caps from the slowest legs of 19 to 26 Nov), #1772 (a batch file's error skips the fallback), #1767 (New Zealand declares its receipt's take-up cap), #1751 (the US post-export H5 path) and #1723 (US QRF identity tests). The engine lock does not move. Eight files conflicted. - uk_runtime/lcfs_consumption.py: main's receipt imports and the clip's docstring, which now names the mix donor and keeps this branch's count of distinct source households over every clone. Main's new decile and range-step receipts count the frame's support in distinct source households (source_household_id), so on the clone-first spine a source household's clones count once. - uk_runtime/graph_kernels.py: the LCFS stage keeps this branch's full list under the derived binding rule and adds microcosm.fit.donors, which main's draw computes through. - uk_runtime/calibration_run.py: main added the LCFS decile gate to the spine gate scope, which this branch keeps in gate_scopes.py; the gate goes there. - .github/workflows/test.yml: main's caps and their basis, and this branch's note on the after-merge job's cap. - The gate contract pins, the coverage manifest and the H2 fixture are recomputed on the merged tree. The feed. Main moved the UK feed from Chronicle 15040ea5 to e4d46c93 and recorded that every 15040ea5 row is byte-identical there, the 487 new rows being ONS Family Spending. This branch's own Scottish Band D facts take the new pin stamps with their 32 rows unchanged, as main's re-pin did for its vendored resources; the local membership takes main's feed label and DESNZ keys beside this branch's two UC seat deferrals. The vendor tool's check against the e4d46c93 artifact did not run here, which lacks that artifact. Checks: with policyengine-uk hidden, as in CI's engine-free job, the tests main's six pull requests change, the LCFS, consumption, Band D, vendoring and feed tests, the UK graph's binding rules, the nesting, stage health, battery, contract, gate and coverage tests (2,245 pass; the vendoring test that rebuilds the vendored resources from a local copy of the pinned feed refuses this machine's 15040ea5 copy, as it should, and skips in CI, which has none); the US coverage report and pins (--check); CI's test plan verify; and on the engine, H2 parity, the UK graph, the consumption resources and the release input coverage (56 pass). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
added a commit
that referenced
this pull request
Nov 27, 2026
main already holds the same fix (#1772, 0678d1d): _baseline_for re-raises PostExportBatchFileError before its broad handler, with its own docstring, release-rule sentence and changelog fragment. The conflicts in tools/build_us_fiscal_refresh_release.py and docs/us-release-build-rule.md were wording only, and take main's text. This branch's changelog fragment repeated main's and is removed. What remains of this branch is test_the_merged_baseline_pass_raises_a_refused_batch_file_at_once, whose missing-file case main's tests do not cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 27, 2026
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.
The merged baseline pass from #1725 catches every error with
except Exception. APostExportBatchFileErrorraised while it reads a batch file therefore takes the fallback path: the scorer logs "each consumer scores its own baseline plan instead" and scores each consumer's plan again. The description of #1751 asks whichever of the two merged second to re-raise the refusal there, as the two held-out writers do. Neither did, and main atc5859652still catches it.What changes
_baseline_forre-raisesPostExportBatchFileErrorbefore its broad handler, and both its docstring and the comment that describes the scoring plan now note the exception.docs/us-release-build-rule.mdsays a refused batch file stops the shared pass and costs a rerun.test_us_post_export_batch_files.py:_merged_baseline_failedunset;Effect
tools/sweep_us_post_export_scoring.pyregisters its plans the same way. A refused batch file now stops that worker at the merged pass too.packages/*/srcfile changes, so neitherbuilder_code_identitynor the worker identity moves. The release tool changes, so a build from before this commit certifies at its own commit, as after Keep the US post-export scorer's household batches in files, not memory #1751.When certification stops
OSError, or the SHA-256 the scorer recorded. With the fix, the first refusal surfaces. On main, a lasting refusal surfaced only from the fallback's second read.--out, with no extra flag, and redoes all of certification, though not the build. Placing the build for certification removes the earlier attempt's outputs and the batch directories its scorer left inpost_export_batches/../route_a.sh --certifyon the same run root and commit reruns it and skips the build stages already accepted._baseline_for, raises the refusal again._certify_main_with_close_outrecords the failure first.Testing
c5859652: the first finds the fallback log line, and the second raises nothing.test_us_post_export_batch_files.pyandtest_us_post_export_scoring.pypass (85 tests).ruff checkandruff format --checkpass on the two changed Python files.axiom: n/a: error handling in the US release tool's post-export scorer; no rule, parameter or RuleSpec change
🤖 Generated with Claude Code