Skip to content

Fix sandbox container test failure caused by pnpm workspace symlinks - #9

Merged
MuhammadAashirAslam merged 2 commits into
mainfrom
copilot/fix-lint-typecheck-build-test
Sep 9, 2026
Merged

MuhammadAashirAslam merged 2 commits into
mainfrom
copilot/fix-lint-typecheck-build-test

Conversation

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The Lint, Typecheck, Build & Test workflow was failing in @argus/sandbox because the Docker lifecycle test copied the package working directory (including pnpm symlinked node_modules) into the container. Docker rejected those links with invalid symlink during docker cp.

  • Root cause alignment

    • SandboxContainer lifecycle test used workspacePath: process.cwd(), which points at a workspace directory containing pnpm symlinks not portable via docker cp.
  • Targeted test fix

    • Updated the container lifecycle test to create and use an isolated temp workspace directory instead of the package cwd.
    • Added explicit cleanup of that temp directory in finally to keep the test hermetic.
  • Scope

    • Test-only change in packages/sandbox/test/container.test.ts; no runtime behavior changes.
const workspacePath = await fs.mkdtemp(path.join(os.tmpdir(), "argus-sandbox-test-"));
const container = new SandboxContainer({
  workspacePath,
  timeoutMs: 30000,
});

try {
  await container.initialize();
  // ...
} finally {
  await container.destroy();
  await fs.rm(workspacePath, { recursive: true, force: true });
}

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Lint, Typecheck, Build & Test Fix sandbox container test failure caused by pnpm workspace symlinks Sep 9, 2026
@MuhammadAashirAslam
MuhammadAashirAslam marked this pull request as ready for review September 9, 2026 09:10
@MuhammadAashirAslam
MuhammadAashirAslam merged commit 2e7f02f into main Sep 9, 2026
1 check passed
@MuhammadAashirAslam
MuhammadAashirAslam deleted the copilot/fix-lint-typecheck-build-test branch September 9, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants