Skip to content

test: pin the ACP and claude-haiku-5-5 beta combination in the gateway - #138

Merged
EricWvi merged 1 commit into
ora-space:mainfrom
ObsisMc:test/370-gateway-acp-beta-pin
Oct 22, 2026
Merged

EricWvi merged 1 commit into
ora-space:mainfrom
ObsisMc:test/370-gateway-acp-beta-pin

Conversation

@ObsisMc

@ObsisMc ObsisMc commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to the review of #115 and #132. No production behavior change.

  • Pin the documented ACP + claude-haiku-5-5 combination. docs/models/model-gateway.md says the pinned Claude Code 2.1.303, started through Agent SDK 0.3.303 / ACP adapter 0.94.0, declares the direct run's betas plus structured-outputs-2025-12-15 and thinking-display-updates-2026-08-18. Existing tests covered each half separately (TestPinnedCLIClaudeModelBetas and TestPinnedClaudeAgentSDKCapabilities), never the 10-item union. TestPinnedClaudeACPHaikuBetaCombination forwards it over ?beta=true and asserts it arrives unchanged. The direct-run header is hoisted into pinnedClaudeHaikuBetas so both tests share one definition.
  • Record the SDK and adapter in anthropic.go's observation note, and say that an SDK or adapter upgrade must also exercise its requests.

The new test's header is composed from the two captured sets, not captured end to end, so it pins that the gateway accepts and forwards the union, not the client's header order. The test comment says so.

ADR

Not related to any ADR status change.

Evidence

  • GOMAXPROCS=2 go test -count=1 -p 1 ./internal/modelgateway/ passes; go vet and gofmt are clean.
  • Removing per-turn-control-2026-07-01 from claudeBetaHeaders makes the new test fail with status=400 calls=0.

Refs ora-space/circus#370

The docs describe the pinned CLI, started through Agent SDK 0.3.303 and ACP
adapter 0.94.0, declaring the direct run's betas plus the SDK's two additions.
No test covered that union, only each half. Also record the SDK and adapter in
the allowlist's observation note.

@wanglongan587 wanglongan587 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查版本:head 1214b13757528c4f16127b9a5d9040ed3d53f78b(base 6a5c6710,即当前 upstream/main)。结论:Approve,无阻塞发现。

改动范围

只有两个文件,没有生产行为变化:

  • internal/modelgateway/anthropic.go:观测来源注释补上 Agent SDK 0.3.303 / ACP adapter 0.94.0。
  • internal/modelgateway/anthropic_test.go:把直连 Claude 的 8 项头提为 pinnedClaudeHaikuBetas,新增 TestPinnedClaudeACPHaikuBetaCombination,钉住文档描述的 ACP + claude-haiku-5-5 组合(8 + 2 = 10 项)。

核对

  • 与 docs/models/model-gateway.md:51-58 一致:ACP 查询追加 structured-outputs-2025-12-15、thinking-display-updates-2026-08-18,claude-haiku-5-5 首个请求带 per-turn-control-2026-07-01。新用例把这 10 项发到 /runtime/anthropic/v1/messages?beta=true,断言上游收到的 Anthropic-Beta 和 query 原样不变。
  • 原 TestPinnedCLIClaudeModelBetas/claude 的字符串换成同一个常量,内容逐字节相同,行为不变。
  • go test -count=1 -run 'TestPinned' -v ./internal/modelgateway/:三个用例全部通过。
  • 反向验证:临时从 claudeBetaHeaders 删掉 per-turn-control-2026-07-01,新用例以 status=400 calls=0 失败;恢复后通过。TestPinnedCLIClaudeModelBetas/claude 同样失败,两个用例都保护该值。
  • gofmt -l internal/modelgateway 无输出;go vet ./internal/modelgateway/ 无输出;git diff --check 干净。
  • 全包 go test -count=1 -p 1 ./internal/modelgateway/:与 base 6a5c6710 相同,只有 3 个 egress_test.go 用例在本 Windows 环境因 staticAddresses 地址策略失败,与改动无关。PR 的 check、packages、integration-0..3 全部 SUCCESS。
  • 与当前 upstream/main(6a5c6710)的 merge-tree 干净;base 之后 main 未改动 internal/modelgateway/、docs/models/。

ADR

不涉及 ADR 状态变化。specs upstream/main(2dce673)没有列举这份 beta 白名单的 ADR,两份相关 ADR 仍是 approved;第 4 项的 specs 落地 PR 另行处理。

非阻塞

  1. 组合头由已抓到的两组拼出,不是端到端抓取,测试注释已写明它只证明网关接受并原样转发并集,不证明客户端真实顺序。第 3 项正式验收拿到真实 ACP 首请求后,若内容或顺序与此不同,应回来同步这条用例。
  2. test-cases/cloud/model-access/personal-agent-configurations.md 的“受限协议兼容”仍是 Missing,按 owner 安排在 #370 第 4 项的 specs PR 里更新。

本结论只覆盖 cloud#138 这一交付,不代表 circus#370 第 2–4 项已完成。

@EricWvi
EricWvi merged commit 0a9ca81 into ora-space:main Oct 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants