Skip to content

fix: surface unclassified files on the rebuild path and in GRAPH_REPORT.md - #3521

Open
ahpxna wants to merge 1 commit into
Graphify-Labs:v8from
ahpxna:fix/surface-unclassified-on-rebuild
Open

ahpxna wants to merge 1 commit into
Graphify-Labs:v8from
ahpxna:fix/surface-unclassified-on-rebuild

Conversation

@ahpxna

@ahpxna ahpxna commented Sep 12, 2026

Copy link
Copy Markdown

Closes #3511.

What was wrong

#1692 made unclassified files visible — but only on the extract path, in
cli.py. The rebuild path used by graphify update, graphify watch and the
git hook never read detected["unclassified"], and the detection dict that
path synthesizes for the report (watch.py, the total_files/total_words
literal) dropped the key entirely.

So a corpus that is mostly an unsupported language rebuilt in silence, and the
report described only the classified half.

On leanprover-community/batteries @ 3b4ce082 — 260 .lean files — before:

$ graphify update .
[graphify watch] Rebuilt: 18 nodes, 13 edges, 7 communities
Code graph updated.
## Corpus Check
- 11 files · ~7,795 words
- Verdict: corpus is large enough that graph structure adds value.

Exit 0. The 18 nodes are 4 shell scripts and 2 READMEs. The verdict is about
those four shell scripts.

After:

[graphify watch] 268 file(s) not classified (no supported extension or shebang), skipped: .lean 260, (no extension) 4, .toml 3
[graphify watch] Rebuilt: 18 nodes, 13 edges, 7 communities
## Corpus Check
- 11 files · ~7,795 words
- Verdict: corpus is large enough that graph structure adds value.
- Unclassified: 268 file(s) skipped - no supported extension or shebang (top: .lean 260, (no extension) 4, .toml 3)

The change

Three additions, 33 lines, no deletions, no behaviour change to the graph:

  • watch.py — print the count on the rebuild path, same message shape as the
    extract path so the two agree.
  • watch.py — carry unclassified into the detection dict handed to
    report.generate.
  • report.py — name them in Corpus Check when the list is non-empty.

Not language-specific: any unsupported extension surfaces, .lean is just what
made it visible.

Tests

Three added. The two behavioural ones fail on v8 without the fix:

FAILED tests/test_report.py::test_report_names_unclassified_files
FAILED tests/test_watch.py::test_rebuild_surfaces_unclassified_files

test_report_silent_when_nothing_unclassified passes either way by design — it
is the regression guard that keeps the line off reports that have nothing to
report.

Full suite, same machine, same env, with and without the patch:

failed passed
v8 baseline 31 5,193
with this patch 31 5,196

The failing set is byte-identical between the two runs (diff of the sorted
FAILED lines is empty), so this patch adds no failures; +3 passed is exactly
the three new tests. The 31 pre-existing failures are all environment, not code:
test_skillgen (11) needs the full history that CI fetches with
fetch-depth: 0 and my clone is --depth 1; test_security (7) and
test_ollama_retry_cap (4) need network; test_terraform (7) and
test_languages (1) need grammars outside the extras I installed;
test_install_references (1). ruff check --config pyproject.toml is clean on
all four changed files.

Deliberately not in this PR

  • total_files in the rebuild path. watch.py sets it to len(code_files),
    which is why Corpus Check says 11 files while detect() reports
    total_files: 22 for the same scan. That looks wrong too, but fixing it
    changes an existing reported number, so it belongs in its own PR with its own
    discussion.
  • A graph.json field. export.to_json does not receive the detect result,
    so adding one means threading a new parameter through the call chain. Happy to
    do it if you want it; kept out here to keep the diff reviewable.
  • Lean support. Separate question, raised in detect() already tracks unclassified files; nothing surfaces them, so a 260-file Lean 4 repo reports as a successful run #3511; no tree-sitter grammar
    exists for it, so it would not follow the ARCHITECTURE.md extractor pattern.

@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.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. 2 change(s) tested, no difference found (not proven).


Graphify review — findings

Surfaces unclassified files on the rebuild path used by graphify update, graphify watch, and the git hook: _rebuild_code now prints a count and top-extension breakdown of files the scan couldn't classify (no supported extension or shebang), matching the message the extract path already emits. Carries the unclassified list into the synthesized detection dict so generate names those files in the Corpus Check report instead of computing its verdict against only the classified half.

No blocking issues surfaced. 3 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 643 functions depend on the 436 functions this change touches.

Health — this change adds coupling hotspots:

  • new: _rebuild_code() — 116 callers, 51 callees
  • new: dispatch_command() — 2 callers, 124 callees
  • new: generate() — 34 callers, 7 callees
  • new: run_pipeline() — 8 callers, 13 callees
  • new: make_inputs() — 16 callers, 5 callees
  • new: watch() — 5 callers, 7 callees
  • new: _reconcile_graph_html() — 6 callers, 5 callees
  • new: load_learning_for_report() — 4 callers, 3 callees
  • …and 5 more — each is listed as a finding

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

Test selection

Test selection

9 of 268 test file(s) selected (3%) via static blast radius.

  • tests/test_confidence.py — impact
  • tests/test_hypergraph.py — impact
  • tests/test_labeling.py — impact
  • tests/test_pipeline.py — impact
  • tests/test_report.py — impact, changed-test
  • tests/test_report_gap_thresholds.py — impact
  • tests/test_semantic_similarity.py — impact
  • tests/test_watch.py — impact, changed-test
  • tests/test_watch_manifest_location.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.

Formal verification

Could not verify: Could not verify build.

The verifier did not have enough to check build, 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: not verifiable: all 9 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly AttributeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify build\_merge.

The verifier did not have enough to check build\_merge, 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 `graph_path` is annotated `str | Path | None` — outside the synthesizable primitive/collection set

No difference found (not proven): No behavior difference found in \_flush\_stat\_index (not a proof).

The verifier ran both versions of \_flush\_stat\_index on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

Could not verify: Could not verify save\_cached.

The verifier did not have enough to check save\_cached, 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

Could not verify: Could not verify dispatch\_command.

The verifier did not have enough to check dispatch\_command, 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: not verifiable: all 23 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)

No difference found (not proven): No behavior difference found in \_native\_leiden (not a proof).

The verifier ran both versions of \_native\_leiden on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

Could not verify: Could not verify deduplicate\_entities.

The verifier did not have enough to check deduplicate\_entities, 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: not verifiable: all 9 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly TypeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify \_llm\_tiebreak.

The verifier did not have enough to check \_llm\_tiebreak, 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: not verifiable: all 200 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly TypeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify detect.

The verifier did not have enough to check detect, 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 `root` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify to\_graphml.

The verifier did not have enough to check to\_graphml, 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: not verifiable: all 200 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly TypeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify extract.

The verifier did not have enough to check extract, 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 `cache_root` is annotated `Path | None` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_extract\_parallel.

The verifier did not have enough to check \_extract\_parallel, 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 `root` is annotated `Path` — outside the synthesizable primitive/collection set

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

Could not verify: Could not verify \_apply\_symbol\_resolution\_facts.

The verifier did not have enough to check \_apply\_symbol\_resolution\_facts, 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 `root` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_collect\_js\_symbol\_resolution\_facts.

The verifier did not have enough to check \_collect\_js\_symbol\_resolution\_facts, 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 `facts` is annotated `_SymbolResolutionFacts` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_collect\_python\_symbol\_resolution\_facts.

The verifier did not have enough to check \_collect\_python\_symbol\_resolution\_facts, 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 `root` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_contained\_in\_package.

The verifier did not have enough to check \_contained\_in\_package, 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 `resolved` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_find\_js\_config.

The verifier did not have enough to check \_find\_js\_config, 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 `start_dir` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_find\_js\_project\_anchor.

The verifier did not have enough to check \_find\_js\_project\_anchor, 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 `start_dir` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_find\_workspace\_root.

The verifier did not have enough to check \_find\_workspace\_root, 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 `start_dir` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_go\_import\_path\_for\_file.

The verifier did not have enough to check \_go\_import\_path\_for\_file, 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 `source_file` is annotated `str | Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_js\_source\_path.

The verifier did not have enough to check \_js\_source\_path, 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 `root` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_js\_top\_level\_function\_bodies.

The verifier did not have enough to check \_js\_top\_level\_function\_bodies, 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

Could not verify: Could not verify \_load\_package\_imports.

The verifier did not have enough to check \_load\_package\_imports, 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 `start_dir` is annotated `Path` — outside the synthesizable primitive/collection set

Could not verify: Could not verify \_package\_entry\_candidates.

The verifier did not have enough to check \_package\_entry\_candidates, 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 `package_dir` is annotated `Path` — outside the synthesizable primitive/collection set

· 13 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.

detect() already tracks unclassified files; nothing surfaces them, so a 260-file Lean 4 repo reports as a successful run

1 participant