<!-- task=m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification plan=18 tag=REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_REVIEW_API milestone-task=workspace-binding,claude-smoke -->

# Execute the fourth authorized sole Claude-through-IOP S12 call

## For the Implementing Agent

The user's `승인할테니 재시도해` instruction authorizes exactly one new Claude Code `--run` against the repaired disposable managed IOP runtime. Run fresh local and remote provider-free gates first. Only after they pass, create `sole-live-4.started`, invoke once, finalize it as `sole-live-4.rc-N`, and never retry. Claude is only the IOP caller; Gemini plan/review and Ornith-fast work remain IOP-owned internal routes. Publish S12 evidence and update bounded qualification owners only on a complete PASS. Fill the implementation-owned review sections and leave verdict/archive/next-state work to official review.

## Background

The prior authorization was consumed by `sole-live-3.rc-69`, which failed HTTP 400 before ingress. Repository and disposable dev repairs now accept the installed Claude 2.1.177 tool-search beta and `defer_loading`; exact provider-free probes pass, unsupported neighboring fields remain fail-closed, generation activity is zero, and harness preflight passes without Claude. The user has explicitly authorized one additional guarded attempt.

## Archive Evidence Snapshot

- Prior pair: `plan_cloud_G10_17.log` / `code_review_cloud_G10_17.log`; verdict `FAIL`, Required R11, `review_rework_count=16`, `evidence_integrity_failure=false`.
- Resolved external stop: `user_review_6.log`; the current user instruction authorizes one fourth guarded Claude-through-IOP execution and no retry.
- Existing guards `sole-live.rc-69`, `sole-live-2.rc-69`, and `sole-live-3.rc-69` are immutable. No `sole-live-4*` guard exists at plan start.
- Managed runtime `/Users/toki/agent-work/iop-s12-managed-validation-20260808` is healthy with one Edge, one Node, two healthy provider snapshots, current runtime evidence, fresh managed TLS material, and zero Claude processes.

## Finding Resolution Map

| Finding | Mode | Exact evidence | Changed precondition |
|---|---|---|---|
| R11 | direct external execution | Resolved `user_review_6.log`, fresh provider-free status matrix, healthy managed fleet, harness preflight, `sole-live-4` guard, one harness `--run` | The user has explicitly authorized exactly one additional real S12 attempt after all currently known repository/runtime compatibility gaps were repaired. |

## Analysis

### Files Read

- `apps/edge/internal/openai/anthropic_types.go`
- `apps/edge/internal/openai/anthropic_bridge_test.go`
- `agent-contract/outer/anthropic-compatible-api.md`
- `agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/iop-owned-single-request-agent-execution.md`
- `agent-roadmap/sdd/knowledge-tool-optimization-extension/iop-owned-single-request-agent-execution/SDD.md`
- `agent-test/dev/rules.md`
- `agent-test/dev/edge-smoke.md`
- `scripts/e2e-single-request-claude.sh`
- `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/user_review_6.log`

### SDD Criteria

SDD S12 requires exactly one real Claude request, ingress delta 1, ordered Gemini -> Ornith-fast -> Gemini stages, stage/total timing, verified workspace result, cleanup, and one terminal. The Evidence Map requires actual Claude, ingress counter, Edge/Node/provider timing, and workspace before/after evidence. A failed or pre-ingress call cannot satisfy S12 and cannot publish success-only owners.

### Verification Context

- Runner: `toki@toki-labs.com` (Darwin/arm64); isolated source `/Users/toki/agent-work/iop-s12-validation-20260808/source`; workspace `/Users/toki/agent-work/iop-s12-validation-20260808/workspace`; managed root `/Users/toki/agent-work/iop-s12-managed-validation-20260808`.
- Canonical `/Users/toki/agent-work/iop-dev` remains read-only. Claude executable is `/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe`; base is `https://127.0.0.1:18483`; public model is `iop-single-request-light`.
- Caller authentication comes from remote SOPS `tokens.toki-dev-cline` only into process memory. It authenticates Claude to IOP and never authenticates a direct provider request.
- Fresh gates must confirm certificate validity, process/runtime identities, fleet/catalog, exact 200/200/200 and 400/400/400 compatibility matrix, zero activity, zero Claude process, absent fourth guard/result/manifest, and preflight without invoking Claude.

### Test Coverage Gaps

No repository-owned compatibility gap remains from current evidence. Only actual S12 execution can prove the external request and internal three-stage/workspace/terminal path.

### Symbol References

None changed in this execution packet.

### Split Judgment

The fourth guard, one live call, cardinality evidence, stage/workspace/terminal result, and PASS-only publication form one indivisible external-verification packet.

### Scope Rationale

Exclude direct provider requests, retries, a fifth guard, canonical dev mutation, speculative compatibility fields, dispatcher/Pi execution, and common Agent-Ops changes. Repository qualification files change only on a complete schema-valid PASS.

### Final Routing

- `evaluation_mode=isolated-reassessment`; `finalizer=finalize-task-policy.sh`; `finalizer_mode=pair`.
- Build `worker/cloud/G10`, `PLAN-cloud-G10.md`; review `review/cloud/G10`, `CODE_REVIEW-cloud-G10.md`.
- `base_route_basis=grade-boundary`; scores `2/2/2/2/2`; `large_indivisible_context=true`.
- Loop risks: `temporal_state`, `concurrent_consistency`, `boundary_contract`, `variant_product`; count 4.
- `review_rework_count=16`, `evidence_integrity_failure=false`; risk/recovery boundaries match without replacing grade basis.

## Implementation Checklist

- [x] Pass fresh local and remote provider-free gates against the exact repaired candidate and managed runtime.
- [x] Create `sole-live-4` and execute exactly one newly authorized Claude-through-IOP call with no retry or direct provider request.
- [x] On PASS only, validate and publish redacted S12 evidence and synchronize bounded qualification owners. Skipped because the guarded call failed.
- [x] On failure, retain only closed diagnostics, preserve privacy, and make no success claim.
- [x] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### REVIEW_API-1 — Freeze the exact repaired candidate

**Problem:** a stale source, binary, certificate, fleet, catalog, or compatibility state would make the live result untrustworthy.

**Solution:** rerun fresh local focused/race/harness/diff/redaction gates and remote identity, health, fleet, catalog, count-token, activity, process, guard, artifact, and harness preflight checks.

**Modified Files and Checklist:**

- [x] `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/CODE_REVIEW-cloud-G10.md` — record exact readiness output.

**Test Strategy:** no new code test; rerun existing deterministic gates fresh.

**Verification:** require local/remote PASS, catalog 200/model count 1, status matrix 200/200/200 and 400/400/400, zero activity/Claude process, three finalized guards, no fourth guard, and preflight PASS.

### REVIEW_API-2 — Execute one guarded call

**Problem:** S12 lacks an admitted real Claude request after the repaired compatibility boundary.

**Solution:** use an exact executable-name process detector, create `sole-live-4.started` atomically, run the harness once with fresh temporary Claude config/managed CA/in-memory SOPS caller, capture `live_rc`, and rename the guard to `sole-live-4.rc-N`. Never retry.

**Modified Files and Checklist:**

- [x] `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/CODE_REVIEW-cloud-G10.md` — record guard, rc, ingress/process cardinality, stage/terminal/artifact outcome, and no-retry proof.

**Test Strategy:** the guarded external run is the required S12 acceptance test.

**Verification:** PASS requires ingress delta 1, exactly three ordered internal stages, verified workspace result and cleanup, one success terminal, redacted timings, and schema-valid manifest. Failure records only closed safe evidence.

### REVIEW_API-3 — Publish only a complete PASS

**Problem:** stale or partial evidence must not become current S12 qualification.

**Solution:** only for `live_rc=0` and schema-valid remote manifest, copy it atomically to the stable evidence path, require identical content, and replace only explicit S12-deferred statements in the bounded contract/spec owners. Otherwise skip all success-only writes.

**Modified Files and Checklist:**

- [x] `agent-test/evidence/iop-owned-single-request-agent-execution/claude-smoke-evidence.json` — correctly absent because the call failed.
- [x] `agent-contract/outer/anthropic-compatible-api.md` — no success-only write because the call failed.
- [x] `agent-spec/runtime/edge-node-execution.md` — no success-only write because the call failed.
- [x] `agent-spec/input/openai-compatible-surface.md` — no success-only write because the call failed.

**Test Strategy:** validate the manifest against `scripts/fixtures/single-request-claude-smoke-manifest.schema.json`; no file is created on failure.

**Verification:** harness manifest validation, atomic content comparison, contract/spec assertions, redaction scan, and `git diff --check` must pass.

### REVIEW_API-4 — Record closed evidence

**Problem:** official review needs exact safe results without secrets, prompts, raw response/model output, or inferred success.

**Solution:** fill all implementation-owned review fields and stop for official review.

**Modified Files and Checklist:**

- [x] `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/CODE_REVIEW-cloud-G10.md` — final execution evidence.

**Test Strategy:** reviewer cross-checks guard cardinality, runtime counters, stage families, artifacts, privacy, and publication decision.

**Verification:** final diff/redaction/task-artifact checks pass; no retry/direct provider evidence exists.

## Modified Files Summary

| File | Item |
|---|---|
| `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/CODE_REVIEW-cloud-G10.md` | REVIEW_API-1, REVIEW_API-2, REVIEW_API-4 |
| `agent-test/evidence/iop-owned-single-request-agent-execution/claude-smoke-evidence.json` | REVIEW_API-3, PASS only |
| `agent-contract/outer/anthropic-compatible-api.md` | REVIEW_API-3, PASS only |
| `agent-spec/runtime/edge-node-execution.md` | REVIEW_API-3, PASS only |
| `agent-spec/input/openai-compatible-surface.md` | REVIEW_API-3, PASS only |

## Final Verification

1. `go test -count=1 ./apps/edge/internal/openai`
2. `go test -count=1 -race ./apps/edge/internal/openai ./apps/edge/internal/service`
3. `bash -n scripts/e2e-single-request-claude.sh && scripts/e2e-single-request-claude.sh --self-test`
4. `git diff --check` plus targeted source/contract/task redaction and placeholder checks.
5. Remote exact process/runtime/certificate/fleet/catalog/status-matrix/activity/guard/artifact checks and harness `--preflight-only`, all without Claude.
6. Create `sole-live-4`, execute exactly one harness `--run`, finalize the guard, and never retry.
7. On PASS only, validate/publish the manifest and bounded contract/spec evidence; otherwise leave all success-only owners unchanged.

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