Skip to content

chore: 同步上游 pingdotgg/t3code main 至 b5a226e49c - #33

Merged
Hylouis233 merged 70 commits into
mainfrom
chore/upstream-sync-20261022b
Oct 22, 2026
Merged

Hylouis233 merged 70 commits into
mainfrom
chore/upstream-sync-20261022b

Conversation

@Hylouis233

@Hylouis233 Hylouis233 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

建议标题: chore: 同步上游 pingdotgg/t3code main 至 b5a226e

概要

使用 git merge(不 rebase)把上游 pingdotgg/t3code main 合并进 fork main。

为什么要合并第二次

上游 70e5e384da 本身就是坏的:apps/web/src/components/chat/useChatShortcuts.browser.test.tsx:53 还在给 useChatShortcuts 传 typeIntoComposer,但这个字段已经不在 ChatShortcutsInput 里了。所以 web typecheck 报 2 个 TS 错误(TS2353、TS7006),这个浏览器测试也失败。上游自己的 CI 在 70e5e384da 上也是红的。

上游在 bd6940beab(test(web): chat shortcut test types through the composer handle, pingdotgg#23126)修好了这个问题。第二次合并把上游 main 推进到 b5a226e49c,它包含这个修复,上游 CI 是绿的。fork 没有手改上游代码。合并后这个测试文件和 bd6940beab 的版本逐字节一致(sha256 1b73f1bc…cdbc)。

第二次合并带进来的另外两个上游提交:

  • a12d6ed942(Merge commit from fork,安全修复):Windows 网络路径(\\host\share、//host、file://host/...)只能在线程所属项目内解析。这样 markdown 图片、文件链接 chip 和 storage cleanup 都不会再去碰攻击者的 SMB 主机,也就不会泄露 NetNTLMv2。涉及 server AssetAccess / WorkspaceFileSystem / storageCleanup / ws,client-runtime markdownImages,shared markdownLinks / path,web useFileMetadata,mobile markdownMedia
  • b5a226e49c(fix(source-control): merge messages drop Claude Code's current claude.com footer pingdotgg/t3code#23133):生成合并提交信息时,去掉 Claude Code 现在使用的 claude.com 页脚

本批上游的主要改动:

  • web:ChatView / composer 大规模拆分重构(useComposerSend、useComposerSelection、useTimelineRewind、ChatBannerLane 等)
  • claude:idle compaction 支持全局默认值与实例级覆盖;完全访问模式下审批会说明 Claude 询问的原因
  • desktop:改用 Clerk 上游修复处理被放弃的浏览器登录(删除 clerkOAuthCancel 和 @clerk__electron@0.1.1.patch,Clerk 依赖升级)
  • server / shared / opencode / pi / cursor / tailscale 的一批 bug 修复(PR 草稿状态同步、JetBrains 列跳转、Azure DevOps 仓库名含空格、opencode 已取消的 todo 等)

冲突

两次合并都没有文本冲突。 第二次合并(70e5e384da..b5a226e49c)改动的 18 个文件 fork 都没改过,合并后与上游 b5a226e49c 完全一致。

第一次合并中,双方都改过的 6 个文件都由 git 自动合并,我逐个检查过,fork 的行为都保留了:

文件 fork 侧改动 上游侧改动 结果
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts 审批产物先于 runtime request 发出(turn_item → runtime_request 的顺序) 新增 claudeApprovalPresentation,接入 ServerSettings / idle compaction 两者都保留,改动位置不重叠
packages/provider-opencode/src/server/adapter.ts 同样调整了审批 emit 的顺序 丢弃已取消的 todo 两者都保留
packages/contracts/src/settings.ts MCode / Dsh 的 external ACP 设置,加入默认禁用列表 Claude idle compaction 设置 两者都保留
packages/contracts/src/orchestrationV2.ts externalAcpResume 元数据 上游的新字段 两者都保留
apps/server/src/provider/providerMaintenanceRunner.test.ts fork 策略作用域相关测试 上游失败原因相关测试 两者都保留,测试通过
apps/server/src/vcs/GitVcsDriverCore.test.ts fork 测试调整 推送被拒时给出原因的测试 两者都保留,测试通过

不需要额外的修复提交。

删除文件检查

第二次合并没有删除任何文件:git diff --diff-filter=D 70d5df78d9 HEAD 为空。

git diff --diff-filter=D origin/main HEAD 共列出 4 个删除,都是上游删除的(由上游 pingdotgg#22903 添加、上游 pingdotgg#23038 删除),fork 自上次同步以来没有改过它们,也没有 fork 独有文件被删:

  • apps/desktop/src/clerkOAuthCancel.ts
  • apps/desktop/src/clerkOAuthCancel.test.ts
  • apps/web/src/components/clerk/ClerkOAuthPendingBar.tsx
  • patches/@clerk__electron@0.1.1.patch(pnpm-workspace.yaml 的 patchedDependencies 也同步移除了,没有残留引用)

.github/workflows/cursor-hygiene-webhook.yml 仍然是删除状态(与 d8e659a 保持一致)。
model-manifest.json 本次没有变化,opencode/1=1、opencode/2=2、pi/2=2 都保留,由 providerCompatibility 守护测试验证。

测试

第二次合并后(HEAD e78909bd4a,Node v24.22.0)

测试 结果
vp install --frozen-lockfile(模拟 CI 的安装步骤) ✅ lockfile 一致,已装上 Clerk 升级后的版本(clerk-js 6.40.0、react 6.18.0 等),工作区没有变化
apps/web typecheck(vp run typecheck → tsc-rs --noEmit) ✅ 0 个错误(CI 在 70d5df7 上有 2 个错误)
web 浏览器测试 useChatShortcuts.browser.test.tsx(headless chromium) ✅ 2/2(CI 在 70d5df7 上失败 1 个)
node --test .github/scripts/opent3code-*.test.cjs ✅ 105/105
server providerCompatibility.test.ts + ModelManifest.test.ts + providerMaintenanceRunner ✅ 38/38
server AssetAccess / storageCleanup / WorkspaceFileSystem(第二次合并的上游改动) ✅ 164/164
client-runtime markdownImages + mediaSource ✅ 20/20
shared markdownLinks ✅ 34/34
source-control-core mergeMessage ✅ 11/11
mobile markdownMedia ✅ 12/12

第一次合并后(HEAD 70d5df78d9)

测试 结果
node --test .github/scripts/opent3code-*.test.cjs ✅ 105/105
node --test .github/scripts/*.test.cjs ✅ 152/152
python3 .github/scripts/stage-preview-bundle.test.py ✅ 6/6
opent3code-source-integrity.cjs --placeholder-only origin/main HEAD ✅ 通过
server providerMaintenanceRunner ✅ 19/19
server providerCompatibility.test.ts + ModelManifest.test.ts ✅ 19/19
server ClaudeAdapterV2.test.ts + GitVcsDriverCore.test.ts(双方都改过) ✅ 368/368
provider-opencode adapter.test.ts(双方都改过) ✅ 31/31
contracts settings.test.ts + orchestrationV2.test.ts(双方都改过) ✅ 35/35
server 中上游改过的其他单测(13 个文件) ✅ 402 通过,2 跳过
web 中上游改过的非浏览器单测(6 个文件) ✅ 397/397
client-runtime / provider-core / provider-cursor / provider-pi / shared / tailscale 中上游改过的单测 ✅ 58 / 52 / 2 / 24 / 118 / 7
scripts mobile-native-static-check.test.ts ✅ 2/2

未验证

  • server typecheck(受限于本地机器内存,没有运行;交给 CI)
  • 其他 typecheck(只在本地跑了 apps/web)
  • 除 useChatShortcuts 以外的 web 浏览器测试(*.browser.test.tsx,包括 UsageToggleShortcut、MessagesTimeline、ThreadDetailsPrRow、PullRequestCodeTab、SidebarProviderUpdatePill、AssistantCitationChip)
  • apps/web/src/hooks/useFileMetadata.ts(安全修复)没有单测,只经过 typecheck
  • apps/mobile/src/reactCompilerCoverage.test.ts,以及 desktop / mobile 的构建
  • Windows 上真实的 UNC / SMB 行为(只在 Linux 上跑了单测)
  • 没有做端到端或手动 UI 验证

wobsoriano and others added 30 commits October 21, 2026 12:13
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…verrides (pingdotgg#23037)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tton (pingdotgg#23040)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… own files (pingdotgg#23042)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…23046)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ort (pingdotgg#23048)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ake (pingdotgg#23049)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…olsBar (pingdotgg#23058)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gg#23062)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ions (pingdotgg#23063)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tions (pingdotgg#23064)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n useThreadLifecycle (pingdotgg#23065)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ineRewind (pingdotgg#23066)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…chmentPreviewHandoff (pingdotgg#23067)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…neBanner (pingdotgg#23068)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…useComposerSelection (pingdotgg#23069)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…stDraftThread (pingdotgg#23070)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ChatView.logic (pingdotgg#23071)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…line overlays move out (pingdotgg#23072)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…the server (pingdotgg#22897)

Co-authored-by: MarMarLabs <marmar9615@icloud.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…otgg#21822)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…g#22913)

Co-authored-by: flamboh <oliver.boorstein@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…sign in over (pingdotgg#22377)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
… internal error (pingdotgg#22895)

Co-authored-by: ScottN-PV <snorteman@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ll (pingdotgg#22900)

Co-authored-by: fixfon <12512757+fixfon@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MarcoDotIO and others added 17 commits October 21, 2026 15:08
…again (pingdotgg#22937)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ailure (pingdotgg#22904)

Co-authored-by: fixfon <12512757+fixfon@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gg#21519)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… Usage (pingdotgg#22905)

Co-authored-by: Victor Vogel <satsdev@only21mil.xyz>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…typing into the composer (pingdotgg#22898)

Co-authored-by: fixfon <12512757+fixfon@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gdotgg#22188)

Co-authored-by: macodev00 <macodev00@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:38
@github-actions github-actions Bot added the vouch:trusted Author has write access or is explicitly trusted by OpenT3Code. label Oct 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added size:XXL 1,000+ effective changed lines. 📱 Native Change Native fingerprint changed; a new native build is required for compatible OTA updates. labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 57e67ed · PR result: e78909b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

juliusmarminge and others added 4 commits October 21, 2026 15:47
A markdown image such as ![x](file://attacker.test/share/cat.jpg), or a raw
\\host\share path, was classified as a host file. Rendering it asked the
server for a signed asset URL, and the server's realpath on the resulting UNC
path made Windows open an SMB session and send the user's NetNTLMv2 response
to the attacker's host, with no click and no tool call. File-link chips did
the same through filesystem.getMetadata, which stats every absolute path, and
storage cleanup stats the store paths in a worktree's pnpm manifest, which an
agent can write.

Network paths (two leading separators, as Windows reads them: \\h, //h, /\h)
now only resolve inside the thread's project, so projects on a share keep
working:

- clients block them in markdown images and stop treating them as file links
- the web stops asking for their metadata
- the server refuses them for media assets and file reads outside the
  project, never stats one for metadata, and storage cleanup ignores a pnpm
  manifest that names one
- each check hands the filesystem the resolved path it approved, since
  Windows reads a `\\?\` path as written, `..` included

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
….com footer (pingdotgg#23133)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Hylouis233 Hylouis233 changed the title chore: 同步上游 pingdotgg/t3code main 至 70e5e384da chore: 同步上游 pingdotgg/t3code main 至 b5a226e49c Oct 21, 2026
@Hylouis233
Hylouis233 merged commit 6451ae5 into main Oct 22, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Native fingerprint changed; a new native build is required for compatible OTA updates. size:XXL 1,000+ effective changed lines. vouch:trusted Author has write access or is explicitly trusted by OpenT3Code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.