Skip to content

feat: 完整引入上游 v0.2.24 并适配 production - #975

Merged
ranxi2001 merged 90 commits into
productionfrom
cherry/upstream-024-20261121
Nov 21, 2026
Merged

ranxi2001 merged 90 commits into
productionfrom
cherry/upstream-024-20261121

Conversation

@ranxi2001

@ranxi2001 ranxi2001 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

解决的问题与行为变化

完整引入 Wei-Shaw/sub2api 的 v0.2.24。包括 Exa 搜索、Codex 原生工具与音频能力、缓存 TTL、额度刷新、请求解析和安全校验、模型路由、模型 ID 复制和后台账号窗口成本估算。

关联记录与来源

上次同步 #922。上游区间 5af9afb58..5c2982a81,fork 基线 84c8d869f。65 个普通提交使用 cherry-pick -x,引入 1 个独有 merge 解决。另 44 个 merge 已核对。逐项源提交与目标提交见 同步清单。

管理员新功能提示

Exa 使用独立公告 exaSearch,覆盖网关设置页签、Web 搜索小节与提供商选择。Claude 额度窗口成本估算使用独立公告 claudeWindowCost,在实际有估算值的用量单元格展示。保留已有批量透传过滤提示。模型广场复制 ID 使用原模型名称。

复现与验收

基于 production 整合,重点核对请求读取、OAuth 刷新、WS 续接、账号额度、缓存计费、搜索与工具转换;复用上游用例与 fork 既有回归。行为验证交源码仓库 CI。

实际验证

从源码仓库根目录执行 git diff --cached --check 通过。已核对 110 个源 SHA 全覆盖。创建 PR 时本机未运行应用构建或测试,未发送生产推理请求。

CI 失败定向核验

  • 后端 go test -p 3 -tags=unit -run '^$' ./internal/service ./internal/repository ./internal/handler ./internal/server/routes ./cmd/server 通过,仅编译并加载测试包。
  • 后端 go test -p 3 -tags=unit ./internal/handler -run 'Test(GatewayMessagesClassifiesRequestBodyReadFailures|GeminiRequestBodyReadTimeoutClassifiedAsClient)' -count=1 通过,修正 HTTP/1 读取超时与客户端取消并发时的状态码,以及 Gemini 超时的 Ops 分类。
  • 前端 vitest run src/views/admin/__tests__/SettingsView.spec.ts -t 'offers DeepSeek|keeps tab badges|dismisses DeepSeek' 通过 5 项,其他用例未选中。模型广场预览用合成模型,实际点击复制按钮后核对了剪贴板。

兼容性与运行影响

保留 fork 独立版本 2.23.1、渠道 Ultra Fast 与免费开关、DeepSeek 搜索、计费下限及 WS 恢复路径。补齐同步范围所需的 Antigravity 配额客户端依赖。请求校验更严格,不合规的请求会在转发前拒绝。运行效果待部署后验证。

文档与用户可见变化

真实定价表组件预览,虚构模型数据。点击按钮后已读取剪贴板,值为完整的 example/text-model。

修改前

修改后

同步清单随 PR 提交。此项为源码整合。

Agent 使用声明

Codex 实现、检查和撰写本 PR。模型为 GPT-6,确切型号及推理强度未知(运行环境未提供可核实信息),未使用子 Agent。

提交前自查

  • 核对 base、tag、来源和范围。
  • 说明已完成与未运行的验证。
  • 保留来源、作者并独立修复 fork 兼容。
  • 已披露 Agent。

github-actions Bot and others added 30 commits November 21, 2026 02:43
…counts

A Codex literature search (gpt-6.2-astra with literature_search_query)
on a plan without that capability gets 403
{"detail":"Literature search is unavailable."} from /alpha/search. The
alpha/search side-effect gate only exempted 401/404/405, so the 403 went
through the generic OpenAI 403 path: the first hit cools the account for
10 minutes and three hits within 3 hours mark it errored until an admin
clears it. 403 is also a failover status, so one request replays across
the pool. In production, one request paused all 9 OAuth accounts within
4 seconds.

On alpha/search (and the PAT Responses fallback), a 403 now writes account
state only when it is an account or workspace access-state error
(deactivated, disabled, ...). Every other 403 is the search tool refusing
the request: the request still fails over, since another account's plan
may allow it, but no account is cooled, counted or errored.

(cherry picked from commit fe5e7fa)
…t and race conditions

(cherry picked from commit fb52c6e)
With the 1h cache TTL injection on, every breakpoint of a compaction request was rewritten to 1h, although the conversation is replaced by the summary afterwards and nothing reads the tokens added since the last main-thread breakpoint again.

A compaction request is recognised by the fixed preamble of the compact prompt in the last user message. Every breakpoint becomes 5m, including one the client already wrote as 1h.

A 5m breakpoint still reads the prefix the main thread cached at 1h, and an all-5m request keeps the tools, system, messages TTL order Anthropic requires. The admin settings hint for the switch names the exception.

(cherry picked from commit e2631bb)
The web search emulation answers a WebSearch tool call on accounts without native search by querying a configured provider. Only Brave and Tavily are available. This adds Exa as a third keyed provider, "exa", in the same place the others are registered.

ExaProvider posts {query, numResults, contents: {highlights: true}} to https://api.exa.ai/search with the key in the x-api-key header. The search type and highlight length are left to Exa's defaults. Each result maps url and title as they are, publishedDate to page_age, and its highlights joined by newlines to the snippet. A result without highlights has no snippet. A non-200 answer is returned as an error with the status and the start of the body, as for Tavily.

"exa" is accepted by the emulation config validator, built by the manager and offered in the admin settings provider dropdown.

(cherry picked from commit bf29255)
…blocks

The Messages bridge always answered an OpenAI web_search_call with an empty web_search_tool_result, so clients never saw the pages the search used.

Bridge requests on the OpenAI platform that carry a web_search tool now ask for web_search_call.action.sources. Each call's sources, or the page a completed open_page opened, become that call's web_search_tool_result entries, in both the streaming and non-streaming paths.

Sources are decoded entry by entry so a malformed entry cannot drop the terminal event.

(cherry picked from commit aa5a020)
…b_search calls

WebSearchAction.URL was a strict string, so a web_search_call whose action.url was not a string failed decoding of the whole Responses event and the Messages stream lost its terminal event. It is now raw like Sources and read as a string only for open_page.

The non-streaming converter also filled results for web_search_call items that had not completed, while the streaming one only handles completed items. Both now emit blocks for completed calls only.

(cherry picked from commit 30152d1)
The Messages to Responses bridge turned every ToolSearch tool_result made of tool_reference blocks into "(empty)" and sent every defer_loading tool as a top-level function.
On ChatGPT/Codex accounts whose model reports supports_search_tool (Grok excluded, xAI has no tool_search) ToolSearch now maps to the native client-executed tool_search, history becomes tool_search_call and tool_search_output carrying the revealed definitions, and an upstream tool_search_call comes back as a ToolSearch tool_use on both the streaming and buffered paths.
Deferred tools stay out of the top-level tools so the prompt cache prefix is the same before and after a reveal.
Requests that do not declare ToolSearch are left untouched.

(cherry picked from commit 5e32269)
A revealed tool was declared in tool_search_output under its own name while its replayed function_call used the Codex reserved-name alias, so the two disagreed for python. Reserved-name collection now walks tool_search_output tools like additional_tools. The collector is shared with the /v1/responses passthrough entries, so they now alias tool_search_output definitions too.
The Responses API has no tool_choice value that forces tool_search or a tool that only tool_search_output declares, so a request forcing ToolSearch or a deferred tool keeps the plain function mapping and its body is unchanged.
tool_search_output has no field for the result text, so text and errors from a ToolSearch result ride in a separate input_text part of the user message after the tool outputs, ahead of the user's own parts.

(cherry picked from commit 3f1a7c6)
Non-streaming /v1/messages and /v1/chat/completions force an upstream stream and read it with readOpenAICompatBufferedTerminal, and the Codex OAuth backend ends that stream with an empty terminal output.
The delta accumulator rebuilds only reasoning, message and function calls, so web_search_call, image_generation_call and other hosted items were dropped and /v1/messages lost its server_tool_use and web_search_tool_result blocks.
The reader now collects the output_item.done items of every type the accumulator does not produce and adds them to an empty terminal output, after the leading reasoning item and ahead of the message and function calls.
The accumulator's own items stay exactly as it builds them, so reasoning text, function call arguments and custom tool calls are unchanged, and a non-empty terminal output is untouched.

(cherry picked from commit f72ef07)
An empty terminal output was rebuilt from merged deltas, so reasoning lost its per-item signature and segmentation, and message and tool order followed the accumulator instead of output_index.
The buffered reader now records every output item and rebuilds the terminal output from the output_item.done items in output_index order, taking deltas only for a field a done item left empty or for an item that never got a done event.
Items merge by item id, so items sharing an output_index stay apart and a repeated item replaces its earlier copy; response.cancelled terminals are filled too.
A non-empty terminal output is untouched. A new test compares /v1/messages and /v1/chat/completions with the streaming path on shapes taken from real Codex streams.

(cherry picked from commit 00b09b8)
A tool call whose arguments were not a JSON object (truncated by max_output_tokens, empty, or the free-form input of a custom_tool_call) made json.Marshal fail, so /v1/messages answered 200 with an empty body.
ResponsesToAnthropic now keeps an object as it is, uses {} for a function_call with anything else, and wraps a custom_tool_call input as {"input": ...}, the shape extractCustomToolCallInput reads back.
Both converters now render custom_tool_call items, which were dropped when the terminal output carried them.
The streaming converter is unchanged: it forwards the argument deltas as the upstream sent them.

(cherry picked from commit fbe8c39)
A custom_tool_call in an output the upstream delivered is not a client tool call; 250deb7 rendered it on that path too, which turns xAI server-side searches into tool_use.
ResponsesResponse.RenderCustomToolCalls is set only when the buffered reader rebuilds an empty output, so a delivered output behaves as before the rework.
A reasoning done item that carries both a summary and raw reasoning_text content now takes its text from the deltas again, as the streaming path shows it.

(cherry picked from commit 49ef5f6)
A message or reasoning item with several parts lost or doubled text when its done item left only some of them empty and the terminal output was empty.
Observe now keeps the deltas per content_index or summary_index, apart for output_text, refusal, summary_text and reasoning_text.
buildMessage and buildReasoning fill only the blank part whose own index has deltas and keep the parts with text and their order as the done item has them.
Deltas of an index the done item has no part for follow its parts.

(cherry picked from commit 5279823)
A rebuilt output skips a web search that is not completed, gives an empty custom tool input as {} and keeps a reasoning signature that only the added event carries.
Deltas without an output_index join their item by item_id or as the newest open item of their kind, and deltas that came before the item was added belong to it.
Items that share an output_index or have none keep their own events: an item of another kind, a done item that is already closed and a different call_id each get their own slot.

(cherry picked from commit 7f1ecfa)
… calls

A buffered request on a Grok account rebuilds an empty terminal output from the done items and renders its custom_tool_call items as tool_use or tool_calls.
An item that apicompat.IsServerSideSearchCall accepts is a search xAI ran itself, so it is no longer rendered as a client tool call.
The item stays in the output, so Grok SearchCount still counts it, and stop_reason and finish_reason follow the remaining content.
A new test covers an empty terminal on /v1/messages and /v1/chat/completions, with and without a client tool next to the search.

(cherry picked from commit 413f1cb)
…es to

A composite route that rewrites the request model left the client's thinking untouched, so a route from claude-sonnet-5 to claude-opus-5-5 forwarded thinking.type=enabled with budget_tokens and validateClaude55Request answered 400 before the request reached the upstream.

The route middleware now rewrites the model through RewriteCompositeRequestModel, which replaces a thinking mode that validateClaude55Request rejects for the new model with the nearest mode it accepts: enabled becomes adaptive without budget_tokens, and disabled becomes between_tools on Sonnet 5.5.

The mapping is shared with the Bedrock Sonnet 5.5 sanitizer, whose behavior is unchanged.

Modes the target still rejects stay with validateClaude55Request, and a request whose model the route does not rewrite keeps its thinking as sent.

(cherry picked from commit f42dad9)
…exists

The byte-level precheck added for Wei-Shaw#8668 still runs both cache_control walks
for any body containing a "thinking" literal, because the thinking-block
cleanup cannot be skipped by that check alone. Claude Code enables extended
thinking by default, so that is the dominant shape: the precheck pays its own
scan and then falls through to the unconditional
normalizeCacheControlTTLOrder(enforceCacheControlBlockLimit(body)).

On the 32KB Claude Code benchmark body with thinking, this made the optimized
path slightly slower than the pre-fix code (112us vs 104us).

Skip the second collectCacheControlPaths pass when the body has no "1h"
literal. The walk is provably a no-op there: last1h stays -1 and nothing is
rewritten. Escaped bodies returned earlier, so the byte check is exact, and
the block-limit deletions only remove cache_control keys, which cannot
introduce a 1h breakpoint.

Benchmark (Apple M5 Pro, -benchtime 2s -count 3):
  thinking, no 1h:  112us / 21 allocs -> 52us / 8 allocs
  common, no 1h:    21.6us / 0 allocs -> 21.3us / 0 allocs
  1h bodies:        unchanged (within noise)

The benchmark gains two thinking cases so future work cannot regress this
shape unnoticed. Equivalence tests compare against the verbatim legacy
implementation.

Fixes Wei-Shaw#8861
Refs Wei-Shaw#8668

(cherry picked from commit 833cfcc)
When a Grok response usage carries server_side_tool_usage_details, take SearchCount from web_search_calls, x_search_calls and document_search_calls instead of counting output items.

xAI documents server_side_tool_usage as the successful calls that determine billing, so failed calls and server-side tools that return nothing are no longer billed. Classes the item counter does not count and the x_posts_fetched / x_users_fetched item counts are not read.

Without server_side_tool_usage_details the existing item counting is unchanged. The usage is read from the JSON body, the SSE body and the terminal stream event, for /v1/responses, /v1/messages and /v1/chat/completions, streaming and not. ResponsesUsage keeps the raw object so the buffered paths, which count from a decoded response, can read it.

(cherry picked from commit 2c587f7)
…eclare one

Every /v1/responses request runs IsImageGenerationIntentForPlatform to decide
whether to mark the context as image generation (capability routing and image
billing). After the two O(1) checks (dedicated image endpoint, image model) the
function unconditionally runs gjson.ValidBytes over the whole body and then
walks the root object with a ForEach.

Both steps are pure overhead for requests that cannot match. Every branch that
can set the intent requires one of two things in the body: the literal
"image_gen" (image_generation tools carry that prefix, and the namespace,
tool_choice and function-reference checks all use image_gen), or an image model
name (gpt-image-*, grok-imagine*) as the "model" value. The same body is also
validated by the handler and again by ParseGatewayRequest, so this pass is a
third redundant validation of the same bytes.

Add a byte-level necessary condition ahead of gjson.ValidBytes:

	bytes.Contains(body, "image_gen")
	|| containsASCIIFold(body, "imag")   // image model names
	|| bytes.Contains(body, "\\u")       // unicode-escaped literal

All three are required:

- "image_gen" alone misses the model branch. {"model":"gpt-image-2"} returns
  true today and does not contain "image_gen"; dropping it would let image
  model requests bypass the group image-generation gate and image billing.
- isOpenAIImageGenerationModel lowercases its argument while bytes.Contains
  does not, so the model token is matched case-insensitively.
- JSON strings may spell any byte as a unicode escape, so a body containing
  "image_generation" only reveals the literal after decoding. Escaped
  bodies therefore fall back to the full scan. None of the target literals
  contain a character JSON escapes, so a "\u" probe is exhaustive.

containsASCIIFold had to be rewritten as well. It compared byte by byte, which
is a full body scan on its own, and a first-byte memchr variant that re-probes
both cases of the first byte per candidate degrades quadratically. The new
implementation keeps one cursor per case and advances only the cursor it just
consumed, so it stays linear. Without this the precheck would cost more than
the scan it replaces (~930us vs 783us on a 1MiB body).

The three scan bodies collapse into two root walkers plus one entry point; the
grok and explicit rules were byte-identical copies.

Codex clients advertise the image_gen namespace on ordinary requests, so those
bodies still take the full scan. Skipping the duplicate validation for callers
that already validated the same bytes is a separate change.

Benchmark (Apple M5 Pro, 1MiB body, 0 allocs):
  no image declarations      783us -> 48us
  codex namespace            560us -> 564us (gate cannot fire, unchanged)

Fixes Wei-Shaw#8865

(cherry picked from commit 59645b7)
…intent

The handler validates the request body at gateway_handler_responses.go:66 and
ParseGatewayRequest validates it again at gateway_request.go:240. For bodies
that do carry image declarations the byte-level precheck cannot fire, so the
intent classifier still ran gjson.ValidBytes over the same bytes a third time.
That is the dominant remaining cost for Codex traffic, because Codex
advertises the image_gen namespace on ordinary responses requests.

Add IsImageGenerationIntentForPlatformValidated for callers that have already
established the body is valid JSON, and use it at the two call sites where
that holds:

- gateway_handler_responses.go: the body is validated at the top of the
  handler, and afterwards it is only rewritten through sjson
  (applyOpenAIReasoningEffortPolicyForRequest), which preserves validity.
- openai_ws_forwarder_ingress.go: the payload is validated in
  parseClientPayload, and every later rewrite is sjson, a decode/re-marshal
  round trip, or a no-op.

Both call sites carry the reasoning in a comment. The validating entry points
are unchanged, so invalid-JSON semantics stay exactly as they were for every
other caller.

Benchmark (Apple M5 Pro, 1MiB Codex body, 0 allocs):
  intent classifier: 562us -> 50us

Refs Wei-Shaw#8865

(cherry picked from commit 487d42c)
…ners

openAIRequestBodyHasImageGenerationDeclaration and
openAIRequestBodyImageGenerationToolNeedsNormalization each validate the whole
body up front before looking at tools/input/tool_choice. Both branches only
match image_gen literals, so the same byte-level necessary condition applies
and lets them skip the validation for bodies that cannot match.

Refs Wei-Shaw#8865

(cherry picked from commit 62765bb)
parseGatewayRequestCurrentBody looked up eight fields with separate
gjson.Get calls. A lookup for a key that is not present still has to scan the
whole body to prove absence, and for a typical Responses request six of those
keys are absent (metadata.user_id, thinking.type, output_config.effort,
max_tokens, system, messages). On a 1MiB body that is six full passes at about
142us each, while a single root walk over the same body costs about 220us.

Collect every field the parser needs in one ForEach over the root and derive
the raw ranges from the same results.

Nested paths keep gjson semantics: each path segment resolves to the first
duplicate key that actually yields the child, not simply the first key with
that name. {"metadata":"x","metadata":{"user_id":"u"}} resolves to "u", and the
walk reproduces that by retrying while the collected child does not exist.
Duplicate scalar keys keep first-occurrence-wins.

The Anthropic [1m] model normalization rewrites the body mid-parse, so the walk
is repeated after the rewrite. That path only runs when the client leaks the
suffix.

Benchmark (Apple M5 Pro, 3 allocs unchanged):
  responses 128KiB: 208us -> 96us
  responses 1MiB:   1.59ms -> 735us
  anthropic 1MiB:   1.43ms -> 723us

Equivalence tests keep a verbatim copy of the previous implementation as
legacy* and compare every field (model, stream, metadata user id, thinking,
effort, speed, max tokens, system/messages/input ranges, protocol, body after
parsing) across 4 protocols and 44 bodies, plus 3000 deterministic random
combinations. A fuzz target does the same for arbitrary input.

(cherry picked from commit 0c571e9)
…es requests

The /v1/responses handler validates the request body with gjson.ValidBytes
before doing anything else, then hands the same bytes to ParseGatewayRequest,
which validates them a second time. After the single-root-walk change the
validation is the majority of what that call does: at 1MiB it is about 510us
of the remaining 730us.

Add ParseGatewayRequestValidated for callers that have already established the
body is valid JSON, and use it in the handler, where the only rewrite between
the two points is applyOpenAIReasoningEffortPolicyForRequest (sjson, which
preserves validity).

The validating entry point is unchanged, so invalid JSON keeps producing a
clean error everywhere else. ReplaceBody / CloneForBody keep validating as
well, because their bytes can differ from the ones a caller validated.

Equivalence tests assert the trusted variant produces identical results to the
validating one on valid JSON, and the fuzz target checks the same for every
input that parses.

Benchmark (Apple M5 Pro, 3 allocs unchanged):
  responses 1MiB: 735us -> 239us
  anthropic 1MiB: 723us -> 207us (not yet wired: that handler has no earlier
  validation, so it keeps the validating path)

(cherry picked from commit 844459e)
Same shape as the responses handler: the body is validated at the top of
ChatCompletions, the only later rewrite is
applyOpenAIReasoningEffortPolicyForRequest (sjson), and the parse error was
already being ignored. Nothing between the two points mutates the bytes:
parseOpenAICompatibleStream, checkSecurityAudit and tokenInflightEstimate only
read them.

(cherry picked from commit 8d962ba)
Wei-Shaw and others added 19 commits November 21, 2026 02:53
An independent audit of the conflicting-field fix found, and running code
confirmed, the following. Each is fixed here.

- A JSON body labelled multipart/form-data skipped the check: the JSON
  branch was chosen from the Content-Type header, but JSON handlers never
  look at it. ConflictingField and FromBodyCandidates now detect JSON by
  content. The same header-only branch, and a UTF-8 BOM prefix (stripped by
  the handlers' lenient reader), also let a body bypass the group model
  allowlist on main; both are closed.
- Identical duplicates passed and the gateway's own sjson rewrites then
  split them: reasoning-effort downgrade, model mapping and the fast-policy
  service_tier delete only touch the first occurrence. Every repeated member
  is now rejected, whatever its value. Multipart rejects repeated scalar
  fields (model, n, size, ...) except list fields (name[], image,
  image[...], image_url).
- Nested case variants bound case-insensitively by struct-based protocol
  conversions ({"reasoning":{"effort":"low","Effort":"xhigh"}}). Members
  are now folded at every depth, except inside user-defined key spaces
  (JSON Schema properties/$defs, tool arguments, metadata, ...), where id
  and ID are distinct and only exact repeats are rejected.
- The recursive walker cost depth x size (1 MB at depth 9990: 1.6 s) and
  stored every key as a string (~16x the body). It is replaced by one
  linear byte scan with an explicit stack that compares 64-bit hashes
  (random per-process seed) of the decoded, folded names: 0.6 ms for the
  same body, ~3.7 GB/s on a Claude Code-shaped body. Subtrees deeper than
  10000 levels are bracket-counted, so later same-level members are still
  checked.
- text_max_body_size no longer bounded what group middleware buffered:
  the route-level limit ran after them. The limit is now chosen per route
  at group level.
- Body read failures in gateway middleware answered in the OpenAI shape
  with a different message than the handlers. They now use the entry
  protocol's shape and the handler's "limit is N" message. Rejections
  are recorded as ingress reason conflicting_request_fields.
- The middleware strips a leading BOM and restores the body, so composite
  routing and handlers parse the bytes that were checked.

Refs: GHSA-p3r4-jcm3-2hph
(cherry picked from commit ce86c1b)
A re-audit of ce86c1b found, and running code confirmed:

- scanJSONString re-scanned to the closing quote after every escape, so
  scanning was quadratic in escapes (200k "\n": 0.56 s; a 10 MB code-like
  body: 24 s). It now visits each quote once and counts the backslashes
  before it: 6 us and 0.7 ms for the same bodies.
- A multipart body with a JSON preamble (RFC 2046; skipped by Go's
  multipart reader) took the JSON branch only, bypassing both the group
  allowlist and the multipart duplicate check. A multipart Content-Type
  now always runs the multipart check, FromBodyCandidates merges JSON and
  multipart candidates, and a body that is both JSON and a form with parts
  is rejected as ambiguous. The JSON scan stops after the first top-level
  value, matching gjson, so binary file parts are never tokenised.
- LooksLikeJSON now skips every byte <= 0x20 before the first value, as
  gjson does.
- Freeform key spaces gained variables, headers, dependentRequired,
  dependencies and labels, matched on the decoded name. metadata is no
  longer freeform: Antigravity binds metadata.user_id case-insensitively
  while sticky sessions read it with gjson.
- Multipart also rejects file parts named model/session, parts without a
  parsable name, and parts carrying two Content-Disposition headers, and
  counts file and text parts with the same name together.
- WebSocket: passthrough forwards session.update and every other client
  event verbatim, and dedicated parsing reads fields from the raw frame
  before any re-encode. Both now reject a frame with repeated fields
  before reading it.
- The linear-compare limit rises to 32 to cut map churn for mid-sized
  objects.

Tests that relied on duplicates passing now assert rejection: a dedicated
WS recovery test that sent two previous_response_id keys, and WS
allowlist cases whose close reason comes from the earlier duplicate check.

Refs: GHSA-p3r4-jcm3-2hph
(cherry picked from commit 263a13f)
…name

Go's mime parser prefers name*= over name=, so a part declared as
name="model"; name*=UTF-8''prompt is read as prompt by the gateway (no
model candidate reaches the group allowlist) but as model by an upstream
that ignores extended parameters. Reject parts whose Content-Disposition
carries name*, name*0 or name*0*. filename* stays allowed: it is the
standard way to send a non-ASCII file name.

Refs: GHSA-p3r4-jcm3-2hph
(cherry picked from commit 88d5a20)
Build the conflict path by appending to a byte slice instead of ignoring
strings.Builder write results, and discard builder results explicitly in
tests. golangci-lint v2.14.0 (CI version) reports 0 issues.

Refs: GHSA-p3r4-jcm3-2hph
(cherry picked from commit a436766)
@ranxi2001

Copy link
Copy Markdown
Owner Author

四小时维护完成有界intake,固定7902a81afacfd9abb7c24f387aaed7e268072ae2:当前不具备merge门槛,未作整版source-clear。

  • 已核110来源=65普通+45merge,65均有唯一完整cherry-pick trailer,独有merge有显式来源;44merge的跳过/等价依据及功能逐项适配仍需可审计清单。正文链接docs/upstream-v0.2.24-import.md在当前head不存在,不能说清单已交付。
  • 正文两张model-id raw图片均404,历史引用提交及当前tree也无相应PNG;不是要求删除不存在的文件。请上传真实渲染前后截图原生附件,并补Exa/Claude窗口估算/其他实际UI变化、双语与新公告完整生命周期证据。按当前CONTRIBUTING,不把对比PNG补进源码。
  • 已读失败原日志:grok-persistence(backoff_red) job136614699779/run44830722838在历史overlay编译account_repo_temp_unsched_test.go时缺UpdateOpenAIOAuthCredentialsIfUnchanged。未进入业务断言,不能当预期RED;请唯一writer修RED-only fixture兼容而保留所有GREEN和oracle。另有检查排队/执行,不能说CI全绿。
  • 模板仍缺可复现验收、协议/默认值/数据与回滚边界等实质字段;完整source-review与live production整合门独立待完成。父维护任务保留source/CI/UI/merge验收责任,不涉及发版部署/生产付费。

请当前原PR唯一writer接修ACK并说明接管/冻结状态;维护任务当前只读,本轮未对此分支启动竞争writer或push。Agent:Hermes父级及有界只读子审,gpt-6.1-sol,推理强度未知;来源统计不等同功能验收。

@ranxi2001
ranxi2001 merged commit 253dc05 into production Nov 21, 2026
192 checks passed
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.