Skip to content

fix: watcher, incremental git, parse-worker, extractor gaps#115

Merged
SutuSebastian merged 3 commits into
mainfrom
fix/watcher-index-extractors
May 20, 2026
Merged

fix: watcher, incremental git, parse-worker, extractor gaps#115
SutuSebastian merged 3 commits into
mainfrom
fix/watcher-index-extractors

Conversation

@SutuSebastian
Copy link
Copy Markdown
Contributor

@SutuSebastian SutuSebastian commented May 20, 2026

Summary

Indexer and watcher fixes after #114:

Area Category Fix
Watcher watchActive after stop() during onPrime concurrency stopped guard + regression test
Incremental index misses rename source paths data-loss git diff --name-status --no-renames, parse Ddeleted
Parse worker TOCTOU read/stat concurrency statSync in same per-file try/catch as read
Multi-declarator arrow/function scopes bug Defer scope push to ArrowFunctionExpression / FunctionExpression visit
Ref binding reads/writes bug VariableDeclarator + for..of/for..in pattern handling
Module new / ++ side effects bug NewExpression / UpdateExpression handlers
test.each curried calls bug Outer CallExpression callee + title from outer args
Bare / bracket process.env bug VariableDeclarator + computed literal branch
Unquoted CSS @import url(...) bug IMPORT_URL_UNQUOTED_RE

Also updates find-side-effect-files golden (cache.ts / store.ts top-level new Map()).

Test plan

  • bun test (watcher, get-changed-files, parse-worker-core, behavioral, css-parser)
  • bun run test:golden (find-side-effect-files updated)
  • bun run typecheck
  • lint-staged on commits
  • CI green on latest push

- Watcher: do not set watchActive after stop() during pending onPrime
- getChangedFiles: use name-status diff so committed renames drop old paths
- parse-worker: isolate statSync failures like read errors
- Extractors: multi-declarator arrow scopes, refs, side-effects, test.each,
  process.env bare/bracket, unquoted CSS @import url()
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 1b5ab66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stainless-code/codemap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@SutuSebastian has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 38 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1001ee0-fbaa-48dc-8ca3-69684fd293ba

📥 Commits

Reviewing files that changed from the base of the PR and between ae54ce0 and 1b5ab66.

📒 Files selected for processing (19)
  • .changeset/fix-watcher-index-extractors.md
  • fixtures/golden/minimal/find-side-effect-files.json
  • src/application/get-changed-files.test.ts
  • src/application/index-engine.ts
  • src/application/watcher.test.ts
  • src/application/watcher.ts
  • src/css-parser.test.ts
  • src/css-parser.ts
  • src/extractors/behavioral.test.ts
  • src/extractors/module-side-effects.ts
  • src/extractors/references.ts
  • src/extractors/runtime-markers.ts
  • src/extractors/scopes.ts
  • src/extractors/symbols.ts
  • src/extractors/tests.ts
  • src/extractors/types.ts
  • src/parse-worker-core.test.ts
  • src/parse-worker-core.ts
  • src/parser.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/watcher-index-extractors

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Top-level `new Map()` in cache.ts and store.ts are now correctly flagged as module side effects.
Match arrow declarators: push scope when visiting the function body, not at VariableDeclaration enter.
@SutuSebastian SutuSebastian merged commit eb18750 into main May 20, 2026
12 checks passed
@SutuSebastian SutuSebastian deleted the fix/watcher-index-extractors branch May 20, 2026 14:26
@github-actions github-actions Bot mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant