Skip to content

fix(csharp): resolve types from enclosing namespaces - #4204

Closed
hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/csharp-enclosing-namespace-resolution
Closed

hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/csharp-enclosing-namespace-resolution

fix(csharp): resolve enclosing namespace types

6b65790
Select commit
Loading
Failed to load commit list.
Graphify Labs / Graphify succeeded Oct 7, 2026 in 1m 59s

Graphify — worth a look

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.

Details

Graphify reviewed this change.

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.


Graphify review — findings

Resolves C# type names against enclosing parent namespaces, so code in Demo.Inner.Deep binds Widget to Demo.Inner.Widget or Demo.Widget, innermost first, instead of leaving a sourceless stub. The walk-up in CsharpNameResolver runs only when the current namespace and using directives yield nothing. Ambiguous candidates still return unresolved, and names found nowhere stay stubs. New tests cover dotted, nested-block and file-scoped namespaces, multi-level shadowing, and using/unknown-type controls; a few existing test comments now show mangled em dashes (—).

Worth a look

  • Parent namespace lookup runs after outer using candidates — graphify/extractors/csharp.py:323 · 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 — 1721 functions depend on the 89 functions this change touches.

Health — this change adds coupling hotspots:

  • new: extract() — 803 callers, 51 callees
  • new: _rebuild_code() — 158 callers, 56 callees
  • new: main() — 102 callers, 3 callees
  • new: dispatch_command() — 2 callers, 129 callees
  • new: link_cross_repo_member_calls() — 21 callers, 9 callees
  • new: global_add() — 12 callers, 9 callees
  • new: run_pipeline() — 8 callers, 13 callees
  • new: _run_cli() — 6 callers, 7 callees
  • …and 20 more — each is listed as a finding

Verification — 1721 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: 729 function(s) in the blast radius were not formally verified this run

Test selection

Test selection

6 of 344 test file(s) selected (2%) via static blast radius.

  • tests/test_cross_repo_external_call_guards.py — impact
  • tests/test_cross_repo_member_calls.py — impact
  • tests/test_csharp_type_resolution.py — impact, changed-test
  • tests/test_extract.py — impact
  • tests/test_global_add_tag_inference.py — impact
  • tests/test_global_graph.py — impact

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.