alt/agent-roadmap/phase/operator-surface/milestones/operator-runtime-refactor.md
toki c4a457c5c4 docs(agent-ops): domain rule과 로드맵을 operator reliability refactor에 맞게 갱신한다
API domain에 workerclient proxy와 handler responsibility를 추가하고,
worker domain에 backtest engine, storage, provider, socket surface를 명시한다.
Client domain에 socket integration과 push integration 경계를 보강한다.
Operations domain에 agent-test/local과 bin 명령어를 포함하며,
operations domain table에 agent-test/local 경계를 추가한다.

로드맵에 Operator Runtime Reliability Refactor Milestone를 추가하고
현재 활성 Milestone으로 설정하여 Flutter Operator Console 전에
선행할 작업으로 변경한다.
2026-05-31 06:53:24 +09:00

4.1 KiB

Milestone: Operator Runtime Reliability Refactor

위치

  • Roadmap: agent-roadmap/ROADMAP.md
  • Phase: agent-roadmap/phase/operator-surface/PHASE.md

목표

Flutter operator console 작업을 더 진행하기 전에 API-worker runtime rail, worker execution wiring, capability reporting, client bootstrap, and remote test rule 기준을 정리한다. 이 Milestone이 끝나면 후속 UX/headless 작업이 실제 연결 가능한 control surface 위에서 계획될 수 있어야 한다.

상태

[계획]

구현 잠금

  • 상태: 해제
  • 결정 필요: 없음

범위

  • API의 worker client lifecycle, injection boundary, reconnect/error reporting 정리
  • worker의 backtest start/execution wiring 또는 명시적 unavailable 상태 정리
  • hello capability와 handler registration test를 실제 surface와 일치
  • ../nexo/agent-test/local/rules.md의 원격 실행 기준을 참고해 ALT local test profile을 원격 테스트 host 기준으로 정리
  • Flutter app bootstrap에서 operator shell과 push/Firebase/Mattermost 초기화를 분리
  • remote verification evidence, generated drift check, skipped integration 조건을 plan/review 루프에서 재현 가능하게 정리

기능

Epic: [runtime-refactor] Operator runtime reliability refactor

Operator console과 headless validation이 의존할 API-worker-client rail을 scaffold 상태에서 실행 가능한 운영 경계로 끌어올린다.

  • [worker-exec] services/worker main에서 BacktestStarter, concrete KindRunBacktest handler, engine/store dependency를 연결하거나, 아직 실행 불가인 부분은 capability와 typed error로 명시한다.
  • [api-worker-lifecycle] services/api의 worker client 전역 상태와 one-shot connect 흐름을 주입 가능한 lifecycle로 정리하고, connect failure, timeout, disconnect behavior를 테스트한다.
  • [test-rules] agent-test/local 규칙을 ../nexo/agent-test/local/rules.md의 원격 실행 방식에 맞춰 ssh toki@toki-labs.com 기준으로 정리하고, ALT smoke profile이 local shell 실행을 암시하지 않게 한다.
  • [capabilities] API/worker HelloResponse.capabilities와 handler coverage test가 market/backtest/worker availability를 실제 등록 surface와 일치하게 검증한다.
  • [client-bootstrap] Flutter operator shell이 push/Firebase/Mattermost 초기화 없이도 시작 가능한 경계로 분리되고, push-specific integration은 후속 push Milestone 범위로 남는다.
  • [verification-handoff] 원격 ALT checkout에서 실행할 검증 명령, bin/contracts-check, bin/worker-storage-check, 통합 테스트 skip 조건과 실제 stdout/stderr 기록 기준을 plan/review 산출물에 남길 수 있게 정리한다.

완료 리뷰

  • 상태: 없음
  • 요청일: 없음
  • 완료 근거: test-rules는 Milestone 생성 시점에 반영했다. runtime/client refactor 기능 Task는 아직 충족되지 않았다.
  • 리뷰 필요:
    • 사용자가 완료 결과를 확인했다
    • archive 이동을 승인했다
  • 리뷰 코멘트: 없음

범위 제외

  • Flutter production 화면, dashboard layout, chart/form wireframe 확정
  • KIS live credential, provider live smoke, trading/order execution
  • push notification 구현 자체
  • 신규 strategy catalog 또는 고급 backtest 분석 기능

작업 컨텍스트

  • 관련 경로: services/api/, services/worker/, apps/client/, agent-test/local/, bin/
  • 표준선(선택): API는 thin control plane으로 유지하고 worker execution/storage는 worker에 둔다. 로컬 테스트 profile의 명령은 로컬 shell이 아니라 원격 테스트 host의 ALT checkout에서 실행한다. Client operator shell은 push integration 없이도 기본 실행 가능해야 한다.
  • 초기 반영: 2026-05-31에 ../nexo/agent-test/local/rules.md를 참고해 agent-test/local/rules.md와 smoke profile의 host/blocker 문구를 원격 테스트 host 기준으로 갱신했다.
  • 선행 작업: API-Centered Proto-Socket Rail
  • 후속 작업: Flutter Operator Console UX Plan, Operator Headless Workflow Validation, Flutter Operator Console MVP
  • 확인 필요: 없음