Repository navigation
Aperture: prune ambiguous-named directories (log, classes, docs, ...) on evidence, record the reason (Closes #8708) - #8933
Conversation
…the reason (#8708) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…-ignored test (#8708) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…8708) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #8933 @ 2881015: 4 failed check(s) == shard 1 (1670027 LOC) (failure) -- real == shard 2 (1669485 LOC) (failure) -- real == shard 3 (1670389 LOC) (failure) -- real == shard 4 (1669847 LOC) (failure) -- real |
…s doom-rosetta and crucible goldens (#8708) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (528fed9) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
…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
… C call baseline after #8933 (Part of #8962) (#8970) * import-graph audit: resolve tsconfig/jsconfig `paths` aliases (Part of #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 * call-graph audit: re-bless the C baseline after #8933 scans libuv's docs/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 --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…tar lens, ignored-dir config) (Part of #8962) (#9028) #8933 changed which files a scan sees and moved two graph-accuracy baselines, but none of its files were in the audit's PR filter, so the audit never ran on it and every later PR that triggered the audit went red on main's numbers. Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #8708
What changed
IGNORED_DIRECTORIESpruned by name alone, so DPDKlib/log/and similar first-party source vanished. The ambiguous names (log,logs,classes,tmp,temp,docs,site,legal,license,licenses) are now pruned on evidence:aperture.is_noise_directorydoes a bounded walk and keeps the directory when any file under it is source (registered code extension, not markup/.log, or a build manifest). A pruned directory is recorded with the reasonignored directory: <name>(by-name members likenode_modulesget the same reason string).gitgalaxy/standards/gitgalaxy_config.py: names removed from the by-name set, pointer toEVIDENCE_DIRECTORY_NAMES.gitgalaxy/core/aperture.py:EVIDENCE_DIRECTORY_NAMES,is_noise_directory,_ignore_verdict(reason-bearing);_check_ignore_rulesis a bool wrapper.gitgalaxy/core/guidestar_lens.py: its directory walk uses the same evidence prune.tests/core_engine/test_ambiguous_ignored_dirs_8708.py: 49 tests, incl.lib/log/log.cscanned andvar/log/app.logskipped and recorded.tests/cobol_mainframe/test_mainframe_corpus.py: one-word fix, it usedtmpas its "ignored by name" example; nownode_modules.Decisions:
docsis evidence-based (scanned when it holds examples/source, pruned when markup only).targetstays pruned by name (Maven/Cargo output; sphinx-style fixtures are not product code).Golden / baseline drift
Crucible: 13 differences per leg, all relabelings of exclusion reasons (
unparsable_filescomposition, excluded-artifacts queue, gpu/llm snapshots). No file moved in or out of scope.tests/ast_accuracy_baseline.jsonregenerated (+2 files, +10 real functions:docs/*.pyin the pinned corpus is now scanned; 0 extras, no regression).docs_read_by_tests.txtregenerated.Cross-repo
None.
Class / Sibling gaps
Class: directory names pruned by name though real source uses them. Members fixed here: log, logs, classes, tmp, temp, docs, site, legal, license(s). Not changed:
build,dist,obj,out(not evidenced in the 15 repos checked),target(decided above).chronometer.pycompares ignored names case-sensitively (left as is; see Remaining slices).vault_sentinelandbinary_anomaly_detectorinherit the fix through_check_ignore_rules. Guidestar anchor discovery now also reads README-style anchors insidedocs/directories that hold source.Lessons for agents
.logis a registered plaintext extension: "has a registered extension" is not "is source"; exclude doc/log extensions explicitly.node_modules), not an ambiguous name.IGNORED_DIRECTORIESmovesast_accuracy_baseline.jsonanddocs_read_by_tests.txt; regenerate both.Fix round
Merged main.
doom-rosettagoldens (tests/golden_doom_rosetta, regenerated) drifted: (a) a bug of mine, files in the ignored set (.gitignore,LICENSE) were labelledignored directory: <file>; they now keep the generic reason (aperture.py); (b) intended scope changes:site/,docs/trees holding source are now scanned (e.g. edge-classicweb/site/webplayer.py, sdl-doomdocs/legacy_doc/*incl. a.asmthat makes the directory source-bearing, so its plaintext siblings come in too). Crucible goldens re-blessed again.Remaining slices
gitgalaxy/metrics/chronometer.pyfallback walk (no-git-history path) used to prune these names by name; it now simply no longer prunes them (more walking, no scope change, goldens unchanged). Apply the same evidence prune there in a follow-up to restore the saving.Facts checked: end-to-end scan of a temp repo gave
lib/log/log.cinfile_data,rte_loginfunction_data,var/log/app.log|Blocked (ignored directory: log)inexcluded_artifacts;audit_check,pr_gates --ratchets(9/9) andpr_gates --fast(only the CI-version-skew warnings remain) pass.🤖 Generated with Claude Code