iop/agent-task/archive/2026/05/opencode_json_stream/complete.log
toki 690498453e 정리: 작업 로그 아카이브 구조를 정리한다
AI-first 작업 이력을 보존하면서 기본 작업 컨텍스트에서 과거 로그를 분리하기 위해 agent-task 완료 로그를 월별 archive로 이동하고 에이전트 진입/ignore 규칙을 추가한다.
2026-05-17 18:34:27 +09:00

17 lines
1.1 KiB
Text

완료 일시: 2026-05-04
요약: opencode JSON stream 전환과 중첩 error 이벤트 파싱 보강을 2회 루프로 완료했다.
루프 이력:
| plan log | code review log | verdict |
|----------|------------------|---------|
| `plan_0.log` | `code_review_0.log` | FAIL |
| `plan_1.log` | `code_review_1.log` | PASS |
최종 리뷰 요약:
- `configs/edge.yaml`의 `opencode` 프로필을 절대경로 command, `--format json`, `output_format: "opencode-json"` 조합으로 정리했다.
- `apps/node/internal/adapters/cli/oneshot.go`의 `emitOpencodeJSON`를 line-by-line JSON 이벤트 파서로 전환하고, `text` 이벤트 delta 전달을 유지하면서 중첩 `error.data.message`와 `error.name` fallback을 처리하도록 보강했다.
- `apps/node/internal/adapters/cli/oneshot/cli_test.go`에 stream event, nested error event, fallback error name, malformed/empty input 회귀 테스트를 추가/갱신했다.
- `go test ./apps/node/internal/adapters/cli/oneshot -count=1` 통과와 실제 `opencode run --format json` 실패 샘플 확인으로 구현과 검증 출력을 맞췄다.