refactor: remove host-mode reviewer, container-only

Reviewer always runs in Docker container. No more snapshot file copy —
reviewer mounts the owner workspace directly as read-only. Removes
REVIEWER_CONTAINER_ENABLED toggle and host-mode fallback code.
This commit is contained in:
Eyejoker
2026-03-30 00:39:50 +09:00
parent 53ed437034
commit 42079d5796
2 changed files with 19 additions and 9 deletions

View File

@@ -70,13 +70,9 @@ export async function runAgentProcess(
envOverrides?: Record<string, string>,
): Promise<AgentOutput> {
// ── Reviewer container mode ─────────────────────────────────────
// When EJCLAW_REVIEWER_RUNTIME is set in envOverrides, run the reviewer
// inside a Docker container with read-only source mount instead of
// as a host process. This provides kernel-level write protection.
const isReviewerContainer =
envOverrides?.EJCLAW_REVIEWER_RUNTIME === '1' &&
getEnv('REVIEWER_CONTAINER_ENABLED') !== '0';
if (isReviewerContainer) {
// Reviewers always run inside a Docker container with read-only source
// mount for kernel-level write protection. Docker is required.
if (envOverrides?.EJCLAW_REVIEWER_RUNTIME === '1') {
const ownerWorkspaceDir =
envOverrides?.EJCLAW_WORK_DIR || group.workDir || process.cwd();
return runReviewerContainer({