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

# Admit canonical empty tool-call content and prepare the fifteenth guard

## For the Implementing Agent

Resolve R31 exactly as scoped. Preserve `sole-live-14.rc-69`, canonical dev state, IOP-owned provider routing, and process-memory-only SOPS caller authentication. Run every local, remote, and provider-free gate before creating `sole-live-15.started`. Then execute exactly one harness `--run`, finalize the guard once, and never retry it.

## Background

Plan 31 admitted and discarded llama.cpp's top-level `system_fingerprint` and `timings`, but `sole-live-14` still closed at Work validation after canonical IOP returned one valid `workspace_write`. Official llama.cpp `common_chat_msg::to_json_oaicompat` writes `content:""` when parsed visible content is empty. Work currently accepts the tool-call branch only when `Content == nil`; its plan-31 positive fixture used `content:null` and therefore did not reproduce the exact response.

## Archive Evidence Snapshot

- Prior pair: `plan_cloud_G10_31.log` / `code_review_cloud_G10_31.log`; verdict `FAIL`, Required R31, `review_rework_count=30`, `evidence_integrity_failure=false`.
- `sole-live-14.rc-69` is immutable: ingress `0 -> 1`, provider tunnels `12 -> 14`, Plan success 1, Work validation error 1, cleanup success 1, terminal validation error 1, no result/manifest, and no retry.
- Isolated correlation `sr-1cb6ad595a14c06d80118318664b9637` and canonical correlation `req.manual-1786194974536857000` agree that the provider returned one `workspace_write` before the isolated Work validation failure.

## Finding Resolution Map

| Finding | Mode | Exact resolution | Acceptance evidence |
|---|---|---|---|
| R31 | direct-fix | Treat only `nil` or exact empty string Work message content as absent for a single `tool_calls` response; keep any non-empty content plus tool call invalid. Change the canonical diagnostic fixture to `content:""` and add an explicit non-empty rejection. | Focused tests prove exact empty-string admission, existing null behavior, and non-empty rejection; one new guarded S12 run must complete Gemini → ornith-fast → Gemini with the exact workspace result and schema-valid manifest. |

## Scope

- Modify only `apps/edge/internal/openai/single_request_work_stage.go`, `apps/edge/internal/openai/single_request_work_stage_test.go`, and implementation-owned review evidence.
- Do not relax top-level/message/tool/function allowlists, role/index/finish-reason checks, tool cardinality, argument validation, completion JSON, or workspace authority.
- Do not modify canonical dev IOP, provider hosts, credentials/routes, configs, harness/schema, contracts/specs/roadmap, or common Agent-Ops files.

## Implementation Checklist

- [x] Admit exact empty-string content as absent only in the single-tool-call Work branch while retaining null admission and non-empty rejection.
- [x] Make the canonical llama.cpp regression fixture byte-shape accurate and add the explicit non-empty-content negative case.
- [x] Run fresh formatting, focused, package, race, Edge regression, and build verification locally and on the isolated dev source.
- [x] Sync only the two reviewed files, rebuild/restart the disposable Edge, refresh source/binary runtime evidence, and pass every provider-free gate.
- [x] Create/finalize exactly one `sole-live-15` guard around one harness `--run`; publish only complete S12 evidence and never retry.
- [x] Fill every implementation-owned section of `CODE_REVIEW-cloud-G10.md` and leave the pair ready for official review.

## Implementation Items

### [REVIEW_API-1] Match llama.cpp empty tool-call content

Change the tool-call branch predicate so `Content == nil` and `Content != nil && *Content == ""` are admitted, but all non-empty strings remain invalid. The content value grants no tool authority and must not be retained or replayed.

### [REVIEW_API-2] Close the exact regression boundary

Change `TestSingleRequestWorkStageAdmitsCanonicalIOPDiagnostics` to use `content:""`. Add a malformed-response fixture with one otherwise valid tool call and non-empty `content`, and require rejection. Existing ordered-loop coverage must retain null-content admission.

### [REVIEW_API-3] Rebuild and qualify once

Run the same local/remote gates as plan 31, sync only the two files, rebuild Darwin arm64 Edge, refresh runtime evidence, and restart only the disposable Edge. Require fourteen finalized guards, zero `.started`, no `sole-live-15`, and no result/manifest. Pass catalog, count-token, fleet, identity, certificate, process, activity, self-test, and harness preflight gates before the single live call.

## Final Verification

1. `gofmt -w apps/edge/internal/openai/single_request_work_stage.go apps/edge/internal/openai/single_request_work_stage_test.go`
2. `go test ./apps/edge/internal/openai -run 'TestSingleRequestWorkStage(AdmitsCanonicalIOPDiagnostics|RejectsMalformedResponsesAndOptions|DrivesOrderedToolLoop)$' -count=1`
3. `go test ./apps/edge/internal/openai -count=1`
4. `go test -race ./apps/edge/internal/openai -run 'TestSingleRequestWorkStage(AdmitsCanonicalIOPDiagnostics|RejectsMalformedResponsesAndOptions|DrivesOrderedToolLoop)$' -count=1`
5. `go test ./apps/edge/... -count=1`
6. `make build-edge`
7. Repeat 2-5 on the isolated dev source, build `EDGE_TARGET=darwin-arm64`, refresh exact runtime identity, restart only disposable Edge, and pass provider-free gates with zero activity delta.
8. Execute exactly one `sole-live-15` harness run. PASS requires ingress delta 1, ordered stage successes, workspace verification, cleanup, one successful terminal, and a schema-valid redacted manifest.
