Repository navigation
test(cpamp): Antigravity 额度行为回归纳入发布门槛 - #14
Merged
Merged
Conversation
v0.2.11 的 Gemini 5h/周额度缺失只靠页面身份与 UA 前缀校验兜底, 无法证明真实请求、窗口解析和快照落库都正确。本次补齐三层行为测试: - 请求层:Vitest 在独立 CPAMP checkout 中执行真实 HTTP 序列化、解析与 窗口/快照构造,不 mock 请求、订阅或 API 客户端(19 项)。 - 页面层:Playwright 驱动生产页面、假 CPA 与真实 Manager/SQLite, 覆盖完整响应、CLI/旧 Hub/缺失 UA、仅 Claude、缺 window、models-only、 429 退避及重启恢复(8 个场景)。 - 源码降版变异:临时把 Hub 版本降到 2.22.0,必须精确报 missing_gemini_window。 - 真实 CPA v8.0.23 HTTP 转发:校验最终 UA 头与 $TOKEN$ 替换。 apply.py 把行为测试与配置安装进 CPAMP checkout;cpamp_native_panel.py 可对实际安装页面执行主场景。CI 中行为失败阻断 cpamp-web → test → build → release,并始终上传诊断证据。测试只用 loopback 与虚构凭证。 本地 2026-10-23 记录见 docs/ANTIGRAVITY_BEHAVIOR_TEST_RESULTS.md。
Gaoshou101
force-pushed
the
codex/antigravity-behavior-tests
branch
from
November 7, 2026 09:24
9e15c97 to
3199627
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
v0.2.11 修复了 Antigravity Gemini 5h/周额度缺失,但防线只有页面身份与 UA 前缀校验,不能证明真实请求、窗口解析和快照落库都正确。本 PR 把 2026-10-23 本地完成的行为测试正式提交,并让它成为
cpamp-web → test → build → release的必经步骤。内容
antigravityBehavior.test.ts在独立 CPAMP checkout 中执行真实 HTTP 序列化、解析与窗口/快照构造,不 mock 请求、订阅或 API 客户端。tests/cpamp_antigravity_behavior.py用 Playwright 驱动生产页面、假 CPA 与真实 Manager/SQLite,覆盖完整响应、CLI/旧 Hub/缺失 UA、仅 Claude、缺window、models-only、429 退避及重启恢复。tests/cpamp_antigravity_mutations.py临时把 Hub 版本降到 2.22.0,要求精确报missing_gemini_window;变异构建不进入正式打包。tests/cpa_antigravity_forwarding.py校验 CPA v8.0.23 的最终 UA 头与$TOKEN$替换。apply.py安装行为测试与 Vitest 配置;cpamp_native_panel.py --behavior-archive对实际安装页面执行主场景。验证
本地记录(2026-10-23,main
032a295)见docs/ANTIGRAVITY_BEHAVIOR_TEST_RESULTS.md:新增请求层 19/19、原有前端 151/151、浏览器 8/8 场景、降版变异检出、真实 CPA 转发 2/2 均通过。本 PR 以远端 CI 结果为准。边界