iop/agent-task/m-iop-agent-cli-runtime/17+13,16_client_process_manager/CODE_REVIEW-cloud-G10.md

5.2 KiB

Code Review Reference - API

[IMPLEMENTING AGENT — READ FIRST] This file must be completed. Fill implementation evidence and actual output, then stop with active files in place. Finalization belongs only to the official reviewer.

Overview

date=2026-07-29 task=m-iop-agent-cli-runtime/17+13,16_client_process_manager, plan=0, tag=API

Roadmap Targets

  • Milestone: agent-roadmap/phase/automation-runtime-bridge/milestones/iop-agent-cli-runtime.md
  • Milestone link: Milestone 문서
  • Task ids:
    • client-process-manager: daemon-owned Flutter/Unity start, stop, reconnect, crash recovery, and detail routing
  • Completion mode: check-on-pass

For the Review Agent

[REVIEW AGENT ONLY] Implementing agents must not execute finalization.

Review daemon ownership, durable identity, authorization inheritance, and cleanup together. Append verdict/signals; archive the active pair to code_review_cloud_G10_0.log and plan_cloud_G10_0.log; on PASS write complete.log, archive the task, and report completion metadata without editing the roadmap.

Implementation Item Completion

Item Status
API-1 Client config [ ]
API-2 Process ownership [ ]
API-3 Persistence/reconcile [ ]
API-4 Control operations [ ]
API-5 S15 evidence [ ]

Implementation Checklist

  • Extend only user-local runtime configuration with strict Flutter/Unity process specs, launch/restart policy, and no environment/credential fields.
  • Implement one daemon-owned process slot per client kind with PID/start identity, cancellation, reaping, duplicate convergence, and bounded crash restart.
  • Persist client lifecycle records and reconcile live, exited, stale, and ambiguous identities without duplicate launch.
  • Implement authenticated local-control client operations and Unity-detail-to-Flutter start/focus routing with command-id idempotency.
  • Prove fixture process ownership, disconnect/crash/reconnect, duplicate launch, focus routing, and daemon survival under race.
  • Update the standalone contract with actual S15 source/test paths and run Darwin cross-build verification.
  • Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

Review-Only Checklist

[REVIEW AGENT ONLY] Implementing agents must not modify this checklist.

  • Append one verdict and verified routing signals.
  • Verify verdict, dimensions, and finding classifications.
  • Archive this review as code_review_cloud_G10_0.log.
  • Archive the plan as plan_cloud_G10_0.log.
  • Verify the Agent-Ops managed .gitignore block.
  • If PASS, write canonical complete.log and leave no active Markdown files.
  • If PASS, move the task to the dated archive and update this checklist there.
  • If PASS, report client-process-manager completion metadata without editing the roadmap.
  • If PASS, remove an empty split parent or prove siblings/files remain.
  • If WARN/FAIL, materialize the required next state without complete.log.

Deviations from Plan

Implementer: actual deviations or None.

Key Design Decisions

Implementer: actual decisions.

Reviewer Checkpoints

  • Config remains user-local, strict, and environment/credential free.
  • PID/start identity and one waiter prevent duplicate/adopted-process races.
  • Ambiguous recovery blocks instead of launching.
  • Unity detail can reach Flutter only through daemon start/focus.
  • All helper children are reaped while daemon context remains live.

Verification Results

Focused and race suites

go test -count=1 ./packages/go/agentconfig ./apps/agent/internal/clientprocess ./apps/agent/internal/localcontrol
go test -count=1 -race ./apps/agent/internal/clientprocess ./apps/agent/internal/localcontrol ./packages/go/agentstate

Paste actual stdout/stderr.

S15 and Darwin

go test -count=1 -race ./apps/agent/internal/clientprocess ./apps/agent/internal/localcontrol -run 'TestS15|TestUnityDetail'
GOOS=darwin GOARCH=arm64 go test -c -o /tmp/clientprocess-darwin.test ./apps/agent/internal/clientprocess

Paste actual stdout/stderr.

Static verification

go vet ./packages/go/agentconfig ./apps/agent/internal/clientprocess ./apps/agent/internal/localcontrol
git diff --check

Paste actual stdout/stderr.


[IMPLEMENTING AGENT — BEFORE SAVING] Fill every implementation-owned section and leave review-only content unchanged.

Section Ownership

Section Owner Note
Header, Overview, Roadmap Targets, Review Instructions Fixed Implementer must not modify
Implementation Item Completion, Implementation Checklist Implementing agent Check status only
Review-Only Checklist Review agent Implementer must not modify
Deviations, Decisions, Verification Results Implementing agent Record actual evidence
Reviewer Checkpoints Fixed Reviewer verifies them
Code Review Result and finalization Review agent Append/execute only after review