<!-- task=m-iop-hot-path-one-shot-execution/06+04,05_request_identity_ingress plan=1 tag=REVIEW_API milestone-task=request-identity -->

# Complete - m-iop-hot-path-one-shot-execution/06+04,05_request_identity_ingress

## Completion Time

2026-08-03

## Summary

Preset ingress identity and Anthropic Messages operation isolation completed after two reviewed loops; final verdict: PASS.

## Loop History

| Plan | Review | Verdict | Notes |
|------|--------|---------|-------|
| `plan_local_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | Required trusted per-turn call identity, count-tokens coordinator isolation, and cross-owner/tool-schema zero-dispatch endpoint evidence. |
| `plan_cloud_G08_1.log` | `code_review_cloud_G08_1.log` | PASS | Confirmed all inherited findings with fresh focused, race, full Edge, vet, formatting, and diff verification. |

## Implementation / Cleanup

- Attached server-issued logical request, call, and stage identity to all accepted preset Chat and Messages ingress branches while preserving one logical request across continuation turns.
- Restricted Anthropic logical execution coordinator admission to the Messages operation so local and native count-tokens paths create no execution state or identity metadata.
- Added deterministic handler coverage for cross-owner and tool-schema mutation rejection with zero provider dispatch, plus native count-tokens state isolation.

## Final Verification

- `test -f agent-task/m-iop-hot-path-one-shot-execution/04+02,03_preset_model_authorization/complete.log || test -f agent-task/archive/2026/08/m-iop-hot-path-one-shot-execution/04+02,03_preset_model_authorization/complete.log` - PASS; the preset authorization predecessor completion log exists.
- `test -f agent-task/m-iop-hot-path-one-shot-execution/05+02,04_request_coordinator/complete.log || test -f agent-task/archive/2026/08/m-iop-hot-path-one-shot-execution/05+02,04_request_coordinator/complete.log` - PASS; the request coordinator predecessor completion log exists.
- `go test -count=1 ./apps/edge/internal/openai -run 'TestPresetRequestIdentity'` - PASS; reviewer output `ok iop/apps/edge/internal/openai 0.078s`.
- `go test -count=1 -v ./apps/edge/internal/openai -run 'TestPresetRequestIdentityAnthropicCountTokensBypassesCoordinator'` - PASS; the count-tokens isolation test executed and passed.
- `go test -race -count=1 ./apps/edge/internal/openai -run 'TestPresetRequestIdentity'` - PASS; reviewer output `ok iop/apps/edge/internal/openai 1.128s`.
- `go test -race -count=1 ./packages/go/streamgate ./apps/edge/internal/openai ./apps/edge/internal/service` - PASS; all three packages passed with race detection.
- `TMPDIR=/config/.tmp-iop-request-identity go test -count=1 ./apps/edge/...` - PASS; every Edge package passed using the executable temporary directory required by the host noexec `/tmp` constraint.
- `go vet ./apps/edge/...` - PASS; exit 0 with no output.
- `gofmt -d apps/edge/internal/openai/request_identity_ingress.go apps/edge/internal/openai/anthropic_handler.go apps/edge/internal/openai/request_identity_handler_test.go` - PASS; no formatting diff.
- `git diff --check` - PASS; exit 0 with no output.

## Remaining Nits

- None.

## Follow-up Work

- None.
