feat(offload): rename container to maintainer-worker and finalize COS integration

This commit is contained in:
mkorwel
2026-03-15 12:36:48 -07:00
parent db5a00489a
commit fb4c413412
3 changed files with 6 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ async function provisionWorker() {
'--boot-disk-size', '200GB',
'--boot-disk-type', 'pd-balanced',
'--container-image', imageUri,
'--container-name', 'maintainer-worker',
'--container-restart-policy', 'always',
'--container-mount-host-path', 'host-path=/home/$(whoami)/dev,mount-path=/home/node/dev,mode=rw',
'--container-mount-host-path', 'host-path=/home/$(whoami)/.gemini,mount-path=/home/node/.gemini,mode=rw',

View File

@@ -64,9 +64,9 @@ export async function runOrchestrator(args: string[], env: NodeJS.ProcessEnv = p
let tmuxCmd = `cd ${remoteWorktreeDir} && ${remoteWorker}; exec $SHELL`;
if (useContainer) {
// If in container mode, we jump into the shared 'gemini-sandbox' container
// If in container mode, we jump into the shared 'maintainer-worker' container
// We must use -i and -t for the interactive tmux session
tmuxCmd = `docker exec -it -w /home/node/dev/worktrees/offload-${prNumber}-${action} gemini-sandbox sh -c "${remoteWorker}; exec $SHELL"`;
tmuxCmd = `docker exec -it -w /home/node/dev/worktrees/offload-${prNumber}-${action} maintainer-worker sh -c "${remoteWorker}; exec $SHELL"`;
}
const sshInternal = `tmux attach-session -t ${sessionName} 2>/dev/null || tmux new-session -s ${sessionName} -n 'offload' ${q(tmuxCmd)}`;

View File

@@ -21,7 +21,7 @@ function getStatus() {
const activeSessions = tmux.stdout.toString().split('\n').filter(s => s.startsWith('offload-'));
// 2. Scan worktrees inside the CONTAINER
const findJobs = spawnSync('docker', ['exec', 'gemini-sandbox', 'ls', WORKTREE_BASE], { stdio: 'pipe' });
const findJobs = spawnSync('docker', ['exec', 'maintainer-worker', 'ls', WORKTREE_BASE], { stdio: 'pipe' });
const jobs = findJobs.stdout.toString().split('\n').filter(d => d.startsWith('offload-'));
if (jobs.length === 0 && activeSessions.length === 0) {
@@ -42,11 +42,11 @@ function getStatus() {
state = '🏃 RUNNING';
} else {
// Check logs inside the container
const logCheck = spawnSync('docker', ['exec', 'gemini-sandbox', 'sh', '-c', `ls ${WORKTREE_BASE}/${id}/.gemini/logs/*.log 2>/dev/null | tail -n 1`], { stdio: 'pipe' });
const logCheck = spawnSync('docker', ['exec', 'maintainer-worker', 'sh', '-c', `ls ${WORKTREE_BASE}/${id}/.gemini/logs/*.log 2>/dev/null | tail -n 1`], { stdio: 'pipe' });
const lastLogFile = logCheck.stdout.toString().trim();
if (lastLogFile) {
const logContent = spawnSync('docker', ['exec', 'gemini-sandbox', 'cat', lastLogFile], { stdio: 'pipe' }).stdout.toString();
const logContent = spawnSync('docker', ['exec', 'maintainer-worker', 'cat', lastLogFile], { stdio: 'pipe' }).stdout.toString();
if (logContent.includes('SUCCESS')) state = '✅ SUCCESS';
else if (logContent.includes('FAILED')) state = '❌ FAILED';
else state = '🏁 FINISHED';