Repository navigation
Conversation
|
CI investigation: the only failing check is backend-security, reporting GO-2026-6859 in net/http@go1.27.3 (fixed in Go 1.27.4). The functional test and golangci-lint checks passed. This is the same existing toolchain issue affecting #8735 and other PRs, not a failure of the standalone-context change. It is already addressed by #8670, whose backend-security and other CI checks have passed. Keeping the context fix scoped: no duplicate toolchain upgrade or unrelated code changes are added here. Once #8670 lands, this branch can be updated and the security scan rerun. |
- Claude 链路:令牌轮换后 401 同账号重试,per-turn beta 保留轮次输出配置,Stainless 版本头与抬升后的 UA 对齐(Wei-Shaw#8737 Wei-Shaw#8742 Wei-Shaw#8731 Wei-Shaw#8726 Wei-Shaw#8724 Wei-Shaw#8698)。 - Codex/OpenAI 链路:Desktop 独立上下文原样转发并删除 fork 的 bootstrap 扫描器,分叉会话沿用父会话缓存键,刷新后的令牌在补充信息超时时仍保存(Wei-Shaw#8680 Wei-Shaw#8664 Wei-Shaw#8671 Wei-Shaw#8735 Wei-Shaw#8682 Wei-Shaw#8703)。 - 构建:Go 升到 1.27.4 修复 GO-2026-6859(Wei-Shaw#8670);前端 Gemini 用量条刷新不再跳动(Wei-Shaw#8740)。 - fork 带的 Wei-Shaw#8034 测试改为断言轮换后的凭据被保存,并为测试桩补齐 CAS 方法。 - 后端全量 unit、golangci-lint、前端 lint/typecheck/账号组件测试通过;repository 集成测试未跑。
|
感谢贡献!本 PR 与已合并的 #8769 方向相反:#8769 延续了 #8622 的做法,把 Codex 独立上下文归一化为 user 文本;本 PR 删除了这套归一化,改为原样转发。两者只能二选一,维护者选择了 #8769。 审计中还发现一个回归:归一化位于 handler 入口,对所有 OpenAI 平台账号生效。删除后,upstream_protocol=anthropic 的账号会在 如果 #8769 白名单里还缺 Thanks! This conflicts by design with the merged #8769 (normalize-to-user-text, as in #8622), so we're closing it. Removing the normalization also regresses OpenAI accounts on Anthropic/Chat protocol conversion: standalone context gets dropped there, or becomes a tool message without |
- 撤销 Wei-Shaw#8680 后 agent 的 proposed_plan、untrusted_content,guardian 的三类输入与 cloud_threads/send_message 委派信封会在本地被拒(400) - 归一化扩展到这三个命名空间:agent 与 guardian 包成 external 标签,云端委派信封原文作为 user 文本,与 codex_app 委派一致 - 预检标记同步补充,新增覆盖补回名字与不合规输入的单测 测试:handler 包 Codex 上下文相关单测与 golangci-lint 通过
- 带入上游 11-16 已合的 55 个 PR,同步基准更新为 9cd1a1e;用量汇总改为非阻塞建表(Wei-Shaw#8693),被动用量换窗清理与 Fable 限额恢复采用上游实现(Wei-Shaw#8723 Wei-Shaw#8779)。 - Codex 独立上下文改用上游 Wei-Shaw#8769 的 user 文本归一化,撤回 fork 的 Wei-Shaw#8680 并补回 proposed_plan、guardian、cloud_threads 等类型;Gemini 思考等级改用 Wei-Shaw#8673,撤回 fork 的 Wei-Shaw#8619。 - 合入 24 个开放 PR,Wei-Shaw#8781 与 Wei-Shaw#8705 部分合入;Wei-Shaw#8856、Wei-Shaw#8858 与已有实现重复,未合入。 - 修复转义的 1h TTL 被快速路径漏判,并按 fork 的构造参数与模型目录调整上游测试。 - 后端全量 unit、golangci-lint、前端 vitest、迁移空库回放与 CI 集成测试通过;go.sum 未整理。
Codex injects browser state, page snapshots and other context as named
function_call_outputitems without a model-issuedcall_id. HTTP Responses rejects these legitimate inputs, while recognized page snapshots are rewritten as user messages. The Codex OAuth upstream accepts the original items, so preserve their native representation.Exclude recognized context only from call/result association checks using a separate validation copy. Forward the original items with their type, ID, name, namespace, output and ordering intact. Remove the page, automation and delegation conversions to user messages, including when these inputs are mixed together. Preserve namespaces in the API-key path and prevent the OAuth transform from synthesizing a
call_idfrom a standalone item'sid, which would cause orphan-result cleanup to drop the context.The allowlist retains page-snapshot checks, adds the complete ambient browser-state envelope, and covers these producers in openai/codex at e58bf8f5233b:
agent.goal_objective:ext/goal/src/steering.rs.agent.proposed_plan:core/src/session/approved_plan.rs.agent.untrusted_content: fallback name incontext-fragments/src/additional_context.rs.guardian.guardian_housekeeper_input,guardian.guardian_channel_selection_input,guardian.guardian_original_evidence:ext/guardian-v3/src/sampling.rsanddelivery.rs.cloud_threads.send_message: delegation delivery recognized incore/src/agent/control/sender_context.rs, including optionalsource_orbit_id.codex_app.automation_updatebootstrap/heartbeat envelopes andcodex_app/codex_tuicreate_thread/send_message_to_threadenvelopes now use the same native path. Their existing envelope validation remains; explicit empty/whitespace call IDs are not treated as missing IDs.Matching requires the exact namespace/name, a missing
call_id, and the expected text/JSON/envelope shape. Explicit call IDs, malformed entries and unknown names retain normal validation. Dynamic names supplied through Codex additional context are not wildcard-allowlisted.Regression coverage verifies non-mutating validation, history, mixed bootstrap inputs, multipart snapshots, CRLF, malformed and unrelated outputs, plus captured OAuth/API-key outbound requests and WebSocket compatibility processing.
Validation:
go test -tags=unit ./internal/handler ./internal/service -count=1 -timeout=300son this PR branch: handler passes; service has one failure in the unchangedTestOllamaProbeCallback_StaleLongDoesNotOverrideNewShorton Windows. The failure also reproduces when that test runs alone with-count=20(the twotime.Now().Add(5*time.Second)cooldown generations can compare equal). No Ollama code or tests are changed here.golangci-lint run --new-from-rev=upstream/main --timeout=5m ./internal/handler/... ./internal/service/...: 0 issues.GO-2026-6859in its Go 1.27.3 standard library, fixed in Go 1.27.4. This PR does not change the toolchain or dependencies.Follow-up to #8622. Refs #8609, #8635.