Repository navigation
Conversation
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nance Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cy columns Round 3 found that this branch rejected the shipped US TRO, causing all four CI test failures; that the model wheel went unchecked; and that an unused raw legacy alias broke the cache hash. An omitted Core binding and bundle_pin now resolve to the validated manifest pin, while explicit bindings and versions stay strict. A pinned wheel digest now requires one wheel with that name and SHA-256. The cache hash uses the same household and SPM-unit link selector as legacy declaration derivation. The SPM runbook now dates its pins to wrapper release 6.20.2 and is titled as history. Tests cover each case and the two scope gaps round 3 named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The run record cites the supplied bundle TRO's composition fingerprint, but the validator only read it. It now recomputes the fingerprint from the artifact hashes and refuses a TRO whose claimed value differs. The shipped US and UK TROs match their artifacts, and a new mismatch case covers a replaced fingerprint on both certification paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A numeric digest raised a raw TypeError while the fingerprint sorted them, and a non-hex string passed once the fingerprint was recomputed. The validator now requires each digest to be 64 lowercase hex digits and refuses others as invalid provenance. Two new cases cover a non-hex string with a matching fingerprint and an integer digest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes #760
What changes
A bare
import policyenginedefers both country namespaces and makes no network call. First US access, and construction from an explicit local file withallow_unmanaged=True, no longer certify the unused bundled dataset. Local provenance records the file's SHA-256 and the checked wrapper, country, Core and SPM versions, withcompatibility_basis="unverified_explicit_local_unmanaged",certified_by=None,country_id="us"andmanaged_by. UK initialisation keeps its eager compatibility check.Pass
allow_unmanaged=Trueto fetch a Hugging Face URI other than the bundled default. The wrapper checks US bundled-data certification before it fetches either kind of URI.Where certification now runs
create_datasets()andensure_datasets()accept explicit local files withallow_unmanaged=True. A missing absolute local source raisesFileNotFoundErrorbefore certification in create, ensure and load.Caches
US year files record the source and runtime that produced them. Saved and in-memory US outputs record the calculation inputs, the resolved legacy SPM profile, the policy and dynamic reforms, the effective scope, the requested columns and the runtime. Unread annotation columns and unused ID aliases change neither the calculation nor the cache identity. A file whose identity is missing or differs is stale, and the
ensurehelpers regenerate it.Native input periods
native_input_period="2017"sets both defaults before the first US country constructor for an explicit local.h5file in TIME_PERIOD_ARRAYS format. The wrapper keeps the stored annual and monthly period keys and values. It refuses directories, HDF5 links and storage outside the file, and non-.h5paths, the last before hashing. It turns an empty root intoValueErrorand preserves unrelated I/O failures. The native clock needs a four-digit year string and can't combine with projection, scoping or conflicting defaults. Callers still choose the tax-benefit system and structural start date.This includes the follow-up from #773:
country_id="us"in local provenance, a factory check for a file before construction, a real Core mixed-period constructor test that checks the loaded values, and a check that Hugging Face transport certifies before its request.Workflows
docs/**,README.md,CONTRIBUTING.md,CHANGELOG.mdorCODE_OF_CONDUCT.mdskips the code jobs. The changelog check compares the PR head with its actual target (origin/mainon manual dispatch). The required job checks every dependency's result, including the bundle verification skip on forks.pypienvironment controls deployment authorisation for trusted publishing. Pages usesactions/configure-pages@v5.Changes since
2cb1d96db6e87cad6:bundle_pin. At2cb1d96db, export refused that pair. Export now treats an omitted binding andbundle_pinas the same binding when the certificate names no exact Core version. It still compares acertifiedbinding and the Core version exactly.2cb1d96db, export never checked a supplied TRO's model wheel. Export now refuses a TRO whose wheel differs from the bundle's pinned wheel.2cb1d96db, the model also hashed the unused alias columns, and pandas raisedTypeErroron a list-valued alias.6f22b8b3:2cb1d96db, export read that fingerprint without checking it. Export now recomputes it from the TRO's artifact hashes and refuses a TRO whose stated fingerprint differs. The shipped US and UK TRO fingerprints match their artifact hashes. A new test case replaces the fingerprint and requires refusal with and without an available data release manifest.Verification
At
6f22b8b3, onlypy_compile,git diff --check,ruff format --checkandruff checkhave run locally. GitHub CI then passed all 16 checks at this head, including Test on Python 3.11 to 3.14 and the test cases added since2cb1d96db(run).Linux pytest runs used Python 3.13.5 in the repository's frozen
uvdev environment, with no credentials.751a6bechas the same source tree as2cb1d96db. Counts are passed, failed and skipped.968af6150, the 9 test files this PR changes, with 20 regression cases overlaid751a6bec, the 9 test files this PR changes751a6bec, the other 137 test files968af6150covered both output cache paths and valid cache hits, the identity of raw legacy SPM files, unread list-valued columns, supplied TRO mismatches, missing local paths and HDF5 virtual storage.7aec0df9b, 19 failed and 4 passed. All 23 passed at968af6150.968af6150and751a6becrecorded no network attempt through a bare import, first US access and real local construction, under both the installed US 2.2.2 and simulated 2.3.0 metadata.751a6bec. The extracted publish smoke step passed on the built wheel and stopped a corrupt wheel at install and a failing wheel at import. The installed wheel's import and bundle CLI made no audited network attempt.git diff --checkand both SPM bundle checks passed at751a6bec. Both vendored TRACE sidecars at that commit bind its bundle manifest.At
2cb1d96db, the Python 3.11–3.14 test jobs and the required PR code checks job failed. Each test job had one failure: run-record export refused the shipped US TRO intest_supplied_run_record_tro_matches_certified_us_bundle[None]. The other 11 jobs passed, including lint, Mypy and the four installation smoke jobs.The local runs didn't cover Darwin, population runs that need a credential, branch protection or the PyPI environment's configuration. #762 tracks repeated offline certification requests and the remaining P3 edge cases. #784 tracks a TRO bound to a certified Core version, which the publisher path would still refuse; no current bundle uses that binding.
axiom: n/a: wrapper runtime, dataset provenance and release workflow plumbing.
🤖 Generated with Claude Code