feat: mount owner session directory read-only in reviewer container

Allows reviewer to verify runtime state files (cron state, configs)
that the owner references by absolute host path. Mounted at the same
host path so absolute path references work inside the container.
This commit is contained in:
Eyejoker
2026-04-01 13:47:34 +09:00
parent 59cf931b82
commit 74ff662026

View File

@@ -321,6 +321,17 @@ export function buildReviewerMounts(
readonly: false,
});
// Owner session directory: read-only so reviewer can verify runtime state
// files (cron state, configs, etc.) that the owner references by absolute path.
const ownerSessionDir = path.join(DATA_DIR, 'sessions', group.folder);
if (fs.existsSync(ownerSessionDir)) {
mounts.push({
hostPath: ownerSessionDir,
containerPath: ownerSessionDir,
readonly: true,
});
}
// Codex OAuth: mount host's ~/.codex (read-only) so codex-runner can authenticate
const hostCodexHome =
process.env.CODEX_HOME || path.join(os.homedir(), '.codex');