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

33 lines
1.5 KiB
Text

# Task Complete — edge_node_arch
## 완료 일시
2026-05-02
## 요약
edge를 TCP 서버로, node를 TCP 클라이언트로 재설계. proto-socket + protobuf 기반 통신 구현. 2 루프(REFACTOR → REVIEW_REFACTOR).
## 루프 이력
| Plan | Code Review | 판정 |
|------|-------------|------|
| plan_0.log (REFACTOR) | code_review_0.log | WARN |
| plan_1.log (REVIEW_REFACTOR) | code_review_1.log | PASS |
## 최종 리뷰 요약
- `proto/gen/iop/` 4개 파일 생성 (runtime, node, control, job)
- `apps/node/internal/transport/`: `client.go`, `parser.go`, `session.go` — proto-socket `TcpClient` 기반 node→edge 클라이언트
- `apps/node/internal/node/node.go`: proto 타입 사용, `structAsMap` helper, `sessionSink.Emit`이 `*iop.RunEvent` 직접 전송
- `apps/node/internal/bootstrap/module.go`: `transport.DialEdge` OnStart, `sess.Close()` OnStop
- `apps/edge/internal/node/registry.go`: `NodeRegistry` — Register/Unregister/Pick/Count/All
- `apps/edge/internal/transport/server.go`: proto-socket `TcpServer`, `onNodeConnected` → CapabilityRequest → Register
- `apps/edge/internal/bootstrap/module.go`: fx 모듈 wiring
- `packages/config/config.go`: `EdgeConfig`, `LoadEdge`, `TransportConf.EdgeAddr`
- `go.mod`: proto-socket require + replace
- `configs/edge.yaml` 추가
## 잔여 Nit
- `apps/node/internal/node/node.go:111` `a.Capabilities(context.Background())` — 전달받은 `ctx` 대신 `context.Background()` 사용. 기능 영향 없음.