feat(wave3): inlineParallelCapable detection threading + capability badge (#127, #128) - #131
Conversation
…ey, intelligence graph (#127) Follow-up to PR #126 (#116). The inlineParallelCapable fingerprint flag was wired through the AST detector + core-scanner but not the detection-layer consumers that already handle batchCapable. Each gap parallels an existing batchCapable site: - Regex pattern path: openai-compatible.ts now emits reg?.inlineParallelCapable (registry-only, no hint-regex fallback); local-waste-detector.ts gains an inline-parallel finding producing the n/count suggestion on the regex-only (RECOST_DISABLE_AST=1) path, using a distinct inline_parallel id so it never collapses with a batch finding. - Pattern dedup key: patterns/utils.ts includes inlineParallelCapable so distinct match shapes aren't collapsed. - Intelligence graph: ApiCallNode + builder.ts coerce the flag so AI-review context distinguishes batch from inline-parallel shapes. Also reconciles PROGRESS.md: Waves 5 (#118/#119) and 1 (#84/#85/#112) marked shipped; remaining accuracy work is Wave 2 -> 4. Tests: scanner-patterns (emit + absence), local-waste-detector (regex-only fanout finding), builder (coercion true/false). Full test:scanner green, build:ext clean, benchmark Δ +0.00pp on all 5 metrics.
…badge (#128) Follow-up to PR #126 (#116). The inlineParallelCapable flag was absent from the UI layer, so since #116 reclassified images.generate off batchCapable, DALL·E endpoints lost their old "batch" chip and showed no capability indicator. This restores a correct one. - EndpointRecord in dashboard/src/lib/types.ts + webview/src/types.ts now carry inlineParallelCapable (parallels batchCapable). - Endpoints.tsx pushes an "inline-parallel" capability chip when the flag is set. - scan-results.ts populates endpoint.inlineParallelCapable at all three endpoint-construction sites (aggregate, fresh, synthetic) so the webview badge has data — mirrors the existing batchCapable mapping. Note: the web dashboard reads endpoints from the API, whose schema has no inline_parallel column yet, so the dashboard chip only lights up once an API migration persists/serves the field. The VS Code webview badge works now. Build: build:webview + build:ext clean; test:scanner green (typechecks scan-results.ts). Dashboard deps not installed in this env — change is an additive optional field + conditional chip (type-safe by construction).
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR implements two follow-up issues ( ChangesinlineParallelCapable capability signal
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/scanner/local-waste-detector.ts`:
- Around line 319-330: The deduplication logic in dedupeFindings currently
builds keys from `${finding.type}:${finding.affectedFile}:${finding.line ?? 0}`,
which collapses distinct detector results (e.g., local-inline_parallel-…) that
intentionally set unique finding.id; update dedupeFindings to key on
`finding.id` (with a fallback to the old
`${finding.type}:${finding.affectedFile}:${finding.line ?? 0}` key if
`finding.id` is missing) so detector-specific ids (like
`local-inline_parallel-…`, `local-batch-…`, `local-cache-…`) are respected while
preserving behavior for any findings that lack an id.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9a876c0a-0f60-4737-87ae-5e0477b8cf8c
📒 Files selected for processing (14)
dashboard/src/lib/types.tsdashboard/src/pages/Endpoints.tsxdocs/superpowers/plans/PROGRESS.mdsrc/intelligence/__tests__/builder.test.tssrc/intelligence/builder.tssrc/intelligence/types.tssrc/scan-results.tssrc/scanner/local-waste-detector.tssrc/scanner/patterns/openai-compatible.tssrc/scanner/patterns/types.tssrc/scanner/patterns/utils.tssrc/test/local-waste-detector.test.tssrc/test/scanner-patterns.test.tswebview/src/types.ts
# Conflicts: # docs/superpowers/plans/PROGRESS.md # src/test/local-waste-detector.test.ts
dedupeFindings keyed on `type:file:line`, which would collapse two distinct detectors that share a SuggestionType at the same site — specifically the new inline-parallel finding (type "batch", id `local-inline_parallel-…`) and a batch finding (id `local-batch-…`). Key on the detector-specific `finding.id` instead, falling back to type:file:line when absent, so genuine duplicates still collapse while distinct detectors are preserved. No registry method is currently both batchCapable and inlineParallelCapable, so this is defensive; benchmark Δ +0.00pp.
|
Addressed in 057d66a. Confirmed: Note: no fingerprint is currently both |
Closes #127, closes #128. Wave 3 follow-ups from PR #126 (#116).
#127 — thread
inlineParallelCapablethrough the detection layerThe flag was wired through the AST detector +
core-scannerin #116 but not the detection-layer consumers that already handlebatchCapable. Each gap parallels an existingbatchCapablesite:openai-compatible.tsnow emitsreg?.inlineParallelCapable(registry-only; no hint-regex fallback, since there's no reliable lexical hint).local-waste-detector.tsgains an inline-parallel finding that produces the n/count suggestion on the regex-only (RECOST_DISABLE_AST=1) path, using a distinctinline_parallelid so it never collapses with a batch finding.patterns/utils.tsincludesinlineParallelCapableso distinct match shapes aren't collapsed.ApiCallNode(intelligence/types.ts) +builder.tscoerce the flag so AI-review context can distinguish batch from inline-parallel shapes.#128 — surface
inlineParallelCapableas a capability badgeSince #116 reclassified
images.generateoffbatchCapable, DALL·E endpoints lost their old "batch" chip and showed nothing. This restores a correct indicator.EndpointRecordindashboard/src/lib/types.ts+webview/src/types.tsnow carryinlineParallelCapable.Endpoints.tsxpushes aninline-parallelcapability chip when the flag is set.scan-results.tspopulatesendpoint.inlineParallelCapableat all three endpoint-construction sites (aggregate, fresh, synthetic) so the webview badge has data.Caveat: the web dashboard reads endpoints from the API, whose schema has no
inline_parallelcolumn yet — the dashboard chip only lights up once an API migration persists/serves the field. The VS Code webview badge works now.Tests / gates
scanner-patterns(emit present / absent),local-waste-detector(regex-only fanout finding),builder(coercion true/false).test:scannergreen;build(webview + ext) clean.Also reconciles
PROGRESS.md: Waves 5 (#118/#119) and 1 (#84/#85/#112) marked shipped.Summary by CodeRabbit
New Features
Bug Fixes / Behavior
Tests
Documentation