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

# Archive-bound handoff pointer와 migration surface 원자적 제거

## For the Implementing Agent

`CODE_REVIEW-cloud-G08.md`의 implementation-owned 섹션 작성은 필수다. encoded predecessor 13의 exactly one final PASS를 확인하고, 그 archive directory의 named artifacts만 검증해 실제 workspace-relative paths/digests를 `HANDOFF.md`에 기록한다. 모든 삭제 대상의 사전 존재와 digest를 먼저 고정한 뒤 같은 task에서 삭제 후 부재와 external before/after 동일성을 기록한다. active pair를 유지한 채 review 준비 완료만 보고하며 finalization은 code-review agent만 수행한다.

## Background

Task 13이 deletion-safe copies와 pre-deletion receipt를 archive한 뒤에는 IOP live tree의 exporter, Task 10 verifier, original/state fixtures, Task 06 stable bundle receipt와 stable delta/addendum가 재실행 가능한 migration source로 남아서는 안 된다. 단순 `test ! -e`는 파일이 애초에 없었어도 통과하므로 이 task는 exact deletion set의 pre-delete existence/digest를 먼저 증명하고, archive pointer를 기록한 다음, post-delete absence를 같은 audit에 결합한다. Legacy CLI Agent contract는 Task 10이 이미 삭제하므로 이 task의 삭제 claim이 아니다.

## Archive Evidence Snapshot

- `plan_local_G07_0.log` / `code_review_cloud_G07_0.log`는 D02 generic Node와 legacy contract 삭제를 전제로 한 미착수 pair다.
- `plan_local_G07_1.log` / `code_review_cloud_G07_1.log`는 archive path를 재탐색하고 pre-delete 존재를 입증하지 못하는 미착수 pair다.
- 두 pair 모두 implementation evidence, verdict, Roadmap completion이 없다. 새 plan은 Task 13 archive artifacts를 exact named set으로만 읽고 legacy contract claim을 제거한다.

## 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-spec/index.md`
- `agent-spec/runtime/iop-agent-cli-runtime.md`
- `agent-spec/runtime/edge-node-execution.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/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_1.log`
- `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/code_review_cloud_G07_1.log`
- `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는 `[승인됨]`, 잠금 `해제`다. Task 13이 S01 `inventory`를 닫은 다음 이 task는 삭제 barrier를 실행해 S05 final closure의 durable input을 만든다. `milestone-task=handoff-gate`는 이 pair의 evidence contribution 범위이며, 이 pair의 PASS만으로 final closure를 주장하지 않고 Task 15의 composite receipt가 완료 근거를 제공한다.
- D04는 provider-only IOP와 independent Chronos Server/Node ownership을 요구하고 IOP-to-Chronos connection을 금지한다. README/HANDOFF는 ownership만 설명하며 Chronos 구현 완료나 연결을 주장하지 않는다.
- S05 final receipt는 Task 15가 `HANDOFF.md`를 다시 갱신해 닫는다. 이 task는 archived Task 13 exact pointers와 removal completion을 제공한다.

### Verification Context

- Predecessor 13은 receipt와 deletion-safe artifacts의 immutable directory를 제공해야 하므로 active candidate를 허용하지 않는다. 구현은 archive의 실제 존재하는 `complete.log`만 Bash `nullglob` array에 수집하고 exactly one archived log와 exactly one Summary final-PASS marker를 확인한 뒤 그 dirname만 사용한다.
- Archive 접근은 resolved predecessor directory의 다음 named files로 제한한다: `pre-deletion-transfer-receipt-v1.md`, original/delta/addendum/effective/state copies와 sidecars, `verify-pre-deletion-receipt-v1.py`, `pre-deletion-audit.log`, `complete.log`.
- Exact 12-file deletion set은 exporter source/test, `scripts/verify-iop-agent-chronos-boundary.py`, migration-only `scripts/verify_iop_agent_chronos_boundary_test.py`, original manifest, state schema/fixture, `scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json`, stable delta/addendum 및 두 SHA sidecars다. `agent-contract/inner/iop-agent-cli-runtime.md`는 Task 10 소유 삭제이므로 포함하지 않는다.
- `migration-removal-audit.log`는 pre-delete마다 literal path와 SHA-256을 저장하고, archived Task 13 copy가 있는 일곱 data files는 receipt digest와 일치시킨다. Exporter/verifier도 존재와 digest를 저장한다. 이어 post-delete마다 exact absence marker를 저장한다.
- `/config/workspace/chronos`, canonical `/config/workspace/iop`, lock registry는 pre/post HEAD, raw status digest, lock digest가 동일해야 한다. IOP staging worktree는 이 task가 의도적으로 바꾸므로 외부 mutation 비교 대상이 아니다.
- Bash/repository-root, Python 3, Git, `sha256sum`, Go가 필요하며 external service/credential은 없다. Confidence는 high이고 predecessor PASS가 유일한 scheduling precondition이다.

### Test Coverage Gaps

- 삭제 전 command는 삭제 뒤 재실행할 수 없는 one-shot evidence다. Reviewer는 saved `migration-removal-audit.log`, exact deletion diff와 post-delete checks를 결합해 검증한다.
- Negative `rg`는 return code 1만 no-match로 인정하고 0 또는 2+를 실패시킨다. HANDOFF required fields는 각각 정확히 한 번 파싱하며 alternation any-match를 사용하지 않는다.

### Symbol References

- 제거: `cmd/iop-chronos-transfer/main.go`, `main_test.go`, stable boundary verifier와 migration fixtures.
- 유지 문서: `README.md`, `HANDOFF.md`; product Node/provider runtime symbol은 바꾸지 않는다.

### Split Judgment

- Durable pointer 작성과 deletion은 한 barrier다. Pointer 없이 삭제하거나 deletion 없이 PASS하면 각각 provenance 단절 또는 duplicate source of truth가 되므로 분리하지 않는다.
- Stable invariant는 every delete target에 pre existence+digest와 post absence가 있고, HANDOFF가 exact archived Task 13 artifacts/digests만 가리키는 것이다.

### Scope Rationale

- Legacy contract, agent runtime, provider-only Node refactor는 Task 10 소유다. 이 task는 해당 파일을 수정/삭제 claim하지 않는다.
- Roadmap/SDD, Chronos, canonical IOP, lock registry, Task 13 archived content를 수정하지 않는다.
- Final live-tree disposition, regressions와 `handoff-gate` completion은 Task 15가 소유한다.

### Final Routing

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

## Dependencies and Execution Order

1. Bash/repository-root preflight로 exactly one archived PASS Task 13 `complete.log`를 resolve한다.
2. Resolved directory의 named files만 읽어 archived verifier `check-archived`를 통과시키고 HANDOFF에 actual exact paths/digests를 기록한다.
3. External before snapshot과 deletion set의 pre-delete existence/digest를 audit에 기록하고 archived copy digest와 대조한다.
4. Exact deletion set을 제거하고 post-delete absence, fail-closed stale reference scan, docs/tests, external after equality를 기록한다.

## Implementation Checklist

- [ ] Refuse to start unless Bash runs at repository root and exactly one archived Task 13 complete.log with exactly one Summary final-PASS marker resolves; inspect only its same-directory named artifacts and pass the archived verifier.
- [ ] Write actual literal Task 13 archive paths and recomputed digests into HANDOFF, rejecting wildcards, placeholders, absolute paths, `..`, duplicate fields or a path outside the resolved predecessor directory.
- [ ] Record pre-delete existence and SHA-256 for every exact deletion target plus external before identities, and bind all copied data artifacts to the Task 13 receipt before deleting anything.
- [ ] Delete only the exporter, stable verifier/test, original/state fixtures and stable delta/addendum set; record every post-delete absence, full regressions and unchanged external after identities in `migration-removal-audit.log`.
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [TEST-1] Exact archive pointer와 pre-delete evidence barrier

**Problem**

Archive glob을 later tasks가 다시 탐색하거나 HANDOFF에 `...` placeholder를 쓰면 Task 13 provenance가 ambiguous하다. 삭제 뒤 부재만 확인하면 exporter/verifier/fixtures가 실제로 검증 대상이었는지도 증명할 수 없다.

**Solution**

Exactly one Task 13 complete log dirname을 고정하고 named artifact set을 offline verifier로 검증한다. Offline check는 receipt의 fixed `bundle-member:acceptance-v1/state/state-export-v1.json` location과 archived bundle/member digest·count binding도 검증한다. HANDOFF front matter에는 Task 13 complete log, pre-deletion receipt/audit/verifier, original/delta/addendum/effective/state schema/state fixture/Task 06 bundle receipt 각각의 actual workspace-relative archive path와 recomputed digest를 정확히 한 번 기록한다. 이어 exact deletion set 12 files의 pre path/digest, Task 13 binding 결과와 external before identity를 audit에 쓴다.

**Modified Files and Checklist**

- [ ] `HANDOFF.md` — exact archived Task 13 pointers/digests and preliminary removal receipt.
- [ ] `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/migration-removal-audit.log` — pre/post deletion and external snapshot evidence.

**Test Strategy**

- Resolve the predecessor exactly once; invoke its archived verifier in offline mode; parse HANDOFF front matter as a unique key map and compare every pointer/digest. Pre-delete capture hard-fails on any missing/non-file target before writing the completion phase.

**Verification**

- `bash -euo pipefail -c 'test "$PWD" = /config/workspace/iop-s1; shopt -s nullglob; group=m-iop-agent-chronos-extraction-decoupling; task=13+09,10_receipt_lock_audit; logs=(); for archived in agent-task/archive/*/*/"$group"/"$task"/complete.log; do test -f "$archived"; logs+=("$archived"); done; test "${#logs[@]}" -eq 1; awk '\''/^## (Summary|요약)$/ {s=1; next} /^## / && s {exit} s && (/final verdict: PASS/ || /최종 verdict: PASS/) {p++} END {exit p==1?0:1}'\'' "${logs[0]}"; d=${logs[0]%/complete.log}; for f in pre-deletion-transfer-receipt-v1.md iop-agent-chronos-ownership-manifest.tsv iop-agent-chronos-ownership-manifest.sha256 boundary-disposition-delta-v1.tsv boundary-disposition-delta-v1.sha256 boundary-surface-addendum-v1.tsv boundary-surface-addendum-v1.sha256 effective-disposition-matrix-v1.tsv effective-disposition-matrix-v1.sha256 iop-agent-chronos-transfer-state-v1.schema.json iop-agent-chronos-transfer-state-v1.schema.json.sha256 iop-agent-chronos-transfer-state-v1.json iop-agent-chronos-transfer-state-v1.json.sha256 verify-pre-deletion-receipt-v1.py pre-deletion-audit.log iop-agent-chronos-transfer-bundle-receipt-v1.json iop-agent-chronos-transfer-bundle-receipt-v1.json.sha256; do test -f "$d/$f"; done; python3 "$d/verify-pre-deletion-receipt-v1.py" check-archived --artifact-dir "$d" --receipt "$d/pre-deletion-transfer-receipt-v1.md" --audit "$d/pre-deletion-audit.log"'`
- `python3 -c 'from pathlib import Path; import hashlib; text=Path("HANDOFF.md").read_text(); assert text.startswith("---\n") and "\n---\n" in text; lines=text.split("\n---\n",1)[0].splitlines()[1:]; kv={}; [( (_ for _ in ()).throw(AssertionError(k)) if k in kv else kv.__setitem__(k,v) ) for k,v in (line.split(": ",1) for line in lines)]; expected={"task13_complete_log_path":("complete.log","task13_complete_log_sha256"),"pre_deletion_receipt_path":("pre-deletion-transfer-receipt-v1.md","pre_deletion_receipt_sha256"),"pre_deletion_audit_path":("pre-deletion-audit.log","pre_deletion_audit_sha256"),"task13_verifier_path":("verify-pre-deletion-receipt-v1.py","task13_verifier_sha256"),"original_manifest_artifact_path":("iop-agent-chronos-ownership-manifest.tsv","original_manifest_sha256"),"boundary_delta_artifact_path":("boundary-disposition-delta-v1.tsv","boundary_delta_sha256"),"boundary_addendum_artifact_path":("boundary-surface-addendum-v1.tsv","boundary_addendum_sha256"),"effective_matrix_artifact_path":("effective-disposition-matrix-v1.tsv","effective_matrix_sha256"),"state_schema_artifact_path":("iop-agent-chronos-transfer-state-v1.schema.json","state_schema_sha256"),"state_fixture_artifact_path":("iop-agent-chronos-transfer-state-v1.json","state_fixture_sha256"),"bundle_receipt_artifact_path":("iop-agent-chronos-transfer-bundle-receipt-v1.json","bundle_receipt_sha256")}; required=[x for k,v in expected.items() for x in (k,v[1])]; assert all(sum(1 for line in lines if line.startswith(k+": "))==1 for k in required); paths={k:Path(kv[k]) for k in expected}; assert all(not p.is_absolute() and ".." not in p.parts and "*" not in str(p) and "..." not in str(p) and p.name==expected[k][0] and p.is_file() for k,p in paths.items()); parents={p.parent for p in paths.values()}; assert len(parents)==1; parent=parents.pop(); assert len(parent.parts)==6 and parent.parts[:2]==("agent-task","archive") and len(parent.parts[2])==4 and parent.parts[2].isdigit() and len(parent.parts[3])==2 and parent.parts[3].isdigit() and parent.parts[-2:]==("m-iop-agent-chronos-extraction-decoupling","13+09,10_receipt_lock_audit"); assert all(hashlib.sha256(p.read_bytes()).hexdigest()==kv[expected[k][1]] for k,p in paths.items())'`
- `python3 -c 'from pathlib import Path; p=Path("agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/migration-removal-audit.log"); lines=p.read_text().splitlines(); targets=["cmd/iop-chronos-transfer/main.go","cmd/iop-chronos-transfer/main_test.go","scripts/verify-iop-agent-chronos-boundary.py","scripts/verify_iop_agent_chronos_boundary_test.py","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","scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256"]; assert all(sum(1 for x in lines if x.startswith("pre_delete_path="+t+"\tsha256=") and len(x.rsplit("=",1)[1])==64)==1 for t in targets); assert lines.count("pre_delete_complete=1")==1 and lines.count("pre_delete_digest_count=12")==1 and lines.count("task13_copy_digest_mismatches=0")==1'`

### [TEST-2] Migration source 삭제, docs와 external no-mutation

**Problem**

Archive pointer를 만든 뒤 live exporter/verifier/fixtures를 남기면 migration source가 둘이다. 반대로 external repository 또는 lock identity가 함께 바뀌면 IOP staging cleanup이 canonical promotion이나 Chronos implementation으로 확대된다.

**Solution**

Exact 12-file deletion set만 제거한다. README는 IOP Node의 model/provider/device execute/cancel/status/usage/lifecycle와 external inference API 경계만 설명하고, HANDOFF는 independent Chronos Server/Node/loop/agent/terminal ownership과 `chronos_connection_surfaces: 0`, `canonical_promotion: pending`을 기록한다. Audit는 post absence 12개, fail-closed scan/test 결과와 external before/after equality를 구조화한다.

**Modified Files and Checklist**

- [ ] `cmd/iop-chronos-transfer/main.go` — delete temporary exporter.
- [ ] `cmd/iop-chronos-transfer/main_test.go` — delete temporary exporter test.
- [ ] `scripts/verify-iop-agent-chronos-boundary.py` — delete stable migration verifier after archival receipt verification.
- [ ] `scripts/verify_iop_agent_chronos_boundary_test.py` — delete Task 10 migration-only verifier test with its production verifier.
- [ ] `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv` — delete immutable live source after archival copy.
- [ ] `scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json` — delete live schema after archival copy.
- [ ] `scripts/fixtures/iop-agent-chronos-transfer-state-v1.json` — delete live sanitized fixture after archival copy.
- [ ] `scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json` — delete Task 06 stable receipt after Task 13 archival copy/digest binding.
- [ ] `scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv` — delete stable delta source.
- [ ] `scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256` — delete stable delta sidecar.
- [ ] `scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv` — delete stable addendum source.
- [ ] `scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256` — delete stable addendum sidecar.
- [ ] `README.md` — provider-only IOP and independent Chronos ownership documentation.

**Test Strategy**

- Require exact path absence and exactly one corresponding post marker per pre marker. Audit must contain unique `removed_target_count=12`, `pre_delete_digest_count=12`, and `post_delete_absence_count=12` counters derived from the literal target set. Run `rg` with explicit roots and accept only return code 1. Run fresh full Go and readability checks, then compare external before/after fields individually.

**Verification**

- `bash -euo pipefail -c 'paths=(cmd/iop-chronos-transfer/main.go cmd/iop-chronos-transfer/main_test.go scripts/verify-iop-agent-chronos-boundary.py scripts/verify_iop_agent_chronos_boundary_test.py 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 scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256 scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256); for p in "${paths[@]}"; do test ! -e "$p"; done; roots=(Makefile agent-contract/index.md agent-spec/index.md agent-spec/runtime agent-ops/rules/project README.md apps packages cmd configs proto); for r in "${roots[@]}"; do test -e "$r"; done; set +e; out=$(rg --sort path -n "cmd/iop-chronos-transfer|verify-iop-agent-chronos-boundary\\.py|verify_iop_agent_chronos_boundary_test\\.py|iop-agent-chronos-(ownership-manifest|transfer-state-v1|transfer-bundle-receipt-v1|boundary-disposition-delta-v1|boundary-surface-addendum-v1)|git\\.toki-labs\\.com/toki/chronos|[Cc]hronos[_-]?(bridge|control|connector|gateway|target|registry)" "${roots[@]}" 2>&1); rc=$?; set -e; test "$rc" -eq 1 || { printf "%s\n" "$out" >&2; exit 1; }'`
- `go list ./... && go test -count=1 ./... && make readability-audit`
- `python3 -c 'from pathlib import Path; p=Path("agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/migration-removal-audit.log"); lines=p.read_text().splitlines(); targets=["cmd/iop-chronos-transfer/main.go","cmd/iop-chronos-transfer/main_test.go","scripts/verify-iop-agent-chronos-boundary.py","scripts/verify_iop_agent_chronos_boundary_test.py","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","scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256"]; assert all(lines.count("post_delete_absent="+t)==1 for t in targets); assert lines.count("removed_target_count=12")==1 and lines.count("pre_delete_digest_count=12")==1 and lines.count("post_delete_absence_count=12")==1; keys=["chronos_head","chronos_status_sha256","canonical_iop_head","canonical_iop_status_sha256","lock_sha256"]; get=lambda k,phase: next(x.split("=",1)[1] for x in lines if x.startswith(phase+"_"+k+"=")); assert all(get(k,"before")==get(k,"after") for k in keys); assert lines.count("external_mutations=0")==1 and lines.count("task14_removal_status=pass")==1'`

## Modified Files Summary

| File | Item |
|------|------|
| `HANDOFF.md` | TEST-1 |
| `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/migration-removal-audit.log` | TEST-1, TEST-2 |
| `cmd/iop-chronos-transfer/main.go` | TEST-2 |
| `cmd/iop-chronos-transfer/main_test.go` | TEST-2 |
| `scripts/verify-iop-agent-chronos-boundary.py` | TEST-2 |
| `scripts/verify_iop_agent_chronos_boundary_test.py` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-transfer-state-v1.schema.json` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-transfer-state-v1.json` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv` | TEST-2 |
| `scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256` | TEST-2 |
| `README.md` | TEST-2 |
| `agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/CODE_REVIEW-cloud-G08.md` | TEST-1, TEST-2 |

## Final Verification

1. `bash -euo pipefail -c 'test "$PWD" = /config/workspace/iop-s1; shopt -s nullglob; group=m-iop-agent-chronos-extraction-decoupling; task=13+09,10_receipt_lock_audit; logs=(); for archived in agent-task/archive/*/*/"$group"/"$task"/complete.log; do test -f "$archived"; logs+=("$archived"); done; test "${#logs[@]}" -eq 1; awk '\''/^## (Summary|요약)$/ {s=1; next} /^## / && s {exit} s && (/final verdict: PASS/ || /최종 verdict: PASS/) {p++} END {exit p==1?0:1}'\'' "${logs[0]}"; d=${logs[0]%/complete.log}; for f in pre-deletion-transfer-receipt-v1.md iop-agent-chronos-ownership-manifest.tsv iop-agent-chronos-ownership-manifest.sha256 boundary-disposition-delta-v1.tsv boundary-disposition-delta-v1.sha256 boundary-surface-addendum-v1.tsv boundary-surface-addendum-v1.sha256 effective-disposition-matrix-v1.tsv effective-disposition-matrix-v1.sha256 iop-agent-chronos-transfer-state-v1.schema.json iop-agent-chronos-transfer-state-v1.schema.json.sha256 iop-agent-chronos-transfer-state-v1.json iop-agent-chronos-transfer-state-v1.json.sha256 verify-pre-deletion-receipt-v1.py pre-deletion-audit.log iop-agent-chronos-transfer-bundle-receipt-v1.json iop-agent-chronos-transfer-bundle-receipt-v1.json.sha256; do test -f "$d/$f"; done; python3 "$d/verify-pre-deletion-receipt-v1.py" check-archived --artifact-dir "$d" --receipt "$d/pre-deletion-transfer-receipt-v1.md" --audit "$d/pre-deletion-audit.log"'`
2. `python3 -c 'from pathlib import Path; import hashlib; text=Path("HANDOFF.md").read_text(); assert text.startswith("---\n") and "\n---\n" in text; lines=text.split("\n---\n",1)[0].splitlines()[1:]; kv={}; [( (_ for _ in ()).throw(AssertionError(k)) if k in kv else kv.__setitem__(k,v) ) for k,v in (line.split(": ",1) for line in lines)]; expected={"task13_complete_log_path":("complete.log","task13_complete_log_sha256"),"pre_deletion_receipt_path":("pre-deletion-transfer-receipt-v1.md","pre_deletion_receipt_sha256"),"pre_deletion_audit_path":("pre-deletion-audit.log","pre_deletion_audit_sha256"),"task13_verifier_path":("verify-pre-deletion-receipt-v1.py","task13_verifier_sha256"),"original_manifest_artifact_path":("iop-agent-chronos-ownership-manifest.tsv","original_manifest_sha256"),"boundary_delta_artifact_path":("boundary-disposition-delta-v1.tsv","boundary_delta_sha256"),"boundary_addendum_artifact_path":("boundary-surface-addendum-v1.tsv","boundary_addendum_sha256"),"effective_matrix_artifact_path":("effective-disposition-matrix-v1.tsv","effective_matrix_sha256"),"state_schema_artifact_path":("iop-agent-chronos-transfer-state-v1.schema.json","state_schema_sha256"),"state_fixture_artifact_path":("iop-agent-chronos-transfer-state-v1.json","state_fixture_sha256"),"bundle_receipt_artifact_path":("iop-agent-chronos-transfer-bundle-receipt-v1.json","bundle_receipt_sha256")}; required=[x for k,v in expected.items() for x in (k,v[1])]; assert all(sum(1 for line in lines if line.startswith(k+": "))==1 for k in required); paths={k:Path(kv[k]) for k in expected}; assert all(not p.is_absolute() and ".." not in p.parts and "*" not in str(p) and "..." not in str(p) and p.name==expected[k][0] and p.is_file() for k,p in paths.items()); parents={p.parent for p in paths.values()}; assert len(parents)==1; parent=parents.pop(); assert len(parent.parts)==6 and parent.parts[:2]==("agent-task","archive") and len(parent.parts[2])==4 and parent.parts[2].isdigit() and len(parent.parts[3])==2 and parent.parts[3].isdigit() and parent.parts[-2:]==("m-iop-agent-chronos-extraction-decoupling","13+09,10_receipt_lock_audit"); assert all(hashlib.sha256(p.read_bytes()).hexdigest()==kv[expected[k][1]] for k,p in paths.items())'`
3. `python3 -c 'from pathlib import Path; p=Path("agent-task/m-iop-agent-chronos-extraction-decoupling/14+13_remove_migration_surface/migration-removal-audit.log"); lines=p.read_text().splitlines(); targets=["cmd/iop-chronos-transfer/main.go","cmd/iop-chronos-transfer/main_test.go","scripts/verify-iop-agent-chronos-boundary.py","scripts/verify_iop_agent_chronos_boundary_test.py","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","scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv","scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256"]; assert all(sum(1 for x in lines if x.startswith("pre_delete_path="+t+"\tsha256=") and len(x.rsplit("=",1)[1])==64)==1 for t in targets); assert all(lines.count("post_delete_absent="+t)==1 for t in targets); assert lines.count("removed_target_count=12")==1 and lines.count("pre_delete_digest_count=12")==1 and lines.count("post_delete_absence_count=12")==1; keys=["chronos_head","chronos_status_sha256","canonical_iop_head","canonical_iop_status_sha256","lock_sha256"]; get=lambda k,phase: next(x.split("=",1)[1] for x in lines if x.startswith(phase+"_"+k+"=")); assert all(get(k,"before")==get(k,"after") for k in keys); assert lines.count("task13_copy_digest_mismatches=0")==1 and lines.count("external_mutations=0")==1 and lines.count("task14_removal_status=pass")==1'`
4. `bash -euo pipefail -c 'paths=(cmd/iop-chronos-transfer/main.go cmd/iop-chronos-transfer/main_test.go scripts/verify-iop-agent-chronos-boundary.py scripts/verify_iop_agent_chronos_boundary_test.py 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 scripts/fixtures/iop-agent-chronos-transfer-bundle-receipt-v1.json scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.tsv scripts/fixtures/iop-agent-chronos-boundary-disposition-delta-v1.sha256 scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.tsv scripts/fixtures/iop-agent-chronos-boundary-surface-addendum-v1.sha256); for p in "${paths[@]}"; do test ! -e "$p"; done; roots=(Makefile agent-contract/index.md agent-spec/index.md agent-spec/runtime agent-ops/rules/project README.md apps packages cmd configs proto); for r in "${roots[@]}"; do test -e "$r"; done; set +e; out=$(rg --sort path -n "cmd/iop-chronos-transfer|verify-iop-agent-chronos-boundary\\.py|verify_iop_agent_chronos_boundary_test\\.py|iop-agent-chronos-(ownership-manifest|transfer-state-v1|transfer-bundle-receipt-v1|boundary-disposition-delta-v1|boundary-surface-addendum-v1)|git\\.toki-labs\\.com/toki/chronos|[Cc]hronos[_-]?(bridge|control|connector|gateway|target|registry)" "${roots[@]}" 2>&1); rc=$?; set -e; test "$rc" -eq 1 || { printf "%s\n" "$out" >&2; exit 1; }'`
5. `go list ./... && go test -count=1 ./... && make readability-audit`
6. `git diff --check`

The one-shot pre-delete capture is reviewed from `migration-removal-audit.log`; it is not rerun after deletion. 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`.
