Skip to content

fix(workbench): unblock Linux Docker bind-mount permissions#44

Open
Zhaiyuqing2003 wants to merge 1 commit into
developmentfrom
fix/workbench-linux-docker-permissions
Open

fix(workbench): unblock Linux Docker bind-mount permissions#44
Zhaiyuqing2003 wants to merge 1 commit into
developmentfrom
fix/workbench-linux-docker-permissions

Conversation

@Zhaiyuqing2003
Copy link
Copy Markdown

On Linux, the agent container (non-root) can't write to the host-mounted results directory because the bind-mount inherits the host owner.

  • chmod 0777 on workDir/resultsDir before docker run
  • chmod -R a+rw on resultsDir after docker cp so the result file is readable for cleanup
  • gitignore .superpowers/ (categorization runtime state)

Standalone fix; the eval/web-design-guidelines branch is stacked on this for the actual workbench case.

The agent container runs non-root and writes results into a host-mounted
results directory. On Linux the bind-mount inherits the host owner, so
the container couldn't write `result.json`. Fix:

- chmod 0777 on workDir + resultsDir before starting the container
- chmod -R a+rw on resultsDir after `docker cp` so cleanup can read it

Also gitignore .superpowers/ — runtime state from the categorization
pipeline (per-skill JSON cache, progress logs).
Copilot AI review requested due to automatic review settings May 7, 2026 16:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Linux host↔container permission mismatches for Docker workbench runs by proactively adjusting filesystem permissions so a non-root agent container can write results and the host can read/clean them up afterward.

Changes:

  • Set permissive mode bits on workDir and resultsDir before starting the Docker run.
  • After docker cp, attempt to make copied result artifacts readable/writable on the host.
  • Prevent .superpowers/ runtime state from being committed via .gitignore.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/workbench/docker-runner.ts Adds chmod steps around Docker execution and makes cleanup resilient to permission-related delete failures.
.gitignore Ignores .superpowers/ directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +215 to 217

await runShellCommand(`chmod -R a+rw ${shellQuote(resultsDir)}`, { cwd: repoRoot });
}
].filter(Boolean).join('\n\n'));
}

await runShellCommand(`chmod -R a+rw ${shellQuote(resultsDir)}`, { cwd: repoRoot });
Comment on lines 412 to +414
mkdirSync(resultsDir, { recursive: true });
chmodSync(workDir, 0o777);
chmodSync(resultsDir, 0o777);
Comment on lines +215 to 217

await runShellCommand(`chmod -R a+rw ${shellQuote(resultsDir)}`, { cwd: repoRoot });
}
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