Repository navigation
Add a curated New Zealand bundle suite (--suite nz) - #340
Conversation
Add --suite nz with all 48 NZ source packages, including the 36 Census 2023 place-summary members. Guard the roster against alias drift and refuse explicit sources with either curated suite while preserving UK error text. Route the NZ Treasury's raw and derived artifact keys through the NZ country prefix, matching its existing manifests. Document year-independent NZ declarations and preserved publisher reference periods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Merged by the NZ hub (session local_e407a527) at 351d0b7 with --merge. Gates: |
#340 added a curated NZ roster whose drift guard requires every alias under the NZ publisher prefixes. After merging main, the 18 stats-nz-census-2023-weekly-rent members failed it, as intended. This adds them to NZ_BUNDLE_SOURCES (48 -> 66 packages) and to the test's Census roots (36 -> 54 Census members), and notes the suite in the changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…G8-d1) (#341) * Add 2023 Census weekly rent facts by NZ regional council Add 18 package members sharing the unchanged, already-published Place summaries files. Emit 162 publisher facts: eight rent-band counts and one published median in NZD per week per place. Pin table median line 1763 rather than identical Quick stats line 13; preserve labels and status lineage, census-night coverage, and unstated population/boundary qualifications. Add independent literal row/cell tests, six red YAML demonstrations, aliases, checklist/evidence, changelog and default-bundle pins. Validation: 185 weekly-rent cases verified (184 initial passes plus the corrected 2018-median mutant rerun); final real Auckland map rerun passes. All 18 validate-package and build-source-suite checks pass; existing household/family 186 cases and alias-drift 1 case pass. Six scratch YAML mutants fail the independent-map test as required. Local source-fidelity and boundary read-only reviews PASS; formal merge gates remain for the hub. Measured delta against main (3c113e8): facts +162 (144 Count, 18 published Median), default 1004092 -> 1004254; geographies +0 (20548 unchanged); 18 existing keys each gain 9 facts; sources +0 (56 unchanged), by_source stats_nz +162 (1786 -> 1948); packages +18 (359 -> 377), national root and 17 rc_XX members; tables +1 (318 -> 319), stats_nz:2023 Census Place summaries: weekly rent paid by households=+162; warnings +0 (117 unchanged); errors +0, skipped sources +0; period_count +0 (511 unchanged), calendar_year:2023=+162; entity_count +0 (12 unchanged), household=+162 (154852 -> 155014); by_geography: country:NZ=+9, region:01=+9, region:02=+9, region:03=+9, region:04=+9, region:05=+9, region:06=+9, region:07=+9, region:08=+9, region:09=+9, region:12=+9, region:13=+9, region:14=+9, region:15=+9, region:16=+9, region:17=+9, region:18=+9, region:99=+9. Final geography pins: country:NZ=6131; region:01-09,12-18=30 each; region:99=25. Aggregate and semantic duplicate-key deltas both 0; default duplicate pins remain 0 and 2324. Measurement: 18 sequential build_bundle calls with exactly one explicit source each; all 18 valid, 9 facts each, zero warnings/errors/duplicates. Each single-source output was deleted immediately; no full bundle built. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com> * Add the weekly-rent family to the NZ bundle suite #340 added a curated NZ roster whose drift guard requires every alias under the NZ publisher prefixes. After merging main, the 18 stats-nz-census-2023-weekly-rent members failed it, as intended. This adds them to NZ_BUNDLE_SOURCES (48 -> 66 packages) and to the test's Census roots (36 -> 54 Census members), and notes the suite in the changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Adds
--suite nztochronicle build-bundle: a curated roster of every New Zealand source package, guarded against alias drift the way the UK suite is. Microcosm's NZ graph will pin the consumer artifact built from it, as the UK graph pinsbuild-bundle --suite uk -> build-consumer-artifact. Package G8-c of microcosm#1183.What changes
chronicle/bundle.py).NZ_BUNDLE_SOURCE_PREFIXES(ird,mbie,msd,stats_nz,treasury) and a sortedNZ_BUNDLE_SOURCES.nz_bundle_sources_from_aliases()andassert_nz_bundle_sources_match_aliases().rc_01–rc_09,rc_12–rc_18andrc_99for each.chronicle/harness.py).build_bundle_dirand the CLI accept--suite nzand refuse it together with--source, asukdoes. The UK error text is unchanged, and a test pins it.chronicle/artifacts.py). The"nz"publisher set lackedtreasury, so Chronicle computedraw/treasury/...keys. The two NZ Treasury manifests declareraw/nz/treasury/.... Addingtreasurymakes the computed keys match those declarations, whichverify-rawotherwise rejects; it also affectsderived/nz.--yearbuilds every member. All 48 packages pin their artifact year and have no year-dependent declarations. The pins are 2019 ×1, 2023 ×36, 2024 ×3, 2025 ×2 and 2026 ×6. Each package's published reference periods are preserved. This is documented in the suite's docstring, the README and the harness doc, and a test guards it.docs/agent-source-package-harness.md, plus two changelog fragments.Tests
On the final tree, after merging main (which brought #338's recursive discovery):
tests/test_source_package_alias_drift.py: 28 passed;tests/test_chronicle_artifacts.py: 39 passed;tests/test_chronicle_bundle.py: 24 passed. The full-bundle node is deselected and left to CI.What the new tests check:
--suite nzwith--sourceis refused, and the CLI accepts both suites;Mutants, each failing the named tests:
rc_XXmember;--suite nzaccept--source;End-to-end build
The hub ran the real build once at
351d0b7b, through this branch's code under the machine's heavy-run lock:build-bundle --suite nz, thenbuild-consumer-artifactfrom its output.build-bundle: exit 0, 54 s. 48 source packages, 0 skipped, 12,089 facts.build-consumer-artifact: exit 0, 5 s. The manifest reads:schema_version: policyengine_ledger.consumer_artifact.v2;consumer_fact_schema_versions: [chronicle.consumer_fact.v4];consumer_fact_schema_sha256: cc9efb90…, the same as the UK feed's;fact_row_count: 12089;facts_sha256: a132629e43ab32e857b50446a9adeb3b2fdc6230f7d663b2097732f2e94913bb;2d82bc552914b54d36b4c84cc6265c17d1de71c2bc738381b9eda08c963095cb.These hashes describe this branch, not merged main. G8-f rebuilds from the merged commit and pins that artifact.
Review
An independent GPT-6.1 Sol review at
351d0b7breturned APPROVE_WITH_NITS:verify-rawturns their fourkey_mismatchresults intoverified.Its one gap, that a completed end-to-end build couldn't be verified in its sandbox, is answered by the build above. It marked "Needs Max: yes" because the README and changelog describe suite coverage and storage routing. That is documentation of a CLI option and a storage path, not a published figure, so the hub treats it as no. This follows #336, where a developer-tool changelog line was treated the same way.
How it was built
🤖 Generated with Claude Code