Skip to content

feat: 사용 목적별 GPU 수명 정책과 v1.1.0 릴리즈 - #44

Merged
serithemage merged 3 commits into
mainfrom
feat/usage-modes-43
Oct 24, 2026
Merged

serithemage merged 3 commits into
mainfrom
feat/usage-modes-43

Conversation

@serithemage

@serithemage serithemage commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

기존에는 모든 사용 패턴에 무요청 30분 종료를 적용했다. 사용 목적별 정책을 추가해 배치는 작업 종료 후 정리하고, 온라인 서비스는 실행 용량을 유지한다. 기본 대화형 동작은 유휴 30분으로 유지한다.

  • tkf run은 명령 실행, 하트비트, 실패·취소·시간 제한 처리와 GPU 정리를 담당한다.
  • CLI와 CDK가 같은 정책 해석기를 사용한다. 기존 스택을 갱신할 때 IP 허용목록·AZ·알림 설정을 보존하고, 설정 기록이 없거나 손상됐으면 수동 이관을 안내한다.
  • README 3개 언어에 부팅·유휴 비용과 모드별 사용법을 설명하고, 패키지를 1.1.0으로 올린다.

검증: 테스트 246개, TypeScript 빌드, 오프라인 합성 13개 케이스 통과. npm tarball을 풀어 버전과 새 CLI 명령을 확인했다. 서울의 기존 스택에 배포해 UPDATE_COMPLETE, 새 출력, GPU 0대를 확인했다.

배치 래퍼는 macOS/Linux 대상이며 호스트 간 잠금은 제공하지 않는다. SIGKILL 이후 백스톱 종료는 보장하지 않는다. 실제 GPU 부팅·추론·배치 실행·온라인 전환은 실환경에서 검증하지 않았다.

Refs #43

serithemage and others added 3 commits October 24, 2026 14:17
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>

@codesolarlght codesolarlght Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔆 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.

Comment thread cli/program.ts
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 },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

@serithemage
serithemage merged commit b35b018 into main Oct 24, 2026
5 checks passed
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.

1 participant