Representative-client compatibility + operations hardening program (ZCode acceptance follow-up) #132
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.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router#132
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?
Mission
Make Scarcity Router usable as a real OpenAI-compatible execution gateway for representative coding clients (ZCode on Windows), preserving every core invariant: deliberate scarcity selection, exact model and explicitly requested reasoning effort, no silent downgrade or discarded request semantics, fail-closed where semantics cannot be preserved, client-owned tools remain client-owned, no hidden cross-target fallback, no secret leakage, no TLS bypass, no weakening of Daybreak restrictions.
Discovered by the first real representative-client acceptance test (2026-09-26, ZCode →
precision-codex-live): a simple pinned smoke request passed, but the real ZCode request shape (bare model id,tools[],tool_choice: auto,stream+include_usage, four simultaneous reasoning representations,max_completion_tokens: 128000) failed at five successive gates:MODEL_TLS_VALIDATION_FAILEDdespite configured Custom certificate).unknown_parameterrejection ofthinking/enable_thinking/reasoning(onlyreasoning_effortunderstood).output_limit_exceededat the hiddenGatewayLimits.max_output_tokens = 16384default (client asked 128000; catalog evidences 128k output / ~1.05M input; hidden defaults: 1 MiB body, 131072 input context, 300 s).model_not_foundfor baregpt-5.6-luna— only admin aliases orsr-pin:resolve;GET /v1/modelsexposes aliases only.compatibility_unsupportedontools— the current hard blocker. Codex source-derived resources advertisetool_calls: False; the worker adapter raisestool_calls_unsupportedon anytoolsarray; the client tool-result continuation half is also unmapped.max_output_tokens/generation_params(request_parameters_unsupported) — raising gateway defaults alone still leaves ZCode blocked.Baseline (verified 2026-09-26)
develop@893d2cb; D-053 (#124, mergeda4370f0) and D-054 (#127, merged1497961) integrated; Docker packaging fix#130merged (9e57e9e).docs/decisions.md).Non-negotiable routing rule
Never reduce the model or reasoning effort, explicitly or implicitly. A request for
gpt-5.6-luna+maxmay route only among resources providing exactlyprovider=openai, model=gpt-5.6-luna, effort=max. No substitution of model, family, effort, restricted model or tool-execution semantics. No exact match → fail explicitly.sr-pin:remains the exact auditable escape hatch.Children (dependency order, one issue → one branch → one PR each)
GET /v1/modelsexposes adopted logical models; bare logical model + exact effort constrains routing; alias-collision rule explicit; restricted/unclassified stay unroutable. Decision D-055.--ca-cert, non-destructive worker origin migration with pre-commit verification.Program rules
develop, targetdevelop; PRs left open for human review; never merge (human merge gate). No deploy to PRD, no develop→main promotion, no release.uv sync --only-dev,make check,uv run basedpyright,git diff --check), focused new-invariant tests, exact-head technical + mandatory UX review, security review for security-critical children (E, F, G) usinggpt-daybreak-blue-latestwhen available — otherwiseSECURITY_REVIEW_UNAVAILABLEand the gate stays open at the human decision point.Representative acceptance target (owner-controlled, later)
ZCode →
/v1endpoint →gpt-5.6-luna→max→ eligible source selection → Precision Codex source → response; one real client tool round trip executed on the client side; audit shows exact selected/executed model+effort; no downgrade; Daybreak never selected; no TLS bypass; nosr-pin:required for normal use; exact-pin path still proven.Stop conditions
Codex App Server cannot support client-owned tool round-tripping with preserved semantics; support would require worker-side tool execution or weakened sandbox/trust boundaries; exact model/effort cannot be preserved; a capability would have to be fabricated; unknown context/output advertised as known; a security-critical PR cannot obtain required review. A well-supported NO is preferable to a compatibility feature that appears to work while changing semantics.
Program-level architecture note (D-056, accepted via #146 / PR #147, merged to
develop@f574e51; frozen scope text above unchanged — this note governs interpretation of the remaining children):D-056 (
docs/decisions.md) settles that Scarcity Router is a harness-independent execution backend. This program is therefore not ZCode integration work: ZCode is the first demanding representative harness that exposed gaps in the execution contract — the Tier-2 acceptance fixture and the source of the captured real workload — not the design target. The intended client population includes Kilo, Cline, other coding-agent harnesses, OpenAI-compatible SDK clients, simple scripts and first-party agent/orchestration algorithms.Consequences for children D–I:
if zcode/if kilo/if clineanywhere; a client's additional syntax is normalized only at the protocol edge where the mapping is bounded and semantically unambiguous (the #135 precedent)./v1/select,/v1/status,/v1/simulateand control/admin surfaces are consumers of the one core, NOT chat/tool execution-protocol adapters.sr-pin:stays the explicit exact-resource escape hatch, never normal client UX.NOT LIVE VERIFIED, never assumed from protocol similarity.Child-list status: A–C delivered (PRs #142/#144/#145); architecture-only child #146 (D-056) added and delivered (PR #147); D–I proceed in the existing order with D-056 addenda recorded on #136, #137, #138, #139, #140 and #141. #143 is unrelated pre-existing test flakiness and is deliberately untouched. No new children were created for D-056 — the same-host container transport tier is assigned to existing child #139 per D-056 pt 8B.
kilo referenced this issue2026-10-04 22:26:20 +00:00
2026-10-27 owner backlog disposition (D-083, governance issue #228). This historical program issue remains open with its
wontfixlabel unchanged; the label history is preserved and no retrospective reason is assigned to it. Children A–F are delivered and closed; the program framing is superseded by D-056 and subsequent accepted deliveries. Still-required obligations of the remaining children G/H/I and the recorded evidence spinoffs are re-homed to active successors: #139 → #224 (transport/TLS, security-critical); #140 producer state → #183 (scope integration) and administrator remainder → #226; #141 → #227 (downstream composed acceptance); #165 → #225 (P1 cancellation defects); #166 → recorded as an accepted test-infrastructure limitation. See D-083 indocs/decisions.mdfor the full re-homing table and retained invariants.