Repository navigation
Pin the fact decoder in both UK target kernel hashes - #1424
Merged
Merged
Conversation
#1382 listed microcosm.build.ledger_artifact in UK_TARGET_COMPILE_MODULE_NAMES because both UK target kernels decode their ledger facts inside run through full_targets -> load_ledger_consumer_artifact. The import-coverage test keeps it listed only while a listed module (ledger_targets, for LexicalFloat) imports it; drop that import and ledger_artifact could leave the tuple with every test green. Pin it directly, as the measure_simulation tests do: all four kernels that share the two UK target hashes (full target, full measure, national target, national problem) must hash ledger_artifact. Moving ledger_artifact from the tuple to EXCLUDED_DIRECT_IMPORTS leaves the coverage test green and turns both new tests red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three full-graph kernels share the UK target hash: target compilation, target selection and measure. The problem kernel embeds that hash in its own. The decoder pin covered only compilation and measure, so it now loops over all four, and its docstring names them. With ledger_artifact moved from the listing into EXCLUDED_DIRECT_IMPORTS, both decoder pins fail and the other six tests pass, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 29, 2026 19:17
Contributor
Author
|
Merged by the NZ hub (session local_e407a527) at 220e9cb with --merge. Gates: |
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
Test-only follow-up to #1382. #1382 listed
microcosm.build.ledger_artifactinUK_TARGET_COMPILE_MODULE_NAMES, because both UK target kernels decode their ledger facts insiderun:full_targets.load_uk_full_target_inputsandload_uk_national_target_inputscallload_ledger_consumer_artifact;The import-coverage test (
test_every_direct_import_of_a_listed_module_is_listed_or_excluded) keepsledger_artifactlisted only while some listed module imports it. Today that module isledger_targets, which imports it forLexicalFloat. Two holes were open:ledger_artifactcould move from the tuple intoEXCLUDED_DIRECT_IMPORTSwith every test green. Add feed-derived NZ reference ageing factors (G8-r2a) #1382's b36c702 shipped exactly that state before its review asked for the listing.ledger_artifactcould leave the tuple with every test green. (Moving it into the exclusions then failstest_exclusions_are_live_and_never_listed, since the entry would be dead.)The independent review of #1382's listing raised this as a nit.
This PR pins the module directly, as the
measure_simulationtests do.test_full_target_kernels_hash_the_fact_decoderandtest_national_target_kernels_hash_the_fact_decoderassert that every kernel built on the two UK target hashes hashesledger_artifact:Invariant
Every UK kernel whose
rundecodes ledger facts includes the decoder module in its implementation hash, so an edit to the decoder alone re-keys it.Evidence
Tests ran with CI's import path (every
packages/*/srcplus the repo root):test_uk_target_compile_modules.pypasses, 8 of 8.ledger_artifactmoved from the tuple intoEXCLUDED_DIRECT_IMPORTS): the import-coverage test stays green, and both new tests fail. That is the hole they close. The hub re-ran it at 220e9cb: 2 failed, 6 passed.No source change, so no implementation hash moves and no cache re-keys.
Review
jobs/review-microcosm-1424): APPROVE_WITH_NITS, no defects.*uk_target_compile_modules(), and it confirmed the call traces from eachruntoload_ledger_consumer_artifact.ledger_artifact.pymoves the full, full-problem and national hashes; under mutant A it moves none.UKFullProblemKernel()takes no arguments, and its hash reaches the patchedsource_hashthroughsuper(). Under mutant A,ledger_artifactdrops out of each of the four full-graph kernels' hashed objects on its own. A comment-only edit toledger_artifact.pymoves all four hashes at head and none under mutant A.gh pr checksexit 0; run 40925575253): engine-free and engine-uk on Python 3.13 and 3.14, integration-uk, lint, select-countries and wheels; engine-us reported skipping.🤖 Generated with Claude Code