You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Findings] Calibrate the local waste detector (C1) #83
Measure the false-positive rate of every waste detector against the benchmark corpus. Tighten, downgrade, or remove any detector with FPR > 30%.
Why
Today there is no measured false-positive rate for any waste detector (n_plus_one, unbounded_loop, polling_no_backoff, missing_cache_guard, unbatched_parallel). User trust in findings depends on calibrated precision.
Current state
src/scanner/local-waste-detector.ts produces findings; src/scanner/python-waste-detector.ts mirrors for Python; specific detectors in src/ast/waste/*. Severity is hardcoded per detector.
What to do
Take benchmark corpus (D1). Manually label every waste finding as TP or FP.
Compute FPR per detector type.
For each detector with FPR > 30%, inspect false positives. Likely categories:
"Unbounded loop": const array / Object.keys() of a literal
"Missing cache guard": cache check in a separate function called inside the loop
"Polling without backoff": single retry, not polling
"N+1": parallelized with Promise.all
Add AST guards that distinguish each.
Re-measure FPR. Iterate.
Acceptance criteria
Each detector has documented FPR in docs/accuracy/findings.md
No detector has FPR > 30%
FPR re-measured on every benchmark CI run; regressions fail the build
Documented exceptions for by-design conservative detectors
Activity
Merge pull request #106 from recost-dev/claude/c1-waste-calibration
Merge pull request #108 from recost-dev/claude/c1-pr2-cache-detector
Merge pull request #109 from recost-dev/claude/c1-pr3-batch-detector
Merge pull request #111 from recost-dev/claude/c1-pr4-rate-limit-batch