<!-- task=m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface plan=1 tag=TEST -->

# Temporary migration surface와 legacy compatibility 제거

## For the Implementing Agent

`CODE_REVIEW-cloud-G07.md`의 implementation-owned 섹션 작성은 필수다. encoded predecessor의 exact PASS와 durable receipt를 확인한 뒤 이 child가 소유한 temporary exporter/fixture/legacy contract/docs만 정리하고 실제 verification output을 기록한다. active pair를 유지해 review 준비 완료만 보고하며 finalization은 code-review agent만 수행한다. 차단되면 사용자 질의나 상태 분류 없이 exact blocker, 시도한 명령/출력, 재개 조건만 evidence 필드에 남기고 archive, `complete.log`, control-plane stop file을 만들지 않는다.

## Background

Bundle과 state를 검증하고 effective transfer receipt가 고정된 뒤 exporter, tracked migration fixture와 unindexed legacy contract를 IOP에 남기면 두 source of truth와 재실행 가능한 compatibility surface가 된다. 이 task는 13 receipt를 durable handoff entrypoint로 연결한 다음 temporary surface를 삭제하고 README/HANDOFF를 provider-only IOP와 downstream Chronos ownership으로 마무리한다.

## Archive Evidence Snapshot

- `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/plan_local_G07_0.log`와 `code_review_cloud_G07_0.log`는 D02 generic Node control을 전제로 한 미착수 pair다. implementation checklist/output과 verdict가 없고 D04가 해당 전제를 대체했다.
- Required/Suggested/Nit finding과 Roadmap completion은 없다. 기존 삭제 순서만 유지하되 최종 boundary는 no-Chronos connection/provider-only IOP다.

## Analysis

### Files Read

- `agent-roadmap/phase/automation-runtime-bridge/PHASE.md`
- `agent-roadmap/phase/automation-runtime-bridge/milestones/iop-agent-chronos-extraction-decoupling.md`
- `agent-roadmap/sdd/automation-runtime-bridge/iop-agent-chronos-extraction-decoupling/SDD.md`
- `README.md`
- `HANDOFF.md`
- `Makefile`
- `agent-contract/index.md`
- `agent-contract/inner/iop-agent-cli-runtime.md`
- `agent-spec/index.md`
- `agent-spec/runtime/iop-agent-cli-runtime.md`
- `agent-ops/rules/project/domain/testing/rules.md`
- `agent-test/local/rules.md`
- `agent-test/local/testing-smoke.md`
- `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv`
- `scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json`
- `scripts/fixtures/iop-agent-chronos-transfer-state-v1.json`
- `agent-task/m-iop-agent-chronos-extraction-decoupling/08+07_cleanup_build_contract/PLAN-local-G07.md`
- `agent-task/m-iop-agent-chronos-extraction-decoupling/13+09,10_receipt_lock_audit/PLAN-cloud-G09.md`
- `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/plan_local_G07_0.log`
- `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/code_review_cloud_G07_0.log`

### SDD Criteria

- SDD는 `[승인됨]`, 잠금 `해제`다. Upstream task 10 PASS가 S03 `decouple`과 S04 `retain-node`를 함께 닫는다. 이 child는 그 결과와 13 receipt 이후의 migration-only path를 제거하고 S05 receipt durability를 지원하지만 독립 Roadmap Task를 check하지 않는다.
- SDD Interface Contract는 legacy active IOP contract를 decouple에서 제거하고 original manifest + delta + effective matrix를 receipt evidence로만 보존하도록 한다.
- 금지 조건은 forwarding runtime, future Chronos bridge/API/proto/config와 두 repository의 duplicate application source of truth다. 따라서 receipt를 먼저 검증하고 archived evidence pointer를 만든 뒤 exporter, fixtures, legacy contract를 같은 transaction으로 삭제한다.

### Verification Context

- Handoff는 없다. active/archive candidate에서 predecessor `13+09,10_receipt_lock_audit`의 exact `complete.log`를 확인했으나 현재 missing이다.
- `cmd/iop-chronos-transfer/main.go`와 `main_test.go`는 현재 checkout에는 아직 없고 predecessor task 04가 생성할 예정인 exact temporary paths다. 구현 시 13 PASS chain과 manifest를 통해 존재/처분을 확인한 뒤 삭제한다.
- 08은 `agent-contract/inner/iop-agent-cli-runtime.md`를 active index에서 제거하고 `transfer-reference-only` 상태로 남긴다. 14는 13 receipt가 이를 대체한 뒤 파일 자체를 삭제하며 index/spec에 새 pointer를 만들지 않는다.
- Local verification은 full fresh Go suite, readability audit, exact path/reference scan, diff check다. external service, credential, Chronos import/write는 필요 없다. Confidence는 high이며 predecessor receipt가 유일한 execution precondition이다.

### Test Coverage Gaps

- 삭제 자체의 별도 unit test는 만들지 않는다. exporter package 부재는 `go list`와 full Go suite로, stale references는 deterministic `rg`와 readability audit로 검증한다.
- README/HANDOFF의 downstream 설명은 구현 완료를 주장하지 않고 ownership 및 receipt pointer만 기록해야 하므로 review checkpoint가 필요하다.

### Symbol References

- 제거 경로: `cmd/iop-chronos-transfer`, `iop.agent-cli-runtime`, ownership/state transfer fixtures.
- active index, Makefile, README/HANDOFF와 Go import/reference를 모두 검사한다. Chronos product symbol을 새로 도입하지 않는다.

### Split Judgment

- Predecessor 13의 active/archive exact PASS `complete.log`는 missing이다.
- Stable invariant는 receipt/digests가 durable archive evidence로 확인된 뒤에만 temporary migration/compatibility surfaces를 삭제하고, living docs가 그 receipt와 최종 ownership을 정확히 가리키는 것이다.
- deletion과 pointer update 사이 중간 상태는 broken reference 또는 duplicate source of truth이므로 한 transaction으로 유지한다. PASS evidence는 exact path absence, stale pointer 0, fresh Go/readability PASS다.

### Scope Rationale

- product agent/Node refactor는 predecessors 07–10이 소유하며 이 task는 새 runtime package나 bridge를 만들지 않는다.
- agent-roadmap, SDD, Chronos repository, lock registry와 archived receipt content는 수정하지 않는다.
- 최종 Milestone `handoff-gate` check와 global forbidden-surface audit는 task 15가 소유한다.

### Final Routing

- `evaluation_mode=isolated-reassessment`, finalizer=`finalize-task-policy.sh`, mode=`pair`.
- Build closures 모두 true. Scores=`2,0,2,1,2`, grade=`G07`, base/route=`local-fit`, lane=`local`.
- Review closures 모두 true. Scores=`2,0,2,1,2`, route=`official-review`, lane=`cloud`, grade=`G07`.
- `large_indivisible_context=false`; positive loop risks=`boundary_contract` (1); `review_rework_count=0`; `evidence_integrity_failure=false`; capability gap 없음.
- Canonical files: `PLAN-local-G07.md`, `CODE_REVIEW-cloud-G07.md`.

## Dependencies and Execution Order

1. `13+09,10_receipt_lock_audit` must have exactly one matching PASS `complete.log`; it is currently missing.
2. Validate that its transfer receipt and effective matrix are durable and digest-consistent.
3. Update final docs pointer and delete all exact temporary/legacy paths atomically, then run full regressions.

## Implementation Checklist

- [ ] Refuse to start until predecessor 13+09,10_receipt_lock_audit has an exact PASS complete.log and its receipt/effective-matrix digests are durable and consistent.
- [ ] Record the exact archived receipt pointer and final provider-only IOP/downstream Chronos ownership in README and HANDOFF without claiming Chronos implementation or an IOP-to-Chronos control connection.
- [ ] Delete the transfer exporter, historical tracked manifest/state fixtures, and unindexed legacy CLI Agent contract only after the receipt pointer is valid.
- [ ] Run exact absence/reference, fresh full Go, readability, and diff checks with zero Chronos repository or lock mutation.
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [TEST-1] Temporary exporter, fixtures와 legacy contract 삭제

**Problem**

검증 완료 후에도 exporter와 tracked migration inputs가 남으면 IOP에서 transfer를 다시 실행하거나 historical snapshot을 active source of truth로 오인할 수 있다. unindexed legacy CLI Agent contract도 IOP가 agent/session/terminal 책임을 계속 보유하는 것처럼 보이게 한다.

```text
# temporary surface after receipt
cmd/iop-chronos-transfer/**
scripts/fixtures/iop-agent-chronos-*
agent-contract/inner/iop-agent-cli-runtime.md
```

**Solution**

13 archived receipt의 original/delta/effective/bundle/state digest와 exact path를 먼저 검증한다. 이후 exporter source/test, original manifest, state schema/fixture와 transfer-reference-only legacy contract를 삭제하고 active index/build/import가 이들을 가리키지 않는지 확인한다.

```text
# after
temporary_transfer_paths=0
legacy_agent_contract_paths=0
active_transfer_references=0
```

**Modified Files and Checklist**

- [ ] `cmd/iop-chronos-transfer/main.go` — delete temporary exporter.
- [ ] `cmd/iop-chronos-transfer/main_test.go` — delete temporary exporter tests.
- [ ] `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv` — delete after immutable receipt retention.
- [ ] `scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json` — delete after state digest retention.
- [ ] `scripts/fixtures/iop-agent-chronos-transfer-state-v1.json` — delete after state digest retention.
- [ ] `agent-contract/inner/iop-agent-cli-runtime.md` — delete unindexed transfer-reference-only legacy contract.

**Test Strategy**

- Exact path absence, `go list ./...`, fresh full Go와 active pointer scan으로 검증한다.

**Verification**

- `test ! -e cmd/iop-chronos-transfer/main.go && test ! -e cmd/iop-chronos-transfer/main_test.go && test ! -e scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv && test ! -e scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json && test ! -e scripts/fixtures/iop-agent-chronos-transfer-state-v1.json && test ! -e agent-contract/inner/iop-agent-cli-runtime.md`
- `test -z "$(rg --sort path -n 'cmd/iop-chronos-transfer|iop-agent-chronos-ownership-manifest|iop-agent-chronos-transfer-state-v1|iop\.agent-cli-runtime|agent-contract/inner/iop-agent-cli-runtime' Makefile agent-contract/index.md agent-spec/index.md agent-ops/rules/project README.md HANDOFF.md apps packages cmd configs proto 2>/dev/null || true)"`
- `go test -count=1 ./...`

### [TEST-2] Final receipt pointer와 ownership documentation

**Problem**

temporary files를 삭제하면서 receipt entrypoint가 사라지거나 README/HANDOFF가 generic Node control/Chronos bridge를 남기면 후속 Chronos 설계와 IOP 책임이 다시 결합된다.

```text
# required final boundary
IOP Node = model/provider/device execute/cancel/status/usage/lifecycle
Chronos = its own Server/Node/loop/agent/terminal; no IOP control connection
```

**Solution**

README에는 IOP provider/device 운영 경계와 외부 inference API만 설명한다. HANDOFF에는 exact archived 13 receipt path, three matrix digests, canonical-promotion pending 조건과 downstream Chronos ownership을 machine-readable fields와 사람용 설명으로 기록하되 Chronos 구현 완료나 IOP Node 연결/등록/제어를 주장하지 않는다.

```text
# HANDOFF.md stable fields
transfer_receipt: agent-task/archive/.../13+09,10_receipt_lock_audit/transfer-receipt.md
iop_node_owner: model-provider-device
chronos_connection_surfaces: 0
canonical_promotion: pending
```

**Modified Files and Checklist**

- [ ] `README.md` — living provider-only IOP boundary.
- [ ] `HANDOFF.md` — durable receipt pointer, promotion gate and downstream ownership.

**Test Strategy**

- HANDOFF pointer existence/digest fields와 required ownership markers를 검증하고 forbidden connection/implementation claims를 review한다.

**Verification**

- Resolve `transfer_receipt:` from `HANDOFF.md`, require one workspace-relative existing archived 13 receipt, and compare its original/delta/effective digests to the HANDOFF fields.
- `rg -n '^iop_node_owner: model-provider-device$|^chronos_connection_surfaces: 0$|^canonical_promotion: pending$|Chronos Server|Chronos Node|loop|terminal' README.md HANDOFF.md`
- `make readability-audit`

## Modified Files Summary

| File | Item |
|------|------|
| `cmd/iop-chronos-transfer/main.go` | TEST-1 |
| `cmd/iop-chronos-transfer/main_test.go` | TEST-1 |
| `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv` | TEST-1 |
| `scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json` | TEST-1 |
| `scripts/fixtures/iop-agent-chronos-transfer-state-v1.json` | TEST-1 |
| `agent-contract/inner/iop-agent-cli-runtime.md` | TEST-1 |
| `README.md` | TEST-2 |
| `HANDOFF.md` | TEST-2 |
| `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/CODE_REVIEW-cloud-G07.md` | TEST-1, TEST-2 |

## Final Verification

1. Confirm exactly one PASS `complete.log` for encoded predecessor `13+09,10_receipt_lock_audit`; resolve and verify its archived `transfer-receipt.md` and `effective-disposition-matrix.tsv` digests before deletion.
2. `test ! -e cmd/iop-chronos-transfer/main.go && test ! -e cmd/iop-chronos-transfer/main_test.go && test ! -e scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv && test ! -e scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json && test ! -e scripts/fixtures/iop-agent-chronos-transfer-state-v1.json && test ! -e agent-contract/inner/iop-agent-cli-runtime.md`
3. `test -z "$(rg --sort path -n 'cmd/iop-chronos-transfer|iop-agent-chronos-ownership-manifest|iop-agent-chronos-transfer-state-v1|iop\.agent-cli-runtime|agent-contract/inner/iop-agent-cli-runtime' Makefile agent-contract/index.md agent-spec/index.md agent-ops/rules/project README.md HANDOFF.md apps packages cmd configs proto 2>/dev/null || true)"`
4. Resolve the single `transfer_receipt:` workspace-relative path from `HANDOFF.md`, require it to exist under archived task 13, and compare the original manifest, boundary delta and effective matrix digest fields.
5. `rg -n '^iop_node_owner: model-provider-device$|^chronos_connection_surfaces: 0$|^canonical_promotion: pending$|Chronos Server|Chronos Node|loop|terminal' README.md HANDOFF.md`
6. `go list ./... && go test -count=1 ./...`
7. `make readability-audit`
8. `git -C /config/workspace/chronos status --short && git diff --check` — Chronos status unchanged and workspace diff cleanly formatted.

Commands containing `go test -count=1` require fresh output; all other checks are rerun against the current checkout.

After completing all code changes, fill implementation-owned sections in `CODE_REVIEW-*-G??.md`.
