Repository navigation
Conversation
Fails on main: when a batch file changed, the merged baseline pass (#1725) catches PostExportBatchFileError like any other error, prints that each consumer will score its own baseline plan, and the consumer's own pass then reads the same changed file and raises the same error. The merged pass must raise it after one read, with no fall-back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_baseline_for re-raises PostExportBatchFileError before its broad handler, which makes every consumer fall back to scoring its own baseline plan. A key only one consumer planned still fails that consumer alone; a refused batch file now stops certification in the merged pass, since every consumer's own pass would read the same files. Scored values are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngelog Review found that the test covered only a batch file whose bytes changed, so a fix that re-raised only on a digest mismatch would pass. The test now also deletes the file and expects the "cannot be read" refusal after one attempt, with no fall-back. The changelog (and the previous commit's message) said the fall-back pass always raised the same error. That holds for a changed file. A read error that did not happen again on the fall-back's second read used to let certification go on; it now stops certification, as a refused batch file does in every other post-export stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
…rged-pass-batch-refusal
Contributor
Author
|
Closing as superseded by #1772, which put the same fix on main: _baseline_for re-raises PostExportBatchFileError before its broad handler, with tests for a changed batch file and for one that fails a read. After merging main, this branch added only one test, whose cases repeat those tests' coverage. |
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.
Summary
#1751 made post-export scoring keep each household batch in its own file, and raise
PostExportBatchFileErrorwhen a batch file's bytes changed or it cannot be read. #1725 added the merged baseline pass: one pass over every stage's baseline keys. If that pass raises,_HouseholdBatchedPostExportScorer._baseline_forlets each stage score its own plan, so that a key only one stage asked for fails that stage alone.#1751 merged after #1725 without changing that handler, so the handler also caught
PostExportBatchFileError. When that happened:_baseline_fornow re-raisesPostExportBatchFileErrorbefore its broad handler. A refused batch file stops certification in the merged pass, as it does in every other post-export stage. Every other error still falls back as before, including one raisedfroma batch-file error and an exception group holding one; the reviewer ran both cases.Scored values are unchanged whenever certification completes.
POST_EXPORT_SCORING_METHODis unchanged.Tests
Red-green:
10fa8507eaddstest_the_merged_baseline_pass_raises_a_refused_batch_file_at_once. It fails onmain: positions read were[0, 0], and the fall-back message was printed.dcb82eb03makes it pass.23d6030f2adds a missing-file case to the same test, so a fix that re-raised only on a digest mismatch would fail.I ran both cases of the test locally by node ID. Other tests were not run locally; CI runs them.
Review
One adversarial review round, which found nothing serious:
_PostExportBatchFiles.__getitem__raises the error, and that no other handler between it andcertify_mainturns it into a fall-back or an "unavailable" report.Deployment and environment variables
No CI workflow, Dockerfile, Terraform or Modal code changes, and no environment variable is read or added.
🤖 Generated with Claude Code