Repository navigation
Description
Summary
Two independent aperture heuristics silently exclude 33 of the sqlite crucible corpus's 73
git-tracked .sql files from being scanned at all -- they never reach prism/detector, so they
never contribute to function_data/class_data or to the tri-comparison precision/recall
measurement (found while running the tri-comparison-ledger-sweep/harden-language-extraction
skills on sqlite, PR #2511). Same underlying class of problem as #2415 (aperture silently dropping
legitimate crucible corpus content), different mechanism.
Reproduction
Corpus: language-crucible (main, sqlite category). galaxyscope data/sqlite --db-only --debug
(no manifest -> has_intent=False).
1. Aperture._check_ignore_rules's infra_path_pattern (aperture.py:107) -- correctly
left-boundary-guarded post-#2415, but the semantic list itself (gen, generated, scripts, ...)
is broad enough to catch real, hand-authored, git-tracked corpus files whose path merely contains
one of those words as a normal segment, not generated build output:
mediawiki_sqlite_tables/tables-generated.sql(28KB, 64 realCREATE TABLEstatements,
MediaWiki's official abstract-schema-generated-but-committed-and-canonical DDL) -- matches
-generated.- All 11
sqlite_cli_scripts/*.sqlfiles (SQLite's own CLI test fixtures) -- matches_scripts/
2. The content-based "Machine-Generated Source Code Signature" heuristic (separate gate, logs
ANOMALY: <file> | Blocked (Machine-Generated Source Code Signature: N LOC) /
UNPARSABLE_BYPASS: '<file>' lacks structural integrity) -- blocks all 18 files under
mediawiki_sqlite_alterpatches/ plus 2 more in mediawiki_sqlite_tables/ and
prisma_typed_sql/getBigInt.sql. These are real MediaWiki schema-change patches (e.g.
patch-archive-drop-ar_sha1.sql, CREATE TEMPORARY TABLE /*_*/__temp__archive AS SELECT ...) --
their header comment literally says "This file is automatically generated using maintenance/
generateSchemaChangeSql.php", which is presumably what trips the heuristic, but the SQL itself is
real, valid, hand-reviewed-and-committed schema-migration logic, not build/vendor debris.
Net effect: 33/73 (45%) of the sqlite corpus is invisible to the engine. The detector itself
classifies every one of these files correctly as sqlite when probed directly
(LanguageDetector.inspect()) -- the drop happens entirely at the aperture perimeter, before
prism/detector ever see the content.
Why this matters
This corpus is the ground truth docs/self_scan/tri_comparison_ledger.json's sqlite shapes are
measured against. Silently dropping 45% of it doesn't cause a wrong reading -- it caps how much of
the real precision/recall surface can ever be verified in the first place, and would equally
under-count any real user repo that happens to have "scripts"/"generated" in a legitimate SQL
schema path (both real, common naming conventions for hand-maintained SQL, not just this corpus).
Suggested scope (not investigated further -- filing to track, not blocking PR #2511)
infra_path_pattern: consider whetherhas_intent-gating alone is the right lever, or whether
the semantic list needs a narrower default for known-source extensions (.sqlamong them) the
wayexact_match_files/whitelisted_extensionsalready special-case elsewhere in aperture.py.- The "Machine-Generated Source Code Signature" gate: consider whether a file's own claim about
itself (a generator-tool comment) should be enough to exclude it outright, vs. a softer signal
combined with LOC/structure the way the neighboring gates already weight multiple factors.
Priority
Not COBOL/JCL, so standard triage -- but note it's a real recall gap affecting how much of ANY
corpus's precision/recall can be verified, not just sqlite's.
Activity
sqlite tri-comparison validation: class extraction to 100%, both ledg…
fix(#2512): sqlite corpus scanning 40/73 -> 73/73 files; function pre…
fix(core): dominant-lang, manifest-scoped scanning, git quotepath -- c…