Repository navigation
feat: 사용 목적별 GPU 수명 정책과 v1.1.0 릴리즈 - #44
Conversation
interactive(기본, 유휴 30분)/batch(tkf run, 작업 후 GPU 0)/online(유휴 종료 없음) 모드를 resolveUsagePolicy()로 CDK 컨텍스트와 CLI에서 같은 규칙으로 해석한다. 스택 출력 UsageMode/IdleMinutes/DeploymentSettings로 기존 스택의 보안 설정을 보존한 채 갱신한다. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔆 CodeSolar review 🟡 Minor notes
PR #44 adds usage modes (interactive/batch/online) for GPU lifecycle management. I reviewed the core policy resolver, CLI commands, lock mechanism, CDK stack, and tests. The implementation is thorough with proper validation, ownership checks, and cleanup logic. A few minor concerns noted.
Findings: 🟡 Low 1
solar-pro4 (openrouter) · 25 files · +2099/-79 · 266.4s · CodeSolar
Comment /codesolar on this PR to re-run the review.
| export function spawnJob(cmd: string, args: string[], env: Record<string, string>): JobHandle { | ||
| const p = spawn(cmd, args, { | ||
| stdio: [process.stdin.isTTY ? 'ignore' : 'inherit', 'inherit', 'inherit'], | ||
| env: { ...process.env, ...env }, |
There was a problem hiding this comment.
🟡 Low · security — spawnJob passes full parent environment to child process
spawnJob merges all of process.env into the child's environment ({ ...process.env, ...env }). The child inherits every environment variable the parent has, including any AWS credentials or other secrets present in the shell environment. The intended secret (API key) is passed explicitly via env, but the child also gets everything else. This is standard Node.js spawn behavior and the user's command already runs in their own environment, so the practical risk is low, but callers should be aware the child is not sandboxed from the parent's environment.
🔆 CodeSolar
기존에는 모든 사용 패턴에 무요청 30분 종료를 적용했다. 사용 목적별 정책을 추가해 배치는 작업 종료 후 정리하고, 온라인 서비스는 실행 용량을 유지한다. 기본 대화형 동작은 유휴 30분으로 유지한다.
tkf run은 명령 실행, 하트비트, 실패·취소·시간 제한 처리와 GPU 정리를 담당한다.검증: 테스트 246개, TypeScript 빌드, 오프라인 합성 13개 케이스 통과. npm tarball을 풀어 버전과 새 CLI 명령을 확인했다. 서울의 기존 스택에 배포해
UPDATE_COMPLETE, 새 출력, GPU 0대를 확인했다.배치 래퍼는 macOS/Linux 대상이며 호스트 간 잠금은 제공하지 않는다. SIGKILL 이후 백스톱 종료는 보장하지 않는다. 실제 GPU 부팅·추론·배치 실행·온라인 전환은 실환경에서 검증하지 않았다.
Refs #43