agent-contract/outer/anthropic-compatible-api.md:101:Missing capability returns a sanitized `503 api_error`; a coordinator start or runtime
agent-contract/outer/anthropic-compatible-api.md:102:failure returns a sanitized `502 api_error` on the same request.
agent-contract/outer/anthropic-compatible-api.md:114:disposition before it crosses the endpoint boundary. Its closed kinds are `end_turn`,
agent-contract/outer/anthropic-compatible-api.md:117:`workspace_cleanup`. A legacy result without a disposition normalizes to `end_turn`.
agent-contract/outer/anthropic-compatible-api.md:125:| `end_turn` | `200`, one caller-safe text block, `stop_reason="end_turn"` | one caller-safe final text block, `message_delta(end_turn)`, then `message_stop` |
agent-contract/outer/anthropic-compatible-api.md:126:| `length` | `200`, empty content, `stop_reason="max_tokens"` | no private partial final block, `message_delta(max_tokens)`, then `message_stop` |
agent-contract/outer/anthropic-compatible-api.md:127:| `error/validation`, `error/context` | `400 invalid_request_error` with a fixed safe message | one `error` event of type `invalid_request_error` |
agent-contract/outer/anthropic-compatible-api.md:128:| every other `error/*` | `502 api_error` with a fixed safe message | one `error` event of type `api_error` |
agent-contract/outer/anthropic-compatible-api.md:129:| `cancelled` | no response body after caller disconnect | no later event after caller disconnect |
agent-contract/outer/anthropic-compatible-api.md:134:fallback, partial success, or a second request. One accepted marked POST therefore
agent-contract/outer/anthropic-compatible-api.md:138:completion only and cannot write a second terminal. This is the implemented S11
agent-contract/outer/anthropic-compatible-api.md:139:`error-cancel` boundary; external Claude qualification remains deferred to S12.
agent-contract/outer/anthropic-compatible-api.md:154:joined before terminal output or handler return. An `end_turn` terminal writes the
agent-contract/outer/anthropic-compatible-api.md:155:final caller-safe text block, one `message_delta` with `stop_reason="end_turn"`, and one
agent-contract/outer/anthropic-compatible-api.md:157:with `stop_reason="max_tokens"`. A classified failure writes one sanitized `error`
agent-contract/outer/anthropic-compatible-api.md:158:event and never writes a success terminal. Caller disconnect owns `cancelled`, cancels
agent-contract/outer/anthropic-compatible-api.md:215:- Managed mode sources provider authentication only from the credential slot and Node-targeted lease. Config validation rejects `openai.provider_auth` and static provider credential sources, while ingress rejects caller-supplied legacy provider credential headers with `400 invalid_request_error`.
agent-contract/outer/anthropic-compatible-api.md:237:지원하지 않는 beta 값을 보내면 `400 invalid_request_error`를 반환한다.
agent-contract/outer/anthropic-compatible-api.md:256:Wrong methods on Anthropic-selected endpoints return `405 invalid_request_error`.
agent-contract/outer/anthropic-compatible-api.md:265:  "max_tokens": 1024,
agent-contract/outer/anthropic-compatible-api.md:299:- `max_tokens`: 출력 토큰 상한이다. 필수 field다. 0 이하 값은 `400 invalid_request_error`를 반환한다.
agent-contract/outer/anthropic-compatible-api.md:303:- `temperature`: 0..1 범위. 범위를 벗어나면 `400 invalid_request_error`를 반환한다.
agent-contract/outer/anthropic-compatible-api.md:304:- `top_p`: 0..1 범위. 범위를 벗어나면 `400 invalid_request_error`를 반환한다.
agent-contract/outer/anthropic-compatible-api.md:328:  "stop_reason": "end_turn",
agent-contract/outer/anthropic-compatible-api.md:345:- `stop_reason`: `end_turn`, `max_tokens`, `tool_use`, `stop_sequence` 중 하나.
agent-contract/outer/anthropic-compatible-api.md:367:data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null}}
agent-contract/outer/anthropic-compatible-api.md:388:3. on `end_turn`, one complete final text block, one `message_delta` with `end_turn`,
agent-contract/outer/anthropic-compatible-api.md:391:   `max_tokens`, and exactly one `message_stop`;
agent-contract/outer/anthropic-compatible-api.md:392:5. on classified service failure, one sanitized `invalid_request_error` or `api_error`
agent-contract/outer/anthropic-compatible-api.md:394:6. on caller disconnect, silent cancellation with no later event.
agent-contract/outer/anthropic-compatible-api.md:415:    "type": "invalid_request_error",
agent-contract/outer/anthropic-compatible-api.md:423:- `invalid_request_error`: 요청 validation 실패 (missing field, bad value, unsupported header), request body가 ingress 상한 초과 (413)
agent-contract/outer/anthropic-compatible-api.md:426:- `api_error`: provider dispatch 실패, tunnel unavailable, timeout, upstream error (400/502)
agent-contract/outer/anthropic-compatible-api.md:434:In legacy mode, `openai.provider_auth.enabled=true` with a missing required header returns `400 invalid_request_error` "provider auth token is required". Managed mode does not read that caller header.
agent-contract/outer/anthropic-compatible-api.md:455:그 외 driver는 `502 api_error` "selected provider returned an unsupported protocol driver"를 반환한다.
agent-contract/outer/anthropic-compatible-api.md:474:output, or a failed selector gate returns one sanitized endpoint-standard `api_error`
agent-contract/outer/anthropic-compatible-api.md:492:해당 profile extension 없이 explicit enabled thinking으로 bridge하면 `400 invalid_request_error` "selected Chat profile does not support thinking"를 반환한다. `thinking.type="adaptive"`는 별도 budget field를 만들지 않고 `output_config.effort`를 `reasoning_effort`로 변환한다.
agent-contract/outer/anthropic-compatible-api.md:500:Built-in API-key profiles such as `seulgi_messages` may declare their auth header case-insensitively (for example the lowercase `x-api-key`). The Control Plane canonicalizes the resolved header name to its HTTP-canonical spelling (`X-Api-Key`) before signing the lease scope, so the managed API-key lease is issued and consumed successfully and the Node injects only that exact signed lease instruction upstream, never the raw secret. A lease-issuance or consumption failure fails closed with a sanitized `502 api_error` and never falls back to caller auth or a bearer slot. This outbound provider-header canonicalization is distinct from inbound IOP caller auth. The deterministic credential-slot qualification exercises both managed profiles (Chat and Messages) end to end.
agent-spec/runtime/edge-node-execution.md:23:    notes: Edge-side tunnel-tolerant heartbeat and disconnect supervision
agent-spec/runtime/edge-node-execution.md:74:    notes: Run and tunnel handler lifetime cancellation on disconnect
agent-spec/runtime/edge-node-execution.md:104:    notes: Request-local S11 stage classification and fixed-hash repetition/no-progress detection
agent-spec/runtime/edge-node-execution.md:107:    notes: S11 provider, timeout, budget, malformed, context, length, cancel, tool, and no-progress terminal evidence
agent-spec/runtime/edge-node-execution.md:113:    notes: Streaming terminal-disposition mapping, exactly-one terminal, disconnect silence, and private-partial exclusion
agent-spec/runtime/edge-node-execution.md:206:| single-request S11 terminal policy | One validated, copy-safe terminal disposition is frozen across envelope/result/progress with kinds `end_turn`, `length`, `error`, and `cancelled`. Error classes are `provider`, `validation`, `timeout`, `budget`, `repetition`, `malformed`, `context`, `internal_tool`, and `workspace_cleanup`. Cleanup can replace a pending success/length before publication; no acknowledgement race can publish a second terminal. |
agent-spec/runtime/edge-node-execution.md:235:- The request-local single-request quality gate classifies provider/tool timeouts, exhausted stage/request budgets, first proven repeated action/result no-progress, malformed calls/results, context/output limits, cancellation, internal-tool failures, and workspace cleanup into the closed terminal vocabulary. It retains only fixed hashes for repetition evidence and never retries, reselects, falls back, exposes a partial success, or starts a second request after classification.
agent-spec/runtime/edge-node-execution.md:236:- The service freezes the first public terminal candidate. Legacy successful results normalize to `end_turn`; output limits produce `length`; caller disconnect produces silent `cancelled`; validation/context become `invalid_request_error`; other errors become `api_error`. Buffered and SSE projectors share that policy, emit at most one terminal, and never expose private partial stage content for `length`. This completes deterministic S11 `error-cancel` evidence without changing the Edge-Node protobuf wire. S12 external Claude/Mac qualification remains pending.
agent-spec/runtime/edge-node-execution.md:302:- 이 값은 runtime YAML model config나 `max_tokens`/context 설정이 아니라 transport 구현 상수다.
agent-spec/runtime/edge-node-execution.md:329:- `go test -race ./apps/edge/internal/service ./apps/edge/internal/openai -run 'Test(SingleRequestTerminalDisposition|SingleRequestQualityGate|AnthropicSingleRequestErrorCancelMatrix|SingleRequestAnthropicStreamTerminalDisposition)' -count=1` — deterministic S11 error-cancel/length matrix, first-terminal ownership, one ingress, no second request, disconnect silence, and raw-free output evidence.
agent-spec/runtime/edge-node-execution.md:333:- 30/45초 liveness profile은 provider 응답 token 상한이나 model context window를 늘리지 않는다. 요청 중단 원인 판정 시 model 설정과 transport disconnect를 별도로 확인한다.
agent-spec/runtime/edge-node-execution.md:338:- Node retry and `recovery_eligible` remain prohibited. Hard deadline and connection disconnect continue to take precedence over a simultaneous stall timer.
agent-spec/runtime/edge-node-execution.md:341:- The composite single-request executor is installed at Edge input startup (`apps/edge/internal/input/manager.go`), wiring the active Plan -> Work -> Review stage pipeline for single-request execution. Private stage outcomes use the implemented closed S11 terminal policy and stop without retry/fallback or a second request. Deterministic local activation and terminal evidence are proven, while actual external Claude qualification remains explicitly deferred to S12 (`claude-smoke`).
agent-spec/runtime/edge-node-execution.md:346:- 2026-08-07: Implemented the S11 `error-cancel` boundary: one frozen service terminal disposition, request-local typed stage classification, fixed-hash repetition/no-progress detection, shared buffered/SSE Anthropic mapping, silent disconnect cancellation, private-partial suppression for `max_tokens`, and deterministic one-ingress/one-terminal/no-second-request evidence. The Edge-Node protobuf wire is unchanged and S12 remains pending.
agent-spec/runtime/edge-node-execution.md:350:- 2026-08-04: Added the shared Node run/tunnel watchdog coordinator, serialized tunnel emission fence, pre-provider admission cleanup, disconnect-bound handler lifetime, and deterministic S01/S02 manual-clock evidence.
agent-spec/input/openai-compatible-surface.md:71:    notes: Exact-wire progress/repair/ping/privacy tests, terminal races and failures, disconnect, acknowledgement order, and one streaming POST
agent-spec/input/openai-compatible-surface.md:143:    notes: Request-local S11 stage classification and fixed-hash repetition/no-progress detection
agent-spec/input/openai-compatible-surface.md:146:    notes: S11 timeout, budget, repetition, malformed, context, length, cancel, and tool terminal evidence
agent-spec/input/openai-compatible-surface.md:167:| marked single-request S11 terminal policy | The service freezes one closed `end_turn`, `length`, `error`, or `cancelled` disposition. `error` classes are provider, validation, timeout, budget, repetition, malformed, context, internal-tool, and workspace-cleanup. Buffered and SSE share one projection: `end_turn`; `max_tokens` with no private partial output; `400 invalid_request_error` for validation/context; `502 api_error` for other failures; and silent cancellation after caller disconnect. No terminal classification retries, falls back, opens a second request, or later writes success. |
agent-spec/input/openai-compatible-surface.md:182:| Anthropic ingress | `POST /v1/messages` and `POST /anthropic/v1/messages` share one handler; the corresponding count-tokens paths share another. `/anthropic/v1/models`, and `/v1/models` with `anthropic-version`, return the Anthropic model-list shape. Wrong methods return `405 invalid_request_error`. |
agent-spec/input/openai-compatible-surface.md:257:- A marked single-request Messages dispatch requires the narrow service coordinator capability and never falls back to the generic provider pool. The handler copies the immutable binding and request input and counts the accepted HTTP admission once with no labels. The service projects exactly one frozen terminal candidate through both response modes: buffered/SSE `end_turn`; buffered/SSE `max_tokens` without private partial content; `invalid_request_error` for validation/context; `api_error` for provider, timeout, budget, repetition, malformed, internal-tool, and workspace-cleanup failures; or silent cancellation after caller disconnect. The streaming path maps only fixed plan/work/review/repair summaries, serializes pings and monotonic text-block indices with one terminal owner, stops and joins liveness before terminal/return, and acknowledges completion only after `message_stop`. Arbitrary progress, reasoning, tool/provider/credential/workspace data, raw failures, and internal stage terminals stay private. No classified terminal triggers retry, fallback, partial success, a second request, or a later success terminal. Count-tokens does not enter or increment this path.
agent-spec/input/openai-compatible-surface.md:261:- provider capacity와 long-context slot은 model alias별이 아니라 `node_id + provider_id`별로 공유한다. queue pending 상한과 timeout은 Edge root `provider_pool` policy이며, lease 반환·refresh·disconnect/reconnect가 모든 model group waiter를 global enqueue 순서로 재평가한다.
agent-spec/input/openai-compatible-surface.md:315:- 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 the closed S11 `error-cancel`/length policy with deterministic local evidence. S11 is implemented; only actual external Claude qualification remains explicitly deferred to S12 (`claude-smoke`).
agent-spec/input/openai-compatible-surface.md:320:- 2026-08-07: Implemented and documented S11 `error-cancel`: one closed service terminal disposition, request-local typed failure/no-progress classification, shared buffered/SSE `end_turn`/`max_tokens`/`invalid_request_error`/`api_error` mapping, silent disconnect, private-partial suppression, and deterministic one-ingress/one-terminal/no-second-request evidence. S12 external qualification remains pending.
exit=0
