<!-- task=m-iop-owned-single-request-agent-execution/22+21_executor_activation plan=1 tag=REVIEW_API milestone-task=review-stage -->

# Synchronize the input-surface activation spec

## For the Implementing Agent

Filling the implementation-owned sections of `CODE_REVIEW-cloud-G03.md` is the mandatory last implementation step. Execute the selected direct fix without changing its owner or write boundary, run every verification command, paste actual output, keep both active files in place, and report ready for review. Only the official code-review skill may append a verdict, archive files, write `complete.log`, or classify the next state. If blocked, record the exact blocker, attempted commands/output, and resume condition only in implementation-owned evidence fields; do not ask the user, call a user-input tool, create a control-plane stop file, archive logs, or write `complete.log`.

## Background

The prior loop correctly installed the composite single-request executor and synchronized the Anthropic outer contract plus runtime spec. Review found that the current input-surface living spec still says the implemented stage drivers and request-artifact cleanup are deferred. This follow-up repairs only that current-spec contradiction while leaving external Claude qualification owned by S12.

## Archive Evidence Snapshot

- Prior plan: `agent-task/m-iop-owned-single-request-agent-execution/22+21_executor_activation/plan_local_G07_0.log`.
- Prior review: `agent-task/m-iop-owned-single-request-agent-execution/22+21_executor_activation/code_review_cloud_G07_0.log`, verdict `FAIL`, Required `R1`, no Suggested or Nit findings.
- Fresh review evidence passed the dependency check, focused installation test, changed-package regression, vet, broader Edge regression, constructor/document searches, and `git diff --check`; `evidence_integrity_failure=false`.
- Roadmap carryover remains `milestone-task=review-stage`; actual external Claude/Mac qualification remains the separate S12 `claude-smoke` task.

## Finding Resolution Map

| Finding | Mode | Exact fix or dependency evidence | Changed precondition |
|---------|------|----------------------------------|----------------------|
| R1 | `direct-fix` | Update `agent-spec/input/openai-compatible-surface.md` source evidence, current marked-single-request behavior, limitation text, and change record from the already verified manager/executor/contract/runtime evidence. | The current input-surface spec will describe the installed active pipeline and completed request-artifact cleanup, with only S12 external qualification deferred. |

## Analysis

### Files Read

- `apps/edge/internal/input/manager.go`
- `apps/edge/internal/input/manager_test.go`
- `apps/edge/internal/openai/single_request_executor.go`
- `apps/edge/internal/service/service.go`
- `apps/edge/internal/service/single_request.go`
- `apps/edge/internal/bootstrap/runtime.go`
- `agent-contract/outer/anthropic-compatible-api.md`
- `agent-spec/runtime/edge-node-execution.md`
- `agent-spec/input/openai-compatible-surface.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-task/archive/2026/08/m-iop-owned-single-request-agent-execution/21+20_single_request_executor/complete.log`
- `agent-task/m-iop-owned-single-request-agent-execution/22+21_executor_activation/plan_local_G07_0.log`
- `agent-task/m-iop-owned-single-request-agent-execution/22+21_executor_activation/code_review_cloud_G07_0.log`

### SDD Criteria

- SDD: `agent-roadmap/sdd/knowledge-tool-optimization-extension/iop-owned-single-request-agent-execution/SDD.md`, status approved and unlocked.
- Milestone scope: `milestone-task=review-stage`; Acceptance Scenario S10 requires pass or defect review, repair/reverification, and final output.
- Evidence Map S10 requires review pass/defect/repair fixtures and finalization evidence. The completed predecessor and installed composite supply that deterministic evidence; this follow-up keeps the current input-surface spec consistent with it and does not claim S12 external qualification.

### Verification Context

- No separate verification handoff was supplied. Repository-native evidence came from the local test rules, Edge smoke profile, active contract/specs, production constructor, installation regression, and the prior review's fresh commands.
- Preconditions: task 21 has exactly one archived `complete.log`; the target input spec has no overlapping worktree modification; the current manager installation test passes.
- Commands use `-count=1` for fresh Go execution and deterministic `rg --sort path` or fixed-string guards for document state.
- External verification is intentionally excluded: S12 owns actual Claude/Mac qualification, and this follow-up changes documentation only.
- Confidence: high; one exact current-state contradiction and one exact owner file are known.

### Test Coverage Gaps

- No runtime behavior changes are planned, so no new Go test is needed.
- Existing `TestManagerInstallsSingleRequestExecutor` covers production installation, and predecessor review-stage fixtures cover the composite behavior. The follow-up adds deterministic current-spec guards instead of duplicating runtime tests.

### Symbol References

None; no symbol is renamed or removed.

### Split Judgment

Keep one compact documentation packet: source evidence, feature wording, limitation wording, and change record must describe one current-state invariant together. Subtask `22+21_executor_activation` depends on task index 21, satisfied by `agent-task/archive/2026/08/m-iop-owned-single-request-agent-execution/21+20_single_request_executor/complete.log`. No recursive split is useful.

### Scope Rationale

Include only `agent-spec/input/openai-compatible-surface.md` and the required active review evidence. Exclude code, tests, the already-correct Anthropic outer contract and runtime spec, historical deferred change-record entries, roadmap mutation, and S12 external execution.

### Final Routing

- `evaluation_mode=isolated-reassessment`; all build and review closures are true, ownership is closed by R1's `direct-fix`, and there is no capability gap.
- Build scores `1/0/0/1/1` => G03, base/final basis `local-fit`, route `worker/local/G03`, filename `PLAN-local-G03.md`.
- Review scores `1/0/0/1/1` => G03, basis `official-review`, route `review/cloud/G03`, filename `CODE_REVIEW-cloud-G03.md`.
- `large_indivisible_context=false`; positive loop risk `boundary_contract` (1); `review_rework_count=1`; `evidence_integrity_failure=false`; no risk or recovery boundary matched.
- Finalizer: `finalize-task-policy.sh`, mode `pair`.

## Dependencies and Execution Order

1. The task-21 dependency command must resolve exactly `agent-task/archive/2026/08/m-iop-owned-single-request-agent-execution/21+20_single_request_executor/complete.log` and exit zero.
2. Synchronize the input-surface spec from the already active code, outer contract, and runtime spec; do not reinterpret historical change-record statements as current limitations.
3. Run the focused installation test and deterministic document guards before filling review evidence.

## Implementation Checklist

- [x] Update the input-surface spec's activation source evidence, current behavior, limitation text, and change record so Plan -> Work -> Review plus request-artifact cleanup are active and only S12 external qualification remains deferred.
- [x] Run the dependency, focused installation, deterministic current-spec/source-evidence, and diff checks.
- [x] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [REVIEW_API-1] Synchronize the current input-surface spec

**Problem**

`agent-spec/input/openai-compatible-surface.md:296` currently says the provider-specific stage drivers and request-artifact cleanup remain deferred. That current limitation contradicts production installation at `apps/edge/internal/input/manager.go:27`, the active Anthropic contract, and the runtime spec.

**Solution**

Add exact activation code/test evidence to the spec frontmatter, add or amend current marked-single-request behavior so the installed composite and generic private-stage failure projection are explicit, replace the stale limitation, and add a current change-record entry. Preserve prior historical entries and keep actual Claude qualification deferred to S12.

Before (`agent-spec/input/openai-compatible-surface.md:296`):

```markdown
- The marked single-request SSE projector and private workspace continuation do not add event kinds, filters, release rules, or recovery behavior to the generic Stream Evidence Gate. Provider-specific plan/work/review stage drivers, request-artifact cleanup, and actual Claude qualification remain deferred; deterministic coordinator/tool-loop tests do not imply that qualification.
```

After:

```markdown
- The marked single-request SSE projector and private workspace continuation do not add event kinds, filters, release rules, or recovery behavior to the generic Stream Evidence Gate. The active Plan -> Work -> Review composite and request-artifact cleanup use generic private-stage failure projection and deterministic local evidence; only actual external Claude qualification remains explicitly deferred to S12 (`claude-smoke`).
```

**Modified Files and Checklist**

- [x] Add `apps/edge/internal/input/manager.go`, `apps/edge/internal/input/manager_test.go`, and `apps/edge/internal/openai/single_request_executor.go` as exact current activation evidence in `agent-spec/input/openai-compatible-surface.md`.
- [x] Synchronize the current marked-single-request feature/limitation wording and add a dated change-record entry without rewriting historical entries.

**Test Strategy**

Do not add a test file because runtime behavior is unchanged. Rerun the existing focused installation regression and use deterministic fixed-string/source-evidence guards to prove the living spec no longer defers implemented components.

**Verification**

Run the focused installation test plus the exact current-state and evidence searches in Final Verification; all commands must exit zero.

## Modified Files Summary

| File | Items |
|------|-------|
| `agent-spec/input/openai-compatible-surface.md` | REVIEW_API-1 |
| `agent-task/m-iop-owned-single-request-agent-execution/22+21_executor_activation/CODE_REVIEW-cloud-G03.md` | REVIEW_API-1 |

## Final Verification

Fresh output is required; Go tests use `-count=1` and cached output is not acceptable.

1. `bash -c 'set -euo pipefail; shopt -s nullglob; candidates=(agent-task/m-iop-owned-single-request-agent-execution/21_*/complete.log agent-task/m-iop-owned-single-request-agent-execution/21+*/complete.log agent-task/archive/*/*/m-iop-owned-single-request-agent-execution/21_*/complete.log agent-task/archive/*/*/m-iop-owned-single-request-agent-execution/21+*/complete.log); printf "%s\n" "${candidates[@]}"; ((${#candidates[@]} == 1))'` — prints exactly one task-21 completion path and exits zero.
2. `go test ./apps/edge/internal/input -run 'TestManager.*SingleRequestExecutor' -count=1` — the installed production construction regression passes freshly.
3. `bash -c 'set -euo pipefail; rg --fixed-strings "active Plan -> Work -> Review" agent-spec/input/openai-compatible-surface.md; rg --fixed-strings "actual external Claude qualification remains explicitly deferred to S12" agent-spec/input/openai-compatible-surface.md; ! rg --fixed-strings "Provider-specific plan/work/review stage drivers, request-artifact cleanup, and actual Claude qualification remain deferred" agent-spec/input/openai-compatible-surface.md'` — current behavior is active, only S12 remains deferred, and the stale claim is absent.
4. `rg --sort path -n 'apps/edge/internal/(input/manager(_test)?|openai/single_request_executor)\.go' agent-spec/input/openai-compatible-surface.md` — exact production constructor, regression, and composite evidence paths are present.
5. `git diff --check` — no whitespace errors.

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