Repository navigation
Harden Axiom adapter references and kernel hash coverage (NZ v0, G1b) - #1139
Merged
Merged
Conversation
Reject submodules, repository-environment redirection, and changed resolved module paths. Check committed paths, unfiltered bytes and executable modes, including edits hidden from Git status. Clarify array and checkout claims. Property-test compile pins, checkout integrity and reference-name-independent kernel hashes, with same-qualname adapters from different modules and Git blob differential checks. Both reviewed hash-order mutants are killed. Validation: 183 passed, 4 real-engine skips in the two targeted files; main regressions reproduced, lint/format/test-plan checks passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
On macOS with core.precomposeunicode=true, git records a path in NFC while
the file system lists the NFD name the file was created under. The checkout
check compared the two path sets as strings and refused a clean checkout
("2 path(s) differ"). Committed paths now pair with files one to one:
identical names first, then the single canonically equivalent entry that
the committed path opens (Path.samefile). Ambiguous or unmatched names are
refused; the byte, executable-mode and directory-digest checks are
unchanged, and nothing is normalized wholesale.
Regression tests build the clean macOS case under tmp_path and show that a
hidden edit or mode change to the paired file is still refused. A commit
holding both spellings of one name is refused where one file opens under
both. A property test checks the pairing against a brute-force matching on
the real file system. The changelog and docstrings now state that the
exact-commit check assumes an intact object database.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merged by the NZ hub (session local_e407a527) at b06217f with --merge. Gates: |
MaxGhenis
added a commit
that referenced
this pull request
Oct 9, 2026
Two conflicts: - docs/concept-schema-transport-adr.md: keep both sides. Main's status text (#1130) describes the transport reader; G4 adds that benefit-unit construction from the concept pointers is built for New Zealand. Main's closing bullet listed 13 of New Zealand's 80 module bindings as deferred until unit construction exists; G4 builds it, so the bullet now says New Zealand's group bindings execute on built units, Belgium's and the US/UK group bindings stay deferred, and a country pack is still needed. - packages/microcosm-build/tests/golden/nz_country_spec.json: regenerated from the loaded spec (canonical_json_bytes(_loaded_spec_summary("nz"))), not hand-merged. Resource hashes are the union of both sides (G4's axiom_input_closure.json and country_package.json, #1138's gates.json); fingerprint 09ed486f... Tests (one file at a time, after `uv sync --all-packages --locked --inexact` for main's new sqlalchemy dependency): country spec 135, NZ input closure 17 (1 skipped), NZ spec package 71, transport gate bindings 110, group encode 78, unit construction 38, input closure 52, concept mapping 168; all passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
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.
Follow-ups to the reviews of microcosm#1118 (G1, the Axiom graph adapter, merged 4121f27). Findings 1–6 of
review-microcosm-1118/out-053144.mdand finding 6 ofout-033221.md.git statusmisses no longer pass.GIT_DIR/GIT_WORK_TREEcannot point the check at a clean decoy or another HEAD..gitentry or a replace ref. SHA-256 repositories are accepted and checked byte for byte.__qualname__are ordered by module. Both surviving mutants from the review (sort by ref name; sort by qualname alone) are now killed.Invariants (Hypothesis property tests)
test_property_it_compiles_only_from_the_referenced_bytes).test_property_accepted_iff_the_root_holds_exactly_the_commit).test_property_the_hash_depends_only_on_the_bound_classes).git hash-object(test_differential_blob_ids_equal_git_hash_object).Tests (build lane)
test_axiom_graph_adapter.pyandtest_rules_kernels.py, one file at a time: 183 passed, 4 skipped (the existing real-engine graph tests; no local engine). Test evidence by kind is listed under "Review fix" below. ruff check/format andtools/ci_test_plan.py verifyclean. Full report: lane report (hub copy at~/reviews/nz-hub/jobs/new-g1b/report-cont2.md).Out of scope: an Axiom engine CI job (plan R12), the household-only-weights contract (G2), frozen graph files,
frame/kernels.py.Shared files and owners
packages/microcosm-frame/src/microcosm/frame/adapters/axiom.pyandrules_kernels.pytests only;axiom.pyis also edited by draft #826 and #822 (Max's sessions). Nouk_runtime/us_runtime, frozen graph file orframe/kernels.pychange.Part of the Microcosm NZ v0 graph plan (Max ruling d962), package G1b. Built by the NZ hub on Subfleet build lanes: Claude Opus 5.5 wrote most of it and a GPT-6.1 Sol lane finished it after a provider error (both in the commit trailer); the hub verified scope before committing.
Review fix (head b06217f)
GPT-6.1 Sol review (Subfleet 20261008-095817) at 0c7e90d: REQUEST_CHANGES for one defect, fixed in b06217f and independently verified (APPROVE_WITH_NITS).
core.precomposeunicode=truerecords precomposed names (usually NFC) while the file system lists the NFD name a file was created under; comparing the two path sets as strings refused that clean checkout. Committed paths now pair with files one to one: identical names first, then the single canonically equivalent file the committed path opens, confirmed withPath.samefile. Ambiguous and unmatched names are refused, one directory entry never answers for two committed names, and the byte, executable-mode and directory-digest checks are unchanged. Names that differ only in case are not equivalent.aafc628fadapter source and green here: the submodule, inherited git environment, module-path, hidden byte/mode and replace-ref checkout tests. Regression tests red on 0c7e90d and green here on macOS: the decomposed-name acceptance, hidden-change and property tests. Positive controls that pass on main by design:test_native_outputs_are_numpy_arrays_text_and_dates_includedandtest_a_module_link_left_alone_compiles_the_referenced_file. Mutant coverage for the unchangedrules_kernels.py: all three kernel-hash tests fail under the sort-by-reference-name mutant;test_classes_sharing_a_qualname_are_ordered_by_moduleand the property test also fail under sort-by-qualname-alone.test_axiom_graph_adapter.py162 passed, 5 skipped (4 need a local Axiom engine; 1 needs a normalization-sensitive file system);test_rules_kernels.py29 passed. Not observed on Linux: the three macOS end-to-end tests are expected to skip in CI, and the distinct-NFC/NFD-files test to run there.🤖 Generated with Claude Code