Skip to content

[test] 端到端测试缺口与 CI 分层 #248

Closed
5 of 5 issues completed
Closed

Description

@codeasier

背景

基于 main 1a54337(#241–#247 已全部合入)盘点端到端 / 验收覆盖。这里的「端到端」指:真实 pt-snap 命令或公共 API 入口 + 真实产物(pkl → import → 分片 SnapshotDB / compat 数据集 → query / report / export → msinsight 兼容输出),不是内部单元。

现状

  • CI(.github/workflows/test.yml)仅 ubuntu,Python 3.10–3.13 各跑完整 pytest;slow 未排除,百万级用例在 4 个版本各跑一遍。
  • 大规模用例全部是测试内调 Python API;用已安装 wheel 跑 import → CLI → API 的大规模测试(test_dataset_scale_acceptance.py:193)因未设 PT_SNAP_ACCEPTANCE_WHEEL 在 CI 中被跳过。
  • 干净 wheel 的 agent 验收只用单库 pkl,不涉及分片;tests/skills/test_agent_e2e.py 只对已存 baseline 打分,不跑真实 agent。
  • 真实 msinsight GUI/C++ 互操作仅人工验收(docs/zh/interop-acceptance.md)。
  • 已有:分片回放 ≡ 单库、compat 导出/导入契约、数据集全局查询差分(8 种子)、公共预算(CliRunner)、报告完整性、缓存失效等。

缺口(细节见子 issue)

P0

  1. free_requested 跨分片断言 + msinsight 3 片 fixture
  2. 真实 CLI 子进程跑默认规模
  3. 随机差分(多种子 × 全模板 × v1/v2)

P1:默认规模补齐模板、ATTACH/scratch 真实规模一致性、深 offset + 预算子进程、超时 / kill 清理、并发、错误文本一致性

P2:导出器内存、CLI 层哈希遍数、冷启动趋势、tab 补全不碰分片、有序帧 / memory tree 分片端到端、真实 agent e2e、Windows/macOS

建议的 CI 分层

  • 每个 PR:P0-1、P0-3 小规模(约 20 种子)、错误文本一致性、tab 补全;slow 只在 3.13 跑,其余版本 -m "not slow"。
  • 每晚:P0-2(设 PT_SNAP_ACCEPTANCE_WHEEL)、P0-3 200 种子、P1 全部、导出内存、冷启动趋势、Windows/macOS 非 slow。
  • 手动 / 发布前:真实 msinsight GUI 验收(msinsight #625 修复后用 P0-1 fixture 复测)、memory tree 浏览器视觉、真实 agent 运行。

Activity

  1. codeasier commented on Oct 11, 2026

    @codeasier
    OwnerAuthor

    验收关闭(2026-10-12):#255–#263 已按检视顺序合入,main = 07bdf660。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions