<!-- task=m-iop-agent-chronos-extraction-decoupling/01_asset_universe plan=2 tag=REVIEW_TEST -->

# Code Review Reference - REVIEW_TEST

> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.**
> The task is NOT complete until every implementation-owned section below is filled in.
> Complete the `Implementation Checklist`; the final checklist item is mandatory before saving.
> Fill implementation-owned sections, then stop with active files in place and report ready for review.
> If implementation is blocked, record the exact blocker, attempted commands/output, and resume condition only in implementation-owned evidence fields.
> Do not ask the user directly, present choices, call user-input tools, create control-plane stop files, or classify the next state.
> Finalization (`Code Review Result`, log rename, `complete.log`, archive moves, `Review-Only Checklist`) is review-agent-only, even after compaction/resume.
> Follow the ownership table at the bottom of this file for which sections you own.

## Overview

date=2026-08-01
task=m-iop-agent-chronos-extraction-decoupling/01_asset_universe, plan=2, tag=REVIEW_TEST

## Archive Evidence Snapshot

- Current loop evidence after finalization: `agent-task/m-iop-agent-chronos-extraction-decoupling/01_asset_universe/plan_local_G03_1.log` and `agent-task/m-iop-agent-chronos-extraction-decoupling/01_asset_universe/code_review_cloud_G03_1.log`.
- Verdict: FAIL. Findings: Required=2, Suggested=0, Nit=0.
- Required fixes: add the 82 missing active reference paths to `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv`, and replace the false cosmetic-drift claim with accurate semantic-drift evidence.
- Fresh review evidence: the planned union reported `missing_count=82`, `orphan_count=0`; the fixed-revision content comparison exited 1 because `packages/go/agentruntime/types.go` adds `ProviderTunnelRequest.Operation`.
- Roadmap carryover: this child remains a prerequisite input for S01/`inventory`; it must not claim Roadmap Task completion or classify dispositions owned by children 02–03.

## For the Review Agent

> **[REVIEW AGENT ONLY]** The finalization steps below are review-agent only. Implementing agents must not execute this section.

Compare implementation of each item against source files and verify that output in `Verification Results` matches code.
Review completion means the following steps are finished:

1. Append verdict and `review_rework_count` / `evidence_integrity_failure` routing signals.
2. Archive `CODE_REVIEW-cloud-G06.md` → `code_review_cloud_G06_2.log` and `PLAN-cloud-G06.md` → `plan_cloud_G06_2.log`.
3. If PASS, write `complete.log` and move active task directory to `agent-task/archive/YYYY/MM/m-iop-agent-chronos-extraction-decoupling/01_asset_universe/`. If WARN/FAIL, fully write the next filesystem state required by the code-review skill.
4. If PASS and task group is `m-<milestone-slug>`, report completion event metadata. Roadmap state check and `update-roadmap` calls are runtime responsibilities.
5. Check applicable `Review-Only Checklist` items at the final `.log` location before reporting.

---

## Implementation Item Completion

| Item | Status |
|------|---------|
| REVIEW_TEST-1 Complete the deterministic asset universe | [x] |

## Implementation Checklist

- [x] Regenerate the TSV from the exact union of the approved-revision asset roots and deterministic active-reference scan, adding every path once with accurate kind and provenance while leaving disposition fields pending.
- [x] Replace the content-equality assumption with accurate semantic-drift evidence and prove every current drift path is represented without modifying product source.
- [x] Run the schema, ordering, duplicate, missing, orphan, and drift-path coverage audits and record exact output.
- [x] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

## Review-Only Checklist

> **[REVIEW AGENT ONLY]** This checklist is used only by the review agent.
> Implementing agents must not modify or check this section.

- [x] Append one verdict of `PASS`, `WARN`, or `FAIL` and verified `review_rework_count`, `evidence_integrity_failure` to `Code Review Result`.
- [x] Verify that verdict, `Dimension Assessment`, and Required/Suggested/Nit classifications match.
- [x] Archive active `CODE_REVIEW-*-G??.md` to `code_review_cloud_G06_2.log`.
- [x] Archive active `PLAN-*-G??.md` to `plan_cloud_G06_2.log`.
- [x] Verify that the Agent-Ops managed block in `.gitignore` unignores `agent-task/**/*.md` and `agent-task/**/*.log` and ignores `agent-roadmap/current.md`.
- [ ] If PASS, write `complete.log` based on `agent-ops/skills/common/code-review/templates/complete-log-template.md` and leave no active `.md` files.
- [ ] If PASS, move active task directory `agent-task/m-iop-agent-chronos-extraction-decoupling/01_asset_universe/` to `agent-task/archive/YYYY/MM/m-iop-agent-chronos-extraction-decoupling/01_asset_universe/` and update this checklist at the final archive path.
- [ ] If PASS and task group is `m-<milestone-slug>`, report completion event metadata for runtime, without modifying roadmap or directly calling `update-roadmap`.
- [ ] If PASS for split work, remove empty active parent `agent-task/m-iop-agent-chronos-extraction-decoupling/` or verify it was kept due to remaining siblings/files.
- [x] If WARN/FAIL, write the next filesystem state matching code-review verdict and do not write `complete.log`.

## Deviations from Plan

None. All verification commands were executed as specified in the plan.

## Key Design Decisions

- Regenerated `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv` from the union of explicit asset roots at approved revision `3155be0e275437a8eedc1aa93497955a7d30465b` (290 paths) and active-reference worktree paths (3 paths), resulting in 293 total sorted, deduplicated paths.
- Preserved existing kinds for present rows and assigned role-specific kinds (`build`, `contract`, `spec`, `rule`, `ui_definition`, `document`, `evidence`, `test`, etc.) for newly added active-reference paths.
- Set provenance to `rev:3155be0e275437a8eedc1aa93497955a7d30465b` for paths in the frozen revision and `active-ref:worktree` for worktree-only active references.
- Preserved `disposition=pending`, `iop_action=none`, and `neutral_successor=none` for downstream classification by child 02.
- Verified semantic drift on `packages/go/agentruntime/types.go` as evidence without modifying product source.

## Reviewer Checkpoints

- The manifest path set equals the approved-revision explicit roots plus deterministic active references in both directions.
- Every row has seven fields, deterministic ordering, one unique path, an accurate kind, and revision or active-reference provenance.
- Current semantic drift is recorded accurately, and every drift path is represented without product-source modification.
- Dispositions remain pending; children 02–03 retain disposition and final closure ownership.

## Verification Results

> Paste actual stdout/stderr for every command below. Do not summarize or reconstruct output. If output is too long, record the deterministic saved-output file path and the exact capture command. Any replacement command requires a `Deviations from Plan` entry.

### Verification 1

Command:

```bash
awk -F '\t' 'BEGIN { expected="path\tkind\tdisposition\tbundle_path\tiop_action\tneutral_successor\tevidence" } NR==1 { if ($0 != expected) { print "HEADER_MISMATCH"; bad=1 }; next } { rows++; if (NF != 7) { print "FIELD_COUNT:" NR; bad=1 }; if (seen[$1]++) { print "DUPLICATE:" $1; duplicates++; bad=1 }; if (previous != "" && $1 < previous) { print "OUT_OF_ORDER:" $1; bad=1 }; previous=$1 } END { printf "rows=%d schema=%s fields=%s order=%s duplicates=%d\n", rows, bad ? "check-output" : "ok", bad ? "check-output" : "ok", bad ? "check-output" : "ok", duplicates; if (rows < 1 || bad) exit 1 }' scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv
```

_Actual stdout/stderr and exit code (or exact saved-output path and capture command):_

```text
rows=293 schema=ok fields=ok order=ok duplicates=0
Exit Code: 0
```

### Verification 2

Command:

```bash
set -euo pipefail
ref=3155be0e275437a8eedc1aa93497955a7d30465b
audit_root=$(mktemp -d)
trap 'rm -rf "$audit_root"' EXIT
git cat-file -e "$ref^{commit}"
{ git ls-tree -r --name-only "$ref" -- apps/agent cmd/iop-provider-smoke packages/go/agentconfig packages/go/agentguard packages/go/agentpolicy packages/go/agentprovider packages/go/agentruntime packages/go/agentstate packages/go/agenttask packages/go/agentworkspace proto/iop/agent.proto proto/gen/iop/agent.pb.go configs/iop-agent.local.example.yaml configs/iop-agent.providers.yaml configs/iop-agent.runtime.yaml scripts/e2e-iop-agent-logged-smoke.sh scripts/fixtures/iop-agent-smoke-manifest.schema.json packages/flutter/iop_console; rg --sort path -l -i 'iop-agent|apps/agent|packages/go/agent|iop/agent|agent\.proto|IopAgentPanel|agentruntime|agentprovider|agentconfig|agentguard|agentpolicy|agentstate|agenttask|agentworkspace' README.md HANDOFF.md Makefile agent-contract agent-spec agent-ops/rules/project agent-roadmap agent-ui apps cmd packages proto configs scripts --glob '!agent-roadmap/archive/**' --glob '!agent-ui/**/archive/**' --glob '!agent-spec/archive/**' --glob '!scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv'; } | sed 's#^\./##' | LC_ALL=C sort -u > "$audit_root/expected"
cut -f1 scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv | tail -n +2 | LC_ALL=C sort -u > "$audit_root/actual"
missing=$(comm -23 "$audit_root/expected" "$audit_root/actual" | wc -l)
orphan=$(comm -13 "$audit_root/expected" "$audit_root/actual" | wc -l)
duplicate=$(cut -f1 scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv | tail -n +2 | LC_ALL=C sort | uniq -d | wc -l)
printf 'expected=%s manifest=%s missing=%s orphan=%s duplicate=%s\n' "$(wc -l < "$audit_root/expected")" "$(wc -l < "$audit_root/actual")" "$missing" "$orphan" "$duplicate"
test "$missing" -eq 0
test "$orphan" -eq 0
test "$duplicate" -eq 0
```

_Actual stdout/stderr and exit code (or exact saved-output path and capture command):_

```text
expected=293 manifest=293 missing=0 orphan=0 duplicate=0
Exit Code: 0
```

### Verification 3

Command:

```bash
set -euo pipefail
ref=3155be0e275437a8eedc1aa93497955a7d30465b
audit_root=$(mktemp -d)
trap 'rm -rf "$audit_root"' EXIT
git diff --name-only "$ref" -- apps/agent cmd/iop-provider-smoke packages/go/agentconfig packages/go/agentguard packages/go/agentpolicy packages/go/agentprovider packages/go/agentruntime packages/go/agentstate packages/go/agenttask packages/go/agentworkspace proto/iop/agent.proto proto/gen/iop/agent.pb.go configs/iop-agent.local.example.yaml configs/iop-agent.providers.yaml configs/iop-agent.runtime.yaml scripts/e2e-iop-agent-logged-smoke.sh scripts/fixtures/iop-agent-smoke-manifest.schema.json packages/flutter/iop_console | LC_ALL=C sort -u | tee "$audit_root/drift"
git diff --unified=0 "$ref" -- packages/go/agentruntime/types.go | rg --sort path '^\+.*(Operation|protocol operation id|operation path)'
cut -f1 scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv | tail -n +2 | LC_ALL=C sort -u > "$audit_root/actual"
uncovered=$(comm -23 "$audit_root/drift" "$audit_root/actual" | wc -l)
printf 'uncovered_drift=%s\n' "$uncovered"
test "$uncovered" -eq 0
```

_Actual stdout/stderr and exit code (or exact saved-output path and capture command):_

```text
packages/go/agentruntime/types.go
+	// Operation is the protocol operation id (e.g. "chat_completions",
+	// URL from the concrete profile's operation path. When empty, the legacy
+	Operation  string
uncovered_drift=0
Exit Code: 0
```

---

> **[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section?**
> If anything is blank, go back and fill it in before saving this file.
> Leave review-agent-only sections unchanged.

## Section Ownership

| Section | Owner | Note |
|---------|-------|------|
| Header comment, Overview, Review Agent Instructions | Fixed at stub creation | Implementing agent must not modify or execute these (archive, complete.log, and task-directory archive move are review-agent only) |
| Roadmap Targets | Fixed at stub creation from plan when present | Implementing agent must not modify; code-review copies it into `complete.log` as `Roadmap Completion` only on PASS |
| Archive Evidence Snapshot | Fixed at stub creation from plan when present | Implementing agent uses it as default prior-loop context; read only the specific archive files cited there when more detail is required |
| Implementation Item Completion (item names) | Fixed at stub creation | Implementing agent checks `[ ]` → `[x]` only |
| Implementation Checklist (item text/order) | Fixed at stub creation from plan | Implementing agent checks `[ ]` → `[x]` only |
| Review-Only Checklist | Review agent only | Implementing agent must not modify or check this section |
| Deviations from Plan, Key Design Decisions | Implementing agent | Replace placeholder text with actual content |
| Reviewer Checkpoints | Fixed at stub creation | Pre-filled from plan |
| Verification Results (section headings + commands) | Fixed at stub creation | Implementing agent fills in command output only; command changes require a `Deviations from Plan` entry |
| Code Review Result | Review agent appends | Not included in stub |

## Code Review Result

- **Overall Verdict**: FAIL
- **Dimension Assessment**:
  - Correctness: Fail — the manifest assigns the Dart test asset `packages/flutter/iop_console/test/iop_console_shell_test.dart` the `source` kind instead of the required `test` kind.
  - Completeness: Fail — the path universe is complete, but the planned accurate kind classification is not complete for all rows.
  - Test Coverage: Fail — the three inventory audits pass but none validates path-to-kind classification, so the stated Go-and-Dart test rule can regress undetected.
  - API Contract: Fail — the seven-column manifest schema is structurally valid, but one `kind` value violates the row semantics consumed by downstream disposition work.
  - Code Quality: Pass — the 293 paths are sorted, unique, schema-valid, and use source-accurate provenance.
  - Implementation Deviation: Fail — the plan explicitly requires both Go and Dart test files to use `kind=test`, while one Dart test remains `kind=source`.
  - Verification Trust: Fail — fresh reviewer evidence contradicts the asserted role-specific kind accuracy even though the recorded command outputs themselves reproduce exactly.
- **Findings**:
  - **Required** — `scripts/fixtures/iop-agent-chronos-ownership-manifest.tsv:149`: change `packages/flutter/iop_console/test/iop_console_shell_test.dart` from `kind=source` to `kind=test`, then add and run a deterministic kind-classification audit that fails when Go or Dart test paths are not classified as `test` (and when non-test paths are incorrectly classified as tests). Preserve the already passing 293-path union, provenance, schema, ordering, duplicate, and semantic-drift evidence.
- **Routing Signals**: `review_rework_count=2`, `evidence_integrity_failure=false`
- **Next Step**: Archive this pair and materialize the freshly routed follow-up PLAN/CODE_REVIEW pair for the Required kind-classification fix and regression audit.
