Repository navigation
test: guard fork-only orchestrationProtocolVersion tags in bundled model manifest - #28
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
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.
关联 #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)
providerCompatibility.test.ts整个文件:19/19 passed。providerCompatibility+providerMaintenanceRunner44/44 通过。vp fmt --check(测试文件 + 文档)和vp lint(测试文件)均通过。未验