Repository navigation
Conversation
benefit_unit_rule.json cited microcosm.graph.executor by line range
("executor.py lines 636-643", "lines 1550-1573"); after #888 the two
functions sit at lines 638 and 1531, so both ranges were stale. The two
concepts.py citations in the same file ("concepts.py:880-919", "lines
892-901") had drifted too. All four now name the symbol: the executor's
_structural_columns and _validate_population_declaration, the
microcosm.frame.concepts pointer concepts, and _check_pointers. The claims
themselves were re-read against the current code and still hold.
The file is a hashed NZ country-spec resource, so the edit moves its
sha256 and the NZ composition fingerprint; tests/golden/nz_country_spec.json
is regenerated from the loaded spec (those two values only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
packages/microcosm-build/src/microcosm/build/nz/benefit_unit_rule.jsoncited code by line number. After #888 (merge 2743422) the two executor citations were stale:_structural_columns, executor.py lines 636-643packages/microcosm-graph/src/microcosm/graph/executor.pylines 638-645_validate_population_declaration, executor.py lines 1550-1573The same file carried two more line citations into
microcosm-frame'sconcepts.py, and both had drifted too:pointer_concepts.citation:concepts.py:880-919reference_person_idpointer)composition[dependent_child].rule: "the pointer definition, concepts.py lines 892-901"parent_1_person_idis lines 893-902All four now cite the symbol and drop the line number:
microcosm.graph.executor._structural_columnsmicrocosm.graph.executor._validate_population_declarationmicrocosm.frame.concepts, specifically thepartner_person_id,parent_1_person_id,parent_2_person_idandreference_person_idpointer conceptsparent_1_person_idpointer definition inmicrocosm.frame.concepts, andmicrocosm.frame.concepts._check_pointersNothing in the repo asks for line-number citations (
docs/agent-guide.mdhas no citation rule), and no code reads these strings:pointer_concepts.citationhas no reader. Symbol names survive edits above them, and a grep finds them.I re-read each prose claim against the current code, and each still holds:
_structural_columnsreturns each entity's id column, plus the membership columns for the person entity._validate_population_declarationraisesNodeRejectedwhen aStructuralDelta.NONEnode owns one of those columns._check_pointersreportsparent_2_person_idwithoutparent_1_person_idasparent_order.parent_1_person_iddescription says that a lone co-resident parent is always parent 1.Only string values changed. Keys, structure and every rule value are untouched.
Pins moved
benefit_unit_rule.jsonis a declared NZ country-spec resource (nz/country_package.json,kind: legacy_json).load_country_spechashes the bytes of every resource, andResolvedCountrySpec.fingerprintis the composition fingerprint over those hashes. So this edit moves:benefit_unit_rule.jsonsha256 intests/golden/nz_country_spec.json:9e507e78…a653→a5f37485…f148fingerprintin the same golden:df8850d5…fd48→a3229c53…c371The golden was regenerated with the test's own
_loaded_spec_summary("nz")andcanonical_json_bytes. Its diff is exactly those two lines, and theamandbegoldens are unchanged.Hash sinks checked that do not move a pin
I traced the file's bytes to every hash in the repo from three angles (code trace, literal grep, open PRs), then had a critic re-verify the result. Nothing else is pinned. Each sink below was read in the code:
legacy_jsonresources get empty projections on every surface (spec_engine/loader.py), andcompiler_ir._normalized_resourcesskips them. So the NZspec_sha256,documentation_sha256, compiled IR,spec_bindingand plan lock do not move. The spec engine's per-fileFileReceiptandpackage_fingerprintdo move, but no NZbundle.lock.jsonorplan.lock.jsonis committed.test_spec_engine_reemission[nz]compares emitted values with reloaded ones rather than with literals.inventory_coverage.EXPECTED_HASHES, thefield_usagecounts,tools/spec_engine_coverage.pyanddocs/evidence/spec-engine/us-f0-coverage.jsonare all US-only, and none of them readslegacy_json.fingerprintorresource_hashesis inuk_runtimeand callsload_country_spec("uk"). No NZ graph or runtime exists yet.transport/binding_identity.pyhashes.pysources only, andorrery.py(Export Microcosm schema metadata for Orrery #888) exports compiled graphs.code_identity.builder_code_identity. It moves, as it does on any source edit, but nothing pins a live value.Landing order (NZ hub)
Two open NZ hub PRs also edit
tests/golden/nz_country_spec.json:benefit_unit_rule.json. A three-way merge gives two conflicting hunks.gates.jsonhash. A three-way merge gives one conflicting hunk.The NZ hub holds
build/nzedits until #1122 lands, so this PR lands after #1122 and #1138. At land time, merge main and regenerate the golden from the loaded spec; this PR still changes only thebenefit_unit_rule.jsonhash and the fingerprint:PYTHONPATH=. .venv/bin/python -c "import importlib.util as u; s=u.spec_from_file_location('t','packages/microcosm-build/tests/engine_free/shared/test_country_spec.py'); m=u.module_from_spec(s); s.loader.exec_module(m); (m.GOLDEN_ROOT/'nz_country_spec.json').write_bytes(m.canonical_json_bytes(m._loaded_spec_summary('nz')))"After that,
git diffagainst the merged main should show only those two golden lines.Tests
Targeted run with
-p no:cacheprovider --basetemp=.hub-scratch/pytest -o tmp_path_retention_policy=failed, all underpackages/microcosm-build/tests/engine_free/shared/:test_country_spec.pytest_nz_spec_package.pytest_spec_engine_country_bundles.pytest_spec_only_country_packages.pytest_spec_engine_reemission.pyBefore the re-pin, the first three files gave 1 failed and 225 passed. The one failure was
TestGoldenCountrySpecs::test_loaded_spec_matches_the_golden_file_byte_for_byte[nz]. After the re-pin, all five files gave 242 passed. CI runs the whole suites.tools/ci_test_plan.pyputs both changed paths in thesharedscope, so every job runs.Invariants
canonical_json_bytes(_loaded_spec_summary("nz")), and the same bytes come back on reload (test_fingerprint_is_stable_across_loads).No logic changed, so there is no new property-based test.
axiom: n/a: documentation string in a microcosm build resource, no policy change
🤖 Generated with Claude Code