oto/agent-task/m-control-plane-separation-migration/04+02_bootstrap_command/CODE_REVIEW-cloud-G07.md
toki 78c2260dc8 feat(control-plane): Server-Runner 계약을 추가한다
독립 Control Plane 전환의 선행 조건으로 Go server와 Dart runner가 공유할 wire 계약 원본과 생성물 경로가 필요하다.

proto 생성 target, 생성된 Go/Dart protobuf, migration smoke 경계 문서화와 리뷰 완료 artifact를 함께 반영한다.
2026-06-05 14:27:33 +09:00

4.8 KiB

Code Review Reference - API

[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation. Fill implementation-owned sections, paste verification output, and stop with active files in place.

개요

date=2026-06-05 task=m-control-plane-separation-migration/04+02_bootstrap_command, plan=0, tag=API

Roadmap Targets

  • Milestone: agent-roadmap/phase/independent-control-plane/milestones/control-plane-separation-migration.md
  • Task ids:
    • bootstrap-command: OTO Server가 runner bootstrap command를 발급하고, bootstrap script가 apps/runner binary/config를 기준으로 runner를 실행하는 흐름이 정의된다.
  • Completion mode: check-on-pass

이 파일을 읽는 리뷰 에이전트에게

[REVIEW AGENT ONLY] 종결 절차는 코드리뷰 에이전트 전용이다.

구현 항목별 완료 여부

항목 완료 여부
[API-1] Predecessor 확인 [ ]
[API-2] Server bootstrap command endpoint [ ]
[API-3] Bootstrap script server terminology [ ]
[API-4] Config parser와 CLI help [ ]
[API-5] Full bootstrap smoke [ ]

구현 체크리스트

  • [API-1] predecessor 02+01_runner_registration 완료 근거를 확인한다.
  • [API-2] services/core에 runner bootstrap command response를 추가한다.
  • [API-3] bootstrap script가 --server-url 표준 flag와 server: config section을 쓰도록 갱신하되 --edge-url compatibility를 유지하거나 명시적으로 deprecate한다.
  • [API-4] Dart config parser와 CLI help가 OTO Server 용어를 우선 사용한다.
  • [API-5] Go/Dart script tests를 추가하고 token 노출 방지와 PID path 회귀를 유지한다.
  • CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.

코드리뷰 전용 체크리스트

[REVIEW AGENT ONLY] 이 체크리스트는 코드리뷰 에이전트만 사용한다.

  • 판정을 append한다.
  • active plan/review를 log로 아카이브한다.
  • PASS이면 complete.log 작성 후 task directory를 archive로 이동한다.
  • PASS이고 m-prefixed task group이면 완료 이벤트 메타데이터만 보고한다.
  • WARN/FAIL이면 다음 loop 상태를 만든다.

계획 대비 변경 사항

구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다.

주요 설계 결정

구현 에이전트가 주요 설계 결정 사항을 기록한다.

사용자 리뷰 요청

기본값은 없음이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 request_user_input을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다.

  • 상태: 없음
  • 사유 유형: 없음
  • 결정 필요: 없음
  • 차단 근거: 없음
  • 실행한 검증/명령: 없음
  • 자동 후속 불가 이유: 없음
  • 재개 조건: 없음

리뷰어를 위한 체크포인트

  • server-issued bootstrap command와 shell flag 이름이 일치한다.
  • --server-url이 표준이고 --edge-url 처리 방침이 테스트로 고정된다.
  • enrollment token이 stdout/stderr에 노출되지 않는다.
  • PID path 회귀가 유지된다.

검증 결과

API-1 중간 검증

$ find agent-task/m-control-plane-separation-migration -path '*/02*/*' -name complete.log -print
(output)

API-2 중간 검증

$ cd services/core && go test ./internal/httpserver
(output)

API-3 중간 검증

$ cd apps/runner && dart test test/oto_agent_bootstrap_script_test.dart
(output)

API-4 중간 검증

$ cd apps/runner && dart test test/oto_agent_config_test.dart test/oto_agent_cli_test.dart
(output)

API-5 중간 검증

$ cd services/core && go test ./internal/httpserver
$ cd apps/runner && dart test test/oto_agent_bootstrap_script_test.dart
(output)

최종 검증

$ cd services/core && go test ./...
$ cd apps/runner && dart analyze
$ cd apps/runner && dart test test/oto_agent_migration_plan_test.dart test/oto_agent_bootstrap_script_test.dart test/oto_agent_cli_test.dart test/oto_agent_config_test.dart test/oto_agent_registration_test.dart test/oto_iop_connection_smoke_test.dart
(output)