Skip to content

Integration: security tier + self-hosted operator blockers (rebased onto v3.8.51) - #10952

Merged
diegosouzapw merged 13 commits into
cheaper-inference:release/v3.8.50from
arminanton:integrate/blockers-and-security
Aug 23, 2026
Merged

diegosouzapw merged 13 commits into
cheaper-inference:release/v3.8.50from
arminanton:integrate/blockers-and-security

Conversation

@arminanton

Copy link
Copy Markdown
Contributor

Summary

An integration branch of blocker + security fixes, rebased clean onto the current release/v3.8.50 tip (13 commits, 0 behind). It bundles the security tier and the self-hosted operator bugs from a prioritised remediation plan, plus one build-reliability fix and one net-new secret-leak hardening pass found during review.

The branch was rebased onto current head immediately before opening this PR; commits that upstream has since merged independently (its own #10907 sticky-pin fix, #10872 CLI-card guard, the CodeQL-action bumps, the command-code effort suffixes) were dropped during the rebase rather than reapplied, so this diff is a true delta with no duplicate work.

What's in it, by tier

Security (highest severity first)

Bugs that block real usage (self-hosted operator)

Provider/feature fixes

Contributor credit

Several commits are cherry-picked from external contributor PRs (authorship preserved in git history): @rqzbeh (#10871), the #10899 and #10916 authors, and the sticky-pin / command-code work by @excessivechaos where upstream hadn't already merged it. Where upstream merged an equivalent fix first, that version is kept and the duplicate dropped.

Validation

  • typecheck:core clean, check:cycles clean.
  • 68 unit tests across the new/ported fixes pass (build-guard, corruption-fence, opencode-pair, WS-diagnostics, model-persistence, hidden-model fix(providers): hiding a model does not exclude it from auto combos for no-auth providers #7620, error-passthrough credential-refuse, sticky-pin, SSRF, blocked-providers, custom-system-prompt).
  • A broad sweep of the touched areas (combo/passthrough/redact/sanitize/build, ~2.1k tests) shows zero regressions vs the pristine release/v3.8.50 baseline: the same pre-existing failures appear on both, and no new failure is introduced by this branch.

Notes for reviewers (transparency, not changed here)

  • Pre-existing base-reds observed on the current release tip (not introduced or fixed here): a better-sqlite3 native-binding load failure on some host glibc lines (affects the db/omp, migration-snapshot and dependency-shape tests in a sandbox), and two model-capability-overrides / #9199 deep-equal assertions. These fail identically on pristine release/v3.8.50.
  • Config-posture finding (left for a maintainer decision, not changed): anonymous /v1 access is the shipped default unless REQUIRE_API_KEY is set, and configuring a management password does not gate the API surface (only the dashboard). On a 0.0.0.0-bound instance an unauthenticated caller can use the operator's stored provider keys. Flipping a security default belongs with the maintainer rather than in an integration branch; flagging it here.
  • Optional hardening: NEXT_TELEMETRY_DISABLED=1 is set in a sub-Dockerfile but not the main build; setting it in the primary build env would fully disable Next.js build-time telemetry. (No runtime telemetry / phone-home exists; the audit confirmed the "zero telemetry by default" posture.)

Copilot AI lite review requested due to automatic review settings August 21, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@arminanton
arminanton force-pushed the integrate/blockers-and-security branch from 110e592 to 923e8d7 Compare August 21, 2026 18:29
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thank you for bundling these blocking/security fixes — the substantive code is solid and the dedicated tests are well-written. However, the PR is currently stale relative to its stated base and cannot merge as-is.

MANDATORY before this can merge:

  1. The rebase is not current. The branch is 54 commits behind release/v3.8.50. A real merge produces 7 conflicts, and worse, src/shared/validation/settingsSchemas.ts auto-merges with DUPLICATE keys: your customSystemPromptEnabled/customSystemPrompt (max 100000) at ~line 151 PLUS the base's identical pair (max 10000) at ~line 195 in the same z.object literal → TS1117 duplicate object key → typecheck:core fails. We verified this by materializing the merge. Please rebase onto the current tip and resolve.

  2. Drop 4 already-landed areas (subsumed by base). These are already on release/v3.8.50 and will re-conflict:

    • #10935 Cloudflare SSRF: the summit fix + tests/unit/cloudflare-relay-path-ssrf.test.ts already exist on base; your inline isPrivateHostname(h) also diverges from base's shared isPrivateRelayHostname.toString() — keep base's, drop the divergent inline copy.
    • #10727 muse-spark WS readyState diagnostic + its test (already on base).
    • #10865/#10890 custom system prompt schema (base commit 9fd19f5 already landed it) — drop your insertion and the custom-system-prompt-settings-schema.test.ts file.
    • cursorApiKeyAuth HMAC (base already uses createHmac).
  3. Add a regression test for the #10898 change (Hard Rule fix(ci): add environment for npm token access #18). src/lib/db/models/compat.ts removes alias canonicalization from the compat key and src/sse/services/model.ts:312 merges overrides across no-auth siblings — both are production behavior changes with NO test in this PR. Add one pinning that opencode-zen resolves overrides stored under sibling opencode.

OPTIONAL: src/lib/logPayloads.ts adds "capability" to SENSITIVE_KEYS — that word is very common in non-secret bodies and will broadly redact capability fields from call-log artifacts; consider scoping to provider-specific keys only. Also the 3-condition isBuild expression is repeated across driverFactory.ts, core.ts, kiro route and codegraphKnowledge.ts — a tiny shared helper would keep them consistent.

No behavior issues in the genuinely-new code: the build-sqlite stub, call-log corruption fence, loopback re-probe and secret/error hardening all look correct and their tests pass. Once rebased, dropped and re-tested this will be a strong merge.

@arminanton
arminanton force-pushed the integrate/blockers-and-security branch from 923e8d7 to 64192d3 Compare August 22, 2026 09:52
@arminanton

Copy link
Copy Markdown
Contributor Author

Thank you for the thorough review and the clear, actionable guidance — it made this straightforward to resolve. I've force-pushed a rebased branch (now 64192d32a, 10 commits, linear on the current release/v3.8.50 tip 6cd4d38e2). Here's everything that was done, mapped to your points.

Mandatory

1. Rebase + the silent settingsSchemas.ts duplicate key.
Rebased onto the current tip. You were exactly right that a naive rebase auto-merges customSystemPromptEnabled/customSystemPrompt into a TS1117 duplicate-key state that breaks typecheck:core — I reproduced it by materializing the merge. Resolved by dropping our now-subsumed copy (see #2). typecheck:core is green on the rebased branch.

2. Drop the already-landed areas. Dropped all four you named, and while rebasing I found two more that base had absorbed since your review, so they're dropped too:

  • #10935 Cloudflare relay-path SSRF (base already has the shared isPrivateRelayHostname + the test) — dropped our divergent inline copy.
  • #10727 muse-spark WS readyState diagnostic + test.
  • #10865/#10890 custom system prompt schema (base commit landed it) — dropped our insertion and custom-system-prompt-settings-schema.test.ts (this is what removes the duplicate key).
  • cursorApiKeyAuth HMAC — base already uses createHmac.
  • Also dropped (newly subsumed): #10903 loopback-readiness no-memoize (base's anti-storm implementation is a superset of ours) and #10736 call-log corruption fence (base grew its own callLogRotatePaused/handleCallLogRotateError).

3. Regression test for #10898 (Hard Rule #18). Added tests/unit/noauth-sibling-compat-override-7620.test.ts, pinning both halves of the fix: (a) an override written under the raw opencode id stays on the raw key and does not leak onto opencode-zen (the exact #10898 regression), and (b) getNoAuthHydrationProviderIds merges the sibling so a lookup resolving to opencode-zen still reads the opencode override. I verified it's a real guard by re-introducing the canonicalized key — the test flips to not ok, and reverting to the raw-key fix makes it pass.

Optional (both done)

logPayloads.ts "capability" redaction. Agreed — matching the bare word broadly redacts non-secret capability/capabilities fields (model catalogs, degradation/provider-discovery strings, MCP tool schemas). Removed it; the real web-impersonation credentials (ecto_1_sess cookie, storageState, runtimeKey) are already covered by cookie/authorization/storageState/runtimeKey. Added a regression test asserting those redact while capability/capabilities survive.

Shared isBuild helper. Extracted src/lib/buildPhase.ts (isNextBuildPhase()) and routed all four sites through it — driverFactory.ts, codegraphKnowledge.ts, the kiro auto-import route, and db/core.ts's isBuildPhase const now delegate to it. No import cycle (the leaf helper resolves the driverFactory↔core cycle that forced the inline copies).

Verification

typecheck:core green; 131 tests pass across the changed surface (copilot/github, compat-override, build-stub, log-payloads, error-passthrough). Branch is linear (0 merge commits) and 0 behind the default branch.

Thanks again for the detailed problem list — the file:line pointers and the "materialized the merge" note on the duplicate key saved a lot of time. Happy to adjust anything further.

…s before cached fallback

Two release/v3.8.50 base-red unit failures in tests/unit/cc-compatible-provider.test.ts
(part of the cheaper-inference#9985 "release branch not green" set), re-derived and fixed against the
current tip rather than cherry-picked, since the base-red set has drifted since the
originating PRs were written.

1. models route (genuine code bug; ref cheaper-inference#10795 fix cheaper-inference#1, closes the gap in cheaper-inference#10863):
   GET /api/providers/:id/models returned HTTP 200 with an empty/cached model list
   for a Claude-Code-compatible (anthropic-compatible-cc-*) connection instead of the
   documented HTTP 400 "does not support models listing". The isClaudeCodeCompatibleProvider
   check sat AFTER maybeReturnCachedDiscovery() / maybeReturnAutoFetchDisabled() inside
   the isAnthropicCompatibleProvider block, so a freshly-created CC connection with no
   synced models hit the auto-fetch-disabled 200 fallback first. Hoisted the CC 400
   check to the top of that block so the unsupported-listing contract always wins.

2. stale test assertion (test-only; the code is correct per cheaper-inference#10684): the
   "preserves client cache markers" test asserted a client message marker sent with no
   ttl defaults to 1h even when a system block carries an explicit 5m marker. cheaper-inference#10684
   ("advance Claude cache breakpoints on growing tails") changed normalizeCacheControlTtl
   to "default missing ttl to 5m after a 5m breakpoint" (sections processed
   tools -> system -> messages) and updated claude-code-parity.test.ts /
   chatcore-translation-paths.test.ts to match, but missed this third assertion.
   Updated it to expect 5m, matching the intended breakpoint semantics.

Verified: tests/unit/cc-compatible-provider.test.ts 27/27, claude-code-parity 40/40,
chatcore-translation-paths 75/75, typecheck:core clean.

Refs cheaper-inference#9985, cheaper-inference#10795, cheaper-inference#10863, cheaper-inference#10684.

(cherry picked from commit 674606963abc8ed3e9ba89f2544e9f3aad6c8fa5)
cheaper-inference#10060)

The native better-sqlite3 Statement destructor aborts with SIGABRT when a
Next.js build worker thread exits (node::RemoveEnvironmentCleanupHook, env ==
nullptr), which can leave the production build with no standalone bundle.

Thread a reliable OMNIROUTE_BUILDING=1 signal (set by build-next-isolated.mjs,
inherited by every spawned build worker) through every DB entry point, because
Next workers sometimes drop NEXT_PHASE:
- getDbInstance() returns a no-op SQLite stub during build (never the native driver)
- driverFactory skips better-sqlite3 and falls through to node:sqlite
- codegraphKnowledge + kiro auto-import lazy loaders fail closed
- callLogArtifacts isBuildPhase honors the same signal
- next.config aliases better-sqlite3 to a build-only stub (runtime still uses the
  real package via serverExternalPackages, so no runtime behavior change)

Also raise the default build heap 4096->6144 and cap Next build worker pools
(CIRCLE_NODE_TOTAL=8) to avoid the many-core page-data SIGSEGV, and add
.gitattributes (*.sh eol=lf) so kernel-exec'd scripts never ship CRLF shebangs.

Per the maintainer's review on cheaper-inference#10060, this deliberately does NOT downgrade the
Node base image: release/v3.8.50 moved to node:26-trixie-slim through several
considered commits, so the guard is re-derived against the current base instead
of reverting the FROM line. The original PR's npm@11 pin and binary-hide dance
are dropped: our build already rebuilds better-sqlite3 deterministically via
node-gyp and floats npm@latest for the CVE overlay.

3 build-guard tests added. typecheck:core + eslint clean.

(cherry picked from commit bf4ea18db82682d5945aa6dbe29465c8dafbd586)
… redact relayed OCR/moderation errors + widen call-log key redaction

Audit of the error/log surface found three secret-leak paths:

1. upstreamErrorPassthrough relays a provider's 4xx body verbatim to Claude
   Code clients (the capability-recovery contract needs exact wording). It only
   screened for stack traces, not echoed credentials. Add a bounded, ReDoS-safe
   credential regex (Bearer/Basic, sk-, api_key/token/authorization/cookie/secret
   assignments); when the body carries a secret, refuse passthrough and fall back
   to the sanitized error path. Secret-free bodies still relay verbatim.

2. OCR + moderations handlers forwarded upstream error text byte-for-byte. Route
   it through the now-exported, structure-preserving redactSensitiveErrorText.

3. protectPayloadForLog's SENSITIVE_KEYS gains cookie/storageState/runtimeKey/
   capability so web-impersonation credentials (Meta AI ecto_1_sess, chatgpt-web
   storageState) surfaced into a body field are redacted before the on-disk
   call-log artifact is written.

Claude Code verbatim-wording contract preserved. 396 passthrough/redaction/ocr/
moderations tests green; new credential-echo + capability-preserved cases added.

(cherry picked from commit 88dc2b345821dd4bc140adf3be223d68d6bb1759)
No telemetry anywhere: set NEXT_TELEMETRY_DISABLED=1 on the Dockerfile builder
stage AND in resolveNextBuildEnv (build-next-isolated.mjs) so local, CI, and
Docker builds all suppress Next.js's anonymous build-time telemetry ping, not
just the devin-bridge sub-image that already had it.

(cherry picked from commit f9dd20dbdad1b803a696b65b0a5a8fe8c33a8b92)
…aking raw-id lookups (cheaper-inference#7620 regression from cheaper-inference#10898)

The merged cheaper-inference#10898 canonicalizes the provider id via resolveProviderAlias inside
the low-level readCompatList/writeCompatList. That shifts which key_value row is
read/written for aliased providers and REGRESSES cheaper-inference#7620: setModelIsHidden writes
the isHidden override under the raw "opencode" id, but getHiddenModelsByProvider
(and the auto-combo candidate filter) read it back under "opencode", while the
canonicalized write landed it under "opencode-zen". A hidden no-auth model
reappears in the auto-combo pool.

Move the alias-awareness UP to the resolution layer: lookupModelMeta now merges
getModelCompatOverrides across the provider AND its no-auth sibling ids (via the
existing getNoAuthHydrationProviderIds map, requested id first), and the
low-level compat store goes back to keying on the raw providerId. This keeps the
apiFormat/targetFormat/supportsVision persistence cheaper-inference#10898 added working for the
"opencode/x -> opencode-zen" resolution case, while paths that legitimately key
on the raw id (getHiddenModelsByProvider) keep working.

Verified: noauth-autocombo-hidden-7620 + model-protocol-persistence both green;
check:cycles clean (no src/lib/db -> open-sse import).
(cherry picked from commit 923e8d722e56e1fd632611d295fceb816029c12b)
…and GHE

Claude models must use Copilot's Anthropic-native /v1/messages shim (prompt-cache
token counts + lossless tool_use/tool_result/thinking blocks), never
/chat/completions or /responses. Previously github.com gated this on the
registry's per-model targetFormat tag (so an untagged or custom Claude id fell
through to /chat/completions), and GHE Copilot had no /v1/messages path at all
(all its Claude models went to /chat/completions).

Match on the model NAME (/claude/i) in both executors' buildUrl, so any claude-*
id, tagged or not, hits the native shim. GHE gains a getMessagesBase() that
derives the per-connection /v1/messages host from copilotApiUrl/gheUrl, and a
messagesUrl config default to enable the route. Mirrors the Hermes copilot
routing (`if "claude" in model: return CAPI_MESSAGES_URL`).

Tests updated to the new contract (Claude -> /v1/messages, Gemini stays on
/chat/completions, gpt/codex stay on /responses); 6 new cases cover untagged +
custom Claude ids and the GHE dynamic-host path. Full copilot/github/ghe sweep
(280 tests) green.

(cherry picked from commit ccbd0da382dd2148358e4db26e50fcf15122902b)
…iscovery + add entitled models

Header parity (open-sse/config/providerHeaderProfiles.ts, executors/github.ts):
Match the @github/copilot CLI 1.0.81-6 inference request 1:1 (MITM-captured /
live-verified), since an incomplete OR over-complete header fingerprint is itself
a flagging signal.
  - DROP editor-plugin-version + x-vscode-user-agent-library-version from the
    chat/inference path: the CLI does not send them there (they are VS Code
    Copilot Chat extension headers, not CLI). They remain on the OAuth/internal
    paths where the CLI does send Editor-Plugin-Version.
  - ADD x-client-machine-id (stable per-install fingerprint; getGitHubCopilotMachineId,
    env override GITHUB_COPILOT_MACHINE_ID) plus per-request x-interaction-id /
    x-client-session-id / x-agent-task-id, x-github-repository-nwo/host sentinels,
    and x-stainless-helper-method:stream (streamed turns only). Client-pinned
    session/task/repo values are honored when present.

Model discovery de-gating (open-sse/services/githubCopilotModels.ts):
Replace the hardcoded GITHUB_COPILOT_MODEL_ALLOWLIST intersection in
parseGitHubCopilotModels with a capability-driven filter (capabilities.type ===
"chat", or a chat-shaped supported_endpoints), so any model the account is
entitled to shows up in "Import Models" WITHOUT a code edit — the old allowlist
silently dropped newly-entitled models (grok-4.6, mai-code-1.1-flash,
gemini-3.6-flash). The former allowlist becomes the static FALLBACK catalog
(offline/unauthed/error only); the old export name is kept as an alias.

Registry (open-sse/config/providers/registry/github/index.ts):
Add entitled models with live-probed context windows: claude-opus-4.6 (1M,
claude->/v1/messages), gemini-3.5-flash + gemini-3.6-flash (1M), gpt-5.4-nano
(400k, /responses), grok-4.5 + grok-4.6 (500k, /responses-only — 400 on
/chat/completions), mai-code-1.1-flash + mai-code-1-flash-picker (256k,
/responses).

NOTE on fast mode: live /v1/messages probing (billing cost_per_batch signal)
proves that on Copilot TODAY, `claude-opus-4.8-fast` sent VERBATIM activates real
fast mode (2x billed), while base id + speed:fast / service_tier:priority is
INERT (1x). This is the OPPOSITE of native Anthropic (strip -fast + send speed).
The registry already carries claude-opus-4.8-fast as a verbatim /v1/messages
entry, which is wire-correct; deliberately NOT switching to strip+param, which
would silently regress Copilot fast mode.

Tests: update provider-header-profiles, executor-github, github-copilot-model-
discovery, provider-models-config for the new identity + capability filter;
regenerate the provider translate-path golden snapshot. All copilot/github tests
green (the 1 unrelated command-code combo red is pre-existing on the base).

(cherry picked from commit 2f767e215f9c0a0bf63fa8bcaf4b149c3da97060)
…ide resolution (cheaper-inference#10898 regression guard)

Adds tests/unit/noauth-sibling-compat-override-7620.test.ts covering the two
halves of the cheaper-inference#10898/cheaper-inference#7620 fix in this PR (previously shipped with no dedicated
test, per maintainer review on cheaper-inference#10952):

  1. an isHidden/compat override written under the raw no-auth id 'opencode'
     stays on the raw key and does NOT leak onto the canonical 'opencode-zen'
     sibling key (the exact cheaper-inference#10898 regression); and
  2. getNoAuthHydrationProviderIds merges the sibling set so a lookup that
     resolves the model prefix to the APIKEY gateway id 'opencode-zen' still
     reads overrides the operator wrote under 'opencode' (incl. the existing
     getModelInfo('opencode/<model>') apiFormat/targetFormat/supportsVision path).

Verified red-against-buggy: re-introducing the cheaper-inference#10898 canonicalized compat key
flips test (1) to 'not ok'; reverting to the raw-key fix makes all 3 pass.
Per maintainer review on cheaper-inference#10952 (optional): the 3-condition build-phase
expression (NEXT_PHASE || OMNIROUTE_BUILDING || npm_lifecycle_event) was
copy-pasted across driverFactory.ts, codegraphKnowledge.ts and the kiro
auto-import route, with a 2-condition variant in db/core.ts.

Adds src/lib/buildPhase.ts — a zero-import leaf module exporting isNextBuildPhase()
— and routes all four sites through it (db/core's isBuildPhase const now delegates
to it, so its many importers get the unified 3-signal check for free). No import
cycle: driverFactory could not import db/core (core imports driverFactory), which
is why the inline copies existed; the leaf helper resolves that.

Net -17/+13 lines. typecheck:core green; build-stub + buildPhase behavior verified
(clean=false; OMNIROUTE_BUILDING/NEXT_PHASE/npm_lifecycle_event each=true).
…he generic 'capability'

Per maintainer review on cheaper-inference#10952 (optional): the secret-leak hardening added the
bare word "capability" to SENSITIVE_KEYS, but redactPayload matches keys by exact
name anywhere in the payload tree. "capability"/"capabilities" is a common
NON-secret field — model catalogs' capabilities objects, degradation /
provider-discovery 'capability' strings, MCP tool schemas — so it broadly
redacted useful diagnostics from on-disk call-log artifacts.

Remove "capability" from the set. The actual web-impersonation credentials it was
meant to guard (Meta AI ecto_1_sess cookie / ecto1: WS token, chatgpt-web
storageState + runtimeKey) are already covered by cookie/authorization/
storageState/runtimeKey. Verified no credential-bearing field is ever named
'capability' in the codebase.

Adds a regression test pinning the scoping: cookie/storageState/runtimeKey redact
to [REDACTED] while capability/capabilities survive. request-log-payloads 10/10,
upstream-error-passthrough 14/14 green.
… models unlock

The full entitled Copilot catalog (grok-4.x, mai-code) is only served when the
copilot-integration-id: copilot-developer-cli header rides on a RAW GitHub Bearer
token. Discovery was sending the exchanged copilot_internal/v2/token bearer, which
is minted without the developer-cli identity and unlocks only the narrower default
set — so grok/mai silently vanished for entitled accounts. Reorder the discovery
token precedence (github.com path) to prefer the raw accessToken, keeping the
exchanged token as a fallback. GHE keeps the exchanged token (its enterprise API
requires it). Mirrors the Copilot CLI's de-gated discovery.

Adds tests/unit/github-copilot-discovery-token.test.ts pinning both halves:
the raw token is sent as Authorization: Bearer *** developer-cli header, and
/responses-only entitled models (grok/mai) survive discovery parsing.
@arminanton
arminanton force-pushed the integrate/blockers-and-security branch from 64192d3 to d7c3d66 Compare August 22, 2026 20:51
@arminanton

Copy link
Copy Markdown
Contributor Author

Refreshed the branch onto the current release/v3.8.50 tip and force-pushed (now d7c3d66f2, 11 commits). The previous head was rebased onto an older tip, so its CI went red on changes that landed upstream since (e.g. the webhook-telegram-dispatcher emoji change) — those pass now that the branch sits on the current tip.

One net-new commit was added, completing the model-discovery de-gating that fix(copilot): match live CLI 1.0.81-6 wire identity + de-gate model discovery started:

fix(copilot): present raw GitHub token on model discovery so entitled models unlock — the earlier commit de-gated the parse filter (capability-driven instead of a hardcoded allowlist), but discovery still presented the exchanged copilot_internal/v2/token bearer on GET /models. That exchanged token is minted without the copilot-developer-cli integration identity, so GitHub serves only the narrower default catalog and entitled /responses-only models (grok-4.x, mai-code) silently vanish for accounts that DO have them (verified: the same account shows them in the Copilot CLI). The full catalog only unlocks when copilot-integration-id: copilot-developer-cli rides on a raw GitHub Bearer. Fix reorders the discovery token precedence (github.com path) to prefer the raw accessToken, keeping the exchanged token as a fallback; GHE keeps the exchanged token since its enterprise API requires it. Adds tests/unit/github-copilot-discovery-token.test.ts pinning that the raw token is sent as Authorization: Bearer with the developer-cli header, and that grok/mai survive discovery parsing.

Happy to split that copilot-discovery commit into its own PR if you would rather keep this one exactly as previously reviewed — it is self-contained.

@diegosouzapw diegosouzapw changed the title Integration: security tier + self-hosted operator blockers (rebased onto v3.8.50) Integration: security tier + self-hosted operator blockers (rebased onto v3.8.51) Aug 23, 2026
@diegosouzapw
diegosouzapw merged commit 1027682 into cheaper-inference:release/v3.8.50 Aug 23, 2026
5 of 7 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 23, 2026
…11205 follow-ups)

The base advanced twice past the branch cut (15 + 2 merges); the PR's CI
surfaced five more reds on the merged head, each discriminated:

1. check-env-doc-sync + Docs Gates: OMNIROUTE_BUILDING referenced in code
   (src/lib/buildPhase.ts, db/core, callLogArtifacts — build-phase stub
   signal from #10060 via #10952) but missing from .env.example /
   ENVIRONMENT.md. Fix: document it in both (never-set-for-server note).

2. db-core-init 'build phase uses an in-memory database' — STALE TEST:
   #10060 deliberately replaced the real in-memory build DB with a no-op
   stub (native better-sqlite3 aborts the Next.js build worker on exit,
   node::RemoveEnvironmentCleanupHook); the stub contract is pinned by
   tests/unit/build/10060-build-sqlite-stub.test.ts. The old test pinned
   the superseded contract (real memory DB with migrations). Aligned:
   stub driver, no-op queries, no file created.

3. 8134-github-t5-fallback-filter — STALE FIXTURE: #10952 added
   claude-opus-4.6 to the github registry, invalidating the fixture's
   'no 4.6 tier' assumption. The provably-absent tier moved to
   claude-opus-4-6-thinking (still absent); test rewritten against the
   real ladder (4.8 -> 4.7 -> 4.6 -> skip 4-6-thinking -> 4.5), keeping
   the original #8134 regression assertion (absent tier never returned).

4. cli-tools Codex/Copilot fingerprint — STALE PIN: #10952 bumped
   GITHUB_COPILOT_CLI_VERSION 0.54.0 -> 1.0.81-6 without the sibling
   fingerprint pin. Assertion aligned to GitHubCopilotChat/1.0.81-6.

5. stryker.conf.json — drop a duplicate tap.testFiles entry for
   quota-exhaustion-cutoff-opencode.test.ts created by the merge (the
   base registered it too after my fix in 17f5e4e).

Validation: env-doc-sync gate green; 8134 2/2, cli-tools 23/23,
db-core-init build-phase test, check-env-doc-sync.test.ts all
RED->GREEN locally (node --import tsx/esm --test).

Refs #9985
diegosouzapw pushed a commit that referenced this pull request Aug 23, 2026
#11249/#11251/#11252/#10952 follow-ups)

The gate (eslint full-tree, baseline 0) failed on the merged head with 26
unsuppressed errors, all introduced by same-day base merges — none by this
PR. Each fixed at the cause (no new suppressions):

1. tests/integration/qdrant-routes.test.ts (#11249/#11213): 20x
   no-explicit-any on route-invocation casts. Fix: typed asNextRequest()
   adapter (Request -> NextRequest) replacing every "as any".

2. tests/unit/effort-tiers-loop-catalog-e2e.test.ts (#11252): unused
   after/beforeEach imports — newly error-level under the no-unused-vars
   ratchet #11247 shipped the same day. Fix: trim the import (the file
   uses test.after/test.beforeEach method forms).

3. EditConnectionModal.tsx (#11251): react-hooks/set-state-in-effect on
   the modal-open setFormData init. The pattern (sync form state with the
   loaded connection when isOpen flips) is the codebase's sanctioned
   exception — same justified eslint-disable-next-line already used in
   FreePoolTab.tsx and BatchConceptCard.tsx; a key-remount of the 30+
   field form would be a behavior-risking restructure for a basereds PR.

4. tests/unit/usage-service-hardening.test.ts (shard 2/4): last stale
   Copilot wire-identity pin — #10952 re-based it on the live-captured CLI
   1.0.81-6 (copilot-developer-cli integration id, API version 2026-08-01).
   Assertions aligned (UA, Editor-Version, Editor-Plugin-Version,
   X-GitHub-Api-Version).

Validation: all four files eslint-clean with the frozen suppressions;
usage-service-hardening 23/23 and effort-tiers 2/2 RED->GREEN
(node --import tsx/esm --test).

Refs #9985
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…nto v3.8.51) (cheaper-inference#10952)

Validated on the resolved merge against the current tip (585c2b7 + the post-cheaper-inference#11281 rebaseline): the single conflict was a comment-only collision in providers/[id]/models/route.ts (kept the tip's cheaper-inference#10828-ordering note). Focused suites 125/125 across all 13 touched test files (build-sqlite-stub, cc-compatible, copilot-claude-messages, copilot-gemini-route, executor-github, ghe-copilot, github-copilot-discovery-token, github-copilot-model-discovery, noauth-sibling-7620, provider-header-profiles, provider-models-config, request-log-payloads, upstream-error-passthrough), typecheck:core clean, file-size/changelog-integrity OK. Merged --admin over the inherited 2026-08-23 base-red cluster (cheaper-inference#9985) — the reds are proven tip failures (CLI catalog cluster + @testing-library allowlist, being drained by cheaper-inference#11280), not from this diff. Note: the rebase means several items the body listed (relay x-relay-path SSRF, /v1/search blocked-providers, cheaper-inference#10736 rotation fence, cheaper-inference#10903, cheaper-inference#10865, cheaper-inference#10899, cheaper-inference#10916) already landed upstream and are NOT in this delta — the delta is: better-sqlite3 build guard + build heap/worker caps + telemetry-off (cheaper-inference#10060 re-derived), credential-echo passthrough refusal + OCR/moderation redaction + call-log key redaction, Copilot CLI 1.0.81-6 wire identity + Claude→/v1/messages name-matched routing + discovery token fix, CC model_not_found 400, compat overrides for no-auth aliases (cheaper-inference#7620-pinned). The Copilot wire-identity change is the one to watch in production. Thank you @arminanton — and the ported-author credits in the commit history (@rqzbeh, yidecode, the cheaper-inference#10899/cheaper-inference#10916 authors) are preserved. Your config-posture finding (REQUIRE_API_KEY default vs 0.0.0.0) is noted for a maintainer decision, as you scoped it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants