Repository navigation
graph-accuracy audit: resolve tsconfig paths aliases and re-bless the C call baseline after #8933 (Part of #8962) - #8970
Merged
Conversation
…#8962) #8933 stopped pruning directories such as docs/ without evidence, so the audit's pinned zod now scans packages/docs, zod's Next.js docs app. Its imports use `@/components/tabs` through tsconfig `"@/*": ["./*"]`. The engine's edges to those files are correct, but the audit's TypeScript rule said tsconfig aliases are "not scored", so it counted 32 correct edges as false positives and typescript import precision fell 100.0 -> 96.3 (the gate red on every PR since 5:51 PM ET 11-21). The parser side now reads the nearest tsconfig.json / jsconfig.json: compilerOptions.paths, relative to baseUrl or the config's directory, comments and trailing commas allowed, a child's `paths` replacing its relative `extends` parent's, an exact key beating a wildcard and the longest prefix winning. A mapping that names nothing in the repo (a generated target) stays unscored, like any external import. Measured on the pinned zod: before 96.3% precision / 100.0% recall (36 FP); after 99.6% / 99.8% (4 FP, 2 FN), gate OK. The two false negatives are alias imports the audit can now see and the engine misses. Three tests: alias resolution with an exact key and a generated target, baseUrl + extends + comments + longest prefix, and a config without paths. This does NOT address the separate C call-recall dip (55.3 -> 54.6) in the same window. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV
…ocs/code (Part of #8962) #8933 no longer prunes docs/ without evidence, so the audit's pinned libuv now scans docs/code/*.c, the example programs of its documentation (370 -> 455 files, 3,281 -> 3,399 functions; hiredis is unchanged). Measured with libclang 18.1.1 on the pinned corpus: before #8933 the gate read resolution recall 55.2 (OK); at #8933 it reads 54.6 (REGRESSION vs the 55.3 baseline). Regenerated with tests/tools/call_graph_resolution.py c --regenerate; four fields move: confident_judged 6756 -> 6875, confident_unmapped 310 -> 313, recall_pct 50.8 -> 51.7, resolution_recall_pct 55.3 -> 54.6. Precision is unchanged at 100%. The example programs call libuv's public API from main(), so more of the judged calls are ones the engine resolves to a callee outside the file, which is why resolution recall dips while call recall rises. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV
squid-protocol
marked this pull request as ready for review
November 22, 2026 12:12
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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 #8962 (the
graph-accuracy-audithas been red on every PR since #8933 merged, 5:51 PM ET 11-21). Both regressions bisect to #8933.Cause
#8933 stopped pruning directories such as
docs/without evidence. The audit's pinned corpora now scan code they used to skip:packages/docs/(a Next.js app), +100 files.docs/code/*.c(the documentation's example programs), 370 -> 455 files, 3,281 -> 3,399 functions. hiredis is unchanged.Fix 1: the TypeScript import audit (
import-graph-2, precision 100.0 -> 96.3)The docs app imports
@/components/tabsthrough zod'stsconfig.json("@/*": ["./*"]). The engine's edges to those files are correct; the audit's parser said tsconfig aliases are "not scored", so it counted 32 correct edges as false positives. The parser now reads the nearesttsconfig.json/jsconfig.jsoncompilerOptions.pathsby the compiler's rules (relative tobaseUrlor the config, comments and trailing commas allowed, a child'spathsreplace itsextendsparent's, exact key beats wildcard, longest prefix wins; a mapping that names nothing in the repo stays unscored). Three tests.Measured on the pinned zod: before 96.3% precision / 100.0% recall (36 FP); after 99.6% / 99.8% (4 FP, 2 FN), gate OK. The 2 FN are alias imports the audit can now see and the engine misses.
Fix 2: the C call audit (
call-c, resolution recall 55.3 -> 54.6), a re-blessMeasured locally with libclang 18.1.1 on the pinned corpus: 55.2 (OK) just before #8933, 54.6 (REGRESSION) at #8933.
tests/call_graph_resolution_c_baseline.jsonregenerated with the repo's tool; four fields move:confident_judged6756 -> 6875,confident_unmapped310 -> 313,recall_pct50.8 -> 51.7 (up),resolution_recall_pct55.3 -> 54.6. Precision unchanged at 100%. The mechanism is a hypothesis, not measured: the example programs call libuv's API frommain(), which may explain why call recall rises while resolution recall dips. Whether scanningdocs/codeis the better behaviour is the owner of #8933's call; this PR takes the new behaviour as given and makes the audit measure it honestly.Not in this PR
No engine change.
graph-accuracy-auditalso runs on this PR's own head, so it is the proof.🤖 Generated with Claude Code
https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV