Skip to content

Add Budget 2026 Estimates for Vote Social Development benefits - #330

Merged
MaxGhenis merged 3 commits into
mainfrom
nzhub/b7est
Oct 10, 2026
Merged

MaxGhenis merged 3 commits into
mainfrom
nzhub/b7est

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of #177 (wave 2 take-up and validation surface). This is B7 part 2 of the NZ v0 plan. Part 1 was treasury/an24_01_fiscal_totals.

What this adds

packages/treasury/estimates_of_appropriations_2026_27 holds 112 facts from the Treasury's "Expenditure – Budget 2026 Data from the Estimates of Appropriations 2026/27" workbook (published 28 May 2026). Its scope is every Vote Social Development appropriation of type "Benefits or Related Expenses", for each year in the workbook: years ending June 2022 to June 2027. The publisher's Amount Type is kept on every fact:

  • Actuals (74 facts) are observations.
  • Estimated Actual (19 facts, 2025/26) are source projections.
  • Main Estimates (19 facts, 2026/27) are source projections.

Amounts are in $000 × 1,000. fiscal_year uses the opening-year convention of the merged MSD annual-report package, and the publisher's ending-year label is kept as source_period_label.

So the 2024/25 Accommodation Assistance actual here, 2,232,026 ($000), sits on the same fiscal_year:2024 as the MSD annual-report fact with the same value. The two are not reconciled.

Accommodation Assistance is not Accommodation Supplement

The Vote Social Development Estimates PDF (B.5 Vol.9) is pinned as scope evidence only. It contributes no facts.

Its "Conditions on Use" table for Accommodation Assistance lists two payments:

  • the Accommodation Supplement, under s65 of the Social Security Act 2018;
  • the Away from Home Allowance.

Both rows are quoted verbatim in evidence.md, with printed and PDF page numbers. A regression test refuses any relabelling of Accommodation Assistance as AS. The checklist's MSD annual-report row now points here for the payment definition its PDF lacked.

Intended Microcosm treatment

Every row is intended as a held-out comparator, never a calibration target. The 2026/27 Main Estimates figure is the publisher's projection for July 2026 to June 2027. This package does no period alignment: matching that fiscal year to the model's April–March tax year belongs to Microcosm's own contract, which this PR doesn't touch.

Source

  • Workbook: https://www.budget.govt.nz/budget/excel/data/b26-expenditure-data.xlsx, linked from the Budget 2026 Estimates data page. 918,842 bytes, SHA-256 3fc6bba1…2a26f5a0.
  • PDF: https://budget.govt.nz/budget/pdfs/estimates/v9/est26-v9-socdev.pdf. 2,212,387 bytes, SHA-256 85ff85e5…d8e30c23.
  • Fetched: both on 2026-10-10.
  • Licence: CC BY 4.0, per the Budget site's copyright page, checked 2026-10-10, with attribution to the Crown.
  • R2: both artifacts are published under raw/nz/treasury/treasury-estimates-of-appropriations-2026-27/… with --r2-prefix raw/nz. Treasury isn't in the country publisher map. The hub reports verifying both objects by streaming them back (SHA-256 matches); the reviewer had no R2 access and did not re-check this.

Invariants and how they're checked

These are scoped to this package's 112 facts:

Regression tests cover:

  • 792 row and header guards, 112 numeric cell guards and 2 cardinality checks, each shown red on a mutated source or YAML first;
  • the two relabelling cases.

Tests

  • tests/test_chronicle_nz_treasury_estimates.py: 925 passed. The build lane ran it, and the hub re-ran it on the final tree.
  • validate-package and build-suite pass: 112 facts, all 6,451 Raw Data rows preserved, lineage coverage 1.0.
  • The full-bundle node is left to CI.

Bundle pins

  • Measured single-source delta against main 36c0358:
    • facts +112 (treasury, country:NZ, government entity);
    • fiscal years 2021–2026, all existing keys;
    • packages +1, tables +1;
    • no new geographies, sources, periods, entities or warnings.
  • The sibling IRD I2 and household net worth PRs change the same pins. Whichever merges second gets re-pinned by adding the deltas.

Not included

  • The MSD Benefit System Report: not staged, and its licence is unconfirmed.
  • DistributionExplorer: a model output with take-up-assigned AS values.

Built by a GPT-6.1 Sol lane from the NZ hub's brief. The hub verified the test runs, artifact hashes and R2 objects.

Review

An independent GPT-6.1 Sol review at 6730a667 returned APPROVE_WITH_NITS:

  • It re-read every selected cell against the workbook.
  • All 925 tests passed, and each failed under mutation.
  • Its nits are addressed: the period-alignment wording above, and stale upload-pending wording in the checklist and manifest note (fixed in the following docs-only commit).

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits October 10, 2026 06:43
Add treasury/estimates_of_appropriations_2026_27: all 112 Vote Social
Development Benefits or Related Expenses rows for publisher years 2022–2027.
Preserve Amount Type (Raw Data!M1), appropriation labels, immutable source
bytes, physical row/cell lineage, and publisher period coverage. The workbook
is the sole fact source; the Vote PDF provides scope and conditions evidence.
Quote both Accommodation Supplement and Away from Home Allowance condition
rows at printed p245 / PDF index62. Update the NZ checklist and changelog.

Invariants and checks:
- Publisher bytes unchanged: both artifacts' receipt URL, sha256, size_bytes
  and fetched_at are pinned and tested. XLSX 918842 bytes,
  3fc6bba178c78c4a4b259c920a6f55307ec95a547353f340086c86fc2a26f5a0;
  PDF 2212387 bytes,
  85ff85e5b93a8b3e3ef7442a034eb8d3abdd0f1675f76646afad8311d8e30c23.
  Licence CC BY 4.0 and Crown attribution verified in Intro!A13:A14.
  tests/test_chronicle_nz_treasury_estimates.py:196.
- Amounts are $000 with value_scale:1000: every fact equals its one K-column
  publisher cell times 1000; no end selector, divisor or rounding. Seven
  exact physical cells include Accommodation Assistance 2025=2232026,
  2026=2308335, 2027=2322160; NZS 2027=26481340; Jobseeker Support and
  Emergency Benefit 2027=5018386; SPS 2027=2473973; SLP 2027=3023208.
  tests/test_chronicle_nz_treasury_estimates.py:233,304.
- Each year is a separate fact, no growth rates or averages: all 112 atomic
  selections, values and reference periods checked at tests:304,338. The
  publisher's year ending 30 June maps to fiscal_year ending year minus one,
  with July–June dates and the original Year as source_period_label.
  The AA 2025 cell and period match the independent MSD FY2024/25 source
  claim without reconciliation (tests:395).
- Assertions use the closed schema (chronicle/core.py:94): Actuals=74
  observations; Estimated Actual=19 and Main Estimates=19 source projections.
  Estimated Actual is a publisher estimate, and no separate provisional
  observation assertion exists. All original status labels tested at tests:338.
- Accommodation Assistance is never relabelled Accommodation Supplement:
  row-name/App-ID/scope guards preserve its broader appropriation; source
  and YAML relabelling mutations fail (tests:503,516). Both verbatim payment
  rows and their printed/PDF coordinates are in evidence.md:108 and checked
  against the PDF (tests:429; full transcription reviewed independently).
- The PDF contributes evidence text only: all 112 emitted facts have the
  workbook sha256 and K-cell lineage (tests:304,429). PDF Final Budgeted and
  2027/28–2029/30 figures are not facts or reconciled values.
- Scope is exactly every Social Development Benefits or Related Expenses
  workbook row: 6451 complete Raw Data rows preserved; selected_rows pins
  112 physical rows 4713–4824, emitting 1921 compact cells with physical-row
  lineage (tests:268). Other Votes/pivot sheets contribute no facts. Missing
  and ambiguous selected-row mutations fail (tests:562); missing years stay
  absent. No imputation, aging, reconciliation or target construction.
- Every dimension and value is labelled: zero dimension-label gaps or
  conflicting labels in the source-only bundle (tests:338,380). Status source
  constraints are explicit; consumer contract and fact validators pass.
- R2 blocks use Chronicle build_r2_key(prefix="raw/nz") exactly as AN24-01.
  Both keys are tested at tests:196. Treasury is absent from the country map;
  no core change is made. Hub upload/remote verification remains before merge.

Validation:
- validate-package --year 2026 PASS: 6 record sets, 112 rows/records,6 measures
  and 6 source regions; zero validation errors/warnings.
- build-suite --year 2026 PASS: 112 facts, 6451 rows, 1921 cells, 224 constraints,
  complete lineage and all 13 agent-acceptance checks. Axiom validation was
  not run; existing concept_alignment_validation_skipped acceptance warning.
- Explicit RED probes first: 908 expected failures on parsed-cell/temp-YAML
  mutations (792 unique guards/headers,112 numeric guards, 2 selection
  cardinality guards, 2 AA relabelling cases); original files unchanged.
- Final GREEN:925 targeted tests pass,12 dependency deprecation warnings.
  Flags: -p no:cacheprovider --basetemp=.hub-scratch/pytest
  -o tmp_path_retention_policy=failed. Basetemp removed after each run.
- Ruff lint/format and git diff --check PASS; alias discovery PASS.
- Local independent ledger-source-fidelity and ledger-boundary judges PASS.

Exact measured bundle delta (only this source, build year 2023; outputs deleted):
- facts:+112; packages:+1; tables:+1; sources:+0 unique (existing Treasury),
  by_source treasury:+112. Table:
  treasury:Expenditure - Budget 2026 Data from the Estimates of
  Appropriations 2026/27, Vote Social Development:+112.
- geographies:+0 unique; by_geography country:NZ:+112; no other keys.
- periods:+0 unique; fiscal_year:2021:+19,2022:+18,2023:+18,2024:+19,
  2025:+19,2026:+19 (all existing keys).
- entities:+0 unique; by_entity government:+112 (existing key).
- warnings:+0; errors:+0; aggregate duplicate keys:+0; semantic duplicate
  keys:+0; skipped sources:+0.
- Standalone counts:112 facts,1 source,1 package,1 table,1 geography,
  6 periods,1 entity,0 warnings/errors/duplicate keys.
- Pins are base/origin-main36c03585cf2aa6fba489154f24421780b69af6f8 plus
  only this measured delta. AST audit PASS; no full bundle/node was run.
  Final default pins:1000860 facts,319 packages,314 tables,56 sources,
  20547 geographies,511 periods,12 entities,117 warnings. Treasury139,
  country:NZ4183,government3562; other pins unchanged. Hub must re-pin if
  another NZ package lands first.

Intended Microcosm treatment for every one of these 112 rows: held-out
comparator, method card MC2 secondary; never a calibration target. This is
hub PR-body context, with no consumer selection/measurement binding added.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
The hub published the manifest-declared objects with chronicle publish-raw and
verified each by streaming it back from ledger-raw (SHA-256 matches) on
2026-10-10. Tick the checklist's raw/nz column and replace the lane's
upload-pending sentences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (nit 2): the checklist row and the manifest note still said the
objects awaited upload, while the raw/nz column was ticked. Also update the
AN24-01 paragraph, whose objects were verified on 2026-10-07.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit 3dce46a into main Oct 10, 2026
3 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merged by the NZ hub (session local_e407a527) at f0d2ba9 with --merge. Gates: gh pr checks exit 0; MERGEABLE; not draft; no CHANGES_REQUESTED review. Reviewed head: f0d2ba9. Independent GPT-6.1 Sol reviews: round 1 APPROVE_WITH_NITS at 6730a66 (every selected cell re-read against the workbook; 925 tests, each failing under mutation), round 2 APPROVE at f0d2ba9 for the docs-only delta that fixed its nits. Round 2 marked 'Needs Max: yes' because the checklist records the hub's R2 verification. The hub is not holding on that: the record is a provenance note the hub verified directly (both objects streamed back from ledger-raw with matching SHA-256 on 2026-10-10), round 1 judged the same statement as not needing Max, and it matches the wording merged with the earlier NZ packages. chronicle#328 and #329 are stacked on this branch; the branch is kept until they land.

MaxGhenis added a commit that referenced this pull request Oct 10, 2026
…dditively

Stack chronicle#328 on #330 so both land without a second two-hour bundle
run. tests/test_chronicle_bundle.py pins are main 36c0358 plus both measured
single-source deltas: facts 1000748 + 510 (IRD I2) + 112 (Treasury) = 1001370;
packages 318 + 2 = 320; tables 313 + 2 = 315; country:NZ 4071 + 622 = 4693;
ird 4362, treasury 139, person 495562, government 3562. Git merged the
identical 318->319 and 313->314 edits silently; corrected to 320 and 315.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Governance record, added after merge. The PR body omitted the section the other NZ package PRs carry.

  • Agent role: ledger-source-ingestor. The per-package files outside its allowed_paths are the alias entry in chronicle/source_package.py, db/data/**, docs/pe-nz-source-checklist.md, the changelog fragment and the bundle pins.
  • Deterministic checks: validate-package and the package's build-suite acceptance gates pass inside tests/test_chronicle_nz_treasury_estimates.py (925 tests). All 6,451 Raw Data rows are preserved.
  • Judge questions. The independent reviews did not use the judge names as a formal verdict line, so this is the hub's reading of round 1 at 6730a667:
    • ledger-source-fidelity: its independent audit checked all 112 facts and all 6,451 rows against the workbook and reported a pass.
    • ledger-boundary: it found no range, divisor, rounding, computed forecast, reconciliation, target activation or model binding.
    • ledger-contract: no schema or consumer-contract change.
  • Receipts. The reviews note that the hub's fetch and R2 read-back are attested, not shown by a receipt kept in the repo. A follow-up will add retained receipts for the three new NZ packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant