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

# Claude/Pi Hot Path actual smoke closure

## For the Implementing Agent

구현 후 `CODE_REVIEW-cloud-G07.md`의 구현 담당 섹션에 Make self-test/preflight와 실제 external run의 원문 출력을 채우고 active 파일을 유지한다. 외부 환경이 없으면 정확한 preflight blocker와 재개 조건만 기록하며 사용자 질문, archive, `complete.log` 작성은 하지 않는다.

## Background

Child 20 harness를 stable Make entry points로 연결하고, matching source/runtime evidence를 가진 actual Claude/Pi environment에서 10-case stream/workspace/cleanup manifest를 생성해야 S16을 닫을 수 있다.

## Analysis

### Files Read

- `agent-roadmap/sdd/knowledge-tool-optimization-extension/iop-hot-path-one-shot-execution/SDD.md`
- `Makefile`
- `agent-test/local/rules.md`
- `agent-test/local/edge-smoke.md`
- `agent-test/dev/edge-smoke.md`
- `agent-test/inventory-agent.yaml`

### SDD Criteria

- 승인 SDD, `milestone-task=hot-smoke`, S16.
- actual Claude/Pi streaming logs, direct/light-pass/repair/write-unavailable/timeout-cancel rows, workspace before/after, observation and cleanup/orphan evidence, zero secret match are required.

### Verification Context

- external owner must supply the active preset runtime, Claude auth, Pi profile, four deterministic model aliases, runtime evidence manifest, readable observation log, disposable workspace parent, and output path.
- missing input must fail preflight with exit 69 before provider invocation.

### Test Coverage Gaps

- no Make entry points or actual two-protocol manifest evidence exist yet.

### Symbol References

- none.

### Split Judgment

- stable contract: child 20 harness → Make entry points and actual external S16 evidence.
- harness/parser implementation remains in child 20.

### Scope Rationale

- CLI binary/config patching, secret provisioning, shared process termination, deployment changes, and tracked smoke output are excluded.

### Final Routing

- evaluation_mode=isolated-reassessment, finalizer=`finalize-task-policy.sh pair`.
- build closures 모두 true, scores=1/1/1/2/2, G07, local-fit → `PLAN-local-G07.md`.
- review closures 모두 true, scores=1/1/1/2/2, G07, official-review → `CODE_REVIEW-cloud-G07.md`.
- risks=`boundary_contract,variant_product`(2), `large_indivisible_context=false`, recovery=0/false, capability gap 없음. External unavailability is a verification blocker with an exact resume condition, not a build capability gap.

## Implementation Checklist

- [ ] [TEST-1] Add separate harness self-test, external-preflight, and actual smoke Make targets without printing secret values or adding credentialed targets to `test-e2e`.
- [ ] [TEST-2] Run Make/local/common verification and the actual Claude/Pi 10-case smoke, or record exit 69 plus exact external resume conditions and command.
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [TEST-1] Make integration

**Problem:** no stable entry point separates credential-free harness validation from strict external preflight and actual execution.

**Solution:** Add `test-hot-path-agent-smoke-self-test`, `test-hot-path-agent-smoke-preflight`, and `test-hot-path-agent-smoke`. Pass required environment without printing values; keep credentialed targets out of `test-e2e`.

**Modified Files and Checklist:**

- [ ] Modify `Makefile` with the three child-20 harness targets.

**Test Strategy:** self-test exits 0 locally; preflight exits 69 before provider calls when inputs are missing.

**Verification:** `make test-hot-path-agent-smoke-self-test` exits 0.

### [TEST-2] Actual S16 evidence

**Problem:** self-test cannot prove native Claude/Pi consumption of real Hot Path streams and artifact lifecycle.

**Solution:** Verify current source fingerprint against runtime binary/config/fixture evidence, then run preflight and the actual two-agent five-scenario matrix. Validate 10 passing/expected-failure rows, native visible events/terminal, correlated observation classes, workspace/artifact before/after, and zero secret matches. If unavailable, record exact missing inputs, exit 69 output, and resume command without claiming PASS.

**Modified Files and Checklist:**

- [ ] Fill `agent-task/m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual/CODE_REVIEW-cloud-G07.md` with Make output, preflight, actual manifest summary/path, or exact blocker evidence.

**Test Strategy:** actual external run is mandatory for PASS; self-test is not a substitute.

**Verification:** run Final Verification and validate the output manifest with `jq`.

## Dependencies and Execution Order

1. `20+17,19_smoke_harness` must produce its active `complete.log`.
2. Implement TEST-1, then run TEST-2.

## Modified Files Summary

| File | Item |
|---|---|
| `Makefile` | TEST-1 |
| `agent-task/m-iop-hot-path-one-shot-execution/21+20_hot_smoke_actual/CODE_REVIEW-cloud-G07.md` | TEST-2 |

## Final Verification

Local:

```bash
make test-hot-path-agent-smoke-self-test
go test -race -count=1 ./packages/go/streamgate ./packages/go/config ./apps/edge/internal/openai ./apps/edge/internal/service
git diff --check
```

External after required environment is supplied out-of-band:

```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_PI_PROVIDER:-}" && test -n "${PI_CODING_AGENT_DIR:-}" && test -n "${ANTHROPIC_API_KEY:-}" && test -n "${IOP_HOT_SMOKE_RUNTIME_EVIDENCE:-}" && test -n "${IOP_HOT_SMOKE_OBSERVATION_FILE:-}" && test -n "${IOP_HOT_SMOKE_WORKSPACE_PARENT:-}" && test -n "${IOP_HOT_SMOKE_OUTPUT:-}"
IOP_HOT_SMOKE_SOURCE_FINGERPRINT="$(git ls-files --cached --others --exclude-standard -- apps/edge packages/go/streamgate packages/go/config go.mod go.sum | LC_ALL=C sort | while IFS= read -r path; do printf '%s\0%s\n' "$path" "$(git hash-object --no-filters "$path")"; done | git hash-object --stdin)"
export IOP_HOT_SMOKE_SOURCE_FINGERPRINT
jq -e --arg fingerprint "$IOP_HOT_SMOKE_SOURCE_FINGERPRINT" '.source_fingerprint == $fingerprint and (.binary_sha256 | type == "string" and length > 0) and (.config_sha256 | type == "string" and length > 0) and (.fixture_revision | type == "string" and length > 0)' "${IOP_HOT_SMOKE_RUNTIME_EVIDENCE}"
make test-hot-path-agent-smoke-preflight
make test-hot-path-agent-smoke
jq -e '.schema_version == 1 and (.cases | length == 10) and all(.cases[]; .verdict == "pass") and (.redaction.secret_matches == 0)' "${IOP_HOT_SMOKE_OUTPUT}"
```

Expected: local commands exit 0; external preflight proves matching source/runtime/fixture identity; actual manifest has 10 pass rows and zero secret matches. Exit 69 is BLOCKED evidence, not PASS. Cached Go output is not acceptable.

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