Skip to content

fix: take render_resolution_failure from its owning module - #914

Merged
TomKaltofen merged 1 commit into
mainfrom
fix/render-import-from-renderer
Jul 31, 2026
Merged

fix: take render_resolution_failure from its owning module#914
TomKaltofen merged 1 commit into
mainfrom
fix/render-import-from-renderer

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

main is red at 410ff53d: all 15 CI jobs fail on the same test.

FAILED tests/test_core/test_prepare/test_resolution_module_split.py::test_no_call_site_imports_a_foreign_name_from_the_matcher
  tests/test_core/test_prepare/test_raising_matcher_containment.py:22 -> render_resolution_failure

Cause

A merge race between two changes that were each green on their own branch:

They merged 51 seconds apart. The import still resolves at runtime, because the matcher imports the renderer for its own use in evaluate_and_render, which is why only the sweep fails and not the containment test itself.

Fix

Take render_resolution_failure from its owning module. IdentifyFeatureGroupClass stays with the matcher, which owns it.

This clears two gates, not one: mypy --strict also rejected the old form as an implicit re-export (Module "mloda.core.prepare.identify_feature_group" does not explicitly export attribute "render_resolution_failure"). Only the pytest sweep showed up in CI because pytest runs first.

Moving the name into MATCHER_KEPT_NAMES instead would not work: test_kept_names_stay_defined_in_the_matcher_module asserts each kept name's __module__ is the matcher, and RENDERER_NAMES already claims this one for the renderer.

Test

Test-only change, one import line. The failing sweep is itself the regression test, so no new test is added. Full tox green locally: 7584 passed, 170 skipped, plus ruff, licenses, mypy --strict, bandit.

The renderer split gave resolution_failure_renderer ownership of
render_resolution_failure, and added a sweep that fails any call site
importing a name the matcher does not own. The raising-matcher
containment test branched before that sweep existed, so it still took
the name from identify_feature_group and turned main red on merge.
@TKaltofen
TKaltofen requested a review from TomKaltofen as a code owner July 31, 2026 08:57
@TomKaltofen
TomKaltofen merged commit 941bcc6 into main Jul 31, 2026
18 checks passed
@TomKaltofen
TomKaltofen deleted the fix/render-import-from-renderer branch July 31, 2026 09:20
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.

2 participants