Skip to content

chore: sync upstream pingdotgg/t3code main (8866e8f) — 取代 #26 - #27

Merged
Hylouis233 merged 507 commits into
mainfrom
chore/upstream-sync-20261020
Oct 20, 2026
Merged

Hylouis233 merged 507 commits into
mainfrom
chore/upstream-sync-20261020

Conversation

@Hylouis233

@Hylouis233 Hylouis233 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

上游同步:把 pingdotgg/t3code main 8866e8fdcf(fetch 时最新)合进 fork main 9c9938b033。用 merge,不 rebase,取代 #26(#26 基于 4af66184ef,且与 fork main 冲突)。

冲突

文件 冲突 解法
.github/workflows/ci.yml Release Smoke 的 checkout:fork 手动 git init + sparse fetch,上游改成 actions/checkout@v6 + sparse-checkout 保留 fork 的 checkout(跟 ci.yml 其他 job 一致);排除 .repos/ 和 Vendor *.a 的 sparse 规则两边相同
apps/server/src/orchestration-v2/ProjectionStore.ts(2 处) ① 恢复投影的 runtime request 查询:fork 加了 hasOpenRuntimeRequestArtifacts(已关闭但 artifact 还没收尾的 request),上游只改了缩进;② 内存层:fork 新增 getRuntimeRequestById/ByNodeId/getNodeById/getTurnItemById,上游把相邻方法改成 Effect.fn ① 用 fork 的 SQL、上游的缩进;② 保留 fork 的 4 个方法,相邻方法用上游的 Effect.fn 写法
apps/server/src/orchestration-v2/ProviderEventIngestor.ts ingestNormalized:fork 整段重写(runtime lifetime 校验、request group 原子写、artifact 身份保护),上游只把 Effect.gen 包成 Effect.fnUntraced(加 span 注释),逻辑没改 用 fork 实现;后续提交里按上游改成 Effect.fnUntraced
apps/server/src/orchestration-v2/ProviderSessionManager.ts(11 处) fork 的 runtime lifetime 改造(withSessionWrite/withLifetimeWrite、ReleaseJob 重试、按 runtime 判定 idle/unload、owned request group)对上上游 pingdotgg#21995 的 Effect.fn tracing 重构;上游 pingdotgg#19195(Muse 主机在两次 turn 之间死掉后重新拉起)是自动合并进来的 所有冲突段用 fork 逻辑;上游 tracing 改写只在 fork 没动过的函数里保留(failSubscribers、interruptSubscribers、endSubscribers、readReleasedBackgroundTasks、closeScopeWithin、makeEventSubscription、persistProviderSessionUpdate、get、closeInstance、detach);自动合并把函数头和函数尾拼错的 8 处改回一致;detach 用上游结构,但保留 fork 的 scheduleIdleRelease(…, runtime) 参数;pingdotgg#19195 的代码保留
apps/server/src/orchestration-v2/RunExecutionService.ts 上游大改(+882/−759);fork 只有 3 处改动:session: ManagedProviderSessionRuntime、ingestNormalized 传 runtimeLifetime、discardBufferedRequests ensuring 用上游文件,把 fork 这 3 处重新加上
apps/server/src/orchestration-v2/RunExecutionService.test.ts(2 处) MCP 凭证保活测试:上游改用 captureRootRunTermination 辅助函数,fork 在内联 fixture 里加了 runtimeLifetime;ingestor mock:fork 加了 lifetime 方法,上游加了 input.ingestNormalized ① 用上游写法(辅助函数里已经有 runtimeLifetime);② 两边都留:...unusedLifetimeMethods、discardBufferedRequests、input.ingestNormalized ?? …
apps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.test.ts import 列表:fork 加了 OrchestrationV2ThreadProjectionJson、ProviderInstanceId,上游加了 ComposerContextId、OrchestrationMessageContext 两边都留
apps/server/src/vcs/GitVcsDriverCore.test.ts 模块级 decoder:fork 加了 decodeReviewDiffPreviewInput,上游加了 decodeVcsRef、decodeVcsListRefsResult 两边都留
packages/provider-muse/src/server/adapter.ts 审批发出:fork(#22)把顺序改成 node→turn_item→runtime_request;上游改成 showRequest() + shown 字段,full-access 子 workflow 自动批准失败后再显示 用上游结构;上游的 showRequest 仍然先发 request,这个问题上游没修,所以 showRequest 里保留 #22 的顺序(artifact 先、request 后)

没报冲突、但自动合并后需要修的地方

文件 问题 解法
release.yml(resolve_commit)、mobile-android-apk.yml、mobile-eas-production.yml、publish-aur.yml 上游也加了 if: github.repository == 'pingdotgg/t3code',跟 fork 已有的守卫叠成同一个 job 下两个 if:(YAML 键重复) 删掉重复的那行,守卫条件不变
apps/web/src/components/chat/WorkflowOpeningBlock.browser.test.tsx fork #24(渲染前先 await getSyntaxHighlighterPromise)和上游 79b1483(渲染后用 act await 同一个 promise;文件里已经 mock 了 highlighter)都加了同一个 import,合并后 import 重复 上游已经用另一种方式修了这个问题,所以用上游版本,去掉 fork 的预加载
apps/server/src/orchestration-v2/ProviderEventIngestor.test.ts 上游新增的测试直接调原始 ingestor,fork 下会报 Unknown provider runtime lifetime 改用 testIngestor(ac9d5448e1)
6 个 server 文件 上游新 lint 规则 prefer-effect-fn 报了 29 个 error 改成 Effect.fn/Effect.fnUntraced(52274d410f)
apps/server/src/provider/providerMaintenanceRunner.test.ts 测试夹具适配上游 pingdotgg#14319、pingdotgg#18561:上游 pingdotgg#14319 把更新后重读改成走 refreshAfterUpdate,fork 的 V2 policy 用例还在 stub refreshInstance;上游 pingdotgg#18561 新增的 targeted/unknown/legacy 三条夹具 policy 没带 protocol tag,被 fork 忽略 stub 改成 refreshAfterUpdate;夹具补 orchestrationProtocolVersion: 2(6705c6aac7),运行时代码不变

保留的 fork 内容

验证

已跑:

  • pnpm install --frozen-lockfile(pnpm 11.10.0,Node 24):通过
  • 无冲突标记;改过的 TS 文件语法解析通过;没有重复的 import 或顶层声明(重复 import 检查只覆盖两边都改过的 35 个 TS 文件);.github 下所有 YAML 没有重复键
  • vp test run src/orchestration-v2 src/provider/Drivers/ExternalAcpDriver.test.ts(apps/server,在最终的 Effect.fn 提交上跑):111 个文件通过、4 个跳过;2590 个测试通过、14 个跳过、0 失败。跳过的测试 fork main 上本来就有,这次合并没有新增 skip
  • 第一轮(Effect.fn 改写之前)同一目录里 http.test.ts 的 worker 被 SIGKILL(机器内存不够);单独重跑 1/1 通过
  • packages/provider-muse adapter 测试:42/42 通过;provider-muse typecheck(tsc-rs):通过
  • fork 维护脚本测试 node --test .github/scripts/opent3code-*.test.cjs:105/105 通过
  • vp lint(fork 相对上游改过的 61 个 TS 文件):0 error,剩下的 warning 在 fork main 或上游原本就有
  • vp fmt --check(相对 fork main 改过的全部 1363 个文件):通过

未验证:

  • WorkflowOpeningBlock.browser.test.tsx(浏览器测试):跑了约 7 分钟后进程被杀(exit 137,机器内存不够),没有结果
  • server/web 全量 typecheck:没跑(这台机器上会 OOM)。Effect.fn 改写和 RunExecutionService 的类型(ManagedProviderSessionRuntime)要等 CI 的 typecheck
  • web、mobile、desktop 测试,以及 server 中 orchestration-v2 以外的测试:没跑
  • knip:没跑

Yash-Singh1 and others added 30 commits October 19, 2026 22:41
…otgg#22088)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
…on (pingdotgg#19483)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#19923)

Co-authored-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…s under the nav bar (pingdotgg#19980)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#19145)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…9791)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#19733)

Co-authored-by: Cestercian <183791452+cestercian@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…9550)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#19745)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ngdotgg#19590)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…stale (pingdotgg#20388)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
… deleting it (pingdotgg#18786)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…nt (pingdotgg#15995)

Co-authored-by: AskPlays <adrian.skalevag@online.no>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ot (pingdotgg#18885)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
maria-rcks and others added 19 commits October 20, 2026 05:36
…ovals (pingdotgg#15464)

Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#18322)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…odel (pingdotgg#20413)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…22152)

Co-authored-by: Julius Marminge <julius@marminge.se>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…st comments (pingdotgg#20894)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…pingdotgg#15036)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#19796)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#20886)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#18392)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#14859)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…any resize (pingdotgg#22154)

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

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…9646)

Co-authored-by: GPT-6.1-Sol at high effort <noreply@openai.com>
Co-authored-by: Claude Opus 5.5, independent investigation and sanity review <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…fetime

The upstream test calls ingestNormalized on the raw ingestor. On the fork every ingest needs an active runtime lifetime, so it uses the testIngestor helper like the surrounding tests.
Upstream's prefer-effect-fn lint rule now rejects arrow functions that return Effect.gen. Convert the fork-only helpers (runtime lifetime release, request lookups, external ACP adapter and driver) to Effect.fn; per-event ingest and publish paths use Effect.fnUntraced as upstream does.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 06:50

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 vouch:trusted Author has write access or is explicitly trusted by OpenT3Code. size:XXL 1,000+ effective changed lines. 📱 Native Change Native fingerprint changed; a new native build is required for compatible OTA updates. labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 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 −7 B (−0.1%) 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 −7 B (−0.6%) 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: 9c9938b · PR result: 6705c6a · 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.

…scoping

Upstream now refreshes providers after an update through refreshAfterUpdate,
so the fork-only OpenCode 2 untagged-policy test must stub that hook instead
of refreshInstance to observe the installed version.

The fork scopes OpenCode compatibility policies to the orchestration protocol
version, so untagged policies are ignored and the bundled one wins. Tag the
policy in the upstream targeted-update fixture so it is selected, matching the
default test manifest.
@Hylouis233
Hylouis233 merged commit ca256ef into main Oct 20, 2026
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.