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

# Execute the repaired S12 Claude qualification exactly once

## For the Implementing Agent

Fill the implementation-owned sections of `CODE_REVIEW-cloud-G10.md` after execution. This packet authorizes exactly one live Claude invocation. Any live child exit consumes the authorization: never retry, substitute another caller, or construct evidence manually. Do not expose the API key, raw Claude/provider/tool output, raw observation lines, workspace content, or temporary config paths.

## Background

`user_review_3.log` records the user's explicit `시작해` decision for one new non-retriable S12 invocation. The prior attempt selected clean API-key auth but Claude 2.1.177 rejected `--print --output-format=stream-json` without `--verbose` before HTTP ingress. Plan 8 repaired the repository harness and deterministic fake. This plan synchronizes that exact repaired script to the disposable remote candidate, refreshes only the candidate worktree digest in its runtime evidence, re-runs all no-provider gates, and then consumes at most one live call with a zsh-safe `live_rc` wrapper.

## Archive Evidence Snapshot

- Prior pair: `plan_cloud_G05_8.log` / `code_review_cloud_G05_8.log`; verdict `FAIL`, `review_rework_count=7`, `evidence_integrity_failure=false`.
- Resolved stop: `user_review_3.log`; authorization is exactly one new live call with a fresh `CLAUDE_CONFIG_DIR`, API key from `/config/workspace/iop/token/.claude`, the canonical remote CLI, and no retry.
- Repaired local harness: help admission, real command, fake help, and fake live validation require exactly one `--verbose`; syntax, deterministic self-test, focused assertions, and diff hygiene passed.
- Frozen external state before this plan: candidate HEAD `70d22850d01714fdef734dafa42e82fed79e0786`, Edge PID `35091`, Node PID `25114`, health ready, ingress 0, and result/manifest absent.

## Finding Resolution Map

| Finding | Resolution | Completion evidence |
|---|---|---|
| R2 | External verification | Sync the reviewed harness to the disposable candidate, atomically refresh its bounded source worktree digest, pass local/remote self-tests, identity/auth/state checks, and zero-child preflight, then execute the harness once. |
| R2-doc | Evidence-gated sync | Only after a schema-valid redacted manifest exists, publish it atomically to the stable local path and update the contract and two living specs with bounded selected-runtime wording. |

## Analysis

### SDD Criteria

- The Milestone is in progress; the approved SDD is unlocked and contribution ids remain `workspace-binding,claude-smoke`.
- S12 requires one actual Claude request, Edge ingress delta 1, ordered `gemini -> ornith-fast -> gemini`, non-negative stage/total timing, changed and independently verified workspace output, and one terminal outcome.
- Only the schema-valid redacted manifest may enter tracked evidence. The credential, endpoints, paths, prompts, raw output, tool payloads, and workspace content remain excluded.

### Verification Context

- Remote runner: `toki@toki-labs.com`; disposable source `/Users/toki/agent-work/iop-s12-validation-20260808/source`; approved workspace `/Users/toki/agent-work/iop-s12-validation-20260808/workspace`.
- Canonical Claude: `/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe`, expected version 2.1.177.
- Candidate runtime: Edge origin `127.0.0.1:18083`, metrics `127.0.0.1:19101`, candidate-owned binaries/config/runtime evidence/observation under `build/s12/`.
- The canonical dev checkout and running Edge/Node processes are read-only. Candidate writes are limited to the reviewed harness, atomic runtime-evidence digest refresh, disposable workspace result, harness temporaries, and candidate manifest.
- The local credential is read into process memory only with the missing-newline-safe `read ... || test -n` pattern. It is never printed, hashed, copied, or persisted.

### Test Coverage Gaps

- Deterministic tests prove the repaired CLI argument invariant and evidence controls but cannot prove provider admission or the full Edge/Node stage sequence.
- Clean `auth status` is a no-provider selection check; it does not consume the sole live authorization. Only `--run` may do so.

### Split Judgment

Keep one packet. Remote harness identity, runtime-evidence binding, the irreversible call boundary, manifest validation, and evidence-gated documentation are one qualification transaction.

### Scope Rationale

Do not change production code, schemas, Makefile, runtime config, roadmap/SDD, canonical dev checkout, running processes, or unrelated dirty files. Local tracked writes after live PASS are limited to the stable manifest, three owner documents, and review evidence.

### Final Routing

- `status=routed`, `evaluation_mode=isolated-reassessment`, `finalizer=finalize-task-policy.sh`, `finalizer_mode=pair`.
- Build closures all `true`; scores `2/2/2/2/2`, base `grade-boundary`, `large_indivisible_context=true`, risks `4`, `review_rework_count=7`, `evidence_integrity_failure=false` => cloud `G10`, `PLAN-cloud-G10.md`.
- Review closures all `true`; scores `2/2/2/2/2`, `official-review` => cloud `G10`, `CODE_REVIEW-cloud-G10.md`.

## Dependencies and Execution Order

1. Confirm the local repaired harness still passes syntax, deterministic self-test, focused race tests, focused source assertions, and diff hygiene.
2. Copy that exact script through a temporary remote file into only the disposable candidate, preserve executable mode, and pass remote syntax/self-test.
3. Recompute the candidate's existing harness-defined worktree digest and atomically replace only `source.worktree_digest` in the existing runtime-evidence JSON; validate the full JSON contract without weakening any other identity.
4. Revalidate exact HEAD/process/runtime/CLI identity, clean-config `api_key` auth, ingress 0, and absent result/manifest. Pass one zero-child preflight and re-check the unchanged state.
5. Execute `--run` exactly once under a new clean config. Capture its exit in `live_rc`; any non-zero exit stops the packet without retry.
6. On success only, validate and atomically copy the redacted manifest, update the three owner documents, and run final deterministic hygiene.
7. Fill the active review with only secret-safe bounded evidence and stop for official review.

## Implementation Checklist

- [ ] Synchronize the repaired harness and refresh the remote candidate worktree binding atomically; pass all no-provider gates.
- [ ] Confirm clean API-key auth and zero-child state, then consume no more than one live invocation with `live_rc` and no retry.
- [ ] On manifest PASS only, publish local evidence and update the bounded S12 qualification statements.
- [ ] Fill all implementation-owned review sections with actual safe results.

## Modified Files Summary

| File | Reason |
|---|---|
| `agent-test/evidence/iop-owned-single-request-agent-execution/claude-smoke-evidence.json` | Success-only stable redacted S12 manifest |
| `agent-contract/outer/anthropic-compatible-api.md` | Success-only bounded qualification wording |
| `agent-spec/runtime/edge-node-execution.md` | Success-only selected-runtime evidence link |
| `agent-spec/input/openai-compatible-surface.md` | Success-only selected-runtime evidence link |
| `agent-task/m-iop-owned-single-request-agent-execution/25+23,24_claude_smoke_qualification/CODE_REVIEW-cloud-G10.md` | Implementation and verification evidence |

Remote disposable candidate files are execution inputs/outputs, not repository publication targets.

## Final Verification

Run in order. Steps 1-4 are no-provider gates. Step 5 contains the only live Claude/provider invocation and may execute once. Steps 6-7 are success-only.

1. Local: credential existence/mode, manifest absence, `bash -n`, `make test-single-request-claude-smoke-self-test`, the two focused `go test -race -count=1` commands, source assertions for exactly one `--verbose`, and `git diff --check`.
2. Remote sync gate: copy only the reviewed script to a temporary candidate path, compare its SHA-256 with local, atomically install it, then run remote `bash -n` and deterministic `--self-test`.
3. Runtime binding gate: compute the harness-defined worktree digest, atomically update only `source.worktree_digest`, validate exact JSON keys/digests, and run an exact candidate/process/runtime/CLI/auth/state check.
4. Zero-child gate: fresh config, `authMethod=api_key`, `--preflight-only`, then require ingress 0 and absent workspace result/candidate manifest.
5. Sole live gate: fresh config and API-key status, invoke the repaired harness `--run` exactly once, assign `live_rc=$?`, clean up, and exit with `live_rc`. Never retry after any exit.
6. Success-only remote/local evidence: validate the remote manifest with the repository schema, require result/manifest present and ingress 1, copy through a local temporary file, validate again, and atomically publish without replacement.
7. Success-only docs/hygiene: update only the three owners, run manifest validation, deterministic self-test, focused tests, bounded wording searches, secret/raw-data denial searches, and `git diff --check`.

After all implementation work, fill the implementation-owned sections in `CODE_REVIEW-cloud-G10.md`.
