Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
844f501
fix(ast): track \`export const x = new Sdk()\` by unwrapping export_s…
AndresL230 May 14, 2026
39ee4d0
fix(scanner): wire cross-file resolution into scanFiles() so all cons…
AndresL230 May 14, 2026
950fe31
fix(scanner): preserve AST-failure text-fallback path for both JS/TS …
AndresL230 May 14, 2026
deb3730
test(a3): bootstrap barrel-direct baseline + a3 test file with 5 audi…
AndresL230 May 14, 2026
db96130
test(a3): empirical audit of 5 re-export shapes (passing: nested, mis…
AndresL230 May 14, 2026
06f377e
fix(a3): capture export aliases (\`export { x as y }\`) in barrel res…
AndresL230 May 14, 2026
744ee6c
fix(a3): detect \`export *\` wildcard re-exports in cross-file resolver
AndresL230 May 14, 2026
3617d2c
fix(a3): support \`export { default } from\` re-exports
AndresL230 May 14, 2026
460916e
fix(concurrency): suppress concurrency_control on batch-capable metho…
AndresL230 May 14, 2026
911bec9
docs(a3): record landed re-export shapes + perf measurement on 1000-f…
AndresL230 May 14, 2026
b065281
test(a5): bootstrap a5 test file with 3 audit markers
AndresL230 May 14, 2026
47608bd
test(a5): empirical audit of 3 patterns (passing: bind; failing: fact…
AndresL230 May 14, 2026
53c4191
fix(a5): factory return inference for \`return new X()\` (in-file + c…
AndresL230 May 14, 2026
7021ed8
fix(a5): resolve typed constructor params for \`this.<field>\` access…
AndresL230 May 14, 2026
593776d
test(a5): regression check for simple new X() pattern
AndresL230 May 14, 2026
6fa1a45
docs(a5): record landed patterns + benchmark deltas; commit A3/A5 plan
AndresL230 May 14, 2026
4b14322
fix(a3): resolve named re-exports after wildcard in same barrel; drop…
AndresL230 May 14, 2026
d1e33a8
fix(a5): detectFactoryReturnPackage must not descend into nested func…
AndresL230 May 14, 2026
95138c9
chore(a3/a5): coderabbit cleanups — tighten BOUNDED_REPLICATION regex…
AndresL230 May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/accuracy/detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ import { client } from "../lib/clients"; // ← scanner must reach openai.ts
- `src/ast/cross-file-resolver.ts`
- New fixtures under `src/test/fixtures/barrels/`

### Status (2026-05-14)
Implemented on branch `claude/a3-a5-resolver-recall`. Fixtures live under `src/test/fixtures/a3-a5/barrel-*`; behavioral coverage in `src/test/a3-barrel-reexports.test.ts`. Resolved shapes: direct (`export { x } from`), aliased (`export { x as y } from`), wildcard (`export * from`), nested barrels (2+ levels, depth-capped), and `export { default } from`. Missing-symbol re-exports fail gracefully (no throw). Perf: synthetic 1001-file barrel chain scanned in ~0.3s — well under the 30s ceiling.

---

## A4. AST ↔ regex parity audit
Expand Down Expand Up @@ -217,6 +220,14 @@ The first pattern (`.bind`) is almost certainly missed today. The factory patter
- [ ] No regression on simple `const ai = new OpenAI()` cases.
- [ ] Each new tracked pattern has a fixture + test.

### Status (2026-05-14)
Implemented on branch `claude/a3-a5-resolver-recall`. Fixtures under `src/test/fixtures/a5/`; coverage in `src/test/a5-factory-di-aliased.test.ts`. Landed:
- `.bind()`-aliased method refs — already resolved by the existing scanner (audit confirms the member-access inside `.bind()` is detected).
- Factory return inference — `function makeClient(): X { return new X(); }` plus `const c = makeClient()` is tracked both in-file (per-file `factoryReturnMap` populates `varMap`) and cross-file (post-fixpoint pass synthesises matches for callers in other files).
- DI typed constructor params — `constructor(private readonly ai: OpenAI)` now populates a `thisFieldMap` so `this.ai.<chain>` resolves to the param's declared SDK type.
- Regression test confirms simple `const c = new X()` still resolves.
- Benchmark gate: detection recall +2.94pp, detection precision −0.91pp (within 1pp tolerance); finding precision/recall unchanged.

### Files
- `src/ast/import-resolver.ts`
- `src/ast/call-visitor.ts`
Expand Down
1,147 changes: 1,147 additions & 0 deletions docs/superpowers/plans/2026-05-14-a3-a5-resolver-recall.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"build:webview": "cd webview && npm run build",
"build:dashboard": "cd dashboard && npm run build && rm -rf ../dashboard-dist && cp -r dist ../dashboard-dist",
"test": "npm run test:scanner",
"test:scanner": "tsc -p tsconfig.scanner-tests.json && tsc -p tsconfig.benchmark.json && node dist-test/test/scanner-patterns.test.js && node dist-test/test/workspace-scanner.test.js && node dist-test/test/workspace-file-access.test.js && node dist-test/test/endpoint-classification.test.js && node dist-test/test/local-waste-detector.test.js && node dist-test/test/chat-providers.test.js && node dist-test/test/fingerprint-registry.test.js && node dist-test/test/pricing-sync.test.js && node dist-test/test/ast-parser-loader.test.js && node dist-test/test/ast-call-visitor.test.js && node dist-test/test/ast-import-resolver.test.js && node dist-test/test/ast-scanner.test.js && node dist-test/test/ast-python.test.js && node dist-test/test/ast-frequency-analyzer.test.js && node dist-test/test/ast-cache-detector.test.js && node dist-test/test/ast-batch-detector.test.js && node dist-test/test/ast-concurrency-detector.test.js && node dist-test/test/ast-cross-file-resolver.test.js && node dist-test/test/a1-multi-hop-wrappers.test.js && node dist-test/intelligence/__tests__/builder.test.js && node dist-test/intelligence/__tests__/clusters.test.js && node dist-test/intelligence/__tests__/compression.test.js && node dist-test/intelligence/__tests__/export.test.js && node dist-test/test/api-client.test.js && node dist-test/test/key-management.test.js && node dist-test/test/ast-parser-loader-fallback.test.js && node dist-test/intelligence/__tests__/cost-utils.test.js && node dist-test/test/intelligence-compression-async.test.js && node dist-test/test/webview-provider-dispatch.test.js && node dist-test/test/extension-activation.test.js && node dist-test/test/source-span.test.js && node dist-test/test/url-template.test.js && node dist-test/test/enclosing-function.test.js && node dist-test/test/endpoint-id.test.js && node dist-test/test/parity.test.js && node dist-test/test/a6-object-literal-fps.test.js && node dist-test/test/a2-const-fold.test.js && node dist-test/test/a7-url-path-fallback.test.js && node dist-test/test/c1-pr2-cache-tightening.test.js && node dist-test/test/c1-pr3-batch-tightening.test.js && node dist-test/src/test/benchmark-schema.test.js && node dist-test/src/test/benchmark-metrics.test.js",
"test:scanner": "tsc -p tsconfig.scanner-tests.json && tsc -p tsconfig.benchmark.json && node dist-test/test/scanner-patterns.test.js && node dist-test/test/workspace-scanner.test.js && node dist-test/test/workspace-file-access.test.js && node dist-test/test/endpoint-classification.test.js && node dist-test/test/local-waste-detector.test.js && node dist-test/test/chat-providers.test.js && node dist-test/test/fingerprint-registry.test.js && node dist-test/test/pricing-sync.test.js && node dist-test/test/ast-parser-loader.test.js && node dist-test/test/ast-call-visitor.test.js && node dist-test/test/ast-import-resolver.test.js && node dist-test/test/ast-scanner.test.js && node dist-test/test/ast-python.test.js && node dist-test/test/ast-frequency-analyzer.test.js && node dist-test/test/ast-cache-detector.test.js && node dist-test/test/ast-batch-detector.test.js && node dist-test/test/ast-concurrency-detector.test.js && node dist-test/test/ast-cross-file-resolver.test.js && node dist-test/test/a1-multi-hop-wrappers.test.js && node dist-test/intelligence/__tests__/builder.test.js && node dist-test/intelligence/__tests__/clusters.test.js && node dist-test/intelligence/__tests__/compression.test.js && node dist-test/intelligence/__tests__/export.test.js && node dist-test/test/api-client.test.js && node dist-test/test/key-management.test.js && node dist-test/test/ast-parser-loader-fallback.test.js && node dist-test/intelligence/__tests__/cost-utils.test.js && node dist-test/test/intelligence-compression-async.test.js && node dist-test/test/webview-provider-dispatch.test.js && node dist-test/test/extension-activation.test.js && node dist-test/test/source-span.test.js && node dist-test/test/url-template.test.js && node dist-test/test/enclosing-function.test.js && node dist-test/test/endpoint-id.test.js && node dist-test/test/parity.test.js && node dist-test/test/a6-object-literal-fps.test.js && node dist-test/test/a2-const-fold.test.js && node dist-test/test/a7-url-path-fallback.test.js && node dist-test/test/c1-pr2-cache-tightening.test.js && node dist-test/test/c1-pr3-batch-tightening.test.js && node dist-test/src/test/benchmark-schema.test.js && node dist-test/src/test/benchmark-metrics.test.js && node dist-test/test/pre-a-scanfiles-resolution.test.js && node dist-test/test/pre-b-export-const-tracking.test.js && node dist-test/test/a3-barrel-reexports.test.js && node dist-test/test/a5-factory-di-aliased.test.js",
"calibrate-detectors": "tsc -p tsconfig.scanner-tests.json && node dist-test/test/waste-calibration.js",
"watch:ext": "node esbuild.mjs --watch",
"watch:webview": "cd webview && npm run build -- --watch",
Expand Down
Loading
Loading