Refresh merged-bundle count pins and make bundle drift loud in CI#93
Merged
Merged
Conversation
tests/test_arch_bundle.py::test_build_bundle_writes_merged_consumer_contract pinned the merged default bundle at 7,149 facts / 27 source packages -- the state of 2026-05-28 (5ec0956). Main then landed fifteen source-package PRs (#34-#48) before this branch forked at 5e851c5, and the test is not in the CI pytest whitelist, so the pins went stale silently: the bundle has built 10,268 facts / 39 packages (8 year-skipped) since the fork point. Diagnosis (2026-07-11): legitimate additive drift, not a regression. The bundle built at the fork point 5e851c5 and at branch tip 08d1001 produce byte-identical consumer_facts.jsonl (sha256 78ca9a51...), so no branch-side commit changed bundle behavior; every count delta decomposes exactly into the fifteen pre-fork package additions (bea +443, cbo +6, census_acs +468, census_population_projections +86, cms_medicaid +255, hhs_acf_liheap +1, irs_soi +1444, ssa +416 = +3,119), and every pre-existing per-table count is unchanged. - Refresh all hardcoded expectations to the current build; pin the eight year-2023-skipped packages by name (mirrors main's test_ledger_bundle style) and spot-check three post-fork package suites. - Run the file in CI as a standalone "Arch bundle drift" job. It is deliberately NOT added to the required "Arch checks" pytest whitelist: the merged build takes ~6 minutes and "Arch checks" gates the resolver's daily append PRs, which cannot touch bundle inputs. The test docstring records the same rationale. Lint the file via the ruff whitelist. - Drop the paths filter from the append-gate workflow: "Append gate" is a required status check, and with the filter a PR touching none of the gated paths (like this one) never receives the check and deadlocks on "Expected". The gate is cheap when the ledger diff is empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
tests/test_arch_bundle.py::test_build_bundle_writes_merged_consumer_contractfails on this branch with stale hardcoded counts (7,149 facts / 27 source packages), and CI never notices because the file is not in the "Test Arch surface" pytest whitelist. This PR refreshes the pins to the verified current build (10,268 facts / 39 built packages / 8 year-skipped), runs the file in CI as a standalone job, and fixes a required-check deadlock that any non-ledger PR into this branch — including this one — would otherwise hit.Diagnosis: legitimate drift, not a regression
consumer_facts.jsonl(sha25678ca9a51…). No branch-side commit (arch/core.py vocabulary widening, ledger appends, witness infrastructure) affects bundle output at all.The 8 skipped packages are the year-specific ACS-2024 and CMS-ACA vintages that cannot produce a year-2023 bundle; the test now pins them by name, mirroring the style main adopted for
tests/test_ledger_bundle.pywhen it refreshed its own pins in #68.CI placement: standalone job, deliberately outside the required whitelist
The merged build takes ~6 minutes (5:46 for the file locally). "Arch checks" is a required status check gating the Thesis resolver's daily append PRs and currently completes in ~3 minutes — putting the bundle build inside it would roughly triple required-path latency for a drift signal that appends cannot trigger (bundle inputs are frozen on this branch). Instead:
uv run pytest tests/test_arch_bundle.py -qon every push and PR — loud and visible, but not blocking the append path.Because bundle inputs are frozen on this branch, the refreshed test now acts as a tripwire: any future failure means something unexpectedly changed bundle behavior, not routine drift. (Main needs no change — its CI runs the whole suite, whitelist-free, since #68.)
Required-check deadlock fix
thesis-facts-append.ymlcarried apaths:filter, but branch protection lists "Append gate" as required: a PR into this branch that touches none of the gated paths never receives the check and deadlocks on "Expected". The filter is removed, so the gate now runs on every PR/push to the branch. For non-ledger PRs the append-only diff is trivially clean and the gate costs ~1 minute; this strictly widens enforcement, never weakens it.Verification
uv run pytest tests/test_arch_bundle.py -q→ 5 passed locally on this branch.python3 scripts/check_thesis_facts_append.py --base-ref origin/codex/thesis-ledger-facts→ OK (143 rows, immutable prefix 128, +0 appended, release 0).ruff check tests/test_arch_bundle.pyclean.🤖 Generated with Claude Code