From 95df4c74ed604533b5bd8b64df43bdeecb948d57 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:14:52 -0700 Subject: [PATCH] refactor: group Parcel watcher process ownership (#33401) --- .../build-plugins/main-build-entry-points.ts | 4 +- config/knip.json | 2 +- .../process-host-direct-import-baseline.txt | 12 ++--- config/reliability-gates.jsonc | 52 +++++++++---------- config/scripts/ci-shard-timings.json | 30 +++++------ config/scripts/orcad-entry-build.mjs | 2 +- .../runtime-file-watcher-fault-harness.mjs | 4 +- .../runtime-file-watcher-resource-probe.mjs | 4 +- ...lesystem-watcher-document-lifetime.test.ts | 4 +- ...filesystem-watcher-lifecycle-model.test.ts | 2 +- .../filesystem-watcher-listener-lifecycle.ts | 2 +- .../filesystem-watcher-local-events.test.ts | 4 +- .../ipc/filesystem-watcher-local-events.ts | 2 +- .../filesystem-watcher-local-install.test.ts | 2 +- .../ipc/filesystem-watcher-local-install.ts | 2 +- ...lesystem-watcher-local-unsubscribe.test.ts | 8 +-- ...filesystem-watcher-native-capacity.test.ts | 2 +- ...ilesystem-watcher-removal-deadline.test.ts | 8 +-- ...filesystem-watcher-removal-restore.test.ts | 2 +- src/main/ipc/filesystem-watcher-shutdown.ts | 2 +- .../parcel-watcher-canary-directory.ts | 0 .../parcel-watcher-cancellation-restart.ts | 6 +-- .../parcel-watcher-child-launch.test.ts | 2 +- .../parcel-watcher-child-launch.ts | 4 +- .../parcel-watcher-child-messaging.ts | 2 +- .../parcel-watcher-child-recovery.ts | 8 +-- .../parcel-watcher-child-slot.ts | 2 +- .../parcel-watcher-child-termination.ts | 4 +- .../parcel-watcher-crash-fuse.test.ts | 0 .../parcel-watcher-crash-fuse.ts | 0 ...cel-watcher-disconnect-termination.test.ts | 4 +- .../parcel-watcher-entry-path.test.ts | 0 .../parcel-watcher-entry-path.ts | 2 +- .../parcel-watcher-event-cancellation.test.ts | 0 .../parcel-watcher-event-delivery.test.ts | 0 .../parcel-watcher-event-delivery.ts | 6 +-- .../parcel-watcher-host-subscriptions.ts | 4 +- .../parcel-watcher-in-process-fallback.ts | 0 ...parcel-watcher-interrupted-cancellation.ts | 4 +- .../parcel-watcher-module-loader.test.ts | 0 .../parcel-watcher-module-loader.ts | 0 ...el-watcher-native-error-retirement.test.ts | 2 +- .../parcel-watcher-pending-cancellation.ts | 4 +- .../parcel-watcher-pending-subscribe.ts | 4 +- .../parcel-watcher-process-dispose.test.ts | 2 +- .../parcel-watcher-process-entry.test.ts | 2 +- .../parcel-watcher-process-entry.ts | 6 +-- .../parcel-watcher-process-failure.ts | 0 .../parcel-watcher-process-protocol.ts | 0 .../parcel-watcher-process-subscription.ts | 0 ...rcel-watcher-process-supervisor-options.ts | 0 .../parcel-watcher-process-supervisor.ts | 24 ++++----- .../parcel-watcher-process-test-child.ts | 0 .../parcel-watcher-process.test.ts | 4 +- .../parcel-watcher-process.ts | 2 +- .../parcel-watcher-root-path-rewrite.test.ts | 2 +- ...arcel-watcher-shallow-subscription.test.ts | 0 .../parcel-watcher-shallow-subscription.ts | 6 +-- ...l-watcher-supervisor-capacity-wait.test.ts | 2 +- ...parcel-watcher-supervisor-capacity-wait.ts | 4 +- ...parcel-watcher-supervisor-capacity.test.ts | 4 +- ...parcel-watcher-supervisor-disposal.test.ts | 2 +- .../parcel-watcher-supervisor-disposal.ts | 6 +-- .../parcel-watcher-supervisor-message.ts | 4 +- .../parcel-watcher-supervisor-subscribe.ts | 9 ++-- ...parcel-watcher-unsubscribe-timeout.test.ts | 2 +- ...parcel-watcher-crash-fuse-recovery.test.ts | 6 +-- .../ipc/parcel-watcher-delivery-canary.ts | 2 +- .../parcel-watcher-delivery-health.test.ts | 8 +-- .../ipc/parcel-watcher-delivery-health.ts | 4 +- ...-watcher-shallow-file-subscription.test.ts | 2 +- ...arcel-watcher-shallow-file-subscription.ts | 2 +- .../ipc/runtime-watcher-pending-assignment.ts | 4 +- .../ipc/runtime-watcher-pool-lifecycle.ts | 2 +- .../ipc/runtime-watcher-pool-shutdown.test.ts | 4 +- src/main/ipc/runtime-watcher-pool-state.ts | 2 +- .../runtime-watcher-predecessor-barriers.ts | 2 +- .../ipc/runtime-watcher-process-pool.test.ts | 6 +-- src/main/ipc/runtime-watcher-process-pool.ts | 16 +++--- .../ipc/runtime-watcher-quarantine-queue.ts | 2 +- .../runtime-watcher-subscription-failure.ts | 2 +- .../ipc/worktree-git-common-narrow-watch.ts | 4 +- ...ree-git-common-native-upgrade-poll.test.ts | 6 ++- ...worktree-git-common-native-upgrade-poll.ts | 2 +- .../ipc/worktree-git-common-primary-watch.ts | 4 +- ...ee-git-common-watch-reconciliation.test.ts | 8 +-- .../ipc/worktree-git-common-watch.test.ts | 8 +-- src/main/ipc/wsl-watcher-process-exit.ts | 2 +- src/main/orcad/orcad-entry.ts | 3 +- .../orcad/orcad-forked-child-paths.test.ts | 2 +- .../orcad-runtime-native-preflight.test.ts | 4 +- .../orcad/orcad-runtime-native-preflight.ts | 4 +- .../plugins/plugin-content-safety.test.ts | 2 +- ...lugin-dev-watcher-unknown-identity.test.ts | 8 +-- src/main/plugins/plugin-dev-watcher.test.ts | 10 ++-- src/main/plugins/plugin-dev-watcher.ts | 6 +-- src/main/runtime/file-watcher-host.test.ts | 6 +-- src/main/runtime/file-watcher-host.ts | 8 +-- .../files/watch/file-watcher-leases.ts | 2 +- .../runtime/files/watch/windows-file-watch.ts | 2 +- .../runtime/orca-runtime-files-watch.test.ts | 2 +- .../methods/file-watch-stream-lifecycle.ts | 2 +- .../rpc/methods/files-watch-cleanup.test.ts | 2 +- .../runtime/runtime-root-watch-ownership.ts | 2 +- .../runtime/runtime-root-watch-teardown.ts | 2 +- .../tools/repro-watcher-crash-7547/README.md | 2 +- .../repro-watcher-crash-7547/fixed-child.cjs | 12 ++++- 107 files changed, 249 insertions(+), 219 deletions(-) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-canary-directory.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-crash-fuse.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-crash-fuse.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-entry-path.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-entry-path.ts (96%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-event-cancellation.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-event-delivery.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-event-delivery.ts (94%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-host-subscriptions.ts (97%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-in-process-fallback.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-module-loader.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-module-loader.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-native-error-retirement.test.ts (98%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-dispose.test.ts (96%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-entry.test.ts (99%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-entry.ts (97%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-failure.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-protocol.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-subscription.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-supervisor-options.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-supervisor.ts (89%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process-test-child.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process.test.ts (99%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-process.ts (96%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-root-path-rewrite.test.ts (98%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-shallow-subscription.test.ts (100%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-shallow-subscription.ts (96%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-capacity-wait.test.ts (94%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-capacity-wait.ts (95%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-capacity.test.ts (97%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-disposal.test.ts (95%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-disposal.ts (80%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-message.ts (94%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-supervisor-subscribe.ts (94%) rename src/main/ipc/{ => filesystem/watcher-process}/parcel-watcher-unsubscribe-timeout.test.ts (98%) diff --git a/config/build-plugins/main-build-entry-points.ts b/config/build-plugins/main-build-entry-points.ts index 35375ee9d93..fdf7639d9f2 100644 --- a/config/build-plugins/main-build-entry-points.ts +++ b/config/build-plugins/main-build-entry-points.ts @@ -45,7 +45,9 @@ export const MAIN_BUILD_ENTRY_POINTS: Record = { ), // Why: forked with ELECTRON_RUN_AS_NODE so @parcel/watcher faults // can't take down the main process (issue #7547). - 'parcel-watcher-process-entry': resolve('src/main/ipc/parcel-watcher-process-entry.ts'), + 'parcel-watcher-process-entry': resolve( + 'src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts' + ), // Why: `orca serve` runs it under ELECTRON_RUN_AS_NODE so the CLI never bundles orcad prep. [ORCAD_LOCAL_SERVE_SELECTION_ENTRY]: resolve( 'src/main/orcad/orcad-local-serve-selection-entry.ts' diff --git a/config/knip.json b/config/knip.json index a18c838b60f..7df23412276 100644 --- a/config/knip.json +++ b/config/knip.json @@ -12,7 +12,7 @@ "src/main/foreign-sqlite-readers/foreign-sqlite-reader-entry.ts", "src/main/ports/port-scan-command-worker-entry.ts", "src/main/worker-thread-child-process/worker-thread-child-process-entry.ts", - "src/main/ipc/parcel-watcher-process-entry.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts", "src/main/hang-watchdog/main-thread-hang-watchdog-entry.ts", "src/main/agent-hooks/managed-agent-hook-controls.ts", "src/main/claude-accounts/keychain.ts", diff --git a/config/process-host-direct-import-baseline.txt b/config/process-host-direct-import-baseline.txt index 04855f7c278..30e0459c41f 100644 --- a/config/process-host-direct-import-baseline.txt +++ b/config/process-host-direct-import-baseline.txt @@ -1,6 +1,6 @@ + # Existing production source files importing child_process outside @orca/process-host. # Migration debt: this list may only shrink; new callers use the package public API. - src/cli/handlers/account.ts src/cli/handlers/core.ts src/cli/handlers/interactive-login-interruption.ts @@ -63,16 +63,16 @@ src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-messaging.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-recovery.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-termination.ts +src/main/ipc/filesystem/watcher-process/parcel-watcher-host-subscriptions.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-cancellation.ts +src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor.ts +src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.ts +src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-message.ts +src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-subscribe.ts src/main/ipc/local-network-connection-test.ts src/main/ipc/macos-keyboard-input-source.ts src/main/ipc/macos-keyboard-layout-snapshot.ts src/main/ipc/notification-authorization-status.ts -src/main/ipc/parcel-watcher-host-subscriptions.ts -src/main/ipc/parcel-watcher-process-supervisor.ts -src/main/ipc/parcel-watcher-supervisor-disposal.ts -src/main/ipc/parcel-watcher-supervisor-message.ts -src/main/ipc/parcel-watcher-supervisor-subscribe.ts src/main/ipc/preflight-command-exec.ts src/main/ipc/repos/repo-clone-lifecycle.ts src/main/ipc/worktree-apfs-clone.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index fa9a65e7447..c56351a59d5 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -18520,14 +18520,14 @@ "oracle": "Fill the global watcher-child reservation, require native desktop, paired-runtime, and WSL setup to retain typed transient capacity and retry after one serialized release, then cancel pending desktop and paired-client watches and require no retry. Hold one live anchor while aborting 10,000 callers at the capacity, quarantine-assignment, runtime-root, relay-setup, and SSH-registration layers; require exactly one explicit waiter and one base-promise reaction to remain, then zero after settlement. Hold an old relay unsubscribe, queue one same-root setup leader and one anchor, then abort 10,000 joiners; require every cancellation to settle before teardown releases, exactly one anchor waiter, and only one later physical install. Advance the former paired-web callback deadline while capacity remains full, require cancellation ownership to stay live, publish the server token before ready, and require files.unwatch to abort setup before a later slot release can install a native root. Reject the first ready-watch unwatch with a physical-exit promise, resolve that exit later, and require a fresh physical unwatch attempt, registry release, and exactly one stream end. Fill one healthy shared child with multiple roots, map a standard SSH repository's base, Git common directory, and worktree roots to one relay supervisor, then inject IPC disconnect-before-exit, queued and active cancellation, operations during termination, kill-without-exit, repeated unkillable generations, initial and recovery timeouts, and shard failure. During local and SSH deletion, attempt a late terminal spawn whose worktree identity and cwd name different roots, enumerate a non-prefix remote PTY by authoritative worktree ownership, withhold daemon/relay exit callbacks, make attach positively prove a concurrent-shutdown PID dead, and make the provider unavailable; require every acquired admission to roll back on rejection, dead-PID proof to settle physical exit before reaping, timeout to retain ownership, and Git/filesystem deletion never to start. Require bounded watcher process count, physical-exit settlement, healthy-root recovery, stale-generation rejection, overflow plus later events, and fail-closed destructive cleanup. Verify relay build hashes and remote install probes require both relay.js and relay-watcher.js. Launch the built relay with a real PTY and Parcel watch, kill only the watcher child, and require the same relay PID and PTY to answer before a replacement child delivers overflow and a post-crash event.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/files-watch-cleanup.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-pending-assignment.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-pending-assignment.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", "pnpm run build:electron-vite", "node config/scripts/runtime-file-watcher-resource-probe.mjs", "node config/scripts/runtime-file-watcher-fault-harness.mjs", @@ -18541,15 +18541,15 @@ "src/main/ipc/filesystem-watcher-native-capacity.test.ts", "src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts", "src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts", - "src/main/ipc/parcel-watcher-process.test.ts", - "src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts", - "src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts", - "src/main/ipc/parcel-watcher-supervisor-capacity.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts", "src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts", "src/main/ipc/runtime-watcher-pending-assignment.test.ts", "src/main/ipc/runtime-watcher-process-pool.test.ts", - "src/main/ipc/parcel-watcher-process-entry.test.ts", - "src/main/ipc/parcel-watcher-event-delivery.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts", + "src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts", "src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts", "src/main/ipc/filesystem-watcher-wsl.test.ts", "src/main/ipc/worktrees-delete-pty-teardown.test.ts", @@ -18630,7 +18630,7 @@ ] }, { - "file": "src/main/ipc/parcel-watcher-process.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts", "assertions": [ "initial-subscribe crashes complete with an interruption refresh", "watch errors before readiness reject setup and physically cancel the native crawl", @@ -18647,20 +18647,20 @@ ] }, { - "file": "src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts", "assertions": [ "a canary-independent native-unsubscribe deadline restarts the shard and restores healthy siblings after physical child exit", "an unkillable child rejects the native unsubscribe with its retained physical-exit promise only at the bounded exit deadline" ] }, { - "file": "src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts", "assertions": [ "10,000 cancelled capacity callers leave exactly one live anchor and zero waiters after the released slot settles" ] }, { - "file": "src/main/ipc/parcel-watcher-supervisor-capacity.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts", "assertions": [ "one released physical slot launches one shared supervisor child for every waiting root, while partial/all cancellation and disposal remove the shared capacity barrier", "a waiter recursively re-enters the event-driven barrier when crash recovery reclaims its announced slot" @@ -18696,7 +18696,7 @@ ] }, { - "file": "src/main/ipc/parcel-watcher-process-entry.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts", "assertions": [ "queued cancellation removes the request before Parcel starts its crawl", "active cancellation requests one host restart and emits no stale subscribed acknowledgement", @@ -18708,7 +18708,7 @@ ] }, { - "file": "src/main/ipc/parcel-watcher-event-delivery.test.ts", + "file": "src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts", "assertions": [ "eight concurrent root batches never exceed eight active directory metadata stats within one child" ] @@ -18934,7 +18934,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/parcel-watcher-child-registry.test.ts src/main/ipc/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-pending-assignment.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-pending-assignment.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-pending-assignment.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", "result": "passed", "durationSeconds": 11.98, "summary": "Thirty-nine watcher, cancellation, desktop/serve, paired-web, WSL, SSH/relay, removal, and PTY physical-exit files passed with 2,008 tests. Capacity, quarantine, runtime-root, relay, and SSH setup layers each prove that 10,000 aborted callers detach while one anchor remains and zero waiters remain after settlement." @@ -18944,7 +18944,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/parcel-watcher-child-registry.test.ts src/main/ipc/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/main/runtime/rpc/methods/files-watch-cancellation.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", "result": "passed", "durationSeconds": 11.59, "summary": "Thirty-four watcher, cancellation, desktop/serve, paired-web, WSL, removal, PTY physical-exit, provider, renderer, and path files passed with 1,999 tests; paired-web cancellation now owns a server token before ready and aborts pending setup without a late native install." @@ -18963,7 +18963,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/pty-subprocess.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts --reporter=dot", "result": "passed", "durationSeconds": 10.01, "summary": "Twenty-seven watcher, WSL, desktop/serve removal, local/daemon/SSH PTY physical-exit, provider ownership, RPC, renderer, relay PTY admission, and cross-platform path files passed with 1,886 tests. The suite includes nested removal fencing, renderer/runtime cwd-only admission, legacy provider rows, rejected kill retries, transient WSL capacity, and synchronous-startup reservation cleanup." @@ -19018,7 +19018,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/providers/local-pty-provider-shutdown.test.ts src/main/providers/local-pty-provider-session-inventory.test.ts src/main/daemon/session.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", "result": "passed", "durationSeconds": 9.12, "summary": "Twenty-five watcher, WSL, desktop/serve removal, local/daemon/SSH PTY physical-exit, provider ownership, RPC, renderer, relay PTY admission, and cross-platform path files passed with 1,762 tests. The suite covers operations joining in-flight termination, kill failures retaining ownership, bounded timeouts, atomic relay spawn/revive caps, and PTY-removal admission." @@ -19073,7 +19073,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty-spawn-cwd-fallback.test.ts src/main/ipc/pty-listener-teardown-and-orphans.test.ts src/main/daemon/terminal-host.test.ts src/main/daemon/terminal-host-session-reaping-leak.test.ts", "result": "passed", "durationSeconds": 9.03, "summary": "Twenty-three watcher, desktop/serve removal, terminal-spawn gate, daemon/SSH physical PTY exit, provider ownership, RPC, renderer, and cross-platform path files passed with 1,630 tests. The suite includes same-turn watcher replacement, authoritative SSH teardown before Git, bounded kill-without-exit failures that retain ownership, and local/SSH deletion fail-closed behavior." @@ -19101,7 +19101,7 @@ "runner": "local", "platform": "macos", "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/parcel-watcher-process-entry.test.ts src/main/ipc/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/runtime-watcher-process-pool.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/ipc/worktrees-remove-archive-hooks.test.ts src/main/ipc/watcher-removal-gate.test.ts src/main/runtime/file-watcher-host.test.ts src/main/runtime/orca-runtime-files-watch.test.ts src/main/runtime/worktree-teardown.test.ts src/main/runtime/orca-runtime.test.ts src/main/runtime/rpc/methods/files.test.ts src/renderer/src/runtime/runtime-file-client.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", "result": "passed", "durationSeconds": 8.85, "summary": "18 focused supervisor, disconnect termination, pool, child-entry, delivery, desktop/WSL cleanup and IPC removal, removal-gate, runtime-host/commands and physical PTY teardown, RPC, SSH ownership, renderer/paired-web clients, and cross-platform path files passed with 1,193 tests." diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 1a1a016b53f..1f4eaeaef53 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -2652,23 +2652,23 @@ "src/main/ipc/runtime-environments/orcad-ssh-provisioning-handlers.test.ts": 33, "src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts": 51, "src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts": 88, - "src/main/ipc/parcel-watcher-crash-fuse.test.ts": 37, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-crash-fuse.test.ts": 37, "src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts": 146, - "src/main/ipc/parcel-watcher-entry-path.test.ts": 41, - "src/main/ipc/parcel-watcher-event-cancellation.test.ts": 45, - "src/main/ipc/parcel-watcher-event-delivery.test.ts": 112, - "src/main/ipc/parcel-watcher-module-loader.test.ts": 32, - "src/main/ipc/parcel-watcher-native-error-retirement.test.ts": 100, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.test.ts": 41, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-event-cancellation.test.ts": 45, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts": 112, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-module-loader.test.ts": 32, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-native-error-retirement.test.ts": 100, "src/main/ipc/filesystem/watcher-process/parcel-watcher-owned-children.test.ts": 50, - "src/main/ipc/parcel-watcher-process-dispose.test.ts": 36, - "src/main/ipc/parcel-watcher-process-entry.test.ts": 179, - "src/main/ipc/parcel-watcher-process.test.ts": 558, - "src/main/ipc/parcel-watcher-root-path-rewrite.test.ts": 109, - "src/main/ipc/parcel-watcher-shallow-subscription.test.ts": 113, - "src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts": 177, - "src/main/ipc/parcel-watcher-supervisor-capacity.test.ts": 247, - "src/main/ipc/parcel-watcher-supervisor-disposal.test.ts": 91, - "src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts": 118, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process-dispose.test.ts": 36, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts": 179, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts": 558, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-root-path-rewrite.test.ts": 109, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.test.ts": 113, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts": 177, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts": 247, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.test.ts": 91, + "src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts": 118, "src/main/ipc/pet-bundle.test.ts": 52, "src/main/ipc/pet.test.ts": 328, "src/main/ipc/plugin-marketplaces.test.ts": 250, diff --git a/config/scripts/orcad-entry-build.mjs b/config/scripts/orcad-entry-build.mjs index b0620abc439..113f6154b7f 100644 --- a/config/scripts/orcad-entry-build.mjs +++ b/config/scripts/orcad-entry-build.mjs @@ -11,7 +11,7 @@ const { turnedOnDarkBuildDefines } = createRequire(import.meta.url)('../dark-bui export const ORCAD_ENTRY_POINT = 'src/main/orcad/main.ts' export const ORCAD_LAUNCHER_ENTRY_POINT = 'src/main/orcad/launcher.ts' export const ORCAD_CHILD_ENTRY_POINTS = { - watcher: 'src/main/ipc/parcel-watcher-process-entry.ts', + watcher: 'src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts', daemon: 'src/main/daemon/daemon-entry.ts', writer: 'src/main/persistence/profile-state/profile-state-writer-worker-entry.ts', backup: 'src/main/persistence/profile-state/profile-state-backup-worker-entry.ts', diff --git a/config/scripts/runtime-file-watcher-fault-harness.mjs b/config/scripts/runtime-file-watcher-fault-harness.mjs index 7c6205c35ea..e2dcccbe9b4 100644 --- a/config/scripts/runtime-file-watcher-fault-harness.mjs +++ b/config/scripts/runtime-file-watcher-fault-harness.mjs @@ -6,7 +6,9 @@ import { join, resolve } from 'node:path' import { build } from 'esbuild' const ENTRY_PATH = resolve('out/main/parcel-watcher-process-entry.js') -const SUPERVISOR_SOURCE = resolve('src/main/ipc/parcel-watcher-process-supervisor.ts') +const SUPERVISOR_SOURCE = resolve( + 'src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor.ts' +) const WAIT_TIMEOUT_MS = 15_000 const require = createRequire(import.meta.url) diff --git a/config/scripts/runtime-file-watcher-resource-probe.mjs b/config/scripts/runtime-file-watcher-resource-probe.mjs index 88575e3f3af..c000f5a6a12 100644 --- a/config/scripts/runtime-file-watcher-resource-probe.mjs +++ b/config/scripts/runtime-file-watcher-resource-probe.mjs @@ -9,7 +9,9 @@ import { build } from 'esbuild' const ENTRY_PATH = resolve('out/main/parcel-watcher-process-entry.js') const POOL_SOURCE = resolve('src/main/ipc/runtime-watcher-process-pool.ts') -const FAILURE_SOURCE = resolve('src/main/ipc/parcel-watcher-process-failure.ts') +const FAILURE_SOURCE = resolve( + 'src/main/ipc/filesystem/watcher-process/parcel-watcher-process-failure.ts' +) const REGISTRY_SOURCE = resolve( 'src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.ts' ) diff --git a/src/main/ipc/filesystem-watcher-document-lifetime.test.ts b/src/main/ipc/filesystem-watcher-document-lifetime.test.ts index 07a16adba0d..89ac9a3976b 100644 --- a/src/main/ipc/filesystem-watcher-document-lifetime.test.ts +++ b/src/main/ipc/filesystem-watcher-document-lifetime.test.ts @@ -20,7 +20,9 @@ vi.mock('./filesystem-watcher-local-events', () => ({ createLocalWatcher: createLocal, scheduleLocalBatchFlush: vi.fn() })) -vi.mock('./parcel-watcher-process', () => ({ disposeWatcherProcess: vi.fn() })) +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ + disposeWatcherProcess: vi.fn() +})) import { watcherLifecycleState as state } from './filesystem-watcher-lifecycle-state' import { getLocalWatcherRoot } from './filesystem-watcher-paths' import { registerFilesystemWatcherHandlers } from './filesystem-watcher-handlers' diff --git a/src/main/ipc/filesystem-watcher-lifecycle-model.test.ts b/src/main/ipc/filesystem-watcher-lifecycle-model.test.ts index d95556db77d..cde157c337f 100644 --- a/src/main/ipc/filesystem-watcher-lifecycle-model.test.ts +++ b/src/main/ipc/filesystem-watcher-lifecycle-model.test.ts @@ -9,7 +9,7 @@ const { handleMock, statMock, subscribeMock } = vi.hoisted(() => ({ vi.mock('electron', () => ({ ipcMain: { handle: handleMock } })) vi.mock('node:fs/promises', () => ({ stat: statMock })) -vi.mock('./parcel-watcher-process', () => ({ +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: subscribeMock, disposeWatcherProcess: vi.fn() })) diff --git a/src/main/ipc/filesystem-watcher-listener-lifecycle.ts b/src/main/ipc/filesystem-watcher-listener-lifecycle.ts index b6525eefc41..c247a3ff03d 100644 --- a/src/main/ipc/filesystem-watcher-listener-lifecycle.ts +++ b/src/main/ipc/filesystem-watcher-listener-lifecycle.ts @@ -1,5 +1,5 @@ import type { WebContents } from 'electron' -import { isWatcherProcessFailure } from './parcel-watcher-process-failure' +import { isWatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import type { WatchedRoot } from './filesystem-watcher-wsl' import { type CancelledInstallWaiter, diff --git a/src/main/ipc/filesystem-watcher-local-events.test.ts b/src/main/ipc/filesystem-watcher-local-events.test.ts index 082f0c027c8..28524d7e61f 100644 --- a/src/main/ipc/filesystem-watcher-local-events.test.ts +++ b/src/main/ipc/filesystem-watcher-local-events.test.ts @@ -12,7 +12,9 @@ const { statMock, subscribeMock } = vi.hoisted(() => ({ })) vi.mock('fs/promises', () => ({ stat: statMock })) -vi.mock('./parcel-watcher-process', () => ({ subscribeViaWatcherProcess: subscribeMock })) +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ + subscribeViaWatcherProcess: subscribeMock +})) import { createLocalWatcher } from './filesystem-watcher-local-events' import { cancelLocalBatchFlush } from './filesystem-watcher-batch-control' diff --git a/src/main/ipc/filesystem-watcher-local-events.ts b/src/main/ipc/filesystem-watcher-local-events.ts index ef6fb69effa..126cc337454 100644 --- a/src/main/ipc/filesystem-watcher-local-events.ts +++ b/src/main/ipc/filesystem-watcher-local-events.ts @@ -6,7 +6,7 @@ import { MAX_BATCHED_WATCHER_EVENTS, queueWatcherEvents } from './filesystem-wat // Filter high-churn events at source; Explorer display filters only hide rows. import { WATCHER_IGNORE_DIRS, buildParcelWatcherIgnoreOptions } from './filesystem-watcher-ignore' import type { WatchedRoot } from './filesystem-watcher-wsl' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' import { normalizeWatcherEventPath } from './filesystem-watcher-paths' import { watcherLifecycleState } from './filesystem-watcher-lifecycle-state' import { diff --git a/src/main/ipc/filesystem-watcher-local-install.test.ts b/src/main/ipc/filesystem-watcher-local-install.test.ts index 90d26c54c8c..3c75824bd9f 100644 --- a/src/main/ipc/filesystem-watcher-local-install.test.ts +++ b/src/main/ipc/filesystem-watcher-local-install.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' const { createLocalWatcherMock, statMock } = vi.hoisted(() => ({ createLocalWatcherMock: vi.fn(), diff --git a/src/main/ipc/filesystem-watcher-local-install.ts b/src/main/ipc/filesystem-watcher-local-install.ts index b75717ae353..ae8953d9cf8 100644 --- a/src/main/ipc/filesystem-watcher-local-install.ts +++ b/src/main/ipc/filesystem-watcher-local-install.ts @@ -3,7 +3,7 @@ import { isWslPath } from '../wsl' import { WATCHER_IGNORE_DIRS } from './filesystem-watcher-ignore' import { createWslWatcher, type WatchedRoot } from './filesystem-watcher-wsl' import { WatcherChildCapacityError } from './filesystem/watcher-process/parcel-watcher-child-registry' -import { isWatcherProcessFailure } from './parcel-watcher-process-failure' +import { isWatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import type { LocalWatcherInstallResult, LocalWatcherInstallToken diff --git a/src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts b/src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts index 9091fb8f1f7..32fad226723 100644 --- a/src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts +++ b/src/main/ipc/filesystem-watcher-local-unsubscribe.test.ts @@ -1,6 +1,6 @@ import { createWatcherSender } from './filesystem-watcher-test-sender' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type * as ParcelWatcherProcess from './parcel-watcher-process' +import type * as ParcelWatcherProcess from './filesystem/watcher-process/parcel-watcher-process' const { handleMock } = vi.hoisted(() => ({ handleMock: vi.fn() @@ -24,7 +24,7 @@ vi.mock('./filesystem-watcher-wsl', () => ({ createWslWatcher: vi.fn() })) -vi.mock('./parcel-watcher-process', async (importOriginal) => { +vi.mock('./filesystem/watcher-process/parcel-watcher-process', async (importOriginal) => { const actual = await importOriginal() return { ...actual, @@ -40,8 +40,8 @@ import { import { registerFilesystemWatcherHandlers } from './filesystem-watcher-handlers' import { stat } from 'node:fs/promises' import { subscribe as subscribeParcelWatcher } from '@parcel/watcher' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' type HandlerMap = Record unknown> diff --git a/src/main/ipc/filesystem-watcher-native-capacity.test.ts b/src/main/ipc/filesystem-watcher-native-capacity.test.ts index c9e2736935e..274cfd39b27 100644 --- a/src/main/ipc/filesystem-watcher-native-capacity.test.ts +++ b/src/main/ipc/filesystem-watcher-native-capacity.test.ts @@ -11,7 +11,7 @@ const { handleMock, statMock, subscribeViaWatcherProcessMock, disposeWatcherProc vi.mock('electron', () => ({ ipcMain: { handle: handleMock } })) vi.mock('node:fs/promises', () => ({ stat: statMock })) -vi.mock('./parcel-watcher-process', () => ({ +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: subscribeViaWatcherProcessMock, disposeWatcherProcess: disposeWatcherProcessMock })) diff --git a/src/main/ipc/filesystem-watcher-removal-deadline.test.ts b/src/main/ipc/filesystem-watcher-removal-deadline.test.ts index 1a948e721cc..824856b621d 100644 --- a/src/main/ipc/filesystem-watcher-removal-deadline.test.ts +++ b/src/main/ipc/filesystem-watcher-removal-deadline.test.ts @@ -1,6 +1,6 @@ import { createWatcherSender } from './filesystem-watcher-test-sender' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type * as ParcelWatcherProcess from './parcel-watcher-process' +import type * as ParcelWatcherProcess from './filesystem/watcher-process/parcel-watcher-process' const { handleMock } = vi.hoisted(() => ({ handleMock: vi.fn() @@ -24,7 +24,7 @@ vi.mock('./filesystem-watcher-wsl', () => ({ createWslWatcher: vi.fn() })) -vi.mock('./parcel-watcher-process', async (importOriginal) => { +vi.mock('./filesystem/watcher-process/parcel-watcher-process', async (importOriginal) => { const actual = await importOriginal() return { ...actual, @@ -41,10 +41,10 @@ import { WATCHER_REMOVAL_DRAIN_BUDGET_MS, WATCHER_REMOVAL_FINAL_DRAIN_RESERVE_MS } from './watcher-removal-drain' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import { stat } from 'node:fs/promises' import { subscribe as subscribeParcelWatcher } from '@parcel/watcher' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' type HandlerMap = Record unknown> diff --git a/src/main/ipc/filesystem-watcher-removal-restore.test.ts b/src/main/ipc/filesystem-watcher-removal-restore.test.ts index ee0ced50a5d..83dc644dbfb 100644 --- a/src/main/ipc/filesystem-watcher-removal-restore.test.ts +++ b/src/main/ipc/filesystem-watcher-removal-restore.test.ts @@ -9,7 +9,7 @@ const { handleMock, statMock, subscribeMock } = vi.hoisted(() => ({ vi.mock('electron', () => ({ ipcMain: { handle: handleMock } })) vi.mock('node:fs/promises', () => ({ stat: statMock })) -vi.mock('./parcel-watcher-process', () => ({ +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: subscribeMock, disposeWatcherProcess: vi.fn() })) diff --git a/src/main/ipc/filesystem-watcher-shutdown.ts b/src/main/ipc/filesystem-watcher-shutdown.ts index 9fb2c28a01e..caaa34c5200 100644 --- a/src/main/ipc/filesystem-watcher-shutdown.ts +++ b/src/main/ipc/filesystem-watcher-shutdown.ts @@ -1,4 +1,4 @@ -import { disposeWatcherProcess } from './parcel-watcher-process' +import { disposeWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' import { watcherLifecycleState } from './filesystem-watcher-lifecycle-state' import { trackDetachedLocalUnsubscribe } from './filesystem-watcher-listener-lifecycle' import { cancelLocalBatchFlush } from './filesystem-watcher-batch-control' diff --git a/src/main/ipc/parcel-watcher-canary-directory.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-canary-directory.ts similarity index 100% rename from src/main/ipc/parcel-watcher-canary-directory.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-canary-directory.ts diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-cancellation-restart.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-cancellation-restart.ts index 1595be85292..21f59d07f1d 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-cancellation-restart.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-cancellation-restart.ts @@ -3,15 +3,15 @@ import { failAllWatcherSubscriptions, type PendingWatcherUnsubscribe, resolvePendingWatcherUnsubscribes -} from '../../parcel-watcher-host-subscriptions' +} from './parcel-watcher-host-subscriptions' import type { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { createWatcherChildTerminationFailure, terminateWatcherChild } from './parcel-watcher-child-termination' import { resetPendingSubscribeAttempt } from './parcel-watcher-pending-subscribe' -import { WatcherProcessFailure } from '../../parcel-watcher-process-failure' -import type { WatcherProcessSubscriptionRecord } from '../../parcel-watcher-process-subscription' +import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' export function restoreWatcherRecordsAfterCancellation( records: Map, diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts index c4530540d9e..bc2e8635d72 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts @@ -13,7 +13,7 @@ const { forkMock, releaseReservationMock, signalPhysicalExitMock, writeFileSyncM vi.mock('node:child_process', () => ({ fork: forkMock })) vi.mock('node:fs', () => ({ writeFileSync: writeFileSyncMock })) -vi.mock('../../parcel-watcher-canary-directory', () => ({ +vi.mock('./parcel-watcher-canary-directory', () => ({ createWatcherCanaryDirectory: vi.fn(() => null), removeWatcherCanaryDirectory: vi.fn() })) diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.ts index 0e49e71ab57..8bb2dab9e3d 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.ts @@ -3,10 +3,10 @@ import { writeFileSync } from 'node:fs' import { createWatcherCanaryDirectory, removeWatcherCanaryDirectory -} from '../../parcel-watcher-canary-directory' +} from './parcel-watcher-canary-directory' import { reserveWatcherChild, WatcherChildCapacityError } from './parcel-watcher-child-registry' import { registerWatcherChildPhysicalExit } from './parcel-watcher-child-termination' -import type { WatcherToHostMessage } from '../../parcel-watcher-process-protocol' +import type { WatcherToHostMessage } from './parcel-watcher-process-protocol' export type LaunchedWatcherChild = { child: ChildProcess diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-messaging.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-messaging.ts index 91d6a54310c..73e429abed5 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-messaging.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-messaging.ts @@ -1,5 +1,5 @@ import type { ChildProcess } from 'node:child_process' -import type { HostToWatcherMessage } from '../../parcel-watcher-process-protocol' +import type { HostToWatcherMessage } from './parcel-watcher-process-protocol' export function sendToWatcherChild(proc: ChildProcess, message: HostToWatcherMessage): void { try { diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-recovery.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-recovery.ts index 15cc5c8fd04..124154eb563 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-recovery.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-recovery.ts @@ -3,16 +3,16 @@ import { failAllWatcherSubscriptions, type PendingWatcherUnsubscribe, resolvePendingWatcherUnsubscribes -} from '../../parcel-watcher-host-subscriptions' +} from './parcel-watcher-host-subscriptions' import type { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { createWatcherChildTerminationFailure, terminateWatcherChild } from './parcel-watcher-child-termination' import { resetPendingSubscribeAttempt } from './parcel-watcher-pending-subscribe' -import type { WatcherProcessCrashFuse } from '../../parcel-watcher-crash-fuse' -import { WatcherProcessFailure } from '../../parcel-watcher-process-failure' -import type { WatcherProcessSubscriptionRecord } from '../../parcel-watcher-process-subscription' +import type { WatcherProcessCrashFuse } from './parcel-watcher-crash-fuse' +import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' export function recoverWatcherRecordsAfterChildGone( records: Map, diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-slot.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-slot.ts index fc14fad08a1..c88c0797a94 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-slot.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-slot.ts @@ -1,5 +1,5 @@ import type { ChildProcessHandle } from '@orca/process-host/process-spec' -import { removeWatcherCanaryDirectory } from '../../parcel-watcher-canary-directory' +import { removeWatcherCanaryDirectory } from './parcel-watcher-canary-directory' export class WatcherChildSlot { child: ChildProcessHandle | null = null diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-termination.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-termination.ts index b11a67431ff..bac94574d81 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-termination.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-child-termination.ts @@ -2,8 +2,8 @@ import type { ChildProcess } from 'node:child_process' import { type PendingWatcherUnsubscribe, resolvePendingWatcherUnsubscribes -} from '../../parcel-watcher-host-subscriptions' -import { WatcherProcessFailure } from '../../parcel-watcher-process-failure' +} from './parcel-watcher-host-subscriptions' +import { WatcherProcessFailure } from './parcel-watcher-process-failure' import { RUNTIME_FILE_WATCH_EXIT_DEADLINE_MS } from '../../../../shared/runtime-file-watch-limits' export const WATCHER_PROCESS_HARD_KILL_DELAY_MS = 5_000 diff --git a/src/main/ipc/parcel-watcher-crash-fuse.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-crash-fuse.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-crash-fuse.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-crash-fuse.test.ts diff --git a/src/main/ipc/parcel-watcher-crash-fuse.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-crash-fuse.ts similarity index 100% rename from src/main/ipc/parcel-watcher-crash-fuse.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-crash-fuse.ts diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts index 62109fae257..b478775d1b7 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts @@ -22,8 +22,8 @@ import { disposeWatcherProcess, resetWatcherProcessForTest, subscribeViaWatcherProcess -} from '../../parcel-watcher-process' -import type { WatcherProcessSubscription } from '../../parcel-watcher-process-subscription' +} from './parcel-watcher-process' +import type { WatcherProcessSubscription } from './parcel-watcher-process-subscription' type SentMessage = { op: string; id: number } diff --git a/src/main/ipc/parcel-watcher-entry-path.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-entry-path.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.test.ts diff --git a/src/main/ipc/parcel-watcher-entry-path.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.ts similarity index 96% rename from src/main/ipc/parcel-watcher-entry-path.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.ts index 79fb16e166b..e5d5082f91b 100644 --- a/src/main/ipc/parcel-watcher-entry-path.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-entry-path.ts @@ -3,7 +3,7 @@ import { getForkedChildEntryPath, resolveForkedChildEntryPath, resolveForkedChildEntryPathWithoutApp -} from '../forked-child-entry-path' +} from '../../../forked-child-entry-path' const WATCHER_ENTRY_FILENAME = 'parcel-watcher-process-entry.js' diff --git a/src/main/ipc/parcel-watcher-event-cancellation.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-event-cancellation.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-event-cancellation.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-event-cancellation.test.ts diff --git a/src/main/ipc/parcel-watcher-event-delivery.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-event-delivery.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts diff --git a/src/main/ipc/parcel-watcher-event-delivery.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.ts similarity index 94% rename from src/main/ipc/parcel-watcher-event-delivery.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.ts index f51f9562d3c..869f7d8e5be 100644 --- a/src/main/ipc/parcel-watcher-event-delivery.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.ts @@ -1,8 +1,8 @@ import { stat } from 'node:fs/promises' -import { PrioritySemaphore } from '../../shared/priority-semaphore' -import { mapWithConcurrency } from '../../shared/map-with-concurrency' +import { PrioritySemaphore } from '../../../../shared/priority-semaphore' +import { mapWithConcurrency } from '../../../../shared/map-with-concurrency' import type { Event as ParcelWatcherEvent } from '@parcel/watcher' -import { MAX_BATCHED_WATCHER_EVENTS } from './filesystem-watcher-event-batch' +import { MAX_BATCHED_WATCHER_EVENTS } from '../../filesystem-watcher-event-batch' import type { WatcherProcessDeliveryOptions, WatcherProcessEvent diff --git a/src/main/ipc/parcel-watcher-host-subscriptions.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-host-subscriptions.ts similarity index 97% rename from src/main/ipc/parcel-watcher-host-subscriptions.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-host-subscriptions.ts index 67e2f4edce1..05b9b2d3634 100644 --- a/src/main/ipc/parcel-watcher-host-subscriptions.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-host-subscriptions.ts @@ -2,14 +2,14 @@ import type { ChildProcess } from 'node:child_process' import { resetPendingSubscribeAttempt, takePendingSubscribe -} from './filesystem/watcher-process/parcel-watcher-pending-subscribe' +} from './parcel-watcher-pending-subscribe' import { isWatcherProcessFailure, WatcherProcessFailure } from './parcel-watcher-process-failure' import type { HostToWatcherMessage, WatcherToHostMessage } from './parcel-watcher-process-protocol' import type { WatcherProcessSubscription, WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' -import { RUNTIME_FILE_WATCH_CANCEL_TIMEOUT_MS } from '../../shared/runtime-file-watch-limits' +import { RUNTIME_FILE_WATCH_CANCEL_TIMEOUT_MS } from '../../../../shared/runtime-file-watch-limits' export type PendingWatcherUnsubscribe = (error?: Error) => void diff --git a/src/main/ipc/parcel-watcher-in-process-fallback.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-in-process-fallback.ts similarity index 100% rename from src/main/ipc/parcel-watcher-in-process-fallback.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-in-process-fallback.ts diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-interrupted-cancellation.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-interrupted-cancellation.ts index f9be7bc374d..05b6f28eb17 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-interrupted-cancellation.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-interrupted-cancellation.ts @@ -1,6 +1,6 @@ import { resetPendingSubscribeAttempt } from './parcel-watcher-pending-subscribe' -import type { WatcherProcessFailure } from '../../parcel-watcher-process-failure' -import type { WatcherProcessSubscriptionRecord } from '../../parcel-watcher-process-subscription' +import type { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' export function cancelInterruptedWatcherSubscribe(args: { record: WatcherProcessSubscriptionRecord diff --git a/src/main/ipc/parcel-watcher-module-loader.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-module-loader.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-module-loader.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-module-loader.test.ts diff --git a/src/main/ipc/parcel-watcher-module-loader.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-module-loader.ts similarity index 100% rename from src/main/ipc/parcel-watcher-module-loader.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-module-loader.ts diff --git a/src/main/ipc/parcel-watcher-native-error-retirement.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-native-error-retirement.test.ts similarity index 98% rename from src/main/ipc/parcel-watcher-native-error-retirement.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-native-error-retirement.test.ts index 389436f1266..eb75dc9a8ef 100644 --- a/src/main/ipc/parcel-watcher-native-error-retirement.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-native-error-retirement.test.ts @@ -15,7 +15,7 @@ vi.mock('node:fs', () => ({ })) import { WatcherProcessSupervisor } from './parcel-watcher-process-supervisor' -import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './filesystem/watcher-process/parcel-watcher-child-termination' +import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './parcel-watcher-child-termination' describe('native watcher error retirement', () => { let supervisor: WatcherProcessSupervisor diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-cancellation.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-cancellation.ts index 4fc67138540..877f85d275a 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-cancellation.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-cancellation.ts @@ -1,8 +1,8 @@ import type { ChildProcess } from 'node:child_process' import type { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { takePendingSubscribe } from './parcel-watcher-pending-subscribe' -import type { WatcherProcessFailure } from '../../parcel-watcher-process-failure' -import type { WatcherProcessSubscriptionRecord } from '../../parcel-watcher-process-subscription' +import type { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' type CancelPendingWatcherSubscribeOptions = { record: WatcherProcessSubscriptionRecord diff --git a/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-subscribe.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-subscribe.ts index c0cb3a97611..f37c7b3dbf6 100644 --- a/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-subscribe.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-pending-subscribe.ts @@ -1,8 +1,8 @@ -import { WatcherProcessFailure } from '../../parcel-watcher-process-failure' +import { WatcherProcessFailure } from './parcel-watcher-process-failure' import type { PendingWatcherProcessSubscribe, WatcherProcessSubscriptionRecord -} from '../../parcel-watcher-process-subscription' +} from './parcel-watcher-process-subscription' export function installPendingSubscribeControls( record: WatcherProcessSubscriptionRecord, diff --git a/src/main/ipc/parcel-watcher-process-dispose.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-dispose.test.ts similarity index 96% rename from src/main/ipc/parcel-watcher-process-dispose.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-dispose.test.ts index fd022c16622..89b5e1a052d 100644 --- a/src/main/ipc/parcel-watcher-process-dispose.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-dispose.test.ts @@ -10,7 +10,7 @@ vi.mock('./parcel-watcher-process-supervisor', () => ({ disposeAndWait = supervisorDispose } })) -vi.mock('./runtime-watcher-process-pool', () => ({ +vi.mock('../../runtime-watcher-process-pool', () => ({ RuntimeWatcherProcessPool: class { disposeAndWait = poolDispose } diff --git a/src/main/ipc/parcel-watcher-process-entry.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts similarity index 99% rename from src/main/ipc/parcel-watcher-process-entry.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts index cb07e10e2ad..b78b0774347 100644 --- a/src/main/ipc/parcel-watcher-process-entry.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.test.ts @@ -19,7 +19,7 @@ vi.mock('node:fs', () => ({ writeFileSync: writeFileSyncMock })) vi.mock('node:fs/promises', () => ({ stat: statMock })) -vi.mock('./shallow-watch-delivery-probe', () => ({ +vi.mock('../../shallow-watch-delivery-probe', () => ({ detectShallowWatchDelivery: detectShallowWatchDeliveryMock, hasShallowWatchDelivered: () => false, noteShallowWatchDelivered: vi.fn() diff --git a/src/main/ipc/parcel-watcher-process-entry.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts similarity index 97% rename from src/main/ipc/parcel-watcher-process-entry.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts index c1325ba20ae..b7051ccdabb 100644 --- a/src/main/ipc/parcel-watcher-process-entry.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-entry.ts @@ -2,8 +2,8 @@ import type * as ParcelWatcher from '@parcel/watcher' import { loadParcelWatcher } from './parcel-watcher-module-loader' import { startShallowWatcher } from './parcel-watcher-shallow-subscription' -import { detectShallowWatchDelivery } from './shallow-watch-delivery-probe' -import { startWatcherDeliveryCanary } from './parcel-watcher-delivery-canary' +import { detectShallowWatchDelivery } from '../../shallow-watch-delivery-probe' +import { startWatcherDeliveryCanary } from '../../parcel-watcher-delivery-canary' import { createWatcherProcessEventDeliveryQueue, type WatcherProcessEventDeliveryQueue @@ -14,7 +14,7 @@ import type { WatcherProcessSubscribeOptions, WatcherToHostMessage } from './parcel-watcher-process-protocol' -import { errorMessage } from '../../shared/error-message' +import { errorMessage } from '../../../../shared/error-message' type WatcherSubscription = { unsubscribe: () => Promise diff --git a/src/main/ipc/parcel-watcher-process-failure.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-failure.ts similarity index 100% rename from src/main/ipc/parcel-watcher-process-failure.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-failure.ts diff --git a/src/main/ipc/parcel-watcher-process-protocol.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-protocol.ts similarity index 100% rename from src/main/ipc/parcel-watcher-process-protocol.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-protocol.ts diff --git a/src/main/ipc/parcel-watcher-process-subscription.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-subscription.ts similarity index 100% rename from src/main/ipc/parcel-watcher-process-subscription.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-subscription.ts diff --git a/src/main/ipc/parcel-watcher-process-supervisor-options.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor-options.ts similarity index 100% rename from src/main/ipc/parcel-watcher-process-supervisor-options.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor-options.ts diff --git a/src/main/ipc/parcel-watcher-process-supervisor.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor.ts similarity index 89% rename from src/main/ipc/parcel-watcher-process-supervisor.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor.ts index 7963c2c7289..25d95530fd6 100644 --- a/src/main/ipc/parcel-watcher-process-supervisor.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-supervisor.ts @@ -1,26 +1,26 @@ import type { ChildProcess } from 'node:child_process' -import { restartCancelledWatcherChild } from './filesystem/watcher-process/parcel-watcher-cancellation-restart' -import { WatcherCancellationTracker } from './filesystem/watcher-process/parcel-watcher-cancellation-tracker' +import { restartCancelledWatcherChild } from './parcel-watcher-cancellation-restart' +import { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { getWatcherProcessEntryPath, watcherProcessEntryExists } from './parcel-watcher-entry-path' -import { WatcherChildSlot } from './filesystem/watcher-process/parcel-watcher-child-slot' -import * as termination from './filesystem/watcher-process/parcel-watcher-child-termination' -import { launchWatcherChild } from './filesystem/watcher-process/parcel-watcher-child-launch' -import { sendToWatcherChild } from './filesystem/watcher-process/parcel-watcher-child-messaging' +import { WatcherChildSlot } from './parcel-watcher-child-slot' +import * as termination from './parcel-watcher-child-termination' +import { launchWatcherChild } from './parcel-watcher-child-launch' +import { sendToWatcherChild } from './parcel-watcher-child-messaging' import { recoverWatcherRecordsAfterChildGone, terminateDisconnectedWatcherChild -} from './filesystem/watcher-process/parcel-watcher-child-recovery' -import { resetWatcherChildRegistryForTest } from './filesystem/watcher-process/parcel-watcher-child-registry' +} from './parcel-watcher-child-recovery' +import { resetWatcherChildRegistryForTest } from './parcel-watcher-child-registry' import { WatcherSupervisorCapacityWait } from './parcel-watcher-supervisor-capacity-wait' import { WatcherProcessCrashFuse } from './parcel-watcher-crash-fuse' -import { WatcherDeliveryHealthMonitor } from './parcel-watcher-delivery-health' -import { cancelInterruptedWatcherSubscribe } from './filesystem/watcher-process/parcel-watcher-interrupted-cancellation' +import { WatcherDeliveryHealthMonitor } from '../../parcel-watcher-delivery-health' +import { cancelInterruptedWatcherSubscribe } from './parcel-watcher-interrupted-cancellation' import { type PendingWatcherUnsubscribe, reportWatcherTerminalError, resolvePendingWatcherUnsubscribes } from './parcel-watcher-host-subscriptions' -import { cancelPendingWatcherSubscribe } from './filesystem/watcher-process/parcel-watcher-pending-cancellation' +import { cancelPendingWatcherSubscribe } from './parcel-watcher-pending-cancellation' import type { WatcherProcessFailure } from './parcel-watcher-process-failure' import type { WatcherProcessSubscribeOptions, @@ -39,7 +39,7 @@ import { } from './parcel-watcher-supervisor-subscribe' import { disposeWatcherSupervisor } from './parcel-watcher-supervisor-disposal' import { handleWatcherSupervisorMessage } from './parcel-watcher-supervisor-message' -import { WatcherOwnedChildren } from './filesystem/watcher-process/parcel-watcher-owned-children' +import { WatcherOwnedChildren } from './parcel-watcher-owned-children' export class WatcherProcessSupervisor { private nextSubscriptionId = 1 diff --git a/src/main/ipc/parcel-watcher-process-test-child.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process-test-child.ts similarity index 100% rename from src/main/ipc/parcel-watcher-process-test-child.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process-test-child.ts diff --git a/src/main/ipc/parcel-watcher-process.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts similarity index 99% rename from src/main/ipc/parcel-watcher-process.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts index 51c6b2fa7e3..6c23440ff80 100644 --- a/src/main/ipc/parcel-watcher-process.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts @@ -1,10 +1,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { WATCHER_PROCESS_CANCEL_TIMEOUT_MS } from './filesystem/watcher-process/parcel-watcher-cancellation-tracker' +import { WATCHER_PROCESS_CANCEL_TIMEOUT_MS } from './parcel-watcher-cancellation-tracker' import { terminateWatcherChild, WATCHER_PROCESS_EXIT_DEADLINE_MS, WATCHER_PROCESS_HARD_KILL_DELAY_MS -} from './filesystem/watcher-process/parcel-watcher-child-termination' +} from './parcel-watcher-child-termination' import { acknowledgeWatcherSubscribe as ackSubscribe, currentWatcherChild, diff --git a/src/main/ipc/parcel-watcher-process.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process.ts similarity index 96% rename from src/main/ipc/parcel-watcher-process.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-process.ts index 1e2fa20f1cc..e4b632e0f33 100644 --- a/src/main/ipc/parcel-watcher-process.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-process.ts @@ -5,7 +5,7 @@ import type { WatcherProcessHooks, WatcherProcessSubscription } from './parcel-watcher-process-subscription' -import { RuntimeWatcherProcessPool } from './runtime-watcher-process-pool' +import { RuntimeWatcherProcessPool } from '../../runtime-watcher-process-pool' const sharedWatcherProcessSupervisor = new WatcherProcessSupervisor() // Healthy roots share a child; quarantine adds isolation only after faults to limit RSS. diff --git a/src/main/ipc/parcel-watcher-root-path-rewrite.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-root-path-rewrite.test.ts similarity index 98% rename from src/main/ipc/parcel-watcher-root-path-rewrite.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-root-path-rewrite.test.ts index ed23652194e..e917677802f 100644 --- a/src/main/ipc/parcel-watcher-root-path-rewrite.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-root-path-rewrite.test.ts @@ -6,7 +6,7 @@ import { createAliasedWatcherRoot, removeAliasedWatcherRoot, type AliasedWatcherRoot -} from './watcher-aliased-root-fixture' +} from '../../watcher-aliased-root-fixture' import { acknowledgeWatcherSubscribe, currentWatcherChild, diff --git a/src/main/ipc/parcel-watcher-shallow-subscription.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.test.ts similarity index 100% rename from src/main/ipc/parcel-watcher-shallow-subscription.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.test.ts diff --git a/src/main/ipc/parcel-watcher-shallow-subscription.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.ts similarity index 96% rename from src/main/ipc/parcel-watcher-shallow-subscription.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.ts index c6cfdf03737..e942d3c3e47 100644 --- a/src/main/ipc/parcel-watcher-shallow-subscription.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-shallow-subscription.ts @@ -2,9 +2,9 @@ import { statSync, watch, type FSWatcher } from 'node:fs' import { stat } from 'node:fs/promises' import { join } from 'node:path' import type { Event as ParcelWatcherEvent } from '@parcel/watcher' -import { startShallowFileWatcher } from './parcel-watcher-shallow-file-subscription' -import { closeFileSystemWatcher } from './rebinding-file-watch' -import { watcherDirectoryIdentity } from './watcher-directory-identity' +import { startShallowFileWatcher } from '../../parcel-watcher-shallow-file-subscription' +import { closeFileSystemWatcher } from '../../rebinding-file-watch' +import { watcherDirectoryIdentity } from '../../watcher-directory-identity' export type ShallowWatcherSubscription = { unsubscribe: () => Promise diff --git a/src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts similarity index 94% rename from src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts index c358d73734a..4f0845ebd26 100644 --- a/src/main/ipc/parcel-watcher-supervisor-capacity-wait.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.test.ts @@ -3,7 +3,7 @@ import { MAX_PHYSICAL_WATCHER_CHILDREN, reserveWatcherChild, resetWatcherChildRegistryForTest -} from './filesystem/watcher-process/parcel-watcher-child-registry' +} from './parcel-watcher-child-registry' import { WatcherSupervisorCapacityWait } from './parcel-watcher-supervisor-capacity-wait' describe('WatcherSupervisorCapacityWait', () => { diff --git a/src/main/ipc/parcel-watcher-supervisor-capacity-wait.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.ts similarity index 95% rename from src/main/ipc/parcel-watcher-supervisor-capacity-wait.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.ts index aa338b39306..87115f07aed 100644 --- a/src/main/ipc/parcel-watcher-supervisor-capacity-wait.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity-wait.ts @@ -1,9 +1,9 @@ import { onWatcherChildCapacityAvailable, WatcherChildCapacityError -} from './filesystem/watcher-process/parcel-watcher-child-registry' +} from './parcel-watcher-child-registry' import { watcherHostFailure, WatcherProcessFailure } from './parcel-watcher-process-failure' -import { PromiseSettlementWaiters } from '../../shared/promise-settlement-waiters' +import { PromiseSettlementWaiters } from '../../../../shared/promise-settlement-waiters' type CapacityWaitState = { waiters: PromiseSettlementWaiters diff --git a/src/main/ipc/parcel-watcher-supervisor-capacity.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts similarity index 97% rename from src/main/ipc/parcel-watcher-supervisor-capacity.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts index 0606c4e175f..e1a26c03b2a 100644 --- a/src/main/ipc/parcel-watcher-supervisor-capacity.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts @@ -1,9 +1,9 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './filesystem/watcher-process/parcel-watcher-child-termination' +import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './parcel-watcher-child-termination' import { MAX_PHYSICAL_WATCHER_CHILDREN, resetWatcherChildRegistryForTest -} from './filesystem/watcher-process/parcel-watcher-child-registry' +} from './parcel-watcher-child-registry' import { acknowledgeWatcherSubscribe, currentWatcherChild, diff --git a/src/main/ipc/parcel-watcher-supervisor-disposal.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.test.ts similarity index 95% rename from src/main/ipc/parcel-watcher-supervisor-disposal.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.test.ts index d8b32d0bc39..d3aaa15770c 100644 --- a/src/main/ipc/parcel-watcher-supervisor-disposal.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeEach, expect, it, vi } from 'vitest' import { acknowledgeWatcherSubscribe, FakeWatcherChild } from './parcel-watcher-process-test-child' -import { resetWatcherChildRegistryForTest } from './filesystem/watcher-process/parcel-watcher-child-registry' +import { resetWatcherChildRegistryForTest } from './parcel-watcher-child-registry' const { forkMock } = vi.hoisted(() => ({ forkMock: vi.fn() })) vi.mock('node:child_process', () => ({ fork: forkMock })) diff --git a/src/main/ipc/parcel-watcher-supervisor-disposal.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.ts similarity index 80% rename from src/main/ipc/parcel-watcher-supervisor-disposal.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.ts index 26d113e0f86..07bc73ef3ee 100644 --- a/src/main/ipc/parcel-watcher-supervisor-disposal.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-disposal.ts @@ -1,6 +1,6 @@ import type { ChildProcess } from 'node:child_process' import { removeWatcherCanaryDirectory } from './parcel-watcher-canary-directory' -import type { WatcherCancellationTracker } from './filesystem/watcher-process/parcel-watcher-cancellation-tracker' +import type { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { type PendingWatcherUnsubscribe, resolvePendingWatcherUnsubscribes @@ -8,8 +8,8 @@ import { import { resetPendingSubscribeAttempt, takePendingSubscribe -} from './filesystem/watcher-process/parcel-watcher-pending-subscribe' -import { signalWatcherChild } from './filesystem/watcher-process/parcel-watcher-child-termination' +} from './parcel-watcher-pending-subscribe' +import { signalWatcherChild } from './parcel-watcher-child-termination' import { watcherHostFailure } from './parcel-watcher-process-failure' import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' diff --git a/src/main/ipc/parcel-watcher-supervisor-message.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-message.ts similarity index 94% rename from src/main/ipc/parcel-watcher-supervisor-message.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-message.ts index 75e3f3e7c21..25ff7c92535 100644 --- a/src/main/ipc/parcel-watcher-supervisor-message.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-message.ts @@ -1,5 +1,5 @@ import type { ChildProcess } from 'node:child_process' -import type { WatcherCancellationTracker } from './filesystem/watcher-process/parcel-watcher-cancellation-tracker' +import type { WatcherCancellationTracker } from './parcel-watcher-cancellation-tracker' import { handleWatcherHostMessage, type PendingWatcherUnsubscribe, @@ -9,7 +9,7 @@ import { import { startInterruptedSubscribeTimeout, startPendingSubscribeTimeout -} from './filesystem/watcher-process/parcel-watcher-pending-subscribe' +} from './parcel-watcher-pending-subscribe' import { WatcherProcessFailure } from './parcel-watcher-process-failure' import type { WatcherToHostMessage } from './parcel-watcher-process-protocol' import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' diff --git a/src/main/ipc/parcel-watcher-supervisor-subscribe.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-subscribe.ts similarity index 94% rename from src/main/ipc/parcel-watcher-supervisor-subscribe.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-subscribe.ts index 63a7085f9c6..064d77bae35 100644 --- a/src/main/ipc/parcel-watcher-supervisor-subscribe.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-subscribe.ts @@ -1,15 +1,18 @@ import type { ChildProcess } from 'node:child_process' import { existsSync } from 'node:fs' -import { sendToWatcherChild } from './filesystem/watcher-process/parcel-watcher-child-messaging' +import { sendToWatcherChild } from './parcel-watcher-child-messaging' import { createHostWatcherSubscription } from './parcel-watcher-host-subscriptions' import type { PendingWatcherUnsubscribe } from './parcel-watcher-host-subscriptions' import { subscribeWithInProcessWatcher } from './parcel-watcher-in-process-fallback' import { installPendingSubscribeControls, resetPendingSubscribeAttempt -} from './filesystem/watcher-process/parcel-watcher-pending-subscribe' +} from './parcel-watcher-pending-subscribe' import { WatcherProcessFailure } from './parcel-watcher-process-failure' -import { rewriteWatcherEvents, resolveWatcherRootPaths } from './watcher-event-root-path-rewrite' +import { + rewriteWatcherEvents, + resolveWatcherRootPaths +} from '../../watcher-event-root-path-rewrite' import type { HostToWatcherMessage, WatcherProcessSubscribeOptions diff --git a/src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts b/src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts similarity index 98% rename from src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts rename to src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts index 6475df4be41..f49bc5717a9 100644 --- a/src/main/ipc/parcel-watcher-unsubscribe-timeout.test.ts +++ b/src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './filesystem/watcher-process/parcel-watcher-child-termination' +import { WATCHER_PROCESS_EXIT_DEADLINE_MS } from './parcel-watcher-child-termination' import { WATCHER_PROCESS_UNSUBSCRIBE_TIMEOUT_MS } from './parcel-watcher-host-subscriptions' import { acknowledgeWatcherSubscribe as ackSubscribe, diff --git a/src/main/ipc/parcel-watcher-crash-fuse-recovery.test.ts b/src/main/ipc/parcel-watcher-crash-fuse-recovery.test.ts index b123e6f90fa..abe0bb38b7f 100644 --- a/src/main/ipc/parcel-watcher-crash-fuse-recovery.test.ts +++ b/src/main/ipc/parcel-watcher-crash-fuse-recovery.test.ts @@ -1,10 +1,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { CRASH_FUSE_COOLDOWN_INITIAL_MS } from './parcel-watcher-crash-fuse' +import { CRASH_FUSE_COOLDOWN_INITIAL_MS } from './filesystem/watcher-process/parcel-watcher-crash-fuse' import { acknowledgeWatcherSubscribe as ackSubscribe, currentWatcherChild, FakeWatcherChild as FakeChild -} from './parcel-watcher-process-test-child' +} from './filesystem/watcher-process/parcel-watcher-process-test-child' const { forkMock, existsSyncMock } = vi.hoisted(() => ({ forkMock: vi.fn(), @@ -18,7 +18,7 @@ vi.mock('node:fs', () => ({ rmSync: vi.fn() })) -import { createWatcherProcessSupervisor } from './parcel-watcher-process' +import { createWatcherProcessSupervisor } from './filesystem/watcher-process/parcel-watcher-process' const currentChild = (): FakeChild => currentWatcherChild(forkMock) diff --git a/src/main/ipc/parcel-watcher-delivery-canary.ts b/src/main/ipc/parcel-watcher-delivery-canary.ts index dedda4bb2ef..389bd77fbdc 100644 --- a/src/main/ipc/parcel-watcher-delivery-canary.ts +++ b/src/main/ipc/parcel-watcher-delivery-canary.ts @@ -4,7 +4,7 @@ import { type FSWatcher, mkdtempSync, rmSync, watch, writeFileSync } from 'node: import { tmpdir } from 'node:os' import { join } from 'node:path' import type * as ParcelWatcher from '@parcel/watcher' -import { loadParcelWatcher } from './parcel-watcher-module-loader' +import { loadParcelWatcher } from './filesystem/watcher-process/parcel-watcher-module-loader' import { hasShallowWatchDelivered, noteShallowWatchDelivered } from './shallow-watch-delivery-probe' import { errorMessage } from '../../shared/error-message' diff --git a/src/main/ipc/parcel-watcher-delivery-health.test.ts b/src/main/ipc/parcel-watcher-delivery-health.test.ts index babea4b6c17..c626658a915 100644 --- a/src/main/ipc/parcel-watcher-delivery-health.test.ts +++ b/src/main/ipc/parcel-watcher-delivery-health.test.ts @@ -3,7 +3,7 @@ import { acknowledgeWatcherSubscribe as ackSubscribe, currentWatcherChild, FakeWatcherChild as FakeChild -} from './parcel-watcher-process-test-child' +} from './filesystem/watcher-process/parcel-watcher-process-test-child' const { forkMock, existsSyncMock } = vi.hoisted(() => ({ forkMock: vi.fn(), @@ -21,10 +21,10 @@ import { CANARY_STALL_BACKOFF_INITIAL_MS, CANARY_STALL_BACKOFF_MAX_MS } from './parcel-watcher-delivery-canary' -import { WatcherProcessCrashFuse } from './parcel-watcher-crash-fuse' +import { WatcherProcessCrashFuse } from './filesystem/watcher-process/parcel-watcher-crash-fuse' import { WatcherDeliveryHealthMonitor } from './parcel-watcher-delivery-health' -import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' -import { createWatcherProcessSupervisor } from './parcel-watcher-process' +import type { WatcherProcessSubscriptionRecord } from './filesystem/watcher-process/parcel-watcher-process-subscription' +import { createWatcherProcessSupervisor } from './filesystem/watcher-process/parcel-watcher-process' describe('watcher delivery stall reporting', () => { beforeEach(() => { diff --git a/src/main/ipc/parcel-watcher-delivery-health.ts b/src/main/ipc/parcel-watcher-delivery-health.ts index 2b40ff90f07..349f9de5859 100644 --- a/src/main/ipc/parcel-watcher-delivery-health.ts +++ b/src/main/ipc/parcel-watcher-delivery-health.ts @@ -1,10 +1,10 @@ -import type { WatcherProcessCrashFuse } from './parcel-watcher-crash-fuse' +import type { WatcherProcessCrashFuse } from './filesystem/watcher-process/parcel-watcher-crash-fuse' import { CANARY_STALL_BACKOFF_INITIAL_MS, CANARY_STALL_BACKOFF_MAX_MS, type WatcherDeliveryHealth } from './parcel-watcher-delivery-canary' -import type { WatcherProcessSubscriptionRecord } from './parcel-watcher-process-subscription' +import type { WatcherProcessSubscriptionRecord } from './filesystem/watcher-process/parcel-watcher-process-subscription' /** Rescan roots during OS event stalls with backoff, then once on recovery; the child keeps its streams. */ export class WatcherDeliveryHealthMonitor { diff --git a/src/main/ipc/parcel-watcher-shallow-file-subscription.test.ts b/src/main/ipc/parcel-watcher-shallow-file-subscription.test.ts index fc8579eb96f..3d84ce27269 100644 --- a/src/main/ipc/parcel-watcher-shallow-file-subscription.test.ts +++ b/src/main/ipc/parcel-watcher-shallow-file-subscription.test.ts @@ -7,7 +7,7 @@ import { MISSING_FILE_SWEEP_INTERVAL_MS, startShallowFileWatcher } from './parcel-watcher-shallow-file-subscription' -import type { ShallowWatcherSubscription } from './parcel-watcher-shallow-subscription' +import type { ShallowWatcherSubscription } from './filesystem/watcher-process/parcel-watcher-shallow-subscription' let commonDir: string let subscription: ShallowWatcherSubscription | null diff --git a/src/main/ipc/parcel-watcher-shallow-file-subscription.ts b/src/main/ipc/parcel-watcher-shallow-file-subscription.ts index fb9346af220..37989651746 100644 --- a/src/main/ipc/parcel-watcher-shallow-file-subscription.ts +++ b/src/main/ipc/parcel-watcher-shallow-file-subscription.ts @@ -1,7 +1,7 @@ import { statSync } from 'node:fs' import { join } from 'node:path' import type { Event as ParcelWatcherEvent } from '@parcel/watcher' -import type { ShallowWatcherSubscription } from './parcel-watcher-shallow-subscription' +import type { ShallowWatcherSubscription } from './filesystem/watcher-process/parcel-watcher-shallow-subscription' import { watchFileAcrossReplacement, type RebindingFileWatch } from './rebinding-file-watch' // Rebind missed replacements; Git metadata polling provides the shorter staleness backstop. diff --git a/src/main/ipc/runtime-watcher-pending-assignment.ts b/src/main/ipc/runtime-watcher-pending-assignment.ts index 69487668762..bd87e6e6922 100644 --- a/src/main/ipc/runtime-watcher-pending-assignment.ts +++ b/src/main/ipc/runtime-watcher-pending-assignment.ts @@ -1,5 +1,5 @@ -import { WatcherProcessFailure } from './parcel-watcher-process-failure' -import type { WatcherProcessHooks } from './parcel-watcher-process-subscription' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' +import type { WatcherProcessHooks } from './filesystem/watcher-process/parcel-watcher-process-subscription' import { PromiseSettlementWaiters } from '../../shared/promise-settlement-waiters' const DEFAULT_QUARANTINE_WAIT_TIMEOUT_MS = 60_000 diff --git a/src/main/ipc/runtime-watcher-pool-lifecycle.ts b/src/main/ipc/runtime-watcher-pool-lifecycle.ts index de7f47e4055..a7b7f2f2487 100644 --- a/src/main/ipc/runtime-watcher-pool-lifecycle.ts +++ b/src/main/ipc/runtime-watcher-pool-lifecycle.ts @@ -1,4 +1,4 @@ -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' export class RuntimeWatcherPoolLifecycle { readonly isolatedRoots = new Set() diff --git a/src/main/ipc/runtime-watcher-pool-shutdown.test.ts b/src/main/ipc/runtime-watcher-pool-shutdown.test.ts index 1f37f3540c5..69d11ec50f1 100644 --- a/src/main/ipc/runtime-watcher-pool-shutdown.test.ts +++ b/src/main/ipc/runtime-watcher-pool-shutdown.test.ts @@ -1,7 +1,7 @@ import { expect, it, vi } from 'vitest' import { RuntimeWatcherProcessPool } from './runtime-watcher-process-pool' -import type { WatcherProcessHooks } from './parcel-watcher-process-subscription' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessHooks } from './filesystem/watcher-process/parcel-watcher-process-subscription' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' function supervisor() { const pending = Promise.withResolvers() diff --git a/src/main/ipc/runtime-watcher-pool-state.ts b/src/main/ipc/runtime-watcher-pool-state.ts index a99c9b93895..c04e4c81262 100644 --- a/src/main/ipc/runtime-watcher-pool-state.ts +++ b/src/main/ipc/runtime-watcher-pool-state.ts @@ -1,4 +1,4 @@ -import type { WatcherProcessSupervisor } from './parcel-watcher-process-supervisor' +import type { WatcherProcessSupervisor } from './filesystem/watcher-process/parcel-watcher-process-supervisor' export type RuntimeWatcherPoolSupervisor = Pick & Partial> diff --git a/src/main/ipc/runtime-watcher-predecessor-barriers.ts b/src/main/ipc/runtime-watcher-predecessor-barriers.ts index f5301eb5432..45ad89700c1 100644 --- a/src/main/ipc/runtime-watcher-predecessor-barriers.ts +++ b/src/main/ipc/runtime-watcher-predecessor-barriers.ts @@ -1,4 +1,4 @@ -import type { WatcherProcessFailure } from './parcel-watcher-process-failure' +import type { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' /** Retain exact failed-child ownership until its native handles are gone. */ export class RuntimeWatcherPredecessorBarriers { diff --git a/src/main/ipc/runtime-watcher-process-pool.test.ts b/src/main/ipc/runtime-watcher-process-pool.test.ts index 5b326191d03..9ab3e78e111 100644 --- a/src/main/ipc/runtime-watcher-process-pool.test.ts +++ b/src/main/ipc/runtime-watcher-process-pool.test.ts @@ -1,11 +1,11 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' -import type { WatcherProcessSubscribeOptions } from './parcel-watcher-process-protocol' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' +import type { WatcherProcessSubscribeOptions } from './filesystem/watcher-process/parcel-watcher-process-protocol' import type { WatcherProcessCallback, WatcherProcessHooks, WatcherProcessSubscription -} from './parcel-watcher-process-subscription' +} from './filesystem/watcher-process/parcel-watcher-process-subscription' import { RuntimeWatcherProcessPool } from './runtime-watcher-process-pool' type InstalledSubscription = { diff --git a/src/main/ipc/runtime-watcher-process-pool.ts b/src/main/ipc/runtime-watcher-process-pool.ts index 40eddc2d55b..d2c499de15a 100644 --- a/src/main/ipc/runtime-watcher-process-pool.ts +++ b/src/main/ipc/runtime-watcher-process-pool.ts @@ -1,11 +1,11 @@ -import { isWatcherProcessFailure, WatcherProcessFailure } from './parcel-watcher-process-failure' -import { WatcherProcessSupervisor } from './parcel-watcher-process-supervisor' -import type { WatcherProcessSubscribeOptions } from './parcel-watcher-process-protocol' +import * as failures from './filesystem/watcher-process/parcel-watcher-process-failure' +import { WatcherProcessSupervisor } from './filesystem/watcher-process/parcel-watcher-process-supervisor' +import type { WatcherProcessSubscribeOptions } from './filesystem/watcher-process/parcel-watcher-process-protocol' import type { WatcherProcessCallback, WatcherProcessHooks, WatcherProcessSubscription -} from './parcel-watcher-process-subscription' +} from './filesystem/watcher-process/parcel-watcher-process-subscription' import { RuntimeWatcherPendingAssignment } from './runtime-watcher-pending-assignment' import { RuntimeWatcherDisposalOwners } from './runtime-watcher-disposal-owners' import { RuntimeWatcherPoolLifecycle } from './runtime-watcher-pool-lifecycle' @@ -105,7 +105,7 @@ export class RuntimeWatcherProcessPool { unsubscribePromise ??= subscription.unsubscribe().then( () => releaseAssignment(), (error: unknown) => { - if (isWatcherProcessFailure(error) && error.scope === 'supervisor') { + if (failures.isWatcherProcessFailure(error) && error.scope === 'supervisor') { this.retireSlot(slot, error) } else { releaseAssignment() @@ -121,7 +121,7 @@ export class RuntimeWatcherProcessPool { /** Kill every pooled watcher child (production shutdown or test reset). */ dispose(): void { this.lifecycle.dispose() - const disposedError = new WatcherProcessFailure( + const disposedError = new failures.WatcherProcessFailure( 'file watcher supervisor disposed', 'supervisor', 'supervisor_disposed' @@ -163,7 +163,7 @@ export class RuntimeWatcherProcessPool { ): RuntimeWatcherPoolAssignment | Promise { this.predecessorBarriers.throwIfRetained(dir) if (this.lifecycle.failedQuarantineRoots.has(dir)) { - throw new WatcherProcessFailure( + throw new failures.WatcherProcessFailure( 'file watcher process failed again in quarantine', 'supervisor', 'supervisor_crash_fuse' @@ -253,7 +253,7 @@ export class RuntimeWatcherProcessPool { return slot } - private retireSlot(slot: RuntimeWatcherPoolSlot, error: WatcherProcessFailure): void { + private retireSlot(slot: RuntimeWatcherPoolSlot, error: failures.WatcherProcessFailure): void { if (slot.retired) { return } diff --git a/src/main/ipc/runtime-watcher-quarantine-queue.ts b/src/main/ipc/runtime-watcher-quarantine-queue.ts index bc2b4cf5fd4..bbad34666b8 100644 --- a/src/main/ipc/runtime-watcher-quarantine-queue.ts +++ b/src/main/ipc/runtime-watcher-quarantine-queue.ts @@ -1,4 +1,4 @@ -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' type QuarantineWaiter = { dir: string diff --git a/src/main/ipc/runtime-watcher-subscription-failure.ts b/src/main/ipc/runtime-watcher-subscription-failure.ts index 5e238cab8ed..3768954939f 100644 --- a/src/main/ipc/runtime-watcher-subscription-failure.ts +++ b/src/main/ipc/runtime-watcher-subscription-failure.ts @@ -1,7 +1,7 @@ import { isWatcherProcessFailure, type WatcherProcessFailure -} from './parcel-watcher-process-failure' +} from './filesystem/watcher-process/parcel-watcher-process-failure' export function handleRuntimeWatcherSubscriptionFailure( error: unknown, diff --git a/src/main/ipc/worktree-git-common-narrow-watch.ts b/src/main/ipc/worktree-git-common-narrow-watch.ts index 7bbe6946c24..b91dd6aaf38 100644 --- a/src/main/ipc/worktree-git-common-narrow-watch.ts +++ b/src/main/ipc/worktree-git-common-narrow-watch.ts @@ -1,7 +1,7 @@ import { stat } from 'node:fs/promises' import { join } from 'node:path' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' -import { isWatcherProcessFailure } from './parcel-watcher-process-failure' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' +import { isWatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import type { WorktreeBaseWatchTarget } from './worktree-base-directory-event-filter' import type { WorktreeBasePollEvent, diff --git a/src/main/ipc/worktree-git-common-native-upgrade-poll.test.ts b/src/main/ipc/worktree-git-common-native-upgrade-poll.test.ts index 7d792be2397..7d7734b9626 100644 --- a/src/main/ipc/worktree-git-common-native-upgrade-poll.test.ts +++ b/src/main/ipc/worktree-git-common-native-upgrade-poll.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import { GIT_COMMON_NATIVE_UPGRADE_INTERVAL_MS } from './worktree-git-common-native-upgrade-poll' const { pollingMock, statMock, subscribeMock } = vi.hoisted(() => ({ @@ -9,7 +9,9 @@ const { pollingMock, statMock, subscribeMock } = vi.hoisted(() => ({ })) vi.mock('node:fs/promises', () => ({ stat: statMock })) -vi.mock('./parcel-watcher-process', () => ({ subscribeViaWatcherProcess: subscribeMock })) +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ + subscribeViaWatcherProcess: subscribeMock +})) vi.mock('./worktree-git-common-polling', () => ({ startGitCommonPolling: pollingMock })) import { startGitCommonNarrowWatch } from './worktree-git-common-narrow-watch' diff --git a/src/main/ipc/worktree-git-common-native-upgrade-poll.ts b/src/main/ipc/worktree-git-common-native-upgrade-poll.ts index 347cf1ab425..cd2ccd7a0c3 100644 --- a/src/main/ipc/worktree-git-common-native-upgrade-poll.ts +++ b/src/main/ipc/worktree-git-common-native-upgrade-poll.ts @@ -1,4 +1,4 @@ -import { CRASH_FUSE_COOLDOWN_INITIAL_MS } from './parcel-watcher-crash-fuse' +import { CRASH_FUSE_COOLDOWN_INITIAL_MS } from './filesystem/watcher-process/parcel-watcher-crash-fuse' // Retry when the crash fuse half-opens so fallback polling does not remain permanent until restart. export const GIT_COMMON_NATIVE_UPGRADE_INTERVAL_MS = CRASH_FUSE_COOLDOWN_INITIAL_MS diff --git a/src/main/ipc/worktree-git-common-primary-watch.ts b/src/main/ipc/worktree-git-common-primary-watch.ts index fc199d51aba..cc8c050395f 100644 --- a/src/main/ipc/worktree-git-common-primary-watch.ts +++ b/src/main/ipc/worktree-git-common-primary-watch.ts @@ -1,6 +1,6 @@ import { join } from 'node:path' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' -import type { WatcherProcessSubscription } from './parcel-watcher-process-subscription' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' +import type { WatcherProcessSubscription } from './filesystem/watcher-process/parcel-watcher-process-subscription' import type { WorktreeBasePollEvent, WorktreeBaseSubscription, diff --git a/src/main/ipc/worktree-git-common-watch-reconciliation.test.ts b/src/main/ipc/worktree-git-common-watch-reconciliation.test.ts index d71337cb055..23137fb4645 100644 --- a/src/main/ipc/worktree-git-common-watch-reconciliation.test.ts +++ b/src/main/ipc/worktree-git-common-watch-reconciliation.test.ts @@ -1,7 +1,7 @@ import { join, resolve } from 'node:path' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' -import type { WatcherProcessCallback } from './parcel-watcher-process-subscription' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' +import type { WatcherProcessCallback } from './filesystem/watcher-process/parcel-watcher-process-subscription' import { startGitCommonPolling } from './worktree-git-common-polling' import { startGitCommonNarrowWatch } from './worktree-git-common-narrow-watch' import { createGitCommonWatchReconciliation } from './worktree-git-common-watch-reconciliation' @@ -11,7 +11,9 @@ import type { } from './worktree-base-directory-poller' vi.mock('node:fs/promises', () => ({ stat: vi.fn(async () => ({ isDirectory: () => true })) })) -vi.mock('./parcel-watcher-process', () => ({ subscribeViaWatcherProcess: vi.fn() })) +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ + subscribeViaWatcherProcess: vi.fn() +})) vi.mock('./worktree-git-common-polling', () => ({ startGitCommonPolling: vi.fn() })) const commonDirPath = resolve('repository', '.git') diff --git a/src/main/ipc/worktree-git-common-watch.test.ts b/src/main/ipc/worktree-git-common-watch.test.ts index f23951ae1b1..73772794658 100644 --- a/src/main/ipc/worktree-git-common-watch.test.ts +++ b/src/main/ipc/worktree-git-common-watch.test.ts @@ -5,12 +5,12 @@ import { performance as nodePerformance } from 'node:perf_hooks' import { updateActiveGitStatusRefBinding } from './worktree-git-status-ref-watch' import { tmpdir } from 'node:os' import { join } from 'node:path' -import { subscribeViaWatcherProcess } from './parcel-watcher-process' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { subscribeViaWatcherProcess } from './filesystem/watcher-process/parcel-watcher-process' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' import type { WatcherProcessCallback, WatcherProcessHooks -} from './parcel-watcher-process-subscription' +} from './filesystem/watcher-process/parcel-watcher-process-subscription' import type { WorktreeBaseWatchTarget } from './worktree-base-directory-event-filter' import type { WorktreeBasePollEvent, @@ -18,7 +18,7 @@ import type { } from './worktree-base-directory-poller' import { startGitCommonWatch } from './worktree-git-common-watch' -vi.mock('./parcel-watcher-process', () => ({ +vi.mock('./filesystem/watcher-process/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: vi.fn() })) const { statCalls } = vi.hoisted(() => ({ statCalls: [] as string[] })) diff --git a/src/main/ipc/wsl-watcher-process-exit.ts b/src/main/ipc/wsl-watcher-process-exit.ts index ebb897dfe96..6dc703256ae 100644 --- a/src/main/ipc/wsl-watcher-process-exit.ts +++ b/src/main/ipc/wsl-watcher-process-exit.ts @@ -1,6 +1,6 @@ import type { ChildProcessWithoutNullStreams } from 'node:child_process' import { PhysicalExitTracker } from '../../shared/physical-exit-tracker' -import { WatcherProcessFailure } from './parcel-watcher-process-failure' +import { WatcherProcessFailure } from './filesystem/watcher-process/parcel-watcher-process-failure' export const WSL_WATCHER_PHYSICAL_EXIT_TIMEOUT_MS = 8_000 diff --git a/src/main/orcad/orcad-entry.ts b/src/main/orcad/orcad-entry.ts index 8734f40bfeb..e92e0112ef6 100644 --- a/src/main/orcad/orcad-entry.ts +++ b/src/main/orcad/orcad-entry.ts @@ -126,7 +126,8 @@ async function startOrcadRuntime( const { AgentStatusObservedPaneIdentities, AgentStatusObservedPaneIdentityCapture } = await import('../runtime/agent-status-observed-pane-identity') - const { disposeWatcherProcessAndWait } = await import('../ipc/parcel-watcher-process') + const { disposeWatcherProcessAndWait } = + await import('../ipc/filesystem/watcher-process/parcel-watcher-process') let paneGridsForShutdown: { flushPaneGrids(): Promise | null } | null = null let profileStoreForShutdown: diff --git a/src/main/orcad/orcad-forked-child-paths.test.ts b/src/main/orcad/orcad-forked-child-paths.test.ts index 223daf8137a..2297e19cfbd 100644 --- a/src/main/orcad/orcad-forked-child-paths.test.ts +++ b/src/main/orcad/orcad-forked-child-paths.test.ts @@ -3,7 +3,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterEach, beforeEach, describe, expect, it } from 'vitest' import { getAppEnvironment } from '../../shared/app-environment' -import { getWatcherProcessEntryPath } from '../ipc/parcel-watcher-entry-path' +import { getWatcherProcessEntryPath } from '../ipc/filesystem/watcher-process/parcel-watcher-entry-path' import { AI_VAULT_SERVICE_ENTRY_FILENAME, getAiVaultServiceEntryPath diff --git a/src/main/orcad/orcad-runtime-native-preflight.test.ts b/src/main/orcad/orcad-runtime-native-preflight.test.ts index f3edacde03d..b1af6ac6938 100644 --- a/src/main/orcad/orcad-runtime-native-preflight.test.ts +++ b/src/main/orcad/orcad-runtime-native-preflight.test.ts @@ -3,7 +3,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { WatcherProcessCallback, WatcherProcessHooks -} from '../ipc/parcel-watcher-process-subscription' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' import { PtySpawnHealthTimeoutError } from '../daemon/pty-subprocess/spawn-preflight' import { preflightOrcadNativeRuntime } from './orcad-runtime-native-preflight' import { WindowsProcessTableTimeoutError } from '../windows/windows-process-table-timeout-error' @@ -41,7 +41,7 @@ vi.mock('node:fs/promises', () => ({ writeFile: fixture.write, rm: fixture.remove })) -vi.mock('../ipc/parcel-watcher-process-supervisor', () => ({ +vi.mock('../ipc/filesystem/watcher-process/parcel-watcher-process-supervisor', () => ({ WatcherProcessSupervisor: class { subscribe = fixture.subscribe dispose = fixture.dispose diff --git a/src/main/orcad/orcad-runtime-native-preflight.ts b/src/main/orcad/orcad-runtime-native-preflight.ts index cc9cbff9c1f..ab7afca3d8c 100644 --- a/src/main/orcad/orcad-runtime-native-preflight.ts +++ b/src/main/orcad/orcad-runtime-native-preflight.ts @@ -6,8 +6,8 @@ import { PTY_SPAWN_HEALTH_TIMEOUT_MS, runPtySpawnHealthProbe } from '../daemon/pty-subprocess/spawn-preflight' -import { WatcherProcessSupervisor } from '../ipc/parcel-watcher-process-supervisor' -import { resolveWatcherProcessEntryPath } from '../ipc/parcel-watcher-entry-path' +import { WatcherProcessSupervisor } from '../ipc/filesystem/watcher-process/parcel-watcher-process-supervisor' +import { resolveWatcherProcessEntryPath } from '../ipc/filesystem/watcher-process/parcel-watcher-entry-path' import { resolveOrcadInstallRoot } from './orcad-app-paths' import { isWindowsProcessTableAvailable, diff --git a/src/main/plugins/plugin-content-safety.test.ts b/src/main/plugins/plugin-content-safety.test.ts index af907f4a4ab..e3b82da55a1 100644 --- a/src/main/plugins/plugin-content-safety.test.ts +++ b/src/main/plugins/plugin-content-safety.test.ts @@ -2,7 +2,7 @@ import { mkdtemp, mkdir, rm, symlink, truncate, writeFile } from 'node:fs/promis import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterEach, describe, expect, it, vi } from 'vitest' -import { disposeWatcherProcess } from '../ipc/parcel-watcher-process' +import { disposeWatcherProcess } from '../ipc/filesystem/watcher-process/parcel-watcher-process' import { fingerprintPluginConsent } from '../../shared/plugins/plugin-consent-fingerprint' import { pluginManifestSchema, type PluginManifest } from '../../shared/plugins/plugin-manifest' import { diff --git a/src/main/plugins/plugin-dev-watcher-unknown-identity.test.ts b/src/main/plugins/plugin-dev-watcher-unknown-identity.test.ts index b93db9891b5..2b00ee5fe22 100644 --- a/src/main/plugins/plugin-dev-watcher-unknown-identity.test.ts +++ b/src/main/plugins/plugin-dev-watcher-unknown-identity.test.ts @@ -4,8 +4,8 @@ import { mkdir, rename, rm, stat, symlink } from 'node:fs/promises' import type * as FsPromises from 'node:fs/promises' import { join } from 'node:path' import { afterEach, beforeEach, expect, it, vi } from 'vitest' -import { subscribeViaWatcherProcess } from '../ipc/parcel-watcher-process' -import type { WatcherProcessCallback } from '../ipc/parcel-watcher-process-subscription' +import { subscribeViaWatcherProcess } from '../ipc/filesystem/watcher-process/parcel-watcher-process' +import type { WatcherProcessCallback } from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' import { createAliasedWatcherRoot, removeAliasedWatcherRoot, @@ -15,7 +15,9 @@ import { watcherDirectoryIdentity } from '../ipc/watcher-directory-identity' import { PluginDevWatcher } from './plugin-dev-watcher' import { PluginServiceHousekeeping } from './plugin-service-housekeeping' -vi.mock('../ipc/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: vi.fn() })) +vi.mock('../ipc/filesystem/watcher-process/parcel-watcher-process', () => ({ + subscribeViaWatcherProcess: vi.fn() +})) vi.mock('node:fs', async () => { const actual = await vi.importActual('node:fs') return { ...actual, statSync: vi.fn(actual.statSync) } diff --git a/src/main/plugins/plugin-dev-watcher.test.ts b/src/main/plugins/plugin-dev-watcher.test.ts index c103a2771d2..453c2081174 100644 --- a/src/main/plugins/plugin-dev-watcher.test.ts +++ b/src/main/plugins/plugin-dev-watcher.test.ts @@ -4,12 +4,12 @@ import type * as Fs from 'node:fs' import { mkdir, realpath, rename, rm, stat, symlink, writeFile } from 'node:fs/promises' import type * as FsPromises from 'node:fs/promises' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { subscribeViaWatcherProcess } from '../ipc/parcel-watcher-process' +import { subscribeViaWatcherProcess } from '../ipc/filesystem/watcher-process/parcel-watcher-process' import type { WatcherProcessCallback, WatcherProcessHooks -} from '../ipc/parcel-watcher-process-subscription' -import type { WatcherProcessSubscribeOptions } from '../ipc/parcel-watcher-process-protocol' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' +import type { WatcherProcessSubscribeOptions } from '../ipc/filesystem/watcher-process/parcel-watcher-process-protocol' import { createAliasedWatcherRoot as createNativeAliasedWatcherRoot, removeAliasedWatcherRoot, @@ -18,7 +18,9 @@ import { import { PluginDevWatcher } from './plugin-dev-watcher' import { PluginServiceHousekeeping } from './plugin-service-housekeeping' -vi.mock('../ipc/parcel-watcher-process', () => ({ subscribeViaWatcherProcess: vi.fn() })) +vi.mock('../ipc/filesystem/watcher-process/parcel-watcher-process', () => ({ + subscribeViaWatcherProcess: vi.fn() +})) vi.mock('node:fs', async () => { const actual = await vi.importActual('node:fs') return { ...actual, statSync: vi.fn(actual.statSync) } diff --git a/src/main/plugins/plugin-dev-watcher.ts b/src/main/plugins/plugin-dev-watcher.ts index 307a1765fc8..af55d8f91fb 100644 --- a/src/main/plugins/plugin-dev-watcher.ts +++ b/src/main/plugins/plugin-dev-watcher.ts @@ -1,9 +1,9 @@ import { realpathSync, statSync, type BigIntStats } from 'node:fs' import { realpath, stat } from 'node:fs/promises' import { basename, dirname, resolve } from 'node:path' -import { subscribeViaWatcherProcess } from '../ipc/parcel-watcher-process' -import type { WatcherProcessSubscribeOptions } from '../ipc/parcel-watcher-process-protocol' -import type { WatcherProcessSubscription } from '../ipc/parcel-watcher-process-subscription' +import { subscribeViaWatcherProcess } from '../ipc/filesystem/watcher-process/parcel-watcher-process' +import type { WatcherProcessSubscribeOptions } from '../ipc/filesystem/watcher-process/parcel-watcher-process-protocol' +import type { WatcherProcessSubscription } from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' import { resolveWatcherRootPaths } from '../ipc/watcher-event-root-path-rewrite' import { watcherDirectoryIdentity } from '../ipc/watcher-directory-identity' diff --git a/src/main/runtime/file-watcher-host.test.ts b/src/main/runtime/file-watcher-host.test.ts index befe38ca114..df6d7cefc92 100644 --- a/src/main/runtime/file-watcher-host.test.ts +++ b/src/main/runtime/file-watcher-host.test.ts @@ -4,8 +4,8 @@ import type { WatcherProcessCallback, WatcherProcessHooks, WatcherProcessSubscription -} from '../ipc/parcel-watcher-process-subscription' -import { WatcherProcessFailure } from '../ipc/parcel-watcher-process-failure' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' +import { WatcherProcessFailure } from '../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import { WATCHER_IGNORE_DIRS, buildParcelWatcherIgnoreOptions @@ -21,7 +21,7 @@ const { subscribeViaRuntimeWatcherProcessMock: vi.fn() })) -vi.mock('../ipc/parcel-watcher-process', () => ({ +vi.mock('../ipc/filesystem/watcher-process/parcel-watcher-process', () => ({ forgetRuntimeWatcherProcessRoot: forgetRuntimeWatcherProcessRootMock, resetRuntimeWatcherProcessForTest: resetRuntimeWatcherProcessForTestMock, subscribeViaRuntimeWatcherProcess: subscribeViaRuntimeWatcherProcessMock diff --git a/src/main/runtime/file-watcher-host.ts b/src/main/runtime/file-watcher-host.ts index 97ef4f32158..3368b0c3f0c 100644 --- a/src/main/runtime/file-watcher-host.ts +++ b/src/main/runtime/file-watcher-host.ts @@ -3,13 +3,13 @@ import { forgetRuntimeWatcherProcessRoot, resetRuntimeWatcherProcessForTest, subscribeViaRuntimeWatcherProcess -} from '../ipc/parcel-watcher-process' -import type { WatcherProcessEvent } from '../ipc/parcel-watcher-process-protocol' -import type { WatcherProcessSubscription } from '../ipc/parcel-watcher-process-subscription' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process' +import type { WatcherProcessEvent } from '../ipc/filesystem/watcher-process/parcel-watcher-process-protocol' +import type { WatcherProcessSubscription } from '../ipc/filesystem/watcher-process/parcel-watcher-process-subscription' import { isWatcherProcessFailure, type WatcherProcessFailure -} from '../ipc/parcel-watcher-process-failure' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import { WATCHER_IGNORE_DIRS, buildParcelWatcherIgnoreOptions diff --git a/src/main/runtime/files/watch/file-watcher-leases.ts b/src/main/runtime/files/watch/file-watcher-leases.ts index 3a376cd372e..ef5879af75d 100644 --- a/src/main/runtime/files/watch/file-watcher-leases.ts +++ b/src/main/runtime/files/watch/file-watcher-leases.ts @@ -1,5 +1,5 @@ import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' -import { isWatcherProcessFailure } from '../../../ipc/parcel-watcher-process-failure' +import { isWatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' const pendingRuntimeFileWatcherUnsubscribes = new Set>() diff --git a/src/main/runtime/files/watch/windows-file-watch.ts b/src/main/runtime/files/watch/windows-file-watch.ts index 6dab78bf1ac..3eb0e62c8f5 100644 --- a/src/main/runtime/files/watch/windows-file-watch.ts +++ b/src/main/runtime/files/watch/windows-file-watch.ts @@ -1,7 +1,7 @@ import type { FsChangeEvent } from '../../../../shared/filesystem-entry-types' import { PhysicalExitTracker } from '../../../../shared/physical-exit-tracker' import { watch as watchFs } from 'node:fs' -import { WatcherProcessFailure } from '../../../ipc/parcel-watcher-process-failure' +import { WatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import { watchBatchFlushDelayMs } from '../../../../shared/filesystem-watch-batch-window' // Why: each emit is a whole-tree overflow refresh, so pace it slower than precise watcher batches. diff --git a/src/main/runtime/orca-runtime-files-watch.test.ts b/src/main/runtime/orca-runtime-files-watch.test.ts index ecf4a8d7c2d..fdebd770d33 100644 --- a/src/main/runtime/orca-runtime-files-watch.test.ts +++ b/src/main/runtime/orca-runtime-files-watch.test.ts @@ -4,7 +4,7 @@ import type * as Fs from 'node:fs' import type * as FsPromises from 'node:fs/promises' import type * as FilesystemAuth from '../ipc/filesystem-auth' import type { FsChangeEvent } from '../../shared/filesystem-entry-types' -import { WatcherProcessFailure } from '../ipc/parcel-watcher-process-failure' +import { WatcherProcessFailure } from '../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import { acquireWatcherRemovalGate } from '../ipc/watcher-removal-gate' const { diff --git a/src/main/runtime/rpc/methods/file-watch-stream-lifecycle.ts b/src/main/runtime/rpc/methods/file-watch-stream-lifecycle.ts index 10f0489ecc9..1a20317c0fd 100644 --- a/src/main/runtime/rpc/methods/file-watch-stream-lifecycle.ts +++ b/src/main/runtime/rpc/methods/file-watch-stream-lifecycle.ts @@ -1,4 +1,4 @@ -import { isWatcherProcessFailure } from '../../../ipc/parcel-watcher-process-failure' +import { isWatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import type { OrcaRuntimeService } from '../../orca-runtime' import { createFileWatchEventBatcher } from './file-watch-event-batcher' import type { FileWatchBatchCadence } from '../../../../shared/rpc-contract/files-target-params' diff --git a/src/main/runtime/rpc/methods/files-watch-cleanup.test.ts b/src/main/runtime/rpc/methods/files-watch-cleanup.test.ts index a16fbacc44a..efb5763a9b2 100644 --- a/src/main/runtime/rpc/methods/files-watch-cleanup.test.ts +++ b/src/main/runtime/rpc/methods/files-watch-cleanup.test.ts @@ -1,6 +1,6 @@ import '../unused-default-rpc-methods.test-fixture' import { expect, it, vi } from 'vitest' -import { WatcherProcessFailure } from '../../../ipc/parcel-watcher-process-failure' +import { WatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import type { OrcaRuntimeService } from '../../orca-runtime' import type { RpcRequest } from '../core' import { RpcDispatcher } from '../dispatcher' diff --git a/src/main/runtime/runtime-root-watch-ownership.ts b/src/main/runtime/runtime-root-watch-ownership.ts index 890fa802033..a46e05ea408 100644 --- a/src/main/runtime/runtime-root-watch-ownership.ts +++ b/src/main/runtime/runtime-root-watch-ownership.ts @@ -1,7 +1,7 @@ import { isWatcherProcessFailure, type WatcherProcessFailure -} from '../ipc/parcel-watcher-process-failure' +} from '../ipc/filesystem/watcher-process/parcel-watcher-process-failure' type RuntimeRootOwnership = { rootPath: string diff --git a/src/main/runtime/runtime-root-watch-teardown.ts b/src/main/runtime/runtime-root-watch-teardown.ts index e9353d1da49..34630442ac4 100644 --- a/src/main/runtime/runtime-root-watch-teardown.ts +++ b/src/main/runtime/runtime-root-watch-teardown.ts @@ -1,4 +1,4 @@ -import { isWatcherProcessFailure } from '../ipc/parcel-watcher-process-failure' +import { isWatcherProcessFailure } from '../ipc/filesystem/watcher-process/parcel-watcher-process-failure' type RuntimeRootWatchTeardown = { closed: boolean diff --git a/tests/tools/repro-watcher-crash-7547/README.md b/tests/tools/repro-watcher-crash-7547/README.md index f91d8f1dce5..3a5a70cee71 100644 --- a/tests/tools/repro-watcher-crash-7547/README.md +++ b/tests/tools/repro-watcher-crash-7547/README.md @@ -40,7 +40,7 @@ npx electron-vite build node tests/tools/repro-watcher-crash-7547/fixed-child.cjs 15000 ``` -`fixed-child.cjs` esbuild-bundles the real `src/main/ipc/parcel-watcher-process.ts` +`fixed-child.cjs` esbuild-bundles the real `src/main/ipc/filesystem/watcher-process/parcel-watcher-process.ts` client and runs the same `delete-root` + `unsub-churn` load through the forked `out/main/parcel-watcher-process-entry.js`. Expected output: contained watcher process crashes (counted, recovered by respawn+resubscribe, surfaced through diff --git a/tests/tools/repro-watcher-crash-7547/fixed-child.cjs b/tests/tools/repro-watcher-crash-7547/fixed-child.cjs index 47b9749e48e..98f63d178e1 100644 --- a/tests/tools/repro-watcher-crash-7547/fixed-child.cjs +++ b/tests/tools/repro-watcher-crash-7547/fixed-child.cjs @@ -20,10 +20,18 @@ const { Worker, isMainThread, workerData } = require('node:worker_threads') const REPO_ROOT = path.resolve(__dirname, '..', '..', '..') // The real host client, bundled on demand so the harness always exercises the -// current src/main/ipc/parcel-watcher-process.ts. +// current src/main/ipc/filesystem/watcher-process/parcel-watcher-process.ts. const bundlePath = path.join(__dirname, 'parcel-watcher-process.bundle.cjs') if (isMainThread) { - const clientSrc = path.join(REPO_ROOT, 'src', 'main', 'ipc', 'parcel-watcher-process.ts') + const clientSrc = path.join( + REPO_ROOT, + 'src', + 'main', + 'ipc', + 'filesystem', + 'watcher-process', + 'parcel-watcher-process.ts' + ) require('esbuild').buildSync({ entryPoints: [clientSrc], bundle: true,