<!-- task=m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual plan=2 tag=REVIEW_TEST milestone-task=hot-smoke -->

# 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.
> Execute the plan's selected root cause, scope, files, and dependency decisions as written. Do not choose another owner, narrow/expand the write boundary, or replace a fix with another verification attempt.
> 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-05
task=m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual, plan=2, tag=REVIEW_TEST

## Archive Evidence Snapshot

- `plan_local_G07_1.log` and `code_review_cloud_G07_1.log` closed the prior pair with `FAIL`: Required R1 covers missing IOP runtime/profile binding, R2 covers stale prebuilt observation reuse, and R3 covers absent actual execution plus contradicted inventory/exit evidence.
- Fresh reviewer checks passed `make test-hot-path-agent-smoke-self-test`, the four-package `go test -race -count=1` regression, and `git diff --check`; an empty direct harness preflight exits 69, while GNU Make reports its failed recipe with process status 2 and `Error 69` in stderr.
- `agent-task/archive/2026/08/m-iop-hot-path-one-shot-execution/20+17,19_smoke_harness/complete.log` proves the fake-agent harness baseline only; fresh source inspection supersedes its assumption that the same inputs prove an actual IOP runtime.
- Roadmap carryover remains `milestone-task=hot-smoke`, approved SDD scenario S16 and its actual Claude/Pi final-evidence row. No Milestone completion is claimed.

## 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-G07.md` → `code_review_cloud_G07_2.log` and `PLAN-cloud-G07.md` → `plan_cloud_G07_2.log`.
3. If PASS, write `complete.log` and move active task directory to `agent-task/archive/YYYY/MM/m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual/`. If WARN/FAIL, fully write the next filesystem state required by the code-review skill.
4. If PASS, preserve `milestone-task=hot-smoke` in `complete.log` and report it for runtime aggregation. Roadmap state evaluation belongs to `sync-milestone-workstate`.
5. Check applicable `Review-Only Checklist` items at the final `.log` location before reporting.

---

## Implementation Item Completion

| Item | Status |
|------|---------|
| REVIEW_TEST-1 Runtime/profile binding | [x] |
| REVIEW_TEST-2 Fresh observation capture | [x] |
| REVIEW_TEST-3 Trustworthy external evidence | [x] |

## Implementation Checklist

- [x] [REVIEW_TEST-1] Bind the Make/harness contract to the exact IOP base/profile, four scenario preset aliases, current worktree fingerprint, and Edge/config/fixture/CLI identity; reject every mismatch before invoking an agent and cover the contract in the self-test.
- [x] [REVIEW_TEST-2] Replace prebuilt observation-directory acceptance with per-case fresh appended runtime-log capture, reject stale/rotated/mixed lifecycle evidence, and retain the closed redacted manifest/workspace/terminal assertions.
- [x] [REVIEW_TEST-3] Run fresh local checks and the explicit external preflight/matrix; record direct harness versus GNU Make exit semantics and current presence-only environment facts accurately, or the exact remaining external blocker without claiming S16 completion.
- [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_G07_2.log`.
- [x] Archive active `PLAN-*-G??.md` to `plan_cloud_G07_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-hot-path-one-shot-execution/21+20_hot_smoke_actual/` to `agent-task/archive/YYYY/MM/m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual/` and update this checklist at the final archive path.
- [ ] If PASS, preserve and report `milestone-task=hot-smoke` for runtime aggregation, without modifying roadmap or directly calling `update-roadmap`.
- [ ] If PASS for split work, remove empty active parent `agent-task/m-iop-hot-path-one-shot-execution/` 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

All deviations preserve the plan's scope rationale ("do not change the manifest's
secret-safe closed output or the observation schema unless implementation proves
an unavoidable compatibility issue and records a deviation").

1. **Single runtime-evidence file; no separate `--source-evidence`/`--observation-dir`.**
   The plan's `Before/After` snippets still named `--source-evidence` and an
   observation *directory*, but the plan's own external Final Verification block
   supplies neither (`IOP_HOT_SMOKE_SOURCE_EVIDENCE`/`IOP_HOT_SMOKE_OBSERVATION_DIR`
   are absent) and instead requires `IOP_HOT_SMOKE_RUNTIME_EVIDENCE` +
   `IOP_HOT_SMOKE_OBSERVATION_FILE`. Source/worktree identity is therefore folded
   into the one runtime-evidence JSON, and the observation input is one live Edge
   log file. This matches the plan's supplied variable set exactly.
2. **Claude base/model bound via environment, not argv.** To keep the pinned
   six-token `claude_flags` (`--print --output-format stream-json
   --include-partial-messages --no-session-persistence --bare`) and the closed
   manifest schema unchanged, the IOP base URL and per-scenario model alias are
   bound to Claude through `ANTHROPIC_BASE_URL`/`ANTHROPIC_MODEL` in the child
   environment. Pi is bound through its existing `--provider`/`--model` argv
   *values* (flag names unchanged) plus `PI_CODING_AGENT_DIR`. No argv token or
   manifest field carries an endpoint/model/secret value.
3. **Observation `request_id` is a hash-projection derived from the log.** Because
   the real request id is generated by the Edge and *discovered* from the appended
   log region (not predetermined), each record's manifest `request_id` is
   `rid-<first 8 hex of sha256(raw request id)>`, and `validate_manifest` now
   asserts a single rid per case matching `^rid-[0-9a-f]{8,32}$` instead of the old
   predetermined `request_id_for(case_id)` equality.
4. **`runtime.observation_sha256` digests the projected observation evidence**
   actually consumed by the matrix (never the live-log bytes), and
   `persisted_artifacts_are_clean` scans the workspace root for surviving orphan
   artifacts. Raw appended log fragments live only under the disposable
   `RAW_CAPTURE_DIR` and are deleted before manifest persistence.
5. **Worktree fingerprint is batched + memoized.** Content+path hashing runs
   through one `xargs sha256sum` pipeline and the result is cached/exported so
   repeated `( do_run )` subshells reuse it — a performance fix (per-file spawns
   were ~15 s per call on this sandbox), not a semantics change.

## Key Design Decisions

- **Fail-closed identity before any invocation.** `do_run`/`do_preflight` run
  `validate_inputs_presence` (CLAUDE first), `validate_worktree_fingerprint`,
  `validate_edge_binary_config_fixture_identity`, and
  `validate_runner_and_profile_identity` before `validate_observation_log_preflight`
  and before `: > INVOCATION_MARKER`; every digest is compared without printing the
  supplied value, so a wrong worktree, Edge binary/config, Pi config, base URL,
  provider, scenario alias, CLI binary, or fixture exits 69 with an empty
  invocation marker.
- **Deterministic scenario -> alias map** (`scenario_model_alias`): direct→direct,
  light-pass→pass, write-unavailable→pass, repair→repair, timeout-cancel→slow,
  so all four caller aliases are exercised and a structurally valid run must reach
  the intended preset.
- **Per-case fresh observation contract.** Each case snapshots the observation
  log's inode + byte offset immediately before invocation, then consumes only the
  bytes appended after the child finishes; it rejects inode change (rotation),
  shrink below the offset (truncation), zero or multiple request ids
  (missing/mixed lifecycle), and any projected stage/outcome sequence that does
  not match the scenario. Production event classes project to the closed stage
  vocabulary (dispatch→selector, stage→stage_kind, cleanup→cleanup; terminal/
  light/orphan carry no stage record; a dispatch with a rejection reason →
  `failed`).
- **Schema/manifest untouched.** The closed manifest schema, pinned flag arrays,
  redaction contract, and all prior matrix/redaction/schema/cancellation
  assertions are preserved; the self-test adds R1 identity-mismatch and R2
  freshness (stale-only, rotation/truncation, mixed request, wrong stage, missing
  appended) negative controls on top of the existing set.

## Reviewer Checkpoints

- Confirm both CLIs are explicitly bound to the supplied IOP base/profile and scenario alias, and preflight validates worktree, Edge binary/config, fixture, Pi config, and CLI identity without printing secret/private values.
- Confirm each case consumes only newly appended `hot_path_observation` records from one current request lifecycle; stale-only, rotation/truncation, mixed request ids, and missing appended records must fail.
- Confirm the self-test preserves all prior redaction/schema/workspace/cancellation checks and adds the R1/R2 negative controls before any real provider invocation.
- Confirm evidence distinguishes direct harness exit 69 from GNU Make status 2 and does not repeat stale inventory claims.
- Do not PASS without an actual schema-valid 10-case Claude/Pi manifest from the matching runtime, fresh observation/workspace evidence, and zero redaction matches.

## Verification Results

### Syntax and deterministic self-test

Commands:

```bash
bash -n scripts/e2e-hot-path-agents.sh
make test-hot-path-agent-smoke-self-test
```

Actual (fresh; `TMPDIR` set to a repo-local executable dir per the noexec-/tmp constraint):

```text
$ bash -n scripts/e2e-hot-path-agents.sh
# exit 0 (no output)

$ make test-hot-path-agent-smoke-self-test        # exit 0
[e2e-hot-path-agents] assertion PASS: positive do_run exits 0
[e2e-hot-path-agents] assertion PASS: produced manifest validates against supplied fixture
[e2e-hot-path-agents] assertion PASS: ten unique case ids
[e2e-hot-path-agents] assertion PASS: raw argv/stdout/observation capture deleted
[e2e-hot-path-agents] assertion PASS: observation request ids projected and single per case
[e2e-hot-path-agents] assertion PASS: direct cases terminal=success
[e2e-hot-path-agents] assertion PASS: write-unavailable terminal=provider_error
[e2e-hot-path-agents] assertion PASS: timeout-cancel terminal=cancelled
[e2e-hot-path-agents] assertion PASS: process exit status is captured from wait
[e2e-hot-path-agents] assertion PASS: light-pass/repair cleanup=removed
[e2e-hot-path-agents] assertion PASS: timeout-cancel cleanup=orphan
... (manifest-rejection controls: 9-case, forbidden-field, bad-enum, 11-case duplicate,
     distinct-row duplicate id, id-agent, id-scenario, terminal-event, cancellation
     relation, multi-request observation in one case, alternate/malformed fixture) ...
[e2e-hot-path-agents] assertion PASS: worktree fingerprint mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: claude binary identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: edge binary identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: edge config identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: pi config identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: base url identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: scenario alias identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: fixture identity mismatch rejected before invocation
[e2e-hot-path-agents] assertion PASS: missing appended observation evidence rejected before manifest output
[e2e-hot-path-agents] assertion PASS: stale-only observation rejected ...
[e2e-hot-path-agents] assertion PASS: rotated/truncated observation rejected ...
[e2e-hot-path-agents] assertion PASS: mixed/duplicate request lifecycle rejected ...
[e2e-hot-path-agents] assertion PASS: wrong observation stage lifecycle rejected ...
[e2e-hot-path-agents] assertion PASS: immediate exit with no native output rejected ...
[e2e-hot-path-agents] assertion PASS: missing native terminal rejected ...
[e2e-hot-path-agents] assertion PASS: terminal and scenario contradiction rejected ...
[e2e-hot-path-agents] assertion PASS: content-insensitive cleanup contradiction rejected ...
[e2e-hot-path-agents] assertion PASS: timeout without triggered child cancellation rejected ...
[e2e-hot-path-agents] assertion PASS: preflight ok
[e2e-hot-path-agents] self-test PASSED: ... runtime/profile/alias binding mismatch exit 69
  before invocation, fresh per-case observation capture with stale/rotation/mixed/
  wrong-stage rejection, ... verified with fake agents/runtime only.
```

Note: with the previous per-file fingerprint the self-test exceeded a 2-minute
budget on this sandbox (~15 s/traversal from ~864 process spawns); the batched +
memoized fingerprint made it complete well within bound. This was a performance
issue, not a logic hang (see Deviations #5).

### Exit-status fidelity

Commands:

```bash
review_tmp="$(mktemp -d)"
trap 'rm -rf "$review_tmp"' EXIT
set +e
./scripts/e2e-hot-path-agents.sh --preflight-only >"$review_tmp/direct-preflight.log" 2>&1
direct_rc=$?
make test-hot-path-agent-smoke-preflight >"$review_tmp/make-preflight.log" 2>&1
make_rc=$?
set -e
test "$direct_rc" -eq 69
test "$make_rc" -eq 2
rg --sort path -q 'validation failed: missing --claude binary' "$review_tmp/direct-preflight.log"
rg --sort path -q 'Error 69' "$review_tmp/make-preflight.log"
```

Actual (fresh):

```text
direct_rc=69          # direct harness preflight with no inputs
make_rc=2             # GNU Make reports the failed recipe with process status 2

# direct-preflight.log (only line):
[e2e-hot-path-agents] validation failed: missing --claude binary

# make-preflight.log (tail):
[e2e-hot-path-agents] validation failed: missing --claude binary
make: *** [Makefile:150: test-hot-path-agent-smoke-preflight] Error 69

# matched: 'validation failed: missing --claude binary'  -> OK (direct)
# matched: 'Error 69'                                     -> OK (make)
```

The direct harness fail-closed exit is 69; GNU Make wraps the same failed recipe
as process status 2 with the child `Error 69` in stderr. The two are distinct and
not conflated.

### Common regression and diff

Commands:

```bash
go test -race -count=1 ./packages/go/streamgate ./packages/go/config ./apps/edge/internal/openai ./apps/edge/internal/service
git diff --check
```

Actual (fresh; Go 1.26.2 linux/arm64 at `/config/.local/bin/go`):

```text
ok  	iop/packages/go/streamgate	2.101s
ok  	iop/packages/go/config	2.032s
ok  	iop/apps/edge/internal/openai	13.122s
ok  	iop/apps/edge/internal/service	7.074s
# go test exit 0

$ git diff --check
# exit 0 (no whitespace/conflict errors)
```

### External preflight and actual matrix

Commands:

```bash
test -n "${IOP_HOT_SMOKE_BASE_URL:-}"
test -n "${IOP_HOT_SMOKE_DIRECT_MODEL:-}" && test -n "${IOP_HOT_SMOKE_PASS_MODEL:-}"
test -n "${IOP_HOT_SMOKE_REPAIR_MODEL:-}" && test -n "${IOP_HOT_SMOKE_SLOW_MODEL:-}"
test -n "${IOP_HOT_SMOKE_CLAUDE_BIN:-}" && test -x "$IOP_HOT_SMOKE_CLAUDE_BIN"
test -n "${IOP_HOT_SMOKE_PI_BIN:-}" && test -x "$IOP_HOT_SMOKE_PI_BIN"
test -n "${PI_CODING_AGENT_DIR:-}" && test -d "$PI_CODING_AGENT_DIR"
test -n "${IOP_HOT_SMOKE_PI_PROVIDER:-}"
test -n "${IOP_HOT_SMOKE_EDGE_BIN:-}" && test -x "$IOP_HOT_SMOKE_EDGE_BIN"
test -n "${IOP_HOT_SMOKE_EDGE_CONFIG:-}" && test -f "$IOP_HOT_SMOKE_EDGE_CONFIG"
test -n "${IOP_HOT_SMOKE_RUNTIME_EVIDENCE:-}" && test -f "$IOP_HOT_SMOKE_RUNTIME_EVIDENCE"
test -n "${IOP_HOT_SMOKE_OBSERVATION_FILE:-}" && test -f "$IOP_HOT_SMOKE_OBSERVATION_FILE"
test -n "${IOP_HOT_SMOKE_WORKSPACE_PARENT:-}" && test -d "$IOP_HOT_SMOKE_WORKSPACE_PARENT"
test -n "${IOP_HOT_SMOKE_OUTPUT:-}"
test -n "${IOP_HOT_SMOKE_CLAUDE_SECRET_ENV:-}" && test -n "${!IOP_HOT_SMOKE_CLAUDE_SECRET_ENV:-}"
test -n "${IOP_HOT_SMOKE_PI_SECRET_ENV:-}" && test -n "${!IOP_HOT_SMOKE_PI_SECRET_ENV:-}"
make test-hot-path-agent-smoke-preflight
make test-hot-path-agent-smoke
jq -e '
  .schema_version == "1"
  and ([.cases[].id] == ["claude:direct","claude:light-pass","claude:repair","claude:write-unavailable","claude:timeout-cancel","pi:direct","pi:light-pass","pi:repair","pi:write-unavailable","pi:timeout-cancel"])
  and ([.cases[].outcome] == ["completed","completed","completed","error","cancelled","completed","completed","completed","error","cancelled"])
  and (.redaction.matches == 0)
' "$IOP_HOT_SMOKE_OUTPUT"
```

Outcome: **BLOCKED — external S16 matrix not run. This is not PASS for S16.**

Presence-only facts (names only; no value read or printed):

```text
UNSET IOP_HOT_SMOKE_BASE_URL           UNSET IOP_HOT_SMOKE_EDGE_BIN
UNSET IOP_HOT_SMOKE_DIRECT_MODEL       UNSET IOP_HOT_SMOKE_EDGE_CONFIG
UNSET IOP_HOT_SMOKE_PASS_MODEL         UNSET IOP_HOT_SMOKE_RUNTIME_EVIDENCE
UNSET IOP_HOT_SMOKE_REPAIR_MODEL       UNSET IOP_HOT_SMOKE_OBSERVATION_FILE
UNSET IOP_HOT_SMOKE_SLOW_MODEL         UNSET IOP_HOT_SMOKE_WORKSPACE_PARENT
UNSET IOP_HOT_SMOKE_CLAUDE_BIN         UNSET IOP_HOT_SMOKE_OUTPUT
UNSET IOP_HOT_SMOKE_PI_BIN             UNSET IOP_HOT_SMOKE_CLAUDE_SECRET_ENV
UNSET PI_CODING_AGENT_DIR              UNSET IOP_HOT_SMOKE_PI_SECRET_ENV
UNSET IOP_HOT_SMOKE_PI_PROVIDER
```

All 17 required external inputs are absent this session. Non-secret host fact:
`claude` and `pi` CLIs are present on PATH (`bin/claude`, `bin/pi`), but profile
presence alone is not actual-run evidence and cannot substitute for the missing
runtime binding.

First exact blocker (direct harness, presence-check order preserved):

```text
$ ./scripts/e2e-hot-path-agents.sh --preflight-only
[e2e-hot-path-agents] validation failed: missing --claude binary
# exit 69
```

Missing so this matrix cannot run: an IOP Hot Path base URL and matching isolated
Edge runtime (Edge binary/config + the four scenario preset aliases + Pi provider);
a signed runtime-evidence JSON carrying the current worktree fingerprint, Edge/Pi
config digests, and CLI/base/alias identity; one live Edge observation log holding
`hot_path_observation` records; a disposable workspace parent + manifest output
path; and the named Claude/Pi secret env vars. No manifest was produced;
`IOP_HOT_SMOKE_OUTPUT` is unset.

Resume condition (out-of-band, once every required input is supplied):

```bash
# after exporting IOP_HOT_SMOKE_* + PI_CODING_AGENT_DIR and starting/selecting the
# matching isolated Edge runtime (never route through the dispatcher):
make test-hot-path-agent-smoke-preflight    # must print "preflight ok", exit 0
make test-hot-path-agent-smoke              # writes the redacted manifest
jq -e '<the fixed 10-case id/outcome + .redaction.matches==0 assertion above>' \
   "$IOP_HOT_SMOKE_OUTPUT"                   # must pass for S16 PASS
```

S16 remains open: the credential-free self-test now enforces runtime/profile
binding and fresh-observation integrity, but the actual Claude/Pi matrix against
the matching IOP runtime is the separate credentialed verification and has not
run.

Handoff re-verification on the current shared worktree repeated `bash -n`,
`make test-hot-path-agent-smoke-self-test` (exit 0), the direct/Make preflight
status assertions (`69` / `2` with `Error 69`), the four-package race command,
and `git diff --check` (all exit 0). The same 17 external input names remain
unset; no credentialed matrix or manifest was produced.

---

> **[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) |
| 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 observation reducer rejects the production retry trace while accepting a lifecycle with no terminal record, the Pi parser does not implement the installed Pi JSON event contract, and an empty reserved job directory is classified as clean.
  - Completeness: Fail — the required SDD S16 Claude/Pi 10-case matrix was not run and no schema-valid actual manifest exists.
  - Test Coverage: Fail — the fake fixtures reproduce the reducer's assumptions instead of the production observation and Pi contracts, and no negative control covers a surviving empty request directory.
  - API Contract: Fail — `capture_appended_observation` and `parse_visible_events` do not consume the production Edge and Pi event shapes they claim to validate.
  - Code Quality: Pass — identity binding, fail-closed input checks, redaction boundaries, and isolated Make targets are clear and locally structured.
  - Implementation Deviation: Fail — the fake Pi stream and one-record-per-stage observation lifecycle diverge from the actual installed Pi and production Edge lifecycle contracts without recording that incompatibility.
  - Verification Trust: Fail — the self-test passes only because its fixtures mirror the faulty parsers; fresh production-shaped probes contradict the claimed runtime compatibility.
  - Spec Conformance: Fail — SDD S16 requires actual Claude/Pi streaming, stage/tool visibility, terminal/cancellation, workspace lifecycle, and cleanup/orphan evidence from the matching runtime.
- Findings:
  - Required R2 — `scripts/e2e-hot-path-agents.sh:438` and `scripts/e2e-hot-path-agents.sh:474`: the fresh-log reader accepts any JSON object carrying `hot_path_event_class` instead of the exact `msg == "hot_path_observation"` record, discards light/terminal/orphan semantics, and requires exactly one projected record per stage. The production pass trace in `apps/edge/internal/openai/hot_path_observation_test.go:1495` contains repeated local/review stage attempts plus light, cleanup, and terminal events; a fresh focused probe returned `production_pass_trace_rc=1`, while a dispatch-only direct lifecycle with no terminal returned `missing_terminal_direct_rc=0`. Parse only the exact production message, wait within a bounded interval for lifecycle closure, validate terminal/cleanup/orphan/disposition semantics, and reduce stage attempts by their closed attempt/disposition fields without losing order. Add production-trace positive and missing-terminal/foreign-message negative controls.
  - Required R4 — `scripts/e2e-hot-path-agents.sh:539`: the Pi branch expects OpenAI `choices[].delta` and `finish_reason` objects, but installed Pi 0.81.1 serializes its `AgentSessionEvent` stream (`agent_start`, `message_*`, `tool_execution_*`, `agent_end`) in JSON mode. A fresh parser probe with that native shape returned `pi_visible_event_count=0`, so even `pi:direct` cannot satisfy the required visible terminal invariant. Implement the actual Pi event contract, including assistant stop reason, tool name/result, error, and signal-exit cancellation semantics, and make fake Pi fixtures use the same shapes. This is required by SDD S16's actual Pi streaming and visible stage/tool-output criterion.
  - Required R5 — `scripts/e2e-hot-path-agents.sh:493`: `workspace_snapshot` sets `artifacts_present=true` only when a regular file exists under `.iop/job`. A surviving empty `.iop/job/<request-id>/` reservation is therefore reported clean, allowing light success cleanup to pass despite leaked request state. Treat any reserved request path as present, preserve the timeout orphan distinction, and add a self-test that rejects an empty surviving request directory for success/cleanup cases.
  - Required R3 — `agent-task/m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual/code_review_cloud_G07_2.log:301`: all 17 declared external inputs remain unset, so neither external preflight nor the actual 10-case Claude/Pi matrix ran and no manifest was produced. After R2/R4/R5 are fixed, run the matching isolated runtime preflight and matrix, then attach the schema-valid manifest evidence with the fixed ids/outcomes, actual visible events, fresh observation/workspace state, and zero redaction matches; otherwise record the exact remaining external blocker without claiming S16 completion.
- Routing Signals: `review_rework_count=2`, `evidence_integrity_failure=true`
- Next Step: Archive this pair to `code_review_cloud_G07_2.log` and `plan_cloud_G07_2.log`, then materialize the isolated follow-up as `PLAN-cloud-G09.md` and `CODE_REVIEW-cloud-G09.md`. Do not write `complete.log`, create `USER_REVIEW.md`, or update the roadmap.
