Skip to content

test: guard fork-only orchestrationProtocolVersion tags in bundled model manifest - #28

Merged
Hylouis233 merged 2 commits into
mainfrom
test/manifest-protocol-tag-guard
Oct 20, 2026
Merged

Hylouis233 merged 2 commits into
mainfrom
test/manifest-protocol-tag-guard

Conversation

@Hylouis233

@Hylouis233 Hylouis233 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

关联 #27

原因

  • orchestrationProtocolVersion 是 fork 独有的字段。fork 对 OpenCode/Pi 的兼容性策略按当前编排协议版本(ORCHESTRATION_PROTOCOL_VERSION,当前为 2)选择;不带该标签的上游策略会被刻意忽略,见 apps/server/src/provider/providerCompatibility.ts:66-71。
  • 上游 pingdotgg/t3code 的 apps/server/src/provider/model-manifest.json(以及运行时拉取的远程 manifest)都没有这个标签。
  • 如果某次上游同步在冲突处理时直接采用上游的 model-manifest.json,这些标签会被悄悄删掉:远程和内置 manifest 都不再有匹配的条目,OpenCode/Pi 将失去任何兼容性策略(无版本告警、无推荐版本),且不会有测试失败。

改动

  • apps/server/src/provider/providerCompatibility.test.ts:新增测试 keeps fork-only protocol tags on bundled OpenCode and Pi policies,读取真实的内置 manifest(ModelManifest.BUNDLED_MODEL_MANIFEST),断言 OpenCode 和 Pi 的带标签条目恰好是 opencode/1(V1)、opencode/2(V2)、pi/2 这三对(第二个提交 d4a46f4 按 Codex P2 补上 V1 显式断言);以后同步给 OpenCode/Pi 新增条目时此测试会故意失败,需补标签并更新期望列表;失败信息说明原因与修复方式。
  • docs/operations/opent3code.md:在上游同步冲突处理部分补充一行,解决 model-manifest.json 冲突时不要整份采用上游版本,需保留 fork 独有的标签(OpenCode V1 = 1、OpenCode V2 = 2、Pi = 2)。
  • 无运行时代码改动。

验证(本地,Node 24 + 仓库内 vp)

  • 新测试单独运行:1 passed。
  • providerCompatibility.test.ts 整个文件:19/19 passed。
  • 反向验证(临时修改,未提交):去掉 Pi 的标签后新测试失败(1 failed);去掉 OpenCode 的标签后新测试同样失败(1 failed);两次都给出预期的失败信息。之后 manifest 已还原。
  • 反向验证 V1:临时删掉 OpenCode V1 标签后测试失败(gh-check 复验);providerCompatibility + providerMaintenanceRunner 44/44 通过。
  • vp fmt --check(测试文件 + 文档)和 vp lint(测试文件)均通过。

未验

  • 未跑 apps/server 全量测试,只跑了改动的测试文件。
  • CI 结果待 PR 创建后确认。

The fork scopes OpenCode and Pi compatibility policies to the orchestration
protocol version and ignores untagged upstream policies. Upstream's
model-manifest.json has no orchestrationProtocolVersion, so taking it during
a sync would silently leave both drivers without any policy. Assert the
bundled manifest keeps a current-protocol entry for each, and note the rule
in the sync runbook.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 10:28

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 the size:XS 0-9 effective changed lines. label Oct 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:06:22.278338Z d4a46f4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the vouch:trusted Author has write access or is explicitly trusted by OpenT3Code. label Oct 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98926d95d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@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 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: ca256ef · PR result: d4a46f4 · 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.

…fest

The guard only checked for a current-protocol entry per driver, so dropping
the OpenCode V1 tag would pass unnoticed. Assert the exact generation
mapping instead: OpenCode V1 = 1, OpenCode V2 and Pi = the current protocol.
@Hylouis233
Hylouis233 merged commit 9ecaccf into main Oct 20, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 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.

2 participants