Commit 0609bce
feat(analyzer): apply DetectorEmissionDefaults after every detect() call
Wires the orchestrator stamping pass into all three detect() call sites
in Analyzer.java (the main pipeline, the cache-aware runBatchedIndex
path, and the regex-fallback path). Every emission whose source is null
now gets stamped with:
- source = detector.getClass().getSimpleName()
- confidence = detector.defaultConfidence() (LEXICAL for regex bases,
SYNTACTIC for AST/structured bases)
Detectors that stamp explicitly (e.g. setConfidence(RESOLVED) once a
detector migrates to ctx.resolved()) are left alone — applyDefaults
keys off source==null.
Deferred from this commit (will land with Phase 5 detector migration):
- ResolverRegistry.bootstrap(repoPath) call at the start of run() —
pointless without detectors that consume ctx.resolved()
- Per-file ctx = ctx.withResolved(resolver.resolve(file, ast)) — same
This commit is purely additive: 2417 tests in analyzer + cli + detector
packages all pass, no regressions. The full 3555-test suite is green
post-stamping, confirming existing detector behavior is unchanged
(detectors don't stamp confidence/source today, so the stamping floor
applies uniformly).
IndexCommand also benefits transparently — it calls
analyzer.runSmartIndex() which routes through one of the wired detect
sites.
Per sub-project 1 plan Tasks 19-20 (stamping portion).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c83167b commit 0609bce
1 file changed
Lines changed: 8 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
1311 | 1312 | | |
1312 | 1313 | | |
1313 | 1314 | | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1314 | 1318 | | |
1315 | 1319 | | |
1316 | 1320 | | |
| |||
1514 | 1518 | | |
1515 | 1519 | | |
1516 | 1520 | | |
| 1521 | + | |
| 1522 | + | |
1517 | 1523 | | |
1518 | 1524 | | |
1519 | 1525 | | |
| |||
1601 | 1607 | | |
1602 | 1608 | | |
1603 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
1604 | 1612 | | |
1605 | 1613 | | |
1606 | 1614 | | |
| |||
0 commit comments