Add country-aware source storage and NZ conventions - #208
Merged
Conversation
Route new raw and derived artifacts through country-aware publisher prefixes, refuse stale manifest keys, and record NZ period/geography rulings. Preserve legacy US paths and leave UK object copying and manifest migration to a separate credentialed change.
Restrict publisher inference to canonical package roots, preserve cached bytes on rejected routes, and correct the stale quartile ruling using the existing quantile contract. Targeted schema, consumer, artifact, core, and import checks: 83 passed.
Contributor
Author
|
Independent review of 544b26e completed: ledger-contract PASS and ledger-boundary PASS. The ancestor-name routing, pre-write refusal, packages-named-packages, and quantile-documentation findings are resolved. The focused 88 tests pass, and both full Chronicle CI checks are green. This lands only the source-storage conventions; #175 remains open for the separate credentialed UK object-copy/manifest migration. |
MaxGhenis
marked this pull request as ready for review
August 30, 2026 01:18
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
Implements the code and documentation portion of #175, the prerequisite for
New Zealand source packages in #176. This does not close #175 because its
credentialed UK object copy and manifests-only sweep remain separate.
raw/nzandraw/ukfrom package publisher directories; apply the samecountry convention to new derived artifacts. Preserve legacy US paths.
country-aware key, before invoking an upload.
aggregation rulings. No closed-set vocabulary or schema changes.
ancestor directory names, packages named
packages, and refusal of stale or wrong-country keys beforea fetch can overwrite cached bytes or metadata.
aggregation: quantilefor publisher cut-points with explicit quantile-codeconstraints. No new vocabulary is required.
Verification
uv run pytest -q tests/test_chronicle_artifacts.py tests/test_chronicle_core.py tests/test_chronicle_consumer_contract.py tests/test_policyengine_chronicle_imports.py tests/test_policyengine_chronicle_schema.py: 88 passed.uv run ruff check: passed.git diff --check: passed.uv run pytest -q: interrupted after 5 minutes and 50 passing testswhile the bundle build remained CPU-active; no failure had been reported.
The full suite is not claimed green.
Separate credentialed remainder
The tracked UK manifest census contains 82 artifacts across 82 manifests,
totalling 82,837,846 declared bytes. All 82 still record legacy
raw/<publisher>keys; none records
raw/ukyet. This PR changes no UK manifest and deletes noobject.
The current Wrangler OAuth session can list
ledger-rawandledger-derived.Wrangler's object commands expose get, put, and delete, but not server-side
copy. Cloudflare supports
CopyObjectthrough itsS3-compatible API; no
PolicyEngine R2 S3 credential is available in the agent-readable secret store.
The separate migration needs that credential, a paginated remote object
census, verified copy-only operations, then the manifest sweep and full UK
bundle acceptance check. Existing UK keys must remain through the soak period.