Repository navigation
feat(php): resolve instance member calls through the receiver type and link them across repos - #3391
xiongjianxu wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP member-call resolution so a call like $greeter->greet() on a typed receiver whose method lives in another file now gets a calls edge. _resolve_php_member_calls types the receiver from a new per-file php_type_table (built by _php_receiver_type_table from typed properties, promoted/typed parameters, and new bindings, first binding wins), emits an INFERRED edge at 0.85 only when exactly one class declares that type, bails on ambiguity, and parks receivers whose type this build declares nowhere for a later merge. Registers php suffixes for cross-repo binding, extracts receiver names for $var->m() and $this->prop->m() chains, and keeps PHP member calls in-file rather than deferring so an unresolved bare callee routes through raw_calls.
Worth a look
- PHP member resolver can bind calls to non-PHP declarations —
graphify/extract.py:4459· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Existing non-call edge suppresses required PHP calls edge —
graphify/extract.py:4471· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2162 functions depend on the 519 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 546 callers, 43 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 43 more — each is listed as a finding
Verification — 2162 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1997 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 51 more finding(s) on lines outside this diff (see the check run).
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 4 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP member-call resolution: _resolve_php_member_calls looks each $greeter->greet() receiver up in a per-file php_type_table, resolves the single class declaring that type, and emits an INFERRED calls edge (score 0.85) to its method, bailing when the type is ambiguous or a builtin. Builds that table via _php_receiver_type_table, which records the written-down type of typed properties, promoted/typed parameters, and new bindings (file-scoped, first binding wins), and types member-call receivers during generic extraction from $var or $this->prop. Parks receivers whose type is declared nowhere in the corpus for a later merge (#3152), and extends the PHP suffix set (including .phtml, .php3–.php7, .phps) to the cross-repo indexer and resolver activation.
Worth a look
- PHP builtin globals are checked against the language map keys —
graphify/extract.py:4484· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP member-call resolver suppresses calls edges when any other edge already connects the nodes —
graphify/extract.py:4495· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP receiver type table conflates same-named parameters across methods —
graphify/extractors/engine.py:693· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- member_receiver may be referenced before assignment for PHP member_access chains —
graphify/extractors/engine.py:5551· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2163 functions depend on the 520 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 546 callers, 43 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 43 more — each is listed as a finding
Verification — 2163 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1998 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 51 more finding(s) on lines outside this diff (see the check run).
|
Self-audit pass over the bot review. One fix pushed, two findings I am deliberately not acting on. Fixed — the declaration index was corpus-wide. Not acting on — Not acting on — the type table is per-file and flat. Swift (#1356), TS/JS and C++ all scope theirs this way, and Verification: |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP receiver-typed member-call resolution so calls like $greeter->greet() reach a method declared in another file. The engine now builds a per-file php_type_table (via _php_receiver_type_table) mapping receivers to their written-down types from typed properties, promoted constructor params, typed params, and new bindings, and captures member receivers for both $var->m() and $this->prop->m() chains; the new _resolve_php_member_calls pass looks the receiver up, and when exactly one PHP-declared class of that type exists emits an INFERRED calls edge at 0.85, bailing on ambiguity and skipping builtins. A receiver typed to a class this build contains nowhere is parked on the caller (#3152) for a later merge rather than dropped, and PHP suffixes are registered so cross-repo scanning picks up .php/.phtml/etc.
Worth a look
- Nullable PHP builtin types are parked as unresolved —
graphify/extract.py:4476· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- member_receiver may be used before assignment for PHP chained access —
graphify/extractors/engine.py:5551· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2163 functions depend on the 520 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 546 callers, 43 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 43 more — each is listed as a finding
Verification — 2163 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1998 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 51 more finding(s) on lines outside this diff (see the check run).
|
Both advisory findings were checked against the branch; neither holds.
Nullable builtin types parked as unresolved (extract.py:4476) — the premise does not hold. What is true, and deliberate, is that a stdlib class such as |
1ab5d63 to
5388d8d
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP member-call resolution: $greeter->greet() on a typed receiver whose method lives in another file now emits an INFERRED calls edge (score 0.85) via _resolve_php_member_calls, which looks the receiver up in a per-file php_type_table and resolves to the single PHP class declaring that type. The engine builds that table from typed properties, promoted constructor params, typed parameters, and $x = new Foo() bindings (first binding wins, file-scoped) and tags member receivers for both $greeter->greet() and $this->greeter->greet(). Receivers typed to a class this build doesn't contain are parked on the caller for a later merge (#3152); ambiguous or builtin types bail unresolved, and .php/.phtml/etc. now register as a PHP suffix set for cross-repo indexing.
Worth a look
- PHP receiver type table ignores scope and can mis-type shadowing variables —
graphify/extractors/engine.py:726· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- local _key strips underscores, diverging from cross_repo_calls _key normalization —
graphify/extract.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP builtin type filtering is case-sensitive —
graphify/extract.py:4538· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Existing non-call edge suppresses PHP member call edge —
graphify/extract.py:4550· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP new-assignment typing misses
$this->property = new Type()receivers —graphify/extractors/engine.py:741· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2199 functions depend on the 528 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 565 callers, 43 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 44 more — each is listed as a finding
Verification — 2199 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2034 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
106 of 263 test file(s) selected (40%) via static blast radius.
tests/test_astro_extraction.py— impacttests/test_astro_import_ids.py— impacttests/test_build.py— impacttests/test_builtin_global_type_refs.py— impacttests/test_case_sensitive_resolution.py— impacttests/test_cjs_module_extension.py— impacttests/test_cpp_nested_and_cli.py— impacttests/test_cpp_objc_cross_file_calls.py— impacttests/test_cross_extension_reexport_self_cycle.py— impacttests/test_cross_language_call_resolution.py— impacttests/test_cross_repo_member_calls.py— impact, changed-testtests/test_csharp_call_site_generic_args.py— impacttests/test_csharp_enum_members.py— impacttests/test_csharp_field_generic_args.py— impacttests/test_csharp_generic_callsites.py— impacttests/test_csharp_interface_dispatch.py— impacttests/test_csharp_member_calls.py— impacttests/test_csharp_member_nodes.py— impacttests/test_csharp_object_creation.py— impacttests/test_csharp_partial_classes.py— impacttests/test_csharp_type_resolution.py— impacttests/test_definition_file_portability.py— impacttests/test_detect.py— impacttests/test_dotnet.py— impacttests/test_duplicate_annotation_edges.py— impacttests/test_extract.py— impacttests/test_extract_cache_location.py— impacttests/test_file_label_disambiguation.py— impacttests/test_file_node_id_spec.py— impacttests/test_forwarding_review_findings.py— impacttests/test_global_graph.py— impacttests/test_go_builtin_call_targets.py— impacttests/test_go_qualified_resolution.py— impacttests/test_import_extension_resolution.py— impacttests/test_import_self_loops.py— impacttests/test_imported_export_forwarding.py— impacttests/test_incremental.py— impacttests/test_indirect_call_arrow_single_param_shadow.py— impacttests/test_indirect_call_catch_binding_shadow.py— impacttests/test_indirect_call_external_import_shadow.py— impacttests/test_indirect_call_for_of_binding_shadow.py— impacttests/test_indirect_call_function_expression_shadow.py— impacttests/test_indirect_call_nested_closure_shadow.py— impacttests/test_indirect_dispatch.py— impacttests/test_indirect_dispatch_assign_return.py— impacttests/test_indirect_dispatch_getattr.py— impacttests/test_inferred_confidence_rubric.py— impacttests/test_inherited_field_receivers.py— impacttests/test_java_member_calls.py— impacttests/test_java_type_resolution.py— impact- … and 56 more
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 52 more finding(s) on lines outside this diff (see the check run).
5388d8d to
288cb51
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 4 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP member-call resolution so $greeter->greet() binds to a method declared in another file. A per-file php_type_table records each receiver's declared type from typed properties, promoted/typed constructor parameters, and new bindings, and _resolve_php_member_calls looks the receiver up there, emits an INFERRED calls edge (score 0.85) only when exactly one PHP class declares that type, bails on ambiguity, and skips builtins. Receivers typed to a class this build doesn't contain are parked on the caller for a later merged graph, and .php variants are registered as a PHP language suffix and resolver.
Worth a look
- PHP parked calls are not accepted by the cross-repo linker —
graphify/cross_repo_calls.py:170· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP member call edge suppressed by unrelated existing edge —
graphify/extract.py:4676· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Existing non-call edges suppress PHP call resolution —
graphify/extract.py:4678· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- member_receiver may be unbound when object is a member_access_expression that is not $this-> —
graphify/extractors/engine.py:5726· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2230 functions depend on the 532 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 587 callers, 44 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 45 more — each is listed as a finding
Verification — 2230 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2060 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
109 of 269 test file(s) selected (41%) via static blast radius.
tests/test_astro_extraction.py— impacttests/test_astro_import_ids.py— impacttests/test_build.py— impacttests/test_builtin_global_type_refs.py— impacttests/test_case_sensitive_resolution.py— impacttests/test_cjs_module_extension.py— impacttests/test_cpp_nested_and_cli.py— impacttests/test_cpp_objc_cross_file_calls.py— impacttests/test_cross_extension_reexport_self_cycle.py— impacttests/test_cross_language_call_resolution.py— impacttests/test_cross_repo_member_calls.py— impact, changed-testtests/test_csharp_call_site_generic_args.py— impacttests/test_csharp_enum_members.py— impacttests/test_csharp_field_generic_args.py— impacttests/test_csharp_generic_callsites.py— impacttests/test_csharp_interface_dispatch.py— impacttests/test_csharp_member_calls.py— impacttests/test_csharp_member_nodes.py— impacttests/test_csharp_object_creation.py— impacttests/test_csharp_partial_classes.py— impacttests/test_csharp_type_resolution.py— impacttests/test_definition_file_portability.py— impacttests/test_detect.py— impacttests/test_dotnet.py— impacttests/test_duplicate_annotation_edges.py— impacttests/test_extract.py— impacttests/test_extract_cache_location.py— impacttests/test_file_label_disambiguation.py— impacttests/test_file_node_id_spec.py— impacttests/test_forwarding_review_findings.py— impacttests/test_global_add_tag_inference.py— impacttests/test_global_graph.py— impacttests/test_go_builtin_call_targets.py— impacttests/test_go_qualified_resolution.py— impacttests/test_import_extension_resolution.py— impacttests/test_import_self_loops.py— impacttests/test_imported_export_forwarding.py— impacttests/test_incremental.py— impacttests/test_indirect_call_arrow_single_param_shadow.py— impacttests/test_indirect_call_catch_binding_shadow.py— impacttests/test_indirect_call_external_import_shadow.py— impacttests/test_indirect_call_for_of_binding_shadow.py— impacttests/test_indirect_call_function_expression_shadow.py— impacttests/test_indirect_call_nested_closure_shadow.py— impacttests/test_indirect_dispatch.py— impacttests/test_indirect_dispatch_assign_return.py— impacttests/test_indirect_dispatch_getattr.py— impacttests/test_inferred_confidence_rubric.py— impacttests/test_inherited_field_receivers.py— impacttests/test_issue_3405_python_resolution.py— impact- … and 59 more
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 53 more finding(s) on lines outside this diff (see the check run).
|
Rebased onto On the and the end-to-end case builds two repos, merges them through the CLI, and asserts the edge exists: That parametrization asserts both halves — the parked entry ( The remaining three are unchanged from the previous rounds:
Verification: |
288cb51 to
f17f5c9
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 2 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds cross-file PHP member-call resolution: _resolve_php_member_calls types receivers like $greeter->greet() through a per-file php_type_table and emits an INFERRED calls edge (score 0.85) to the sole class declaring that type, bailing when the type is ambiguous, builtin, or absent — in which case the call is parked for a merged-graph pass rather than dropped. Builds that type table in _php_receiver_type_table from typed properties, promoted constructor params, typed parameters, and new assignments (file-scoped, first binding wins), and captures member receivers for $var->m() and $this->prop->m() during generic extraction. Registers php suffixes for cross-repo call matching and adds the php_member_calls resolver.
Worth a look
- member_receiver may be referenced before assignment in PHP branch —
graphify/extractors/engine.py:5723· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP member-call resolver suppresses calls when any non-call edge already connects the same nodes —
graphify/extract.py:4666· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2230 functions depend on the 532 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 587 callers, 44 callees - new:
_rebuild_code()— 115 callers, 51 callees - new:
_extract_generic()— 18 callers, 27 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 124 callees - new:
extract_objc()— 27 callers, 9 callees - new:
_get_extractor()— 26 callers, 6 callees - …and 45 more — each is listed as a finding
Verification — 2230 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2060 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
109 of 269 test file(s) selected (41%) via static blast radius.
tests/test_astro_extraction.py— impacttests/test_astro_import_ids.py— impacttests/test_build.py— impacttests/test_builtin_global_type_refs.py— impacttests/test_case_sensitive_resolution.py— impacttests/test_cjs_module_extension.py— impacttests/test_cpp_nested_and_cli.py— impacttests/test_cpp_objc_cross_file_calls.py— impacttests/test_cross_extension_reexport_self_cycle.py— impacttests/test_cross_language_call_resolution.py— impacttests/test_cross_repo_member_calls.py— impact, changed-testtests/test_csharp_call_site_generic_args.py— impacttests/test_csharp_enum_members.py— impacttests/test_csharp_field_generic_args.py— impacttests/test_csharp_generic_callsites.py— impacttests/test_csharp_interface_dispatch.py— impacttests/test_csharp_member_calls.py— impacttests/test_csharp_member_nodes.py— impacttests/test_csharp_object_creation.py— impacttests/test_csharp_partial_classes.py— impacttests/test_csharp_type_resolution.py— impacttests/test_definition_file_portability.py— impacttests/test_detect.py— impacttests/test_dotnet.py— impacttests/test_duplicate_annotation_edges.py— impacttests/test_extract.py— impacttests/test_extract_cache_location.py— impacttests/test_file_label_disambiguation.py— impacttests/test_file_node_id_spec.py— impacttests/test_forwarding_review_findings.py— impacttests/test_global_add_tag_inference.py— impacttests/test_global_graph.py— impacttests/test_go_builtin_call_targets.py— impacttests/test_go_qualified_resolution.py— impacttests/test_import_extension_resolution.py— impacttests/test_import_self_loops.py— impacttests/test_imported_export_forwarding.py— impacttests/test_incremental.py— impacttests/test_indirect_call_arrow_single_param_shadow.py— impacttests/test_indirect_call_catch_binding_shadow.py— impacttests/test_indirect_call_external_import_shadow.py— impacttests/test_indirect_call_for_of_binding_shadow.py— impacttests/test_indirect_call_function_expression_shadow.py— impacttests/test_indirect_call_nested_closure_shadow.py— impacttests/test_indirect_dispatch.py— impacttests/test_indirect_dispatch_assign_return.py— impacttests/test_indirect_dispatch_getattr.py— impacttests/test_inferred_confidence_rubric.py— impacttests/test_inherited_field_receivers.py— impacttests/test_issue_3405_python_resolution.py— impact- … and 59 more
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 53 more finding(s) on lines outside this diff (see the check run).
|
The push was an author-identity rewrite: my commits were authored under an email that is not linked to my GitHub account, so they were not being attributed to me. The tree hash is identical to the previously reviewed head (verified before pushing) and the commit messages are unchanged, so the re-review's findings are the ones already answered above. |
f17f5c9 to
6b6d6e9
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 4 advisory finding(s) below merit a look before merge.
Formal verification. No changes could be formally verified in this run.
Graphify review — findings
Adds cross-file PHP member-call resolution so $greeter->greet() reaches a method declared in another file. A new per-file php_type_table records the written-down type of each property, promoted/typed constructor parameter, typed parameter, and new binding (first binding wins, file-scoped), and the _resolve_php_member_calls pass looks the receiver up there, resolving to the single PHP class declaring that type and emitting an INFERRED calls edge (0.85); ambiguous types bail and receivers whose type is declared nowhere in the corpus get parked on the caller for a later merge. Registers PHP suffixes in the cross-repo caller and the resolver registry, and skips union/intersection/primitive types (which name no single class) plus builtins.
Worth a look
- PHP type matching collapses distinct namespaced class names —
graphify/extract.py:4638· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP member resolver suppresses calls when any edge already exists between caller and target —
graphify/extract.py:4664· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- PHP call resolution suppresses calls when a non-call edge already exists —
graphify/extract.py:4683· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- All unresolved PHP calls are tagged as parked PHP member calls —
graphify/extractors/engine.py:6457· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2340 functions depend on the 546 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 639 callers, 45 callees - new:
_rebuild_code()— 123 callers, 53 callees - new:
_extract_generic()— 18 callers, 30 callees - new:
extract_js()— 85 callers, 4 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
dispatch_command()— 2 callers, 125 callees - new:
extract_objc()— 27 callers, 9 callees - new:
link_cross_repo_member_calls()— 21 callers, 9 callees - …and 47 more — each is listed as a finding
Verification — 2340 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 2166 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
118 of 284 test file(s) selected (42%) via static blast radius.
tests/test_astro_extraction.py— impacttests/test_astro_import_ids.py— impacttests/test_build.py— impacttests/test_builtin_global_type_refs.py— impacttests/test_case_sensitive_resolution.py— impacttests/test_cjs_module_extension.py— impacttests/test_cpp_nested_and_cli.py— impacttests/test_cpp_objc_cross_file_calls.py— impacttests/test_cross_extension_reexport_self_cycle.py— impacttests/test_cross_language_call_resolution.py— impacttests/test_cross_repo_external_call_guards.py— impacttests/test_cross_repo_member_calls.py— impact, changed-testtests/test_csharp_call_site_generic_args.py— impacttests/test_csharp_enum_members.py— impacttests/test_csharp_field_generic_args.py— impacttests/test_csharp_generic_callsites.py— impacttests/test_csharp_interface_dispatch.py— impacttests/test_csharp_member_calls.py— impacttests/test_csharp_member_nodes.py— impacttests/test_csharp_object_creation.py— impacttests/test_csharp_partial_classes.py— impacttests/test_csharp_type_resolution.py— impacttests/test_definition_file_portability.py— impacttests/test_detect.py— impacttests/test_dotnet.py— impacttests/test_duplicate_annotation_edges.py— impacttests/test_extract.py— impacttests/test_extract_cache_location.py— impacttests/test_file_label_disambiguation.py— impacttests/test_file_node_id_spec.py— impacttests/test_forwarding_review_findings.py— impacttests/test_global_add_tag_inference.py— impacttests/test_global_graph.py— impacttests/test_go_builtin_call_targets.py— impacttests/test_go_qualified_resolution.py— impacttests/test_import_extension_resolution.py— impacttests/test_import_self_loops.py— impacttests/test_imported_export_forwarding.py— impacttests/test_incremental.py— impacttests/test_indirect_call_arrow_single_param_shadow.py— impacttests/test_indirect_call_catch_binding_shadow.py— impacttests/test_indirect_call_external_import_shadow.py— impacttests/test_indirect_call_for_of_binding_shadow.py— impacttests/test_indirect_call_function_expression_shadow.py— impacttests/test_indirect_call_nested_closure_shadow.py— impacttests/test_indirect_dispatch.py— impacttests/test_indirect_dispatch_assign_return.py— impacttests/test_indirect_dispatch_getattr.py— impacttests/test_inferred_confidence_rubric.py— impacttests/test_inherited_field_receivers.py— impact- … and 68 more
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
Could not verify: Could not verify \_extract\_generic.
The verifier did not have enough to check \_extract\_generic, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: parameter `path` is annotated `Path` — outside the synthesizable primitive/collection set
· 55 more finding(s) on lines outside this diff (see the check run).
6b6d6e9 to
de19f26
Compare
…red type v8's `_resolve_php_member_calls` (Graphify-Labs#3872) binds scoped `Class::method()` calls but leaves instance `$g->method()` calls unresolved. This adds the instance tier beside it: a per-file receiver type table (`_php_receiver_type_table` over typed properties, promoted constructor params, typed params and `new` bindings) names the receiver's class, and the shared resolver takes the single PHP declaration of that class and emits the `calls` edge, INFERRED. The declaration index is gated to the PHP interop family: the index is corpus-wide, so a same-named class in another language would both answer the receiver and hide that no PHP file declares it. A receiver the table cannot type to one class — untyped, union, longer chain — stays unresolved. Co-Authored-By: Claude Code <[email protected]>
A receiver typed to a class this build declares nowhere is parked on the caller (Graphify-Labs#3152); the merge then binds it to the one declaration in another repo. PHP was absent from `_LANG_SUFFIXES`, so parked PHP entries were never language-checked and the edge was dropped. Adding PHP's suffixes lets the merge finish the call, gated to PHP declarations like every other tier. Co-Authored-By: Claude Code <[email protected]>
de19f26 to
e7fee26
Compare
|
Thanks @xiongjianxu! One small thing: our changelog and release notes are built from PR titles, so we use the conventional-commits format, for example: Prefixes we use: |
$g->m()) member calls through the receiver's type, and link them across repos
$g->m()) member calls through the receiver's type, and link them across reposKotlin/Scala/C++/Swift generic & template type-param pruning (#4406, #4407, #4408, #4409), Objective-C NS_ENUM/NS_OPTIONS extraction and callable markers (#4401, #3385), and Go/PHP receiver-typed member-call parking (#3395, #3391) all change AST extraction output, so warm caches must re-extract. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Shipped in v0.9.89, just released to PyPI as |
What
Extends the PHP member-call resolver that landed in #3872. That change made
_resolve_php_member_callsbind scopedClass::method()/self::/static::/parent::calls to the actual method (EXTRACTED). This PR addsthe instance tier beside it and wires PHP into the cross-repo merge.
Net-new over v8 (verified against current v8 tip)
v8 today:
::calls (PHP Class::method() static calls without an explicit 'use' import stay INFERRED instead of EXTRACTED #3872);$var->method()instance call as a dynamic scope and leaves itunresolved (its own test
test_instance_call_is_still_unresolved_no_regressionpins this as the deliberate scope boundary of PHP Class::method() static calls without an explicit 'use' import stay INFERRED instead of EXTRACTED #3872);
phpincross_repo_calls._LANG_SUFFIXES, so even a parkedPHP entry is never language-checked and the cross-repo edge is dropped.
This PR:
_php_receiver_type_tablerecordsname -> TypeNamefrom typed properties (private Greeter $g;), promotedconstructor params, typed parameters and
$g = new Greeter(). The sharedresolver looks the receiver up there, takes the single PHP declaration of
that type, and emits the
callsedge — INFERRED (0.85), since the typecomes from the annotation, never the call site. The scoped
::path isuntouched and stays EXTRACTED.
same-named class in another language would both answer the receiver and hide
that no PHP file declares it. The index is gated to the PHP family.
build is parked (merge-graphs / global add can never produce cross-repo member-call edges: the resolved receiver type is discarded at bail-out instead of persisted #3152); adding PHP's suffixes to
_LANG_SUFFIXESlets themerge finish the call against the one declaration in another repo.
A receiver the table cannot type to exactly one class — untyped, union, longer
chain, two same-named classes — stays unresolved rather than guessing.
Tests
tests/test_php_receiver_member_calls.py— instance tier: property, promotion,typed param,
newlocal, nullable; negatives for untyped / union / longerchain / ambiguous name; the cross-language parking case.
tests/test_php_static_call_resolution.py— updated the PHP Class::method() static calls without an explicit 'use' import stay INFERRED instead of EXTRACTED #3872 boundary test toassert the instance call now resolves INFERRED (the limitation this PR lifts).
tests/test_cross_repo_member_calls.py— a parked PHP call binds to the one PHPdeclaration in another repo, and not to a Java class of the same name.