Skip to content

fix(diagnostics): classify external import edges#2132

Draft
cgoulart21 wants to merge 1 commit into
Graphify-Labs:v8from
cgoulart21:fix/external-import-diagnostics
Draft

fix(diagnostics): classify external import edges#2132
cgoulart21 wants to merge 1 commit into
Graphify-Labs:v8from
cgoulart21:fix/external-import-diagnostics

Conversation

@cgoulart21

Copy link
Copy Markdown

Summary

  • classify intentional out-of-corpus imports_from -> ref_* edges separately
    from malformed internal endpoints
  • expose the new external_import_edges diagnostic count and explain it in the
    text report
  • add an end-to-end JavaScript regression that also keeps a genuinely dangling
    internal edge visible

Closes #2130.

Root cause

The JavaScript/TypeScript resolver deliberately namespaces unresolved external
packages as ref_* so they cannot alias onto unrelated in-corpus nodes. The
builder intentionally drops those out-of-corpus edges, but
diagnose_extraction() categorized every absent endpoint as dangling. This made
expected dependency evidence indistinguishable from corrupt internal edges.

Validation

  • pytest tests/test_multigraph_diagnostics.py tests/test_phantom_external_import.py tests/test_ts_import_require.py -q
    • 40 passed
  • ruff check graphify/diagnostics.py tests/test_multigraph_diagnostics.py
    • passed
  • pyright --pythonpath .venv/Scripts/python.exe graphify/diagnostics.py tests/test_multigraph_diagnostics.py
    • 0 errors, 0 warnings
  • public ClawSCAD reproduction
    • 29 external import edges
    • 0 dangling endpoint edges for the JavaScript/TypeScript corpus
  • full Windows suite
    • 3,501 passed, 32 skipped
    • 59 unrelated environment/platform failures (symlink privilege, POSIX path
      assumptions, sandboxed global install paths, and optional OpenAI dependency)

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.

JavaScript imports_from edges reference missing ref_* nodes

1 participant