Skip to content

Target compilation keys do not cover the geography labels in microcosm.calibrate.geography_constants #1492

Closed

Description

@anth-volk

The graph kernels that compile targets do not include microcosm.calibrate.geography_constants in their implementation hashes, so an edit to a geography label leaves their node keys unchanged. A store run with resume="auto" then reuses the stored target surface, which carries the old label, and the calibration diagnostics publish it.

Who reads the module.

  • microcosm.build.ledger_targets._geography_fallback_label takes a target hierarchy's geography label from UK_GEOGRAPHY_ID_TO_LABEL when the Chronicle facts give no name, and always for composed rows.
  • uk_runtime/target_weights takes UK_WIDE_GEOGRAPHY_IDS from the same module for the UK target loss weights, so an edit to those codes changes the weights the UK problem binds.

Why the hashes miss it. Both modules import it with from … import, and source_hash hashes only the files it is given; it does not follow imports.

  • targets.compile@1, and the other transport kernels that hash target_kernels._COMPILE_MODULES, do not list it.
  • The UK target kernels hash uk_target_compile_modules(). Its import check (test_uk_target_compile_modules) looks only at microcosm.build imports, so a microcosm.calibrate module was never flagged.
  • The UK problem kernel's loss-weight hash covers target_weights, local_rowwise and national_doctrine, not the module target_weights reads.

#1342 added the module to the keys of the two diagnostics nodes (diagnostics.calibration@1 and uk.full.gates.calibrated). Those nodes read the stored surface, so in practice they still publish the old label after an edit. Found by the re-review of #1342; the gap is older than that PR.

Goal.

  • Every transport kernel that hashes _COMPILE_MODULES, the UK target kernels (full and national) and the UK problem kernel include geography_constants in their implementation hashes.
  • A test fails when a listed compile module imports a first-party module (any microcosm.* package, not only microcosm.build) that is neither listed nor excluded with a reason, so the next module read this way is caught.

Effect. The target compilation of every transport country and the UK target, problem and solve nodes get new keys, so a resumed store recomputes them once.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions