release: v1.0.2 — review-batch bug fixes#33
Conversation
…an rejection paths Three review rounds turned up these: - Concurrent-restart race in extension.ts where startClient read the module-level `client` after awaiting startup; a parallel stopClient could clear it before the post-start wiring ran. Captures the client in a local and checks identity after the await. - whatsNew lexicographic prerelease compare misranked rc.10 < rc.2 (so a user on rc.2 would miss the rc.10 upgrade toast). Replaced with semver §11.4 per-identifier compare (numeric segments compare numerically, longer set wins on tie). - providers.ts `**` glob emitted `.*` and crossed segment boundaries — `**/Dockerfile` would match `myDockerfile`. `**/` now translates to `(?:.*/)?`. - scanOnSave propagated scan rejections as unhandled promise rejections (onDidSaveTextDocument is fire-and-forget). Added optional `onError` hook wired to clientLog. - scanWorkspace command rejection now goes through a `runScanCommand` wrapper that logs and shows a Pipeline-Check-branded toast instead of VS Code's generic "Command failed". Housekeeping: - log.setLogChannel signature widened to accept `undefined` (drops the `as unknown as OutputChannel` test cast). - manifest.test.ts welcome-link regex now captures dotted command IDs. - workspaceScan and navigate test names/coverage updated to match what they actually test, with new sibling tests for the propagation paths (findScannableFiles rejection, two-finding strict-advance). - Test stub reset consistency in codeLens / findingsView (full resetStubState in beforeEach). - codeql.yml cleanup — drops template scaffolding, keeps the same three languages and the pinned action SHAs. - Two void-prefix consistency fixes on showInformationMessage in extension.ts. Unit tests: 245 → 254 (+9). Typecheck and lint clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Bug-fix batch on top of v1.0.1 — five real defects plus housekeeping covered by 9 new unit tests (245 → 254). See CHANGELOG for the detailed entry; the source changes themselves landed earlier in this branch. Also bumps package-lock.json's top-level "version" to match package.json (had drifted at 1.0.0 since the v1.0.1 cut). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Three review rounds against the working tree turned up five real bugs and a handful of housekeeping items. All under one PR per request.
Bugs
extension.ts.startClientreferenced the module-levelclientafterawait startWithTimeout; a parallelstopClientcould clear or swap the slot, causingclient.onDidChangeStateto throwTypeError. Now captures the client in a local and verifies identity after the await.whatsNewlexicographic prerelease compare misranksrc.10belowrc.2(so an rc.2 user would miss the rc.10 upgrade toast — the exact scenario the existing comment inwhatsNew.ts:24-29says is "the worst possible time to skip it"). Replaced with semver §11.4 per-identifier compare.providers.ts**glob crosses segment boundaries.**/Dockerfiletranslated to.*Dockerfileand matchedmyDockerfile.**/now emits(?:.*/)?so the prefix must end on a real/.scanOnSaverejection leaks as an unhandled promise.onDidSaveTextDocumentis fire-and-forget; a scan failure (workspace closed mid-call, fs error) propagated as a generic extension-host error. Added optionalonErrorhook onScanOnSaveDeps, wired inextension.tstoclientLog.error.scanWorkspacecommand rejection lands as "Command 'X' failed" toast. Wrapped bothpipelineCheck.scanWorkspaceandpipelineCheck.findings.refreshin arunScanCommandhelper that logs + shows a Pipeline-Check-brandedshowErrorMessage.Housekeeping
log.setLogChannelsignature widened toOutputChannel | undefined(drops theas unknown astest cast).manifest.test.tswelcome-link regex now captures dotted command IDs (pipelineCheck.findings.refreshetc.), closing a regression-fence gap.workspaceScan.test.ts: renamed the misleading "withProgress throws" test (which actually tested the per-file caught-failure case) and added a sibling that exercises the real pre-loop propagation path via a new__stubFindFilesErrorstub knob.navigate.test.ts: rewrote the "strict comparison" test to use two findings so it actually verifies advancement (the old single-element setup only proved wrap-around).codeLens.test.ts/findingsView.test.ts: use fullresetStubState()inbeforeEachfor consistency with the other test files — closes a future-trip-hazard where a new test asserting on__stubCallswould inherit stale state.extension.ts: twovoid-prefix consistency fixes onshowInformationMessage.codeql.yml: drops the template scaffolding (same three languages, same pinned action SHAs).Stats
Test plan
xvfb-run npm run test:integration)npm audit --omit=dev --audit-level=highclean.github/workflows/Pipeline-Check: Restart Language Servertwice in quick succession, confirm noTypeErrorin the extension-host logdockerfileindisabledProviders, confirm a file literally namedmyDockerfileis no longer silenced (now correctly classified as not-a-Dockerfile)🤖 Generated with Claude Code