Skip to content

docs: LLM-detection coverage audit (recall clean, precision over-fire) - #4

Merged
settletop-niles merged 1 commit into
mainfrom
docs/llm-detection-audit
Aug 10, 2026
Merged

settletop-niles merged 1 commit into
mainfrom
docs/llm-detection-audit

Conversation

@settletop-niles

Copy link
Copy Markdown
Contributor

Findings from the Scope-B audit of provider/LLM detection across the corpus.

Method: real markers.scan_text vs a broad shape-based heuristic over the same bytes. v1 (persisted bodies, 7.78% coverage) was rejected as selection-biased — marker hits feed file-selection ranking, so the sample was partly chosen by the detector under test. v2 re-ran over the acquire-cache bare repos (46,170 blobs, 10.4×, pre-selection). Every candidate adjudicated against real file content, default false-positive.

Recall: 0 misses on the unbiased sample. Shape-detection measured to add noise and no recall — do not build. One real blind spot (config-driven client with no literals — the Assessor's own client.py) defeats every static scanner equally; not a vocabulary gap.

Precision: the detector over-fires — 12 of 33 fired repos are false positives, all in the ≤80-hit tail, in 7 structural classes. 5 close via path exclusion in is_scannable (same mechanism it already uses for vendored dirs). Severity is quality/efficiency, not correctness: the bespoke-agent probe already rejects provider_identifier/provider_model_id hits, so a false hit cannot misclassify.

Full taxonomy, per-class mitigations, and reproduction in the doc. No code change here — findings only; the optional precision fix is a separate task.

🤖 Generated with Claude Code

Scope-B audit of provider detection over the corpus. Runs the real
markers.scan_text and a broad shape-based heuristic over the SAME bytes.

v1 (persisted bodies, 7.78% coverage) was rejected as selection-biased —
marker hits feed file-selection ranking, so the sample was partly chosen by
the detector under test. v2 re-ran over the acquire-cache bare repos (46,170
blobs, 10.4x, pre-selection) to remove the circularity.

Recall: 0 misses on the unbiased sample; shape-detection adds noise and no
recall (do not build). One real blind spot — a fully config-driven LLM client
with no literals (the Assessor's own client.py) — defeats every string scanner
equally, so it is not a vocabulary gap.

Precision: the detector over-fires. 12 of 33 fired repos are false positives,
all in the <=80-hit tail, in 7 identifiable classes (MCP-server connect docs,
eval harnesses, test fixtures, BOM reference data, dual-use GOOGLE_API_KEY,
CI bots, editor-extension recs). 5 of 7 close via path exclusion in
is_scannable. Severity is quality/efficiency, not correctness: the bespoke
probe already rejects provider hits, so a false hit cannot misclassify.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@settletop-niles
settletop-niles merged commit b9bc632 into main Aug 10, 2026
4 checks passed
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.

1 participant