Skip to content

refactor: group local and WSL filesystem watchers - #33407

Merged
nwparker merged 4 commits into
mainfrom
nwparker/module-organization-local-wsl-watchers
Oct 25, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/module-organization-local-wsl-watchers

Conversation

@nwparker

@nwparker nwparker commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Place local and WSL filesystem watcher lifecycle code together under its existing filesystem owner.

What Changed

Move 35 files into src/main/ipc/filesystem/watchers/, update 13 callers and four configuration files, and preserve concrete defining-owner imports. No barrels or forwarding modules are added.

The startup-ordering fixture now supplies an explicit watcher-binding mock and imports its preflight subject once during collection instead of repeating ten cached imports inside cases. All ten cases, 52 expectations and preflight calls remain. Subject loading moves outside the first case's 30-second timeout; this is a fixture structure change, not an import-latency fix. Import errors still fail collection.

Why

Watcher lifecycle, events, cancellation, shutdown and platform owners span the flat IPC directory. This completes their planned folder boundary. Fourteen original tracker paths were already deleted by #31922; they stay deleted and receive no move credit.

Linked Issue

Part of the ongoing module organization tracker; planning and validation evidence remain local.

Visual Proof

N/A — no rendered UI change.

Testing

  • 39 existing suites on the refreshed commit: 354 cases passed and one existing skip. This includes the original 37-suite watcher/boundary selection with exact H3 assertion parity, plus 82 CI policy/aggregate cases.
  • Startup fixture: 10/10 passed; the recovery case also passed alone with all original assertions. The reviewed fixture is unchanged by the main refresh; no latency improvement is inferred.
  • Node types, changed-code quality, formatting, process-host imports, reliability and path-literal gates passed. Electron and standalone orcad builds passed with unchanged production code.
  • Ordered syntax, comments and both runtime erasure modes match for 47 code pairs after mapping module paths. The remaining fixture has the explicitly reviewed changes above. Support-file history and timing values are preserved.
  • Two independent native Codex source/composition audits approve the refreshed commit. Refactor-audit and current-main integration pass; fresh committed-head CI and actual-merge verification remain required.
  • All local commands used background launch. Cross-platform checks run in CI.

Review

Preserve WSL argv and inline script bytes, physical-exit release, singleton lifecycle/observer state, cancellation/document ownership, partial mocks, mixed-version remote behavior and stable worker outputs. Keep the native ignore suite's Node routing and historical inactive quit mock tables.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer content is copied or translated.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0635aa2b-7183-4961-ab50-9c25cc204807
Commits

Reviewing files that changed from the base of the PR and between 62d9706 and 48b3aa0.

Files selected for processing: 52
  • config/process-host-direct-import-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • config/scripts/vitest-node-runtime-files.mjs
  • src/main/git/source-control/drive-checkout-suspect-real-git.test.ts
  • src/main/git/source-control/drive-checkout-suspect-status.test.ts
  • src/main/git/source-control/drive-checkout-suspect-status.ts
  • src/main/git/source-control/drive-checkout-suspect-writes-real-git.test.ts
  • src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-batch-control.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-document-lifetime.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-event-batch.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-event-batch.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-handlers.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-ignore-real.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-ignore.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-ignore.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-large-batch.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-lifecycle-model.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-lifecycle-state.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-listener-lifecycle.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-capacity.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-events.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-events.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-install.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-install.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-removal.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-subscription.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-native-capacity.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-paths.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-real.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-removal-deadline.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-removal-restore.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-sender-lifetime.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-shutdown.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-test-sender.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-unwatchable-roots.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts
  • src/main/ipc/filesystem/watchers/filesystem-watcher.ts
  • src/main/ipc/filesystem/watchers/local-watcher-event-observers.ts
  • src/main/ipc/filesystem/watchers/wsl-watcher-process-exit.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/runtime/file-watcher-host.test.ts
  • src/main/runtime/file-watcher-host.ts
  • src/main/runtime/rpc/methods/file-watch-event-batcher.ts
  • src/main/startup/browser-process-user-agent-ordering.test.ts
  • src/main/startup/main-process-preflight.ts
  • src/main/startup/main-process-quit.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Walkthrough

Filesystem watcher modules now use the src/main/ipc/filesystem/watchers/ directory. Imports, test mocks, baseline entries, and application references were updated to match. Reliability-gate commands and test paths, CI timing keys, and the Node runtime test path also use the relocated paths. The summaries report no changes to runtime logic.

Priority: Low

Merge Risk: Minimal · up to 48b3a

No actionable merge-blocking risk is established by this relocation.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 39 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the change, motivation, testing, visual impact, review concerns, and agent-skill boundary. However, the required Linked Issue section does not contain an actual issue referenc… Add the actual linked issue in the Fixes #... section. Add the required Notes section and complete the Checklist, including the testing and cross-platform checks.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: grouping local and WSL filesystem watchers.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 39 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description explains the change, motivation, testing, visual impact, review concerns, and agent-skill boundary. However, the required Linked Issue section does not contain an actual issue reference, and the Notes and Checklist sections are missing.

Resolution

Add the actual linked issue in the Fixes #... section. Add the required Notes section and complete the Checklist, including the testing and cross-platform checks.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@nwparker
nwparker merged commit d81958f into main Oct 25, 2026
51 checks passed
shin902 added a commit to shin902/orca that referenced this pull request Nov 6, 2026
- preflight-critical-path benchmark: resolve the baseline from the first
  parent of the PR head (HEAD^2^1 on merge-commit checkouts) instead of
  HEAD^1, which is the base on pull_request checkouts and predates the
  sync's gated-module moves (win32-utils -> windows-directory-acl);
  fetch-depth 2 -> 3 so that commit is present.
- flaky-test-pattern ratchet: raise git maxBuffer to 64 MB (same as
  listTrackedFiles); the sync PR's --name-status diff is ~3.2 MB and
  overflowed Node's 1 MB default (spawnSync git ENOBUFS).
- flaky-test-pattern baseline: record 4 findings from two upstream-added
  watcher tests (stablyai#33407) that the fork's baseline never covered.
- delete the orphaned skill-update-roundtrip fixtures test: upstream
  removed .github/workflows/skill-update-roundtrip.yml in stablyai#31688, so the
  test reads a file that no longer exists.
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