# PLAN: bootstrap 설치 binary 확인 계약 ## 이 파일을 읽는 구현 에이전트에게 이 계획은 `[oto-binary]` 완료만 목표로 하며 `02_unix_bootstrap`, `03+01_windows_bootstrap` 완료 후 실행해야 한다. 두 predecessor의 `complete.log`가 없으면 구현을 시작하지 않는다. ## 배경 마일스톤은 bootstrap으로 설치된 `oto` binary 실행 경로와 버전 확인 방법을 OS별로 고정해야 한다. Unix/Windows script가 완성된 뒤 각 script에 binary 확인 절차와 테스트 fixture를 추가하는 후속 작업이다. ## Roadmap Targets - Milestone: `agent-roadmap/phase/control-plane-product-surface/milestones/cross-os-runner-bootstrap.md` - Epic: `[bootstrap-platforms] Cross-OS bootstrap contract` - Task id: `[oto-binary]` - Completion mode: check-on-pass ## 분석 결과 ### 읽은 파일 - `apps/runner/assets/script/shell/oto_agent_bootstrap.sh` - `apps/runner/test/oto_agent_bootstrap_script_test.dart` - `services/core/internal/httpserver/oto_agent_bootstrap.sh` - `services/core/internal/httpserver/server_test.go` - `agent-test/local/rules.md` - `agent-test/local/agent-smoke.md` ### 테스트 환경 규칙 기본 환경은 local이다. binary 확인은 script fixture에서 fake `oto` 실행 파일로 deterministic하게 검증할 수 있다. ### 테스트 커버리지 공백 현재 테스트는 archive에서 `oto`가 설치되고 background 실행 PID가 생기는지만 본다. 설치 직후 `oto --version` 또는 동등한 확인 절차는 없다. ### 심볼 참조 Unix script의 fake `oto` fixture와 Windows PowerShell fixture가 직접 검증 대상이다. Core embedded copy는 script 변경 시 일치해야 한다. ### 분할 판단 이 작업은 `04+02,03_binary_contract`로 Unix와 Windows bootstrap 구현에 의존한다. API나 registry 연결을 바꾸지 않는 bounded contract라 `local-G06`으로 충분하다. ### 범위 결정 근거 release asset 생성 자동화나 실제 release upload는 하지 않는다. 설치된 binary 실행 가능성/버전 확인 계약만 고정한다. ### 빌드 등급 `local-G06`: 선행 script가 완료되면 fake binary fixture와 deterministic tests 중심의 제한된 변경이다. ## 의존 관계 및 구현 순서 - 선행: `agent-task/m-cross-os-runner-bootstrap/02_unix_bootstrap/complete.log` - 선행: `agent-task/m-cross-os-runner-bootstrap/03+01_windows_bootstrap/complete.log` - 후속: `05+01,02,03_node_connect` ## 구현 체크리스트 - [ ] Unix bootstrap이 설치된 `oto` binary 실행 경로를 확인하고 버전 또는 동등한 health command를 실행한다. - [ ] Windows bootstrap이 설치된 `oto.exe` 실행 경로를 확인하고 버전 또는 동등한 health command를 실행한다. - [ ] fake binary fixture가 성공/실패 케이스를 검증하고 실패 출력에 token을 노출하지 않는다. - [ ] README 또는 agent-smoke의 binary 확인 기준이 바뀌면 함께 갱신한다. - [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. ### [BINARY-1] Unix binary 확인 문제: archive extraction 이후 binary 자체 검증이 없다. 해결 방법: 설치된 `oto` 경로에서 `--version` 또는 안정적인 health command를 실행하고 실패 시 설치를 중단한다. 수정 파일 및 체크리스트: - `apps/runner/assets/script/shell/oto_agent_bootstrap.sh` - `services/core/internal/httpserver/oto_agent_bootstrap.sh` - `apps/runner/test/oto_agent_bootstrap_script_test.dart` 테스트 작성: fake `oto`가 version 성공/실패를 반환하는 케이스를 추가한다. 중간 검증: `cd apps/runner && dart test test/oto_agent_bootstrap_script_test.dart` ### [BINARY-2] Windows binary 확인 문제: Windows zip extraction 후 `oto.exe` 검증 계약이 필요하다. 해결 방법: PowerShell script fixture에서 설치 경로의 `oto.exe` 존재와 version command를 검증한다. 수정 파일 및 체크리스트: - `apps/runner/assets/script/powershell/oto_agent_bootstrap.ps1` - Windows bootstrap test file - `services/core/internal/httpserver/oto_agent_bootstrap.ps1` 테스트 작성: text/parser fixture로 `oto.exe` 경로와 version invocation을 확인한다. 중간 검증: `cd services/core && go test ./...` ## 수정 파일 요약 | 경로 | 목적 | |------|------| | Unix/Windows bootstrap scripts | 설치 binary 확인 계약 | | runner bootstrap tests | fake binary 성공/실패 fixture | | Core embedded assets | script copy 동기화 | ## 최종 검증 - `cd apps/runner && dart test test/oto_agent_bootstrap_script_test.dart` - `cd services/core && go test ./...` 모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.