Skip to content

fix: persist resolution failure metadata - #3724

Open
hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/3667-resolution-failure-metadata
Open

hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/3667-resolution-failure-metadata

Conversation

@hopstreax

Copy link
Copy Markdown
Contributor

Summary

Fixes #3667

Cross-file resolution failures were previously caught and logged, but the extraction artifacts gave no indication that a resolver had failed. This could leave graphs silently missing call/reference edges while appearing healthy.

This PR persists resolver failure metadata as degraded_passes and exposes it through the graph, reports, and diagnostics.

Changes

  • Record failures from language resolver registry and hand-wired cross-file resolution passes.
  • Persist degraded_passes through extraction, build, watch, and CLI flows.
  • Serialize degraded resolution metadata in graph.json.
  • Display failed resolution passes in GRAPH_REPORT.md.
  • Surface degraded passes through extraction diagnostics.
  • Preserve degraded state across partial incremental re-extractions.
  • Clear degraded state when the affected language corpus is successfully re-extracted.
  • Clear stale failures on full rebuilds.
  • Maintain backward compatibility with existing graphs.
  • Keep clean graph.json and GRAPH_REPORT.md output unchanged.
  • Normalize degraded metadata for deterministic watch/topology comparisons.

Verification

  • 16 degraded-resolution regression tests passed.
  • tests/test_build.py: 94 passed.
  • tests/test_watch.py: 234 passed, 13 skipped, 2 deselected.
  • Export/report/diagnostics/resolver suites passed.
  • git diff --check passes.
  • python -m graphify update . completed successfully.

No unrelated changes are included.

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 first-class tracking of degraded resolution passes end-to-end: extract records each pass that fails via _record_degraded_pass (capturing the pass name, error type/message, and affected file suffixes) into a degraded_passes list that flows through extract_parallel and safe_extract_with_xaml_root. Propagates degraded_passes through build, build_from_json, and the CLI extract merge, and reconciles them on incremental merges in merge_raw_extraction and build_merge — carrying forward an existing pass only when its suffixes still have surviving AST nodes and a fresh pass hasn't superseded it, then re-sorting by pass name. On export, to_json lifts degraded_passes to the top level (dropping it from the nested graph dict to avoid dual persistence) only when non-empty, and diagnose_extraction/format_diagnostic_report surface the count and per-pass detail lines.

Worth a look

  • build_from_json rejects previously ignored non-iterable degraded_passes metadatagraphify/build.py:1481 · Escalate · medium
    • agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
  • build() drops degraded metadata for later suffixes with the same passgraphify/build.py:1527 · 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 — 3926 functions depend on the 1702 functions this change touches.

Health — this change adds coupling hotspots:

  • new: extract() — 657 callers, 46 callees
  • new: _rebuild_code() — 142 callers, 54 callees
  • new: build_from_json() — 219 callers, 20 callees
  • new: build_merge() — 77 callers, 14 callees
  • new: to_obsidian() — 38 callers, 14 callees
  • new: to_json() — 62 callers, 7 callees
  • new: extract_js() — 87 callers, 4 callees
  • new: extract_files_direct() — 17 callers, 20 callees
  • …and 77 more — each is listed as a finding

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

Test selection

Test selection

211 of 290 test file(s) selected (73%) via static blast radius.

  • tests/test_affected_cli.py — impact
  • tests/test_agents_platform.py — impact
  • tests/test_analyze.py — impact
  • tests/test_astro_extraction.py — impact
  • tests/test_astro_import_ids.py — impact
  • tests/test_atomic_canvas_export.py — impact
  • tests/test_atomic_writes.py — impact
  • tests/test_benchmark.py — impact
  • tests/test_benchmark_raw_graph.py — impact
  • tests/test_build.py — impact, changed-test
  • tests/test_build_merge_dedup_scope.py — impact
  • tests/test_build_merge_hyperedges_and_prune.py — impact
  • tests/test_build_merge_shrink_guard.py — impact
  • tests/test_builtin_global_type_refs.py — impact
  • tests/test_carried_hyperedge_remap.py — impact
  • tests/test_case_sensitive_resolution.py — impact
  • tests/test_charmap_encoding.py — impact
  • tests/test_chunking.py — impact
  • tests/test_cjs_module_extension.py — impact
  • tests/test_claude_cli_backend.py — impact
  • tests/test_cli_export.py — impact
  • tests/test_cluster.py — impact
  • tests/test_codebuddy.py — impact
  • tests/test_community_labels_skill.py — impact
  • tests/test_confidence.py — impact
  • tests/test_corrupt_graph_json.py — impact
  • tests/test_cpp_nested_and_cli.py — impact
  • tests/test_cpp_objc_cross_file_calls.py — impact
  • tests/test_cross_extension_reexport_self_cycle.py — impact
  • tests/test_cross_language_call_resolution.py — impact
  • tests/test_cross_repo_external_call_guards.py — impact
  • tests/test_cross_repo_member_calls.py — impact
  • tests/test_csharp_call_site_generic_args.py — impact
  • tests/test_csharp_enum_members.py — impact
  • tests/test_csharp_field_generic_args.py — impact
  • tests/test_csharp_generic_callsites.py — impact
  • tests/test_csharp_interface_dispatch.py — impact
  • tests/test_csharp_member_calls.py — impact
  • tests/test_csharp_member_nodes.py — impact
  • tests/test_csharp_object_creation.py — impact
  • tests/test_csharp_partial_classes.py — impact
  • tests/test_csharp_type_resolution.py — impact
  • tests/test_dedup.py — impact
  • tests/test_dedup_remaps_hyperedges.py — impact
  • tests/test_definition_file_portability.py — impact
  • tests/test_detect.py — impact
  • tests/test_devin.py — impact
  • tests/test_dotnet.py — impact
  • tests/test_duplicate_annotation_edges.py — impact
  • tests/test_elixir_import_resolution.py — impact
  • … and 161 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.

· 85 more finding(s) on lines outside this diff (see the check run).

This branch has not been deployed

No deployments
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.

A crashed resolution pass leaves no trace in graph.json or GRAPH_REPORT.md — the graph is silently missing a language's call edges

1 participant