Fix Temporal resolver never reaching the concrete implementation#687
Open
thejesh23 wants to merge 1 commit into
Open
Fix Temporal resolver never reaching the concrete implementation#687thejesh23 wants to merge 1 commit into
thejesh23 wants to merge 1 commit into
Conversation
resolve_temporal_calls() builds 'implementors' keyed by the bare interface name (INHERITS.target_qualified is bare for Java) but looked it up with 'interface_qual', the fully-qualified name. Because interface_qual is always the qualified form, the lookup always returned [], the 'len(impls) == 1' branch was dead, and every Temporal stub call resolved to the interface method instead of the unique concrete implementation. callers_of() and impact analysis through the real impl therefore returned nothing. Look up 'implementors' with the bare interface name (matching how it is keyed, and how the sibling Spring resolver works). Adds a test asserting a single-implementor stub call resolves to PaymentActivityImpl.charge, not the interface PaymentActivity.charge.
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.
Linked issue
Closes #685
What & why
resolve_temporal_calls()buildsimplementorskeyed by the bare interface name (JavaINHERITS.target_qualifiedis bare) but looked it up withinterface_qual, the fully-qualified name. Becauseinterface_qualis always the qualified form,implementors.get(interface_qual, [])always returned[], thelen(impls) == 1branch was dead, and every Temporal stub call resolved to the interface method instead of the unique concrete implementation.callers_of()and impact analysis through the real implementation returned nothing.This looks up
implementorswith the bare interface name — matching how it is keyed, and how the sibling Spring resolver already works.How it was tested
New test (fails on
main, passes here):test_multilang.py::TestTemporalResolver::test_resolved_target_is_concrete_impl_not_interface— asserts a single-implementor stub call resolves toPaymentActivityImpl.charge, not the interfacePaymentActivity.charge.Checklist
uv run pytest tests/ --tb=short -q(one pre-existing, unrelated Windows/py3.14 failure)uv run ruff check code_review_graph/uv run mypy code_review_graph/temporal_resolver.py --ignore-missing-imports --no-strict-optional