refactor(main): organize WSL discovery filesystem and execution owners (#37722)

* refactor(main): organize WSL discovery filesystem and execution owners

* refactor(main): consolidate defining-owner path imports
This commit is contained in:
Neil
2026-11-02 23:36:23 -08:00
committed by GitHub
parent ac91ff6b05
commit 6d5edf8c33
625 changed files with 1729 additions and 1545 deletions
@@ -1,5 +1,5 @@
import { normalizeGhAccountBinding } from '../../../../shared/github/account-binding'
import { parseWslPath } from '../../../wsl'
import { parseWslPath } from '../../../wsl/filesystem/unc-path-access'
import { githubReadExecutionScope } from '../../github-read-execution-scope'
import type { GitHubApiRepository } from '../../github-api-repository'
import type { GhExecOptions } from '../github-exec-scope'
@@ -1,23 +1,23 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import type * as BackgroundDistroGate from '../../../wsl-background-distro-gate'
import type * as BackgroundDistroGate from '../../../wsl/discovery/wsl-background-distro-gate'
import {
fakeSpawnDispatch,
createFakeSpawnedChild
} from '../../../../shared/__fixtures__/fake-spawned-child'
import type * as WslModule from '../../../wsl'
import type * as WslModule from '../../../wsl/discovery/distro-catalog'
import { attachLogFixture, failedLogJob } from './check-job-log-test-fixture'
import { startCheckJobLogDownload } from './check-job-log-download'
import { prCheckLogTailCache } from './check-job-log-tails'
import { setDefaultWslDistroOverride } from '../../../git/runner'
const { spawnMock, distroMock } = vi.hoisted(() => ({ spawnMock: vi.fn(), distroMock: vi.fn() }))
// The default-distro fallback asks whether the distro runs before it may start it (E9).
vi.mock('../../../wsl-background-distro-gate', async (importOriginal) => ({
vi.mock('../../../wsl/discovery/wsl-background-distro-gate', async (importOriginal) => ({
...(await importOriginal<typeof BackgroundDistroGate>()),
readWslDistroRunningState: vi.fn(async () => 'running')
}))
vi.mock('node:child_process', async (original) => ({ ...(await original()), spawn: spawnMock }))
vi.mock('../../../wsl', async (original) => ({
vi.mock('../../../wsl/discovery/distro-catalog', async (original) => ({
...(await original<typeof WslModule>()),
getDefaultWslDistro: distroMock
}))