Repository navigation
test(runtime): delete hand-written conformance replaced by the generated matrix - #1108
Merged
Merged
Conversation
…ted matrix Part of #860 (Phase 8). With the #974 preconditions landed, remove the hand-written two-stage replay tests whose every assertion is owned by a generated matrix cell, and strengthen the generated wire to also assert the per-protocol request credential (Bearer / x-api-key / x-goog-api-key keyed off the registry authKind, and no credential for authKind none) so the deleted per-provider auth assertions stay locked. Deleted (replaced by the named generated cells): OpenCode Go, LocalAI, LM Studio, Cerebras, NVIDIA, SiliconFlow, MiniMax Coding Plan, xAI, Together AI, Mistral, Tencent TokenHub, and the Xiaomi + Z.AI pair. Kept (unique provider contracts): testConnection probes, per-model override Responses routing (OpenCode Zen), signed reasoning_details (ZenMux), buildProviderOptions wires (Vercel, Ollama Cloud, DeepInfra, Groq, OpenRouter, Cloudflare, Tencent Token Plan, Volcengine Ark), reasoning-source quirks (StepFun), full fallback-snapshot lists (Tencent/Volcengine/StepFun plans), and Hugging Face capability mapping. The conformance suite now shares the scripted-HTTP harness instead of carrying its own copy.
Astro-Han
force-pushed
the
refactor/providers-phase8-dedup
branch
from
July 16, 2026 10:06
94d32ed to
ac0eb76
Compare
Astro-Han
changed the base branch from
refactor/providers-phase8-closeout
to
main
July 16, 2026 10:06
Accepted findings from the external review: - P1: wire runs expand optional_api_key into both credential branches (configured key must reach the wire; absent key must send no credential at all), matching the discovery-side expansion; assertWireCredential now also asserts every non-selected credential header (authorization, x-api-key, api-key, x-goog-api-key) is absent for all authKinds. - P2: five declared edge wire samples (opencode-go kimi-k2.7-code, localai localai/Qwen3-8B-Instruct-GGUF:Q4_K_M, lm-studio lmstudio-community/Qwen3-Coder-30B-A3B-Instruct-GGUF, minimax-coding-plan MiniMax-M2.7-highspeed, tencent-tokenhub hy3-preview) run end-to-end through the same wire executor (exact-model-id + tool-loop) on the per-id resolved wire; the declaration lives in the core matrix plan (EDGE_WIRE_SAMPLE_MODEL_IDS -> row.edgeWireSamples) so future providers enter by declaration. - P2: the generic OpenAI wire fixture issues an opaque tool-call id (D681PevKs9, no call_ prefix) and both turns assert it is replayed verbatim, so id canonicalization regressions cannot pass. - P2: wire connections carry a sentinel base-URL pathname (/contract-base/...) and every protocol runner asserts the final request path equals the sentinel prefix plus the protocol suffix, proving the runtime preserves configured baseUrl pathnames. Request-contract violations in wire handlers are recorded and rethrown after the call so injected regressions fail with the contract message instead of a destroyed-socket timeout. Each hardening was verified by injecting the corresponding runtime regression and observing the new assertion fail by name.
57 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #860 (Phase 8). Stacked on #1105 (base branch
refactor/providers-phase8-closeout): with the three #974 preconditions landed there, this PR deletes the hand-written provider-conformance tests whose every assertion is provably owned by a generated matrix cell, and consolidates the duplicated scripted-HTTP test plumbing.To make the deletions airtight, the generated wire runners now also assert the request credential on every inference request, keyed off the registry
authKind: Bearer for the OpenAI/Cohere wires,x-api-key(or Bearer forauth: 'bearer'adapters) for Anthropic,x-goog-api-keyfor Google, and no credential header at all forauthKind: 'none'. This replaces the per-provider auth-on-POST assertions the deleted tests carried.Deleted → replaced by
Every deleted test's dimensions are covered by generated cells of its matrix row (all rows verified
generatedon the relevant dimensions before deletion):opencode-gorow: discovery + openai-chat exact-model-id / tool-loop / reasoning-replaylocalairow: discovery (auth: 'optional', both credential branches from #1105) + openai-chat wire cellslm-studiorow: discovery (auth: 'none') + openai-chat wire cells with the new no-credential wire assertioncerebrasrow: generated discovery + openai-chat wire cellsnvidiarow: generated discovery with fallback-models decoy + wire cells?sub_type=chat) + tool turnsiliconflowrow: generated discovery with declared query + wire cellsminimax-coding-planrow: generated anthropic discovery (x-api-key) + anthropic-messages wire cellsxairow: generated discovery + wire cellstogetherairow: generated discovery + wire cellsmistralrow: generated discovery exercising both payload shapes + wire cellstencent-tokenhubrow: generated discovery + wire cells incl. reasoning-replayxiaomiandzairows: generated discovery + wire cellsstartJsonServer/readBody/respondJsoncopy inprovider-conformance.test.tsconformance-harness.ts(introduced in #1105)Kept (still the fact authority, with reasons)
testConnectionprobe tests (GitHub Copilot validate/reject, OpenCode per-model protocol probes) — the matrix does not exercisetestConnection.reasoning_detailsreplay — generate-path counterpart of the streamed override binding.buildProviderOptionsrequest fields (reasoning_effort,thinking) the generated wire never sends; Cloudflare additionally locks thereasoning-source /reasoning_content-absent replay invariant.reasoningsource-field andfinish_reasonwire quirks plus full plan snapshot lists.capabilities.functionCallingmapping, which the generated discovery cell does not check.STATIC_MODEL_METADATA,CURATED_CATALOG_FALLBACK_MODELS,ANTHROPIC_MODEL_OVERRIDES,CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS) — audited and kept: they are documented authorities for facts models.dev cannot express (wire thinking controls, curated catalog ordering, access-path allowlists), not superseded parallel tables.normalizeProviderType'scodex-subscriptionpersisted-id alias is untouched.Matrix coverage evidence (Phase 8 acceptance)
cohere:discovery,fireworks-ai:discovery,ollama:discovery,github-copilot:{discovery, exact-model-id, tool-loop, reasoning-replay},zenmux:reasoning-replay.discovery (declares-static-fallback-model-snapshot)with the enforced no-network reverse assertion (tencent-coding-plan, volcengine-coding-plan, tencent-token-plan, xiaomi-token-plan-{cn,sgp,ams}, stepfun-step-plan, stepfun-ai-step-plan, volcengine-ark, alibaba-coding-plan{-cn,}, alibaba-token-plan{-cn,}, cloudflare-workers-ai) and 10 ×reasoning-replay (vendor-sdk-owns-signed-reasoning-replay)(anthropic, kimi-coding-plan, minimax-coding-plan, openai, google, MiniMax, MiniMax-cn, cohere, + subscription overrides handled separately).Verification
npm run typecheck— all workspaces pass.npm run test:scripts— 109/109 pass.@maka/core1066 pass,@maka/storage286 pass (1 skipped),@maka/runtime1960 pass (7 skipped/todo, 0 fail; net −13 deleted tests),@maka/headless1022 pass,maka-agent412 pass,@maka/desktop2571 pass.npm run check:stale— dist fresh;git diff --checkclean.Review focus
buildProviderOptions-driven keeps could later collapse into one dedicated request-field suite, and the full-snapshot-list keeps into a registry snapshot test; both are deliberate non-goals here to keep this PR deletion-only in scope.