Skip to content

Separate hidden_imports and hidden_import_cycle action keys so commuting same-module recipes compose - #644

Merged
trissim merged 1 commit into
mainfrom
fix/hidden-import-cycle-action-keys
Nov 28, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/hidden-import-cycle-action-keys

Conversation

@trissim

@trissim trissim commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the phantom nominal source action identities conflict seen on Toad bc8650e81 (toad.agent_surface, toad.client.committed_presentation, toad.transcript_publication):

  • Both HiddenImportFindingRecipeSynthesizer and HiddenImportCutFindingRecipeSynthesizer inherited bare PrimaryEvidenceActionKeysMixin, emitting identical (file_path, module_name) action keys. That made CurrentSnapshotRecipeBatchEvaluation.assess_pair short-circuit as conflicting before ever checking physical edit compatibility, even when retype_type_only_reads did not edit the hub file at all and cut_hidden_cycle + promote_hidden_imports commuted bit-for-bit (equal_sources=True) on both committed_presentation.py and transcript_publication.py.
  • Added action_key_child_subject: ClassVar[str | None] = None on PrimaryEvidenceActionKeysMixin (finding_recipes.py:416), with hidden_imports on HiddenImportFindingRecipeSynthesizer (hidden_imports.py:57) and hidden_import_cycle on HiddenImportCutFindingRecipeSynthesizer (hidden_import_cuts.py:836). Any real physical edit overlap is still caught by simulate_recipe_set + PhysicalSourceEdit.require_compatible + order-equality checks.

Verification

  • Focused tests (tests/test_hidden_imports.py, tests/test_hidden_import_cuts.py, tests/test_type_only_readers.py) + 72 test_repository_* guards on desktop.
  • Live simulation against Toad bc8650e81 confirmed all 3 previously conflicting pairs compose cleanly in both orders with identical rewritten sources (equal_sources=True), lifting Toad's clean exportable batch from 11 to 16 disjoint/commuting recipes (leaving only the 1 real physical line-overlap pair agent_surface.py:120-128 vs 121-121).

@trissim
trissim merged commit 0c03ca2 into main Nov 28, 2026
2 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant