chore(scan,dsn): trim session cruft from comment-heavy files#810
Merged
Conversation
Cleanup pass over the scan + DSN modules after the grep/worker-pool stack (#791, #804, #805, #807, #797) landed. Removed comment bloat accumulated across the 6+ review cycles those PRs went through — redundant bug-history narration, repeated explanations of ref/unref semantics, "pre-PR-N" references, and other scars that wouldn't survive a fresh-eyes read. Net -708 LOC across 12 files, no behavior changes. Per-file reductions: - `src/lib/scan/worker-pool.ts`: 466 → 312 (-33%) - `src/lib/scan/grep.ts`: 985 → 712 (-28%) - `src/lib/dsn/code-scanner.ts`: 541 → 377 (-30%) - `src/lib/scan/grep-worker.js`: 153 → 114 (-25%) - `src/lib/dsn/scan-options.ts`: 70 → 52 (-26%) - `src/lib/init/tools/grep.ts`: 122 → 98 (-20%) - `src/lib/init/tools/glob.ts`: 74 → 59 (-20%) Plus minor trims in `types.ts`, `walker.ts`, `path-utils.ts`, `scan/glob.ts`, and `script/text-import-plugin.ts`. ## Test plan - [x] `bunx tsc --noEmit` — clean - [x] `bun run lint` — clean - [x] `bun test test/lib test/commands test/types` — 5641 pass, 0 fail - [x] `bun test test/isolated` — 138 pass - [x] `bun run bench --size large --runs 3` — no perf regression (scan.grepFiles 167ms, scanCodeForDsns 232ms, matching the pre-trim numbers) - [x] `bun run build --single` — binary builds and exits cleanly
Contributor
|
Contributor
Codecov Results 📊✅ 138 passed | Total: 138 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 27.78%. Project has 1943 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.04% 95.21% +0.17%
==========================================
Files 282 282 —
Lines 40661 40577 -84
Branches 0 0 —
==========================================
+ Hits 38646 38634 -12
- Misses 2015 1943 -72
- Partials 0 0 —Generated by Codecov Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleanup pass over the
scan/anddsn/modules after the grep + worker-pool stack (#791, #804, #805, #807, #797) landed. Removed comment bloat accumulated across the 6+ review cycles those PRs went through — redundant bug-history narration, repeated explanations ofref/unrefboolean semantics, "pre-PR-N" references, and other scars that wouldn't survive a fresh-eyes read.Net −708 LOC across 12 files. No behavior changes.
Per-file reductions
src/lib/scan/worker-pool.tssrc/lib/scan/grep.tssrc/lib/dsn/code-scanner.tssrc/lib/scan/grep-worker.jssrc/lib/dsn/scan-options.tssrc/lib/init/tools/grep.tssrc/lib/init/tools/glob.tsPlus minor trims in
types.ts,walker.ts,path-utils.ts,scan/glob.ts, andscript/text-import-plugin.ts.What was removed
Worker.ref()/.unref()boolean semantics (stated 3× inworker-pool.ts— kept once, on the primary ref/unref helper pair).biome-ignores that were already justified by adjacent context.What was kept
biome-ignorecomment (all still justified)./gflag cloning rationale, the pipeline-failure detector explanation).Test plan
bunx tsc --noEmit— cleanbun run lint— clean (1 pre-existing markdown warning)bun test --timeout 15000 test/lib test/commands test/types— 5641 pass, 0 failbun test test/isolated— 138 passbun run bench --size large --runs 3— no perf regression (scan.grepFiles167ms,scanCodeForDsns232ms — matching pre-trim numbers)bun run build --single— binary builds and exits cleanly onsentry project viewfrom empty dir (3 consecutive runs, all exit=1)🤖 Generated with Claude Code
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com