Repository navigation
Declare Belgium's CREATE inputs (W3-R2): FPB 2025 mass row and donor pin, still inactive - #1704
Merged
Merged
Conversation
…ctive) Plan step W3-R2 of the Belgian transport port, narrowed to the two files that can carry tests with teeth before Belgium has a graph: - build/be/mass_references.json: one row, FPB's June 2026 Economic Outlook T07 total population for calendar 2025 (11,850,400, an annual average), observed_only with exact period matching, used unaged as the 2026 destination mass. A proposal under d1902 (METHOD-CARD-BE row BE-MC11). - build/be/transport_inputs.json: the donor pin, equal to source_stages.json's donor artifact on every key but its note. - country_package.json rows, the generator's destination_mass sentence and the regenerated reference_inventory.json, the golden, and the two Belgian roster sets. - tests/engine_free/shared/test_be_create_inputs.py runs transport.create@1 on the synthetic donor with Belgium's row and a fixture of the pinned artifact's two FPB T07 facts; the feed test checks the fixture and the row against the artifact. No Python source changes. Activation still refuses, with the same gaps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ording - The household case now has a variant whose household fact the Ledger resolves, so it reaches CREATE's person check; the selector-only case stays as a Ledger refusal. - The literal test compares the file's bytes, line endings included, and the CREATE run passes the digest of the file's own bytes, as compose does. - The scaling test checks household weights against the shared oracle, so a non-proportional scaling with the right total fails. - Refusals cover two and three rows and three non-count units; the donor test checks types; the feed test checks each fixture line's recorded line number. - A new test holds the mass fact apart from every holdout, pre-calibration and calibration row's selector, since activation's separation check compares measure names only; the activation test's comment says so. - The generator's destination-mass sentence separates CREATE's condition (one unfiltered person count) from Belgium's national scope; the inventory and golden are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The separation test parses each holdout, pre-calibration and calibration document and checks every selector reference_fact_selectors yields, ratio operands included, with fact_matches_selector against the 2025 mass fact; it also checks that the packaged mass row selects that fact. Hand-compared selector fields missed selectors the Ledger resolves (a one-item key list, a string period). - The feed test requires strictly increasing provenance line numbers, so two entries cannot collapse into one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Ledger resolves a reference by ledger_fact_key or ledger_source_record_id before its selectors, against every key it indexes for a fact. The separation test now builds that index for the 2025 mass fact and asserts no holdout, pre-calibration or calibration row names the fact by either identifier, besides the selector check. The docstring now counts the rows that read the 2026 fact as eight A.1 rows and two B.4 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nodes receive compose's view of a reference file, in which a reference profile can rewrite a row's operation and operands (for example allocated_residual_by_ratio). The separation test now runs its identifier and selector checks over the raw file, transport_resource's view, and, for the profile's reference resource, every view reference_profile_views returns. Belgium's profile is deferred today, so every view trims to the same node document as its file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
November 21, 2026 17:24
Contributor
Author
|
Handed to the Microcosm hub to land, at head
🤖 Generated with Claude Code |
Brings NZ's donor-profile selection into the branch so CI runs on the combined tree; both PRs edit test_spec_engine_country_bundles.py, and Belgium's two roster lines are unchanged. Co-Authored-By: Claude Opus 5.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.
Summary
Plan step W3-R2 of the Belgian transport port: the two inputs
transport.create@1reads, as inactive data. Belgium has no transport graph, so nothing runs CREATE on these files yet and activation still refuses, with the same gaps as on main.build/be/mass_references.json: one row, the Federal Planning Bureau's 2025 annual-average population of Belgium (June 2026 Economic Outlook annex, table T07), 11,850,400 persons, used unaged as the 2026 destination mass.build/be/transport_inputs.json: the donor pin, equal tosource_stages.json's donor artifact on every key but its note.No Python module under
packages/*/srcchanges; the Python edits are tests and one string in the Belgian generator.The mass row is a proposal for Max under d1902 (METHOD-CARD-BE row BE-MC11), together with the weights audit's mass-change limit that goes with it. CREATE keys on the SHA-256 of the file's bytes, so any edit the ruling asks for, wording included, re-keys CREATE. The ruling should therefore come before the PR that adds Belgium's graph.
The mass row
CREATE needs exactly one unfiltered person count with unit
count(population_kernels.py, the mass check). Compose passes CREATE onlycountry,hierarchy,schema_versionandtarget_references, so the description andreference_setstay out of the node's input.ledger.aggregate_fact.v2:15de741846e5680835bafd2c. Chronicle scales FPB's thousands to persons (unit: count,value_scale: 1000) and labels 2025 an observation.observed_onlywithperiod_match_policy: exact, so a row period that differs from the fact's is refused, not matched to an earlier year.fact_aggregation: time_meandeclares the row an annual average of a stock, Microcosm's route for a time mean; the compiler accepts it on thesumlabel Chronicle gives the fact today. Chronicle hashes the aggregation into the aggregate fact key, so a relabel tomeanwould change the key, and the artifact's digest with it. The feed pin (chronicle_feed.json), the selector and the fixture would then be refreshed together, andtime_meanlets the compiler accept the relabelled fact.fpb_t07_total_populationageing pair (2023 and 2026).Why this row, and what Max is asked
allow_source_projection; it sits 0.239% above the calibration total. Belgium's active rows and NZ's mass row are observations.transport.weights_audit@1records the calibrated person mass's relative change from CREATE's mass, and the gate battery'sweights_auditbinding fails the build when that change exceedsgates.json'smaximum_relative_mass_change. NZ declares 0.02. Belgium's 18 Statbel cells each pass at BE-MC6's proposed 2%, so a passing calibration can land between -1.857% and +2.148% of FPB 2025, or between -2.234% and +1.757% of FPB 2026. Covering every such calibration needs a limit of at least 0.021483383 with FPB 2025 (0.02149 at five places), or 0.022336809 with FPB 2026 (0.02234). BE-MC11 proposes 0.025, which covers both. Belgium declares the gate in D2, with the graph.No code compares the mass row's period with the build's: CREATE passes no period, calibrate takes none, and export checks only its own file.
The donor pin
transport_inputs.json's donor block equals the first artifact ofsource_stages.json's first stage on every key exceptintegrity_note, and a test holds that. Hugging Face's headers at the revision tag give the same SHA-256 and byte size (checked 2026-11-21). The note does not repeat NZ'slatest.jsonpointer claim, which Belgium has not checked.Other Belgian edits
country_package.json: two rows.tools/generate_be_target_references.py: thecreate_mass_referencesentence of the destination-mass gap now separates CREATE's condition (one unfiltered person count) from Belgium's national scope, and names this proposal and the missing Belgian geography label. Regenerated with the pinned artifact; only that line ofreference_inventory.jsonmoves, and--checkpasses.tests/golden/be_country_spec.json: the fingerprint, two resource hashes, two new hashes and two newresourcesentries.changelog.d/be-create-inputs.added.md: one fragment, as Add Belgium's declared family benefit unit (W3-R1), still inactive #1700 shipped.tests/fixtures/be_fpb_t07_total_population_2025_2026.jsonl: the pinned artifact's two FPB T07 total-population facts (2025 observation, 2026 projection), verbatim lines, with a provenance file that records the Chronicle commit, the line numbers and their hashes.Shared lines
Four lines outside Belgian files, each inside a Belgian test function. NZ checked them against main
32f341d475and said yes at59ef9316eb(2026-11-21). The yes holds through a rebase or merge over NZ's #1703 that keeps the four lines byte for byte;git merge-treeof the two heads is clean.test_spec_engine_country_bundles.py, intest_be_generation_zero_views_still_come_from_the_country_spec_seam:"mass_references.json",and"transport_inputs.json",.test_country_spec.py, inTestBelgianPackage.test_loads_with_every_declared_resource: the same two names.Invariants and tests
New
tests/engine_free/shared/test_be_create_inputs.py:TRANSPORT_CREATE.run, on the shared synthetic donor with Belgium's row (the trimmed view and the digest of the file's own bytes, as compose passes them) and the fixture, scales design weights to 11,850,400. The household weights equal the shared oracle's, which scales every design weight by one factor.allow_source_projection(11,896,000); underobserved_onlyit is refused.exact. CREATE refuses a filter, two or three rows, a household count the Ledger does resolve, and a fact whose unit ispeople,personsoreur.ledger_fact_keyorledger_source_record_idbefore its selectors; the test checks both fields against every key the Ledger indexes for the fact, then every selector (reference_fact_selectors,fact_matches_selector), ratio operands included. It checks the file and every view compose hands a node (transport_resource, and each ofreference_profile_viewsfor the profile's reference resource), since a reference profile can rewrite a row's operands; Belgium's profile is deferred, so today each view trims to the file's node document.BE_CHRONICLE_ARTIFACT): each fixture line is the artifact's line at the number the provenance file records, and the row compiles against the artifact to one observed count equal to the generator's FPB 2025 level.Local runs from the worktree with the repo's pytest configuration and the pinned Chronicle artifact staged (main
32f341d475):fce1db3d7c, on the clean committed tree: 20 passed, none skipped.fce1db3d7c, on the clean committed tree (the Belgian files, both roster files and the golden, the spec scans and re-emission, NZ's spec package and holdout-separation tests, the population kernels, reference selection, declared units and the CI test plan): 2271 passed, none skipped, 4 workers; the same count as atfbb9c93220. (At59ef9316ebone re-emission test had failed only because the local environment carried two installed copies ofmicrocosm-emitter-interface, which its worker-identity check refuses; with one copy it passes, here and on main.)fce1db3d7c, on the clean committed tree, each run against a control that passes all 20 tests. A mutant counts as killed only when a test fails with no collection or setup error. All 24 are killed:allow_source_projection, a filter, a household entity, a second row, and a holdout row's selector. Each is caught by the literal test and by CREATE's scaling test; all but the period and filter mutants also fail the separation test.period_match_policydropped, or CRLF line endings: caught by the literal test. With a 2025 row and a 2025 fact the default policy behaves the same, and the exact-period refusal has its own case.ledger_fact_key(with the row's own selector, or with none), its legacy key, or its source record id asledger_source_record_id, each of which the Ledger resolves before reading a selector: the separation test. Againsta096173a5f's test file, all four survived.allocated_residual_by_ratiowith an FPB 2025 denominator (the final check's case): the separation test, through compose's view. Against5bf3c2ef92's test file, it survived.32f341d475,59ef9316ebandfbb9c93220;a096173a5f,5bf3c2ef92andfce1db3d7cchange only a test file.ruff checkandruff format --checkat 0.15.16 pass on the touched Python files.Review
Independent review through Subfleet (review task, hard tier): rounds 1 and 2 on gpt-6.2-sol (Codex lanes), round 3 on claude-opus-5-5 (a Claude lane).
59ef9316eb: REQUEST_CHANGES, three P2 and four P3, on tests and wording; no value in either JSON file changed. The household case stopped at the Ledger before CREATE's person check; the PR body saidtime_meankeeps the row compiling after ameanrelabel, but Chronicle hashes the aggregation into the key; the body gave the weights audit the gate's job and understated the 2026 minimum; the literal test missed CRLF; the activation test's comment overstated what separation compares; the generator called national scope a CREATE condition; two status lines were stale (already updated). Answered infbb9c93220and in this body; METHOD-CARD-BE's BE-MC11 takes the same two wording fixes.fbb9c93220: REQUEST_CHANGES. Five of round 1's findings closed;time_meanstayed open on wording and the separation finding partly open. One new P2: the separation test compared selector fields by hand, so a selector the Ledger resolves (a one-item key list, a string period) passed it. Four P3: name the feed-pin refresh a relabel needs (round 1'stime_mean, carried over); duplicate provenance line numbers slipped past the feed test; the bounds were rounded down; the refusal list credited CREATE with the Ledger's period refusal. Answered ina096173a5fand in this body; BE-MC11's FPB 2026 bound now reads +1.757%.a096173a5f: APPROVE; all five round-2 findings closed. Round 2 raised no P0 or P1, so review had finished atfbb9c93220and this round was extra. One new P2: the separation test checked selectors only, but the Ledger resolves a row'sledger_fact_keyorledger_source_record_idfirst (no Belgian row uses either field today). Two P3: the test docstring counted ten A.1 rows where eight are A.1 and two B.4, and this section miscounted round 2. The reviewer also noted that the round-2 mutant run used the working tree seconds before the commit. Answered in5bf3c2ef92and in this body; the mutant script now refuses a dirty tree and records the head it ran on.5bf3c2ef92: a workflow with two lenses (the Ledger's resolution paths; this body's claims against the evidence) and two verifiers per finding. Confirmed by both verifiers: one P2, that this section credited round 3 to the wrong reviewer model; and three P3: the separation test read the raw files while compose hands nodes a profile-resolved view in which a profile can add operands (nothing failed, since Belgium's profile is deferred), the "no Python source" line, and round 3's missing "and in this body". Both verifiers refuted one more finding. The resolution lens found the Ledger's other paths covered: identifiers, selector matching, period policies, every ratio operation, hierarchy and metadata. Factor replay, which reads facts outside reference resolution, was outside its scope; Belgium's factor file names no 2025 key. Answered infce1db3d7cand in this body.What stays out
reference_selection.json,scenarios.jsonandcalibration_settings.json(D2, with the graph);calibration_bindings.json(W3-R3 or D2, after geography assignment); the weights audit declaration and its limit (D2, with BE-MC11's ruling); any shared geography label; the Brussels Article 26 rewording.🤖 Generated with Claude Code