M03: OpenAI-compatible gateway and execution coordinator #88
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#89 M04: Generic OpenAI-compatible HTTP adapter and Ollama integration
Creatidy/scarcity-router
#90 M05: Native worker, pairing, and execution transport
Creatidy/scarcity-router
#94 M09: Configuration, web UX, and diagnostics
Creatidy/scarcity-router
#95 M10: Distribution, installation, update, and end-to-end acceptance
Creatidy/scarcity-router
#85 A0: Architecture, decisions, and contracts for the optional execution gateway
Creatidy/scarcity-router
#86 M01: Resource registry, state, and collectors for executable resources
Creatidy/scarcity-router
#87 M02: Routing core, policy, and client-requirement binding for executable targets
Creatidy/scarcity-router
Reference
Creatidy/scarcity-router#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Expose a real execution endpoint to compatible clients without taking over client-side orchestration.
Module of the execution-gateway program; architecture and contracts come from A0 (#85).
User value
Any OpenAI SDK client (CLI, IDE, agent) can point at Scarcity Router and run multi-turn tool-using conversations against the best authorized backend, with honest capability handling, cancellation and usage accounting.
Relationship to current code
server.py) stays frozen; the gateway is a NEW separately versioned surface (A0 decision) served by the same server process as the control API and UI (M09).Scope
GET /v1/modelsandPOST /v1/chat/completions(minimum ingress), streaming SSE, and request capability validation before inference./v1/responsesthat silently drops unsupported semantics.tool_calls, tool results, structured output, reasoning controls, context limits, error semantics, usage reporting, cancellation. An agentic CLI backend is NOT automatically an OpenAI-compatible backend; concatenating messages into a text prompt is NOT sufficient compatibility.tool_calls; the router never automatically executes client-provided tools as a local shell command, Codex MCP, ZCode MCP or any local tool.Non-goals
Contracts / interfaces affected
New versioned OpenAI-compatible execution contract (A0); machine-interface v1 unchanged (existing
/v1/*untouched); audit metadata per A0's contract.Dependencies
Acceptance criteria
Security considerations
This is the ingress boundary and owns the first executable vertical slice's security posture: authentication, limits, session/filesystem/tool isolation enforced before any backend dispatch, all per A0's threat model.
Risks
Evidence still required
Closeout (v0.1.0 release-readiness reconciliation, 2026-09-21). M03 is implemented and its acceptance criteria are satisfied on
develop@9d6192e.gateway_server.py(authenticated ingress),gateway_coordinator.py(execution lifecycle),gateway_openai.py(wire mapping),gateway_adapters.py(dispatch seam),gateway_audit.py(D-043 audit),gateway_contracts.py(limits, errors, client identity); contract:docs/execution-surface.md(execution surface v1, D-045).tests/test_e2e_execution.py,tests/test_e2e_codex_acceptance.py); missing capabilities rejected before inference (evidence-cell fail-closed,compatibility_unknown); client-disconnect cancellation propagates (workercancel→turn/interrupt; Codex e2etest_client_disconnect_interrupts_the_codex_turn); no silent backend replacement after stream start and no duplicate inference on ambiguity (AmbiguousDisconnectTests,CodexWorkerLossTests); usage/accounting honest with multi-call fan-out represented (CallObservationdocuments); audit metadata per D-043 with no prompt/response content (DiagnosticsAndExportTests,test_stack_holds_the_leakage_line).tests/test_gateway_server.py,tests/test_tls_acceptance.py,tests/test_security_acceptance.pyand mapped indocs/m10-security-acceptance.md.make check1868 tests OK, basedpyright clean,make package-checkgreen; Forgejo CI green ondevelop(run #25).Closing as complete;
docs/roadmap.mdnow records M03 complete.