# Complete - m-bridge-boundary-hardening/02_terminal_core_boundary

## 완료 일시

2026-06-07

## 요약

Node-owned terminal core boundary refactor completed after 3 review loops; final verdict PASS.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | Full-cycle evidence was missing; auxiliary smoke was recorded as completion evidence. |
| `plan_cloud_G07_1.log` | `code_review_cloud_G07_1.log` | FAIL | Full-cycle payload comparison omitted partial fragments and auxiliary smoke output was internally inconsistent. |
| `plan_cloud_G07_2.log` | `code_review_cloud_G07_2.log` | PASS | Deterministic terminal full-cycle evidence and Go verification passed. |

## 구현/정리 내용

- Moved persistent PTY terminal session core into `apps/node/internal/terminal` with Node-internal `Session`, `Options`, `Output`, and `Snapshot` contracts.
- Updated CLI persistent executor to consume `terminal.Session` while preserving provider filtering, session lifecycle, prompt write, raw chunk, close, and command behavior.
- Recovered deterministic full-cycle evidence for edge-node terminal session relay and exact node-local vs edge-rendered payload comparison.

## 최종 검증

- `go test -count=1 ./apps/node/internal/terminal ./apps/node/internal/adapters/cli` - PASS; reviewer rerun: `terminal` 0.431s, `adapters/cli` 42.147s.
- `go test -count=1 ./apps/node/internal/adapters/cli ./apps/node/internal/...` - PASS; reviewer rerun: `adapters/cli` 42.077s, `terminal` 0.444s, `transport` 5.041s, other node internal packages ok/no-test.
- `./scripts/e2e-smoke.sh` - PASS auxiliary only; implementation recorded raw output path `/tmp/iop-e2e-smoke-cloud-G07.out`.
- `IOP_EDGE_CONFIG=/tmp/iop-terminal-diag.rEc8DE/edge.yaml ./scripts/dev/edge.sh` and `IOP_NODE_CONFIG=/tmp/iop-terminal-diag.rEc8DE/node.yaml ./scripts/dev/node.sh` - PASS; raw evidence under `/tmp/iop-terminal-diag.rEc8DE/`, payload comparison in `/tmp/iop-terminal-diag.rEc8DE/comparison.txt`, per-run diff files empty.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/bridge-boundary-hardening.md`
- Completed task ids:
  - `terminal-core-boundary`: PASS; evidence=`plan_cloud_G07_2.log`, `code_review_cloud_G07_2.log`; verification=`go test -count=1 ./apps/node/internal/adapters/cli ./apps/node/internal/...`, `/tmp/iop-terminal-diag.rEc8DE/comparison.txt`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
