From 5d40c9f9eef43a14b02742c5dd51d8b15acd0a3f Mon Sep 17 00:00:00 2001 From: "allyblockcast[bot]" <290875700+allyblockcast[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 06:32:56 +0000 Subject: [PATCH] test(server): remove exact-duplicate workspace-runtime provisioning test (BLO-21118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "provisions worktree-local pnpm node_modules instead of reusing base-repo links" existed twice with byte-identical bodies (same blame timestamp, evidently a copy/paste artifact) but different timeouts — 30s and 15s. Both do a real pnpm install + git worktree provision, which the file's other heavy-provisioning tests budget 120s for. Under CI runner contention the 15s copy timed out and failed unrelated PRs' shards (observed on PR #956, 2026-08-04). Delete the redundant copy and align the survivor's timeout with its siblings instead of just papering over the flake with a bigger number on a test that shouldn't exist twice. --- .../src/__tests__/workspace-runtime.test.ts | 106 +----------------- 1 file changed, 1 insertion(+), 105 deletions(-) diff --git a/server/src/__tests__/workspace-runtime.test.ts b/server/src/__tests__/workspace-runtime.test.ts index 57133cdfa73f..728490bb884a 100644 --- a/server/src/__tests__/workspace-runtime.test.ts +++ b/server/src/__tests__/workspace-runtime.test.ts @@ -1575,7 +1575,7 @@ describe("realizeExecutionWorkspace", () => { await fs.realpath(path.join(repoRoot, "packages", "shared")), ); }, - 30_000, + 120_000, ); it("provisions successfully when install is needed but there are no symlinked node_modules to move", async () => { @@ -1966,110 +1966,6 @@ describe("realizeExecutionWorkspace", () => { } }); - it( - "provisions worktree-local pnpm node_modules instead of reusing base-repo links", - async () => { - const repoRoot = await createTempRepo(); - await fs.mkdir(path.join(repoRoot, "scripts"), { recursive: true }); - await fs.mkdir(path.join(repoRoot, "packages", "shared"), { recursive: true }); - await fs.mkdir(path.join(repoRoot, "server"), { recursive: true }); - await fs.writeFile( - path.join(repoRoot, "package.json"), - JSON.stringify( - { - name: "workspace-root", - private: true, - packageManager: "pnpm@9.15.4", - }, - null, - 2, - ), - "utf8", - ); - await fs.writeFile( - path.join(repoRoot, "pnpm-workspace.yaml"), - ["packages:", " - packages/*", " - server", ""].join("\n"), - "utf8", - ); - await fs.writeFile( - path.join(repoRoot, "packages", "shared", "package.json"), - JSON.stringify( - { - name: "@repo/shared", - version: "1.0.0", - private: true, - type: "module", - exports: "./index.js", - }, - null, - 2, - ), - "utf8", - ); - await fs.writeFile(path.join(repoRoot, "packages", "shared", "index.js"), "export const value = 'shared';\n", "utf8"); - await fs.writeFile( - path.join(repoRoot, "server", "package.json"), - JSON.stringify( - { - name: "server", - private: true, - type: "module", - dependencies: { - "@repo/shared": "workspace:*", - }, - }, - null, - 2, - ), - "utf8", - ); - await fs.writeFile(path.join(repoRoot, "server", "index.js"), "export {};\n", "utf8"); - await fs.copyFile(provisionWorktreeScriptPath, path.join(repoRoot, "scripts", "provision-worktree.sh")); - await fs.chmod(path.join(repoRoot, "scripts", "provision-worktree.sh"), 0o755); - await runPnpm(repoRoot, ["install"]); - await runGit(repoRoot, ["add", "."]); - await runGit(repoRoot, ["commit", "-m", "Add pnpm workspace fixture"]); - - const workspace = await realizeExecutionWorkspace({ - base: { - baseCwd: repoRoot, - source: "project_primary", - projectId: "project-1", - workspaceId: "workspace-1", - repoUrl: null, - repoRef: "HEAD", - }, - config: { - workspaceStrategy: { - type: "git_worktree", - branchTemplate: "{{issue.identifier}}-{{slug}}", - provisionCommand: "bash ./scripts/provision-worktree.sh", - }, - }, - issue: { - id: "issue-1", - identifier: "PAP-551", - title: "Provision local workspace dependencies", - }, - agent: { - id: "agent-1", - name: "Codex Coder", - companyId: "company-1", - }, - }); - - expect((await fs.lstat(path.join(workspace.cwd, "node_modules"))).isSymbolicLink()).toBe(false); - expect((await fs.lstat(path.join(workspace.cwd, "server", "node_modules"))).isSymbolicLink()).toBe(false); - await expect(fs.realpath(path.join(workspace.cwd, "server", "node_modules", "@repo", "shared"))).resolves.toBe( - await fs.realpath(path.join(workspace.cwd, "packages", "shared")), - ); - await expect(fs.realpath(path.join(repoRoot, "server", "node_modules", "@repo", "shared"))).resolves.toBe( - await fs.realpath(path.join(repoRoot, "packages", "shared")), - ); - }, - 15_000, - ); - it("records worktree setup and provision operations when a recorder is provided", async () => { const repoRoot = await createTempRepo(); const { recorder, operations } = createWorkspaceOperationRecorderDouble();