From 0a288e9864c23f737cfff1029a30b6e33d96eac3 Mon Sep 17 00:00:00 2001 From: toki Date: Sat, 13 Jun 2026 07:44:03 +0900 Subject: [PATCH] archive task files and update edge config for default profile migration --- .../code_review_local_G05_1.log} | 38 ++++ .../code_review_local_G06_2.log | 210 ++++++++++++++++++ .../03+02_default_profile/complete.log | 45 ++++ .../plan_local_G05_1.log} | 0 .../plan_local_G06_2.log | 138 ++++++++++++ configs/edge-compose.yaml.tmpl | 22 +- configs/edge.yaml | 10 +- packages/go/config/config_test.go | 75 +++++++ 8 files changed, 525 insertions(+), 13 deletions(-) rename agent-task/{m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md => archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G05_1.log} (50%) create mode 100644 agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G06_2.log create mode 100644 agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/complete.log rename agent-task/{m-codex-app-server-streaming-migration/03+02_default_profile/PLAN-local-G05.md => archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G05_1.log} (100%) create mode 100644 agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G06_2.log diff --git a/agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G05_1.log similarity index 50% rename from agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md rename to agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G05_1.log index e52683d..0b75739 100644 --- a/agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md +++ b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G05_1.log @@ -70,3 +70,41 @@ TODO - `test -f agent-task/m-codex-app-server-streaming-migration/02+01_session_events/complete.log` - `go test ./packages/go/config -count=1` - `go test ./apps/node/internal/adapters/cli -count=1` + +## 코드리뷰 결과 + +- 종합 판정: FAIL +- 리뷰 번호: 1 + +### 차원별 평가 + +| 차원 | 평가 | 근거 | +| --- | --- | --- | +| correctness | Fail | 계획된 기본 `codex` profile 전환이 실제 설정에 반영되지 않았다. | +| completeness | Fail | 선행 완료 조건은 archive `complete.log`로 확인됐지만, 구현 에이전트 소유 섹션과 구현 체크리스트가 TODO/미체크 상태다. | +| test coverage | Fail | 계획된 `TestLoadEdge_CodexAppServerDefaultProfile` 및 fallback 검증이 추가되지 않았다. | +| API contract | Fail | `configs/edge.yaml`과 compose template의 기본 `codex` mode가 계획한 app-server 계약과 다르다. | +| code quality | Fail | 구현 산출물이 없어 품질을 판정할 수 없다. | +| plan deviation | Fail | plan의 필수 구현/검증 항목이 수행되지 않았다. | +| verification trust | Fail | `검증 출력`이 TODO 상태이고 실제 stdout/stderr가 없다. | + +### 발견된 문제 + +- Required: `agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md:25` 구현 완료 기록, 항목별 완료 여부, 구현 체크리스트, 검증 출력이 모두 TODO/미체크 상태라 구현을 판정할 수 없다. 실제 구현 후 해당 섹션을 사실 기반으로 채우고 마지막 체크리스트 항목까지 완료해야 한다. +- Required: `configs/edge.yaml:111` 기본 `codex` profile이 여전히 `args: ["exec", "--json"]`, `output_format: "codex-json"`, `mode: "codex-exec"` 상태다. 계획대로 기본 `codex`를 app-server stdio 실행 경로로 전환하고 `codex-exec` fallback은 별도 profile로 유지해야 한다. +- Required: `configs/edge-compose.yaml.tmpl:51` compose template의 `codex` profile도 `output_format: "plain"`, `mode: "exec"` 상태라 real config와 app-server 기본값이 맞지 않는다. template도 동일한 app-server 기본값으로 갱신해야 한다. +- Required: `packages/go/config/config_test.go:542` config loader 테스트가 `codex-exec` mode 로딩만 검증하고, 계획된 app-server default 및 `codex-exec` fallback profile 로딩 검증을 포함하지 않는다. `TestLoadEdge_CodexAppServerDefaultProfile` 또는 동등 테스트를 추가해야 한다. +- Required: `agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G05.md:64` 검증 출력이 `TODO`라 계획된 명령의 실제 stdout/stderr가 없다. 선행 확인, config package test, cli adapter smoke를 실행하고 결과를 그대로 기록해야 한다. + +### 다음 단계 + +FAIL이므로 현재 PLAN/CODE_REVIEW를 `.log`로 아카이브하고, user-review gate 없이 후속 `PLAN-local-G06.md`와 `CODE_REVIEW-local-G06.md`를 생성한다. 후속 작업은 archive 선행 완료 증거를 확인한 뒤 기본 `codex` app-server 전환, compose template 동기화, config loader 테스트 추가, 검증 출력 기록을 완료해야 한다. + +### 코드리뷰 전용 최종화 체크리스트 + +- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다. +- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다. +- [x] active `CODE_REVIEW-local-G05.md`를 `code_review_local_G05_1.log`로 아카이브한다. +- [x] active `PLAN-local-G05.md`를 `plan_local_G05_1.log`로 아카이브한다. +- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다. +- [x] FAIL이고 user-review gate가 트리거되지 않았으므로 다음 active `PLAN-local-G06.md`와 `CODE_REVIEW-local-G06.md`를 작성하고 `complete.log`를 작성하지 않는다. diff --git a/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G06_2.log b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G06_2.log new file mode 100644 index 0000000..22e5b8e --- /dev/null +++ b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G06_2.log @@ -0,0 +1,210 @@ + + +# Code Review Reference - REVIEW_API + +> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.** +> The task is NOT complete until every implementation-owned section below is filled in. +> Complete the `구현 체크리스트`; the final checklist item is mandatory before saving. +> Fill implementation-owned sections, then stop with active files in place and report ready for review. +> If implementation is blocked by a user-only decision, user-owned external environment prerequisite, or scope conflict, fill `사용자 리뷰 요청` with evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`. Evidence gaps that a follow-up agent can close by rerunning commands or collecting artifacts are normal follow-up issues, not user-review blockers by themselves. +> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation; record the needed decision in `사용자 리뷰 요청` and stop for code-review. +> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only, even after compaction/resume. +> Follow the ownership table at the bottom of this file for which sections you own. + +## 개요 + +date=2026-06-12 +task=m-codex-app-server-streaming-migration/03+02_default_profile, plan=1, tag=REVIEW_API + +## Roadmap Targets + +- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/codex-app-server-streaming-migration.md` +- Task ids: + - `default-profile`: `configs/edge.yaml`의 기본 `codex` profile을 app-server mode로 전환한다. 검증: `console.target`과 CLI profile key가 모두 `codex`인 상태에서 기본 Codex 실행이 app-server 경로를 사용한다. +- Completion mode: check-on-pass + +## 이 파일을 읽는 리뷰 에이전트에게 + +> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다. + +각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요. +리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다. + +1. 판정을 append한다. +2. `CODE_REVIEW-local-G06.md` -> `code_review_local_G06_N.log`, `PLAN-local-G06.md` -> `plan_local_G06_M.log`로 아카이브한다. +3. PASS이면 `complete.log` 작성 후 active task 디렉터리를 `agent-task/archive/YYYY/MM/m-codex-app-server-streaming-migration/03+02_default_profile/`로 이동한다. WARN/FAIL이면 user-review gate를 확인한 뒤 다음 active plan/review 파일 또는 `USER_REVIEW.md`를 작성한다. +4. PASS이고 task group이 `m-codex-app-server-streaming-migration`이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와 `update-roadmap` 호출은 런타임 책임이다. +5. 적용 가능한 `코드리뷰 전용 체크리스트` 항목을 최종 `.log` 위치에서 체크한 뒤 보고한다. + +--- + +## 구현 항목별 완료 여부 + +| 항목 | 완료 여부 | +|------|---------| +| [REVIEW_API-1] 구현 산출물과 리뷰 handoff 완성 | [x] | +| [REVIEW_API-2] real edge 기본 `codex` profile을 app-server로 전환 | [x] | +| [REVIEW_API-3] compose template 기본 `codex` profile 동기화 | [x] | +| [REVIEW_API-4] config loader 테스트 보강 | [x] | +| [REVIEW_API-5] deterministic 검증 출력 기록 | [x] | + +## 구현 체크리스트 + +- [x] archive 선행 `02+01_session_events/complete.log`를 확인하고 검증 출력에 기록한다. +- [x] `configs/edge.yaml`의 기본 `codex` profile을 `codex-app-server` mode/app-server stdio args로 전환하고 `codex-exec` fallback을 보존한다. +- [x] `configs/edge-compose.yaml.tmpl`의 `codex` profile을 real config와 동일한 app-server 기본값으로 동기화한다. +- [x] `packages/go/config/config_test.go`에 app-server default 및 `codex-exec` fallback profile 로딩 검증을 추가한다. +- [x] `go test ./packages/go/config -count=1`와 `go test ./apps/node/internal/adapters/cli -count=1`를 실행하고 실제 stdout/stderr를 기록한다. +- [x] `CODE_REVIEW-local-G06.md`의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. + +## 코드리뷰 전용 체크리스트 + +> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다. +> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다. + +- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다. +- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다. +- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_{review_lane}_GNN_N.log`로 아카이브한다. +- [x] active `PLAN-*-G??.md`를 `plan_{build_lane}_GNN_M.log`로 아카이브한다. +- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다. +- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다. +- [x] PASS이면 active task 디렉터리 `agent-task/{task_name}/`를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다. +- [x] PASS이고 task group이 `m-`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다. +- [x] PASS split 작업이면 이동 후 빈 active parent `agent-task/{task_group}/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다. +- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-{build_lane}-GNN.md`와 `CODE_REVIEW-{review_lane}-GNN.md`를 작성하고 `complete.log`를 작성하지 않는다. +- [ ] USER_REVIEW이면 `agent-ops/skills/common/code-review/templates/user-review-template.md` 기준으로 `USER_REVIEW.md`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다. +- [ ] USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다. + +## 계획 대비 변경 사항 + +- `configs/edge-compose.yaml.tmpl`에 `codex-exec` fallback profile을 추가함. compose template에도 fallback을 두어야 real config와의 대칭성을 유지할 수 있다고 판단. REVIEW_API-3 계획에서 "fallback profile을 추가한 경우 codex-exec key와 codex-json output format을 유지한다"고 명시되어 있어 계획과 일치. + +## 주요 설계 결정 + +- `codex` profile의 `args`: `startCodexAppServerProc()`가 내부에서 `--stdio`를 append하므로 config에는 `["app-server"]`만 필요. `output_format` 필드는 app-server mode에서 사용하지 않으므로 제거. +- `codex-exec` fallback은 `configs/edge.yaml`과 `configs/edge-compose.yaml.tmpl` 모두에서 `mode: "codex-exec"`, `output_format: "codex-json"`, `resume_args`를 그대로 유지. + +## 사용자 리뷰 요청 + +_기본값은 `없음`이다. 구현 중 사용자 결정, 사용자 소유 외부 환경/secret/서비스 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. 구현 에이전트는 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 후속 에이전트가 명령 재실행이나 산출물 수집으로 해소할 수 있는 검증 증거 공백만으로는 사용자 리뷰 요청을 작성하지 않는다._ + +- 상태: 없음 +- 사유 유형: 없음 +- 결정 필요: 없음 +- 차단 근거: 없음 +- 실행한 검증/명령: 없음 +- 자동 후속 불가 이유: 없음 +- 재개 조건: 없음 + +## 리뷰어를 위한 체크포인트 + +- archive 선행 `complete.log` 확인 명령이 PASS인지 확인한다. +- `configs/edge.yaml`의 기본 `codex` target이 `codex-app-server` mode이며 `codex-exec` fallback이 남아 있는지 확인한다. +- `configs/edge-compose.yaml.tmpl`의 기본 `codex` profile이 real config의 app-server 기본값과 어긋나지 않는지 확인한다. +- config loader 테스트가 `codex` app-server default와 `codex-exec` fallback을 모두 검증하는지 확인한다. +- 검증 결과가 실제 stdout/stderr이고 대체 명령이 있으면 사유가 기록됐는지 확인한다. + +## 검증 결과 + +_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._ + +필수 규칙: +- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다. +- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다. +- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다. +- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다. +- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다. + +### REVIEW_API-1 중간 검증 +```bash +$ test -f agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log +PASS: complete.log exists +``` + +### REVIEW_API-2 중간 검증 +```bash +$ go test ./packages/go/config -run 'TestLoadEdge_CodexAppServerDefaultProfile|TestLoadEdge_CLIProfileMode' -count=1 -v +=== RUN TestLoadEdge_CLIProfileMode +--- PASS: TestLoadEdge_CLIProfileMode (0.00s) +=== RUN TestLoadEdge_CodexAppServerDefaultProfile +--- PASS: TestLoadEdge_CodexAppServerDefaultProfile (0.00s) +PASS +ok iop/packages/go/config 0.006s +``` + +### REVIEW_API-3 중간 검증 +```bash +$ rg -n 'codex-app-server|codex-exec|output_format' configs/edge.yaml configs/edge-compose.yaml.tmpl +configs/edge-compose.yaml.tmpl:57: mode: "codex-app-server" +configs/edge-compose.yaml.tmpl:58: codex-exec: +configs/edge-compose.yaml.tmpl:70: output_format: "codex-json" +configs/edge-compose.yaml.tmpl:71: mode: "codex-exec" +configs/edge.yaml:118: mode: "codex-app-server" +configs/edge.yaml:119: codex-exec: +configs/edge.yaml:131: output_format: "codex-json" +configs/edge.yaml:132: mode: "codex-exec" +``` + +### REVIEW_API-4 중간 검증 +```bash +$ go test ./apps/node/internal/adapters/cli -run TestExecutorForMode -count=1 -v +=== RUN TestExecutorForMode +--- PASS: TestExecutorForMode (0.00s) +PASS +ok iop/apps/node/internal/adapters/cli 0.004s +``` + +### 최종 검증 +```bash +$ go test ./packages/go/config -count=1 +ok iop/packages/go/config 0.016s + +$ go test ./apps/node/internal/adapters/cli -count=1 +ok iop/apps/node/internal/adapters/cli 42.471s +``` + +--- + +> **[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section: completion table, implementation checklist, changes from plan, design decisions, and verification output?** +> If anything is blank, go back and fill it in before saving this file. +> Leave review-agent-only sections unchanged. + +Sections and their ownership: + +| 섹션 | 소유자 | 설명 | +|------|--------|------| +| 헤더 주석, 개요(date/task/plan/tag), 리뷰 에이전트 지시 | 스텁 생성 시 고정 | 구현 에이전트가 수정하거나 실행하지 않음 | +| Roadmap Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Roadmap Completion`으로 복사 | +| 구현 항목별 완료 여부 (항목명) | 스텁 생성 시 고정 | `[ ]` -> `[x]` 체크만 구현 에이전트가 수행 | +| 구현 체크리스트 (항목 텍스트/순서) | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 `[ ]` -> `[x]` 체크만 수행; 마지막 체크박스는 저장 전 필수 | +| 코드리뷰 전용 체크리스트 | Review agent only | Implementing agent must not modify or check this section | +| 계획 대비 변경 사항, 주요 설계 결정 | 구현 에이전트가 채움 | placeholder 텍스트를 실제 내용으로 교체 | +| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 진행에 사용자 입력이 필요하지 않으면 `상태: 없음` 유지; 구현 중 직접 질문은 금지; 필요하면 결정 항목, 근거, 명령 출력, 자동 후속 불가 이유, 재개 조건을 기록 | +| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 | +| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 | +| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 | + +## 코드리뷰 결과 + +- 종합 판정: PASS +- 리뷰 번호: 2 + +### 차원별 평가 + +| 차원 | 평가 | 근거 | +| --- | --- | --- | +| correctness | Pass | 기본 `codex` profile이 `codex-app-server` mode와 `app-server` args로 전환됐고, executor는 `--stdio`를 append하는 기존 계약과 맞다. | +| completeness | Pass | 선행 완료 확인, real config/template 동기화, fallback 보존, 테스트 보강, 구현 handoff가 모두 완료됐다. | +| test coverage | Pass | `TestLoadEdge_CodexAppServerDefaultProfile`이 app-server default와 `codex-exec` fallback을 검증하며 기존 mode 회귀 테스트도 유지된다. | +| API contract | Pass | `console.target: "codex"`가 유지되고 `codex-exec` fallback의 `mode`와 `output_format` 계약이 유지된다. | +| code quality | Pass | 변경 범위가 설정/테스트에 국한되어 있고 debug output, dead code, 불필요한 refactor가 없다. | +| plan deviation | Pass | compose template에 fallback을 추가한 편차는 계획의 허용 조건과 설계 결정에 기록되어 있다. | +| verification trust | Pass | 리뷰 중 `go test ./packages/go/config -count=1`, focused executor test, `go test ./apps/node/internal/adapters/cli -count=1`를 재실행해 통과를 확인했다. | + +### 발견된 문제 + +없음 + +### 다음 단계 + +PASS이므로 현재 PLAN/CODE_REVIEW를 `.log`로 아카이브하고 `complete.log`를 작성한 뒤 task directory를 `agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/`로 이동한다. milestone task completion metadata만 보고하고 roadmap 수정은 수행하지 않는다. diff --git a/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/complete.log b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/complete.log new file mode 100644 index 0000000..b95e46e --- /dev/null +++ b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/complete.log @@ -0,0 +1,45 @@ +# Complete - m-codex-app-server-streaming-migration/03+02_default_profile + +## 완료 일시 + +2026-06-12T22:38:04Z + +## 요약 + +Codex 기본 `codex` profile을 app-server mode로 전환하고 `codex-exec` fallback을 보존했다. 2회 리뷰 루프로 완료했으며 최종 판정은 PASS. + +## 루프 이력 + +| Plan | Review | Verdict | 메모 | +|------|--------|---------|------| +| `plan_local_G05_1.log` | `code_review_local_G05_1.log` | FAIL | 구현 산출물과 검증 출력이 없고 기본 profile/template/test 전환이 미완료라 follow-up 필요 | +| `plan_local_G06_2.log` | `code_review_local_G06_2.log` | PASS | 기본 `codex` app-server 전환, compose template 동기화, fallback 보존, config loader 테스트 추가 및 검증 통과 | + +## 구현/정리 내용 + +- `configs/edge.yaml`의 `console.target: "codex"`를 유지하면서 기본 `codex` profile을 `mode: "codex-app-server"`와 `args: ["app-server"]`로 전환했다. +- `codex-exec` fallback profile은 `mode: "codex-exec"`, `output_format: "codex-json"`, `resume_args`를 유지했다. +- `configs/edge-compose.yaml.tmpl`의 `codex` profile을 app-server 기본값으로 동기화하고 `codex-exec` fallback profile을 추가했다. +- `packages/go/config/config_test.go`에 app-server default와 fallback profile 로딩을 검증하는 `TestLoadEdge_CodexAppServerDefaultProfile`을 추가했다. + +## 최종 검증 + +- `test -f agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log` - PASS; 선행 subtask 완료 로그 존재 확인. +- `go test ./packages/go/config -count=1` - PASS; `ok iop/packages/go/config 0.018s`. +- `go test ./apps/node/internal/adapters/cli -run TestExecutorForMode -count=1` - PASS; `ok iop/apps/node/internal/adapters/cli 0.006s`. +- `go test ./apps/node/internal/adapters/cli -count=1` - PASS; `ok iop/apps/node/internal/adapters/cli 42.445s`. + +## Roadmap Completion + +- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/codex-app-server-streaming-migration.md` +- Completed task ids: + - `default-profile`: PASS; evidence=`agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G06_2.log`, `agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/code_review_local_G06_2.log`; verification=`test -f agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log`, `go test ./packages/go/config -count=1`, `go test ./apps/node/internal/adapters/cli -count=1` +- Not completed task ids: 없음 + +## 잔여 Nit + +- 없음 + +## 후속 작업 + +- 없음 diff --git a/agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/PLAN-local-G05.md b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G05_1.log similarity index 100% rename from agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/PLAN-local-G05.md rename to agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G05_1.log diff --git a/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G06_2.log b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G06_2.log new file mode 100644 index 0000000..e62ac57 --- /dev/null +++ b/agent-task/archive/2026/06/m-codex-app-server-streaming-migration/03+02_default_profile/plan_local_G06_2.log @@ -0,0 +1,138 @@ + +# Review Follow-up Plan - Codex Default Profile Switch + +## 이 파일을 읽는 구현 에이전트에게 +이 PLAN을 끝까지 읽은 뒤 구현한다. 이번 plan은 `code_review_local_G05_1.log`의 FAIL Required 항목만 처리한다. 구현 중 사용자에게 직접 질문하지 말고, 사용자 결정이나 외부 환경 소유 blocker가 있으면 `CODE_REVIEW-local-G06.md`의 `사용자 리뷰 요청` 섹션을 증거와 함께 채운 뒤 멈춘다. 단순 검증 증거 부족은 사용자 리뷰 요청이 아니라 명령 재실행과 출력 기록으로 해소한다. + +## 배경 +이전 리뷰는 구현 산출물 부재로 FAIL이었다. 선행 subtask `02+01_session_events`는 archive `complete.log`로 PASS 완료가 확인되었으므로, 이번 follow-up은 기본 `codex` profile의 app-server 전환과 검증 증거 보강에 집중한다. + +## Roadmap Targets + +- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/codex-app-server-streaming-migration.md` +- Task ids: + - `default-profile`: `configs/edge.yaml`의 기본 `codex` profile을 app-server mode로 전환한다. 검증: `console.target`과 CLI profile key가 모두 `codex`인 상태에서 기본 Codex 실행이 app-server 경로를 사용한다. +- Completion mode: check-on-pass + +## 선행 확인 +- 확인 대상: `agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log` +- 선행 확인 명령: +```bash +test -f agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log +``` + +## 범위 결정 근거 +설정 전환, fallback profile 보존, config loader 테스트, adapter mode smoke만 다룬다. app-server event mapping과 full-cycle real Codex smoke는 이미 선행/후속 subtask 범위이므로 여기서 확장하지 않는다. + +## 빌드 등급 +`local-G06`: 이전 FAIL은 구현 부재와 검증 증거 부재가 원인이다. 수정 범위는 설정과 로컬 Go 테스트로 결정 가능하지만, follow-up은 필수 항목 누락 방지를 위해 G06으로 상향한다. + +## 구현 체크리스트 +- [ ] archive 선행 `02+01_session_events/complete.log`를 확인하고 검증 출력에 기록한다. +- [ ] `configs/edge.yaml`의 기본 `codex` profile을 `codex-app-server` mode/app-server stdio args로 전환하고 `codex-exec` fallback을 보존한다. +- [ ] `configs/edge-compose.yaml.tmpl`의 `codex` profile을 real config와 동일한 app-server 기본값으로 동기화한다. +- [ ] `packages/go/config/config_test.go`에 app-server default 및 `codex-exec` fallback profile 로딩 검증을 추가한다. +- [ ] `go test ./packages/go/config -count=1`와 `go test ./apps/node/internal/adapters/cli -count=1`를 실행하고 실제 stdout/stderr를 기록한다. +- [ ] `CODE_REVIEW-local-G06.md`의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. + +### [REVIEW_API-1] 구현 산출물과 리뷰 handoff 완성 +문제: `code_review_local_G05_1.log` 기준 이전 리뷰 파일은 구현 완료 기록, 항목별 완료 여부, 체크리스트, 검증 출력이 TODO/미체크 상태였다. + +해결 방법: 실제 변경과 검증 결과를 `CODE_REVIEW-local-G06.md`의 구현 에이전트 소유 섹션에 모두 기록한다. 계획 대비 변경 사항, 주요 설계 결정, 검증 결과에는 placeholder를 남기지 않는다. + +체크리스트: +- [ ] 구현 항목별 완료 여부를 `[x]`로 갱신할 수 있는 증거를 만든다. +- [ ] 구현 체크리스트의 마지막 handoff 항목까지 완료한다. +- [ ] `검증 결과`에는 명령별 실제 stdout/stderr를 붙인다. + +테스트 결정: 별도 테스트 파일보다 리뷰 artifact 완성도와 실제 검증 출력으로 확인한다. + +중간 검증: +```bash +rg -n "TODO|\\[ \\]" agent-task/m-codex-app-server-streaming-migration/03+02_default_profile/CODE_REVIEW-local-G06.md +``` + +### [REVIEW_API-2] real edge 기본 `codex` profile을 app-server로 전환 +문제: `configs/edge.yaml`의 기본 `codex` profile이 여전히 `codex-exec` mode와 `exec --json` args를 사용한다. 이 상태에서는 `console.target: "codex"`가 app-server 경로를 사용하지 않는다. + +해결 방법: `codex` profile을 app-server stdio 실행에 맞는 `mode: "codex-app-server"`로 전환한다. `codex-exec` fallback profile은 별도로 유지하고 `output_format: "codex-json"`을 그대로 둔다. + +예상 변경: +- before: `codex.mode = "codex-exec"`, `codex.args = ["exec", "--json"]` +- after: `codex.mode = "codex-app-server"`, app-server stdio용 args, fallback `codex-exec` 유지 + +체크리스트: +- [ ] `console.target: "codex"`를 유지한다. +- [ ] `codex` profile의 `mode`를 `codex-app-server`로 변경한다. +- [ ] `codex-exec` fallback의 `mode: "codex-exec"`와 `output_format: "codex-json"`을 유지한다. +- [ ] 기존 `claude-tui` profile과 console timeout 계열 사용자 변경을 되돌리지 않는다. + +테스트 결정: config loader 테스트에서 `codex`와 `codex-exec`가 모두 로드되고 mode가 구분되는지 확인한다. + +중간 검증: +```bash +go test ./packages/go/config -run 'TestLoadEdge_CodexAppServerDefaultProfile|TestLoadEdge_CLIProfileMode' -count=1 +``` + +### [REVIEW_API-3] compose template 기본 `codex` profile 동기화 +문제: `configs/edge-compose.yaml.tmpl`의 `codex` profile은 `mode: "exec"`와 `output_format: "plain"` 상태라 real config와 기본 경로가 어긋난다. + +해결 방법: compose template의 `codex` profile도 real config의 app-server 기본값과 맞춘다. template에 fallback profile을 추가할지 여부는 real config와 운영 UX 일관성 기준으로 판단하되, `codex-exec` fallback이 필요하면 real config와 같은 key를 사용한다. + +체크리스트: +- [ ] compose template의 `codex.mode`를 `codex-app-server`로 변경한다. +- [ ] app-server stdio용 args/output 설정을 real config와 일치시킨다. +- [ ] fallback profile을 추가한 경우 `codex-exec` key와 `codex-json` output format을 유지한다. + +테스트 결정: config package에 template fixture가 없으면 `rg`로 template/real config mode를 확인하고, config loader 테스트로 real config contract를 검증한다. + +중간 검증: +```bash +rg -n 'codex-app-server|codex-exec|output_format' configs/edge.yaml configs/edge-compose.yaml.tmpl +``` + +### [REVIEW_API-4] config loader 테스트 보강 +문제: 현재 테스트는 `codex-exec` mode 로딩만 확인하고, default `codex`가 app-server mode로 바뀌는 계약과 fallback profile 보존을 검증하지 않는다. + +해결 방법: `packages/go/config/config_test.go`에 `TestLoadEdge_CodexAppServerDefaultProfile` 또는 동등한 테스트를 추가한다. 테스트는 `codex`와 `codex-exec` profile을 모두 포함한 YAML fixture를 로드하고 각 profile의 `Mode`, `Args`, `ResumeArgs`, `OutputFormat`을 확인한다. + +체크리스트: +- [ ] `codex` profile의 `Mode == "codex-app-server"`를 검증한다. +- [ ] `codex-exec` profile의 `Mode == "codex-exec"`를 검증한다. +- [ ] fallback `codex-exec.OutputFormat == "codex-json"`을 검증한다. +- [ ] 필요한 경우 기존 `TestLoadEdge_CLIProfileMode`는 legacy exec profile 로딩 회귀 테스트로 유지한다. + +테스트 결정: `go test ./packages/go/config -count=1`를 필수로 실행한다. + +중간 검증: +```bash +go test ./packages/go/config -count=1 +``` + +### [REVIEW_API-5] deterministic 검증 출력 기록 +문제: 이전 리뷰 파일의 `검증 출력`은 `TODO`였고 실제 명령 출력이 없었다. + +해결 방법: 선행 확인, focused config test, adapter executor smoke, 최종 config/cli adapter package test를 실행하고 `CODE_REVIEW-local-G06.md`에 실제 stdout/stderr를 붙인다. 명령을 대체하면 `계획 대비 변경 사항`에 이유를 기록한다. + +체크리스트: +- [ ] 선행 `complete.log` 확인 명령을 실행한다. +- [ ] focused config test를 실행한다. +- [ ] `go test ./apps/node/internal/adapters/cli -run TestExecutorForMode -count=1`를 실행한다. +- [ ] 최종 `go test ./packages/go/config -count=1`를 실행한다. +- [ ] 최종 `go test ./apps/node/internal/adapters/cli -count=1`를 실행한다. + +테스트 결정: 위 명령이 최종 완료 조건이다. 외부 Codex account smoke는 후속 `04+03_stream_smoke` 범위다. + +중간 검증: +```bash +go test ./apps/node/internal/adapters/cli -run TestExecutorForMode -count=1 +``` + +## 최종 검증 +```bash +test -f agent-task/archive/2026/06/m-codex-app-server-streaming-migration/02+01_session_events/complete.log +go test ./packages/go/config -count=1 +go test ./apps/node/internal/adapters/cli -count=1 +``` + +**모든 코드 변경 완료 후 반드시 `CODE_REVIEW-local-G06.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.** diff --git a/configs/edge-compose.yaml.tmpl b/configs/edge-compose.yaml.tmpl index 08eeae2..66db942 100644 --- a/configs/edge-compose.yaml.tmpl +++ b/configs/edge-compose.yaml.tmpl @@ -50,12 +50,24 @@ nodes: profiles: codex: command: "codex" - args: [] + args: + - "app-server" persistent: false terminal: false - response_idle_timeout_ms: 1000 - startup_idle_timeout_ms: 1000 - output_format: "plain" - mode: "exec" + mode: "codex-app-server" + codex-exec: + command: "codex" + args: + - "exec" + - "--json" + resume_args: + - "exec" + - "resume" + - "--json" + env: [] + persistent: false + terminal: false + output_format: "codex-json" + mode: "codex-exec" runtime: concurrency: 1 diff --git a/configs/edge.yaml b/configs/edge.yaml index f786414..3ab3d3c 100644 --- a/configs/edge.yaml +++ b/configs/edge.yaml @@ -111,17 +111,11 @@ nodes: codex: command: "codex" args: - - "exec" - - "--json" - resume_args: - - "exec" - - "resume" - - "--json" + - "app-server" env: [] persistent: false terminal: false - output_format: "codex-json" - mode: "codex-exec" + mode: "codex-app-server" codex-exec: command: "codex" args: diff --git a/packages/go/config/config_test.go b/packages/go/config/config_test.go index bfa6daf..339ed5c 100644 --- a/packages/go/config/config_test.go +++ b/packages/go/config/config_test.go @@ -1240,6 +1240,81 @@ func TestNormalizeAdapters_VllmDisabledSameNameErrors(t *testing.T) { } } +func TestLoadEdge_CodexAppServerDefaultProfile(t *testing.T) { + dir := t.TempDir() + f := filepath.Join(dir, "edge.yaml") + yaml := ` +server: + listen: "0.0.0.0:9090" +nodes: + - alias: "local" + adapters: + cli: + enabled: true + profiles: + codex: + command: "codex" + args: + - "app-server" + mode: "codex-app-server" + codex-exec: + command: "codex" + args: + - "exec" + - "--json" + resume_args: + - "exec" + - "resume" + - "--json" + output_format: "codex-json" + mode: "codex-exec" +` + if err := os.WriteFile(f, []byte(yaml), 0o600); err != nil { + t.Fatalf("write yaml: %v", err) + } + + cfg, err := config.LoadEdge(f) + if err != nil { + t.Fatalf("load: %v", err) + } + + if len(cfg.Nodes) == 0 { + t.Fatal("expected 1 node") + } + profiles := cfg.Nodes[0].Adapters.CLI.Profiles + + codex, ok := profiles["codex"] + if !ok { + t.Fatal("expected codex profile") + } + if codex.Mode != "codex-app-server" { + t.Errorf("codex.Mode = %q, want %q", codex.Mode, "codex-app-server") + } + if len(codex.Args) != 1 || codex.Args[0] != "app-server" { + t.Errorf("codex.Args = %v, want [app-server]", codex.Args) + } + + exec, ok := profiles["codex-exec"] + if !ok { + t.Fatal("expected codex-exec profile") + } + if exec.Mode != "codex-exec" { + t.Errorf("codex-exec.Mode = %q, want %q", exec.Mode, "codex-exec") + } + if exec.OutputFormat != "codex-json" { + t.Errorf("codex-exec.OutputFormat = %q, want %q", exec.OutputFormat, "codex-json") + } + expectedResume := []string{"exec", "resume", "--json"} + if len(exec.ResumeArgs) != len(expectedResume) { + t.Fatalf("codex-exec.ResumeArgs = %v, want %v", exec.ResumeArgs, expectedResume) + } + for i, v := range expectedResume { + if exec.ResumeArgs[i] != v { + t.Errorf("codex-exec.ResumeArgs[%d] = %q, want %q", i, exec.ResumeArgs[i], v) + } + } +} + func TestLoadEdge_ControlPlaneOverride(t *testing.T) { dir := t.TempDir() f := filepath.Join(dir, "edge.yaml")