Repository navigation
Graph comparison: imports join the ledger — causes by layer, validated numbers (#3641) - #3661
Merged
Merged
Conversation
…ed numbers (#3641) - tests/tools/graph_ledger.py: the ledger plumbing, shared by call_graph_accuracy.py and import_graph_accuracy.py (shape groups, credit-geometry validated numbers, render). `merge(results, symbol_type)` refreshes one symbol type and restores the other's entries, which tri_comparison_ledger.merge_and_save would otherwise mark stale. - import_graph_accuracy --buckets / --ledger: each FP/FN gets a cause naming the layer that disagrees -- capture (`capture-missed`), resolution (`token-unresolved`, `declaration-unresolved`, `same-name-other-path`), or the truth side (`truth-names-several-files`) -- using the engine's raw import tokens (file_data.raw_imports). Raw and validated numbers printed; the --ci gate and baseline are unchanged. - Ledger: 23 import shapes, 4 validated by reading source, filed as #3660: dart conditional-import alternatives (35, capture), objective-c symlinked headers read as a second candidate (18), kotlin extension properties not indexed as declarations (17), solidity `../patched/` imports guessed onto a same-named file (24). Scala's 410 `truth-names-several-files` (wildcard and package imports) is left open for a contract ruling. - graph-comparison-history.yml also refreshes imports (pinned repos fetched like graph-accuracy-audit.yml; 45 min like it). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3641. Follows #3647, which put calls in the ledger; this puts imports into the same ledger and process.
What changes
tests/tools/graph_ledger.py: the ledger plumbing is now shared bycall_graph_accuracy.pyandimport_graph_accuracy.py(shapes, credit-geometry validated numbers, rendering).merge(results, symbol_type)refreshes one symbol type only. Otherwisetri_comparison_ledger.merge_and_savewould mark every other entry of the language stale, including the call shapes when imports run.import_graph_accuracy --buckets/--ledger: each disagreement gets a cause naming the layer that disagrees, using the engine's raw import tokens (file_data.raw_imports):capture-missed,capture-none-in-file;token-unresolved,declaration-unresolved,same-name-other-path,target-not-imported;truth-names-several-files,truth-sees-no-import-in-file.Raw and validated numbers are printed side by side. The
--cigate and baseline are unchanged.graph-comparison-history.ymlnow also refreshes imports after merge. It fetches the pinned repos the same waygraph-accuracy-audit.ymldoes, with the same 45-minute timeout. Its first run on main, for Graph comparison: reconcile calls like the tri-comparison — ledger, validated numbers, C8 (#3641) #3647, succeeded.Ledger: 23 import shapes, 4 validated by reading source
All four are GitGalaxy faults, filed as #3660:
capture-missedif (dart.library.io) 'io_client.dart'(all 35 in the repo)truth-names-several-filesinclude/SDWebImage/*.hare symlinks toCore/*.h; the resolver sees two candidates and draws no edgedeclaration-unresolvedtruth-sees-no-import-in-file../patched/…solnames a build-generated directory that isn't in the repo; the engine guesses a same-named fileLeft open: Scala's 410
truth-names-several-files. These are wildcard and package imports (import io.circe._), where the parser's answer is a whole package. That needs a contract ruling on what edge such an import should draw.With these verdicts, 9 of the 20 languages carry no
*: 7 have no disagreements at all, and Objective-C and Dart are fully validated.Verification
tests/tools/test_graph_ledger.py, new: import cause layers; the credit geometry moving validated numbers in both directions; one symbol type's merge never staling the other. With the existing tool tests, 29 pass...a.fooreadfooas a file extension). It's fixed with an explicit list of source suffixes; after re-merging, no validated entry went stale.import_graph_accuracy --ciOK (20 languages); call numbers are identical after the refactor.🤖 Generated with Claude Code
https://claude.ai/code/session_01YAtpBfGGyBGGovitSVaM5Q
Generated by Claude Code