iop/agent-task/02_adapter_execution_terminology/plan_local_G03_0.log
toki d764adb390 chore: agent-task 변경 사항 반영
- edge node store 및 console 업데이트
- node adapters(cli, ollama, vllm, mock) 리팩토링
- node router, run_manager, store 개선
- proto 파일(control.proto, runtime.proto) 및 생성 코드 업데이트
- config 업데이트
2026-05-10 20:41:33 +09:00

160 lines
5.3 KiB
Text

<!-- task=02_adapter_execution_terminology plan=0 tag=REFACTOR -->
# Adapter Execution Terminology Refactor
## 이 파일을 읽는 구현 에이전트에게
**구현 완료 후 `CODE_REVIEW-local-G03.md`의 모든 섹션을 채우는 것이 필수 마지막 단계입니다.** 체크리스트 완료 여부, 중간/최종 검증 결과, 계획 대비 변경 사항, 주요 설계 결정을 실제 내용으로 채우세요. `CODE_REVIEW-local-G03.md`의 아카이브 지시는 리뷰 스킬 전용이며 구현 에이전트가 실행하지 않습니다.
## 배경
현재 공통 실행 경로 일부 주석이 모델 실행 중심으로 읽힌다. IOP Node는 CLI adapter를 first-class adapter로 실행하므로 공통 용어는 `adapter execution`이어야 한다. 이 작업은 동작 변경이 아니라 주석/문구 정리다.
## 분석 결과
### 읽은 파일
- `proto/iop/runtime.proto`
- `proto/iop/control.proto`
- `apps/node/internal/runtime/types.go`
- `apps/node/internal/adapters/cli/cli.go`
- `apps/node/internal/adapters/mock/mock.go`
- `apps/node/internal/adapters/ollama/ollama.go`
- `apps/node/internal/adapters/vllm/vllm.go`
- `apps/node/internal/router/router.go`
- `apps/node/internal/node/node.go`
- `apps/edge/cmd/edge/console.go`
### 테스트 커버리지 공백
- This is comment/help/log terminology. Existing tests mostly do not assert comments.
- Console tests may assert user-facing strings if changed; update only when outputs change.
### 심볼 참조
- No exported symbol rename is required for this task.
- Text references found: `proto/iop/runtime.proto:21`, `apps/node/internal/runtime/types.go:147`, `apps/node/internal/adapters/cli/cli.go:1-5`.
### 범위 결정 근거
- README/docs are excluded by user request.
- Field renames belong to `internal_target_naming`.
- Actual adapter behavior, mock removal, and Ollama/vLLM completion are excluded.
- Model-specific adapter comments such as Ollama `/api/tags` available models may remain.
### 빌드 등급
build=`local-G03`, review=`local-G03`. Narrow terminology cleanup; risk is mostly accidental user-facing string churn.
### [REFACTOR-1] Common execution terminology
#### 문제
`proto/iop/runtime.proto:21` says `RunRequest initiates a model execution`. `apps/node/internal/runtime/types.go:147` says `Adapter executes a model workload`. These are common execution surfaces, not model-only surfaces.
#### 해결 방법
Change common comments to adapter execution language.
```proto
// before: proto/iop/runtime.proto:21
// RunRequest initiates a model execution.
```
```proto
// after
// RunRequest initiates an adapter execution on a node.
```
#### 수정 파일 및 체크리스트
- [ ] `proto/iop/runtime.proto` common comments use adapter execution language.
- [ ] `apps/node/internal/runtime/types.go` `Adapter` comment does not imply model-only execution.
- [ ] `apps/node/internal/runtime/types.go` runtime comments remain generic.
#### 테스트 작성
No new tests. Comment-only changes are covered by compile/test.
#### 중간 검증
```bash
rg -n "model execution|model runtime|model workload" proto/iop apps packages --glob '!**/README.md'
```
예상 결과: no common execution terminology leftovers.
### [REFACTOR-2] CLI adapter is first-class terminology
#### 문제
`apps/node/internal/adapters/cli/cli.go:1-5` describes CLI tools as inference backends. That can be acceptable for current use, but should not make CLI adapter look like a model-only exception.
#### 해결 방법
Describe CLI as an external CLI execution adapter. Keep profile wording.
#### 수정 파일 및 체크리스트
- [ ] CLI package comment uses `execution adapter` or equivalent generic wording.
- [ ] Keep profile names as profile names.
- [ ] Do not alter command args such as `--model`.
#### 테스트 작성
No new tests. Run CLI package tests to catch accidental code edits.
#### 중간 검증
```bash
go test ./apps/node/internal/adapters/cli/...
```
예상 결과: tests pass.
### [REFACTOR-3] Console/log/error wording check
#### 문제
Console currently prints `agent` in several places. That is acceptable until target rename, but common wording should not introduce `model execution` language.
#### 해결 방법
Only adjust strings that incorrectly say model execution/runtime. Do not do broad target rename here.
#### 수정 파일 및 체크리스트
- [ ] Search console/log/error strings for `model execution` and `model runtime`.
- [ ] Leave behavior unchanged.
- [ ] Do not edit README/docs.
#### 테스트 작성
Update console tests only if user-facing strings change.
#### 중간 검증
```bash
go test ./apps/edge/cmd/edge/...
```
예상 결과: tests pass.
## 수정 파일 요약
| 파일 | 항목 |
|------|------|
| `proto/iop/runtime.proto` | REFACTOR-1 |
| `apps/node/internal/runtime/types.go` | REFACTOR-1 |
| `apps/node/internal/adapters/cli/cli.go` | REFACTOR-2 |
| `apps/edge/cmd/edge/console.go` | REFACTOR-3 |
## 최종 검증
```bash
gofmt -w <changed-go-files>
go test ./apps/node/internal/adapters/cli/... ./apps/edge/cmd/edge/...
rg -n "model execution|model runtime|model workload" proto/iop apps packages --glob '!**/README.md'
```
예상 결과: tests pass and common model-only terminology is gone. 모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 전체 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.