Agent Sandbox Registry

python-sdk

Wave 3 全量验证报告

无英文版

.agents/evidence/verify/2026-09-04-wave3-full-suite.md

⚠️ HISTORICAL SNAPSHOT / 历史验证快照 — 标注追加于 2026-09-24(任务 #122,承接 #109 审计)

本文件为当时的测试验证快照,测试结果、命令与输出均保留原样、未作任何篡改。文中出现的旧 CLI sbox(及 ~/.sbox/、旧品牌 serverless-sandbox 等称谓)反映当时状态,现已更名为 abx / agent-sandbox,见 ADR 2026-09-09-brand-rename-sbox-to-abx.md;部分被验证的命令组(auth/session/secret/skill)此后已删除,见 ADR 2026-09-23-cli-command-reduction.md。当前状态请以最新 verify/ 报告、AGENTS.md 与 docs/ 为准。

Wave 3 全量验证报告

日期: 2026-09-04
环境: Python 3.11.15 / macOS darwin 15.7.7 / pytest 9.1.1 / click 8.5.0 / ruff 0.16.6 / mypy 2.3.1
范围: Wave 3 九路并行改动 (#98 ~ #112)


1. 测试结果总览

79 failed, 1188 passed, 1 warning, 237 errors in 7.02s
类别 数量 说明
PASSED 1188 ✅ 全部正常
FAILED 79 ⚠️ 全部为同一根因 (见下方)
ERROR 237 ⚠️ 全部为同一根因 (见下方)
WARNING 1 可忽略

排除 CLI 测试后(非 Click 相关测试)

872 passed in 3.40s — 零失败、零错误

2. 失败清单

唯一根因:Click 8.5 移除 mix_stderr 参数

现象: TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr'

原因: 项目依赖 click>=8.0,但 Click 8.5.0 移除了 CliRunner(mix_stderr=...) 参数。所有 79 个 FAILED 和 237 个 ERROR 均由此导致。

影响文件(10 处):

文件 行号
tests/test_cli_evidence/test_evidence_snapshots.py L58
tests/test_templates/conftest.py L57
tests/integration/test_cli_e2e.py L89
tests/test_cli/conftest.py L16
tests/test_cli/test_deploy_commands.py L18
tests/test_cli/test_run_command.py L15
tests/test_cli/test_mcp_commands.py L18
tests/test_cli/test_template_commands.py L14
tests/test_cli/test_formatters.py L45, L66

修复方案: 将所有 CliRunner(mix_stderr=False) 替换为 CliRunner()(Click 8.5+ 中 stdout/stderr 默认已分离),或将 click 版本锁定为 click>=8.0,<8.5。

Wave 3 改动本身无互相踩踏

排除 Click 兼容性问题后,1188 个测试全部通过,872 个非 CLI 测试零失败。Wave 3 的 9 路并行改动之间没有冲突。


3. Lint 结果 (ruff)

Found 347 errors (188 auto-fixable)

分类: - I001 — 导入排序(auto-fixable) - N801/N818 — 命名约定(FileNotFoundError_、ConnectionError_ 尾缀) - TC003 — datetime 可移入 TYPE_CHECKING 块 - F401 — 未使用导入 - F841 — 未使用变量(测试文件)

结论: 均为预存在的 lint 问题,非 Wave 3 引入。不影响运行时行为。


4. Type Check 结果 (mypy)

Found 126 errors in 33 files (checked 75 source files)

主要类别: - untyped-decorator (Click 装饰器) — 28 处 (sandbox.py 最多) - union-attr — ProcessResult | StreamReader 联合类型 - import-not-found — tomllib/tomli 条件导入 - type-arg — 缺少泛型参数 - no-untyped-def — __init__.py 的 __getattr__

结论: 均为预存在的类型问题,主要集中在 CLI 层的 Click 装饰器类型推断。非 Wave 3 引入。


5. 导入检查

import serverless_sandbox  # ✅ 成功
dir(serverless_sandbox)
# ['__all__', '__builtins__', '__cached__', '__doc__', '__file__',
#  '__getattr__', '__loader__', '__name__', '__package__', '__path__',
#  '__spec__', '__version__', '_version']

结论: ✅ 导入无报错,无对已删除模块的引用。


6. Template 验证结果

模板文件统一重命名 ✅

所有 10 个模板均使用 template.yaml,无残留 sandbox-template.yaml:

examples/templates/browser-automation/template.yaml
examples/templates/claude-code/template.yaml
examples/templates/codex/template.yaml
examples/templates/deepseek-harness/template.yaml
examples/templates/hermes-agent/template.yaml
examples/templates/node-web/template.yaml
examples/templates/openclaw/template.yaml
examples/templates/python-hello/template.yaml
examples/templates/qoder/template.yaml
examples/templates/qwen-code/template.yaml

examples 目录结构 ✅

examples/
├── README.md
├── quickstart/     (5 files: 01_hello ~ 05_decorator_usage)
├── agents/         (2 files: browser_automation, codex_agent)
├── compat-demos/   (5 files: comparison, e2b_*, modal_*)
└── templates/      (10 模板目录 + README.md)

qwen-code 模板内容 ✅


7. 文件存在性检查

Wave 3 新增文件 ✅

文件 状态
src/serverless_sandbox/py.typed ✅ 存在
.github/workflows/ci.yml ✅ 存在
.github/workflows/publish.yml ✅ 存在
.github/dependabot.yml ✅ 存在
llms.txt ✅ 存在
.python-version ✅ 存在 (3.11)
AGENTS.md ✅ 存在

Wave 3 应删除的文件 ✅

文件 状态
src/serverless_sandbox/api/pool.py ✅ 已删除
src/serverless_sandbox/session/database.py ✅ 已删除
src/serverless_sandbox/session/oss.py ✅ 已删除
src/serverless_sandbox/integrations/langchain.py ✅ 已删除
src/serverless_sandbox/integrations/crewai.py ✅ 已删除
src/serverless_sandbox/integrations/autogen.py ✅ 已删除

8. 残留引用检查

检查项 结果
from serverless_sandbox.api.pool ✅ 无残留
from serverless_sandbox.session.database ✅ 无残留
from serverless_sandbox.session.oss ✅ 无残留
from serverless_sandbox.integrations.langchain ✅ 无残留
from serverless_sandbox.integrations.crewai ✅ 无残留
from serverless_sandbox.integrations.autogen ✅ 无残留
SANDBOX_API_KEY 引用 ⚠️ 保留 — 合法向后兼容代码 (transport/config.py, agent/mcp.py, cli/commands/auth.py 等)
sandbox-template.yaml 引用 ⚠️ 保留 — 合法向后兼容 (utils/registry.py, cli/commands/template.py, tests)

最终结论

✅ PASS(有条件)

Wave 3 的 9 路并行改动本身没有互相踩踏。 所有非 CLI 测试 (872) 全部通过,文件结构、导入、残留引用检查全部正常。

遗留问题(非 Wave 3 引入):

优先级 问题 修复建议
P1 Click 8.5 移除 mix_stderr 导致 79 FAILED + 237 ERROR 全局替换 CliRunner(mix_stderr=False) → CliRunner() 或锁定 click>=8.0,<8.5
P3 ruff 347 个 lint 警告 运行 ruff check --fix 自动修复 188 个
P3 mypy 126 个类型错误 主要是 Click 装饰器,需逐步修复