Skip to content

Latest commit

 

History

History
160 lines (117 loc) · 15.3 KB

ci-layer-assessment.md

File metadata and controls

160 lines (117 loc) · 15.3 KB

Python CI layer assessment / Python CI 分层评估

This topic record explains the first evidence-based classification under #273. Commands and permanent validation rules belong to the validation guide; the PR coverage floor belongs to tests/ci_ready_contract.json.

本专题记录 #273 首批基于证据的分类。固定命令与验证规则维护在验证指南,PR 最低保护清单维护在 JSON 契约;本文件不另建一套执行规则。

Measurement / 测量

Sample: CI run 43175876148, 2026-11-12. PR head 05b9ebac; tested merge SHA 2f9b88eebaa24e773ffe882e0ea5b728be6be593. Ubuntu 22.04, Python 3.12.16, pytest 9.1.1. Source: python-test-evidence-1, containing separate JSON/Markdown/JUnit for the main suite and bundled OpenCode. All models are mocked; file/media validation is real where the tests require it.

样本来自上述运行,完整 Python 退出码为 0:1736 passed、100 skipped,收集 1836 个用例,pytest profile 墙钟时间 373.50 秒。独立 bundled OpenCode 为 5 passed、47.55 秒,不与主套件中的同名 skip 混算。profile 包含 setup/call/teardown,不含依赖安装;该 Python job 安装锁定依赖另用约 44 秒,不能靠移走测试省掉这部分。

The main suite completed successfully: 1736 passed, 100 skipped, 1836 collected, 373.50 profile wall seconds. The separate bundled OpenCode sample completed 5 cases in 47.55 wall seconds. Do not conflate those executions with skips in the main suite. Profile times include setup/call/teardown, excluding dependency installation (about 44 seconds in this job).

This first decision uses one per-test Linux sample, not a stable percentile or a promised speedup. Compare later successful samples with the same platform, phase, dependency versions and meaningful scenario coverage. It does not establish Windows-native, real-provider or GPU performance. A passing rerun also does not erase earlier failures: the prior voice lane failed waiting for save with open-canvas 409 responses, while this sample's voice lane passed without a voice-code change; the cause remains separate from Python layer classification.

首轮决策依据一个逐用例 Linux 样本,不足以建立稳定分位数或承诺提速,也不能推断 Windows 原生权限、真实服务或 GPU 表现。先前 voice lane 保存等待失败且 open-canvas 返回 409,本次未修改 voice 代码却通过;不能据此声称已修复,也不能通过改为 nightly 隐藏失败。

Cost and decisions / 成本与分类

Module seconds are sums of observed test phases, not predicted workflow savings. Shared fixtures, installation, job scheduling and the browser critical path mean removing a measured second from ready does not guarantee a second less in PR wall time.

模块秒数是实测阶段耗时累计,不是 CI 墙钟提速预测;共享夹具、安装和浏览器关键路径会影响实际效果。

Module / 模块 Observed seconds / 实测秒 Decision / 决策
test_native_runtime.py 129.68 Already merge; keep the dedicated bundled CLI regression / 已属 merge,独立 bundled CLI 回归仍保留
test_tool_tasks.py 29.50 Move two full reshoot/piecewise-media cases, keep validation/output/cancel representatives / 移动两个完整媒体流程,保留校验、输出与取消代表
test_creation_storage.py 13.26 Move only the 199-revision cache scenario; preserve replay/recovery/concurrency / 仅移动 199 次修订缓存场景,保留幂等、恢复和并发
test_deepseek_runtime.py 11.53 Move the three full ACP transcript/write modes; keep protocol/private-config checks / 移动三个完整 ACP 模式,保留协议和私有配置检查
test_creation_timeline_render.py 11.04 Keep ready: publication, provenance, versions, locks and actual media bounds / 保留 ready,保护发布、来源、版本、锁与实际媒体边界
test_jiuwenswarm_runtime.py 9.87 Move five complete write/trace modes; keep protocol and failure propagation / 移动五个完整写入模式,保留协议与失败传播
test_cli.py 8.66 Keep ready; do not move the help/watchlist cases just to reduce time / 保留 ready,不以减耗时为由移走 help/watchlist
test_creation_parameters.py 8.57 Keep ready: shared input/type boundaries / 保留共享输入与类型边界
test_kling_video.py 7.51 Keep ready: model/reference rules; module total alone is insufficient / 保留模型与参考规则,不仅按模块总耗时移动
test_timeline_packages.py 7.14 Move one live gateway/CLI 5 MiB roundtrip; keep basic import and scope rejection / 移动一次大包完整往返,保留基本导入与范围拒绝

The first move covers 12 collected cases in five modules, accounting for 44.16 phase seconds in this sample:

首批为五个模块的 12 个用例,本样本累计 44.16 秒:

Selector / 选择器 Cases / 数量 Seconds / 秒 Why merge / 原因
test_creation_storage.py::test_long_history_is_validated_from_disk_only_once 1 10.16 199 real commits and full-chain cache proof / 199 次真实提交和完整历史缓存
test_deepseek_runtime.py::test_acp_shared_write_and_native_trace 3 11.11 ACP subprocess, project write, trace, continuation / 子进程、写入、轨迹与续接
test_jiuwenswarm_runtime.py::test_project_write_and_trace 5 9.41 Complete native protocol mode matrix / 完整原生协议模式矩阵
test_tool_tasks.py::test_partial_reshoot_redraws_only_its_window 1 2.42 Real audio/video reconstruction of a selected window / 实际音视频窗口重构
test_tool_tasks.py::test_long_video_edit_runs_piecewise_and_subtitles_default_to_the_bottom_band 1 7.86 Multi-part 20-second edit plus subtitle processing / 分片长视频与字幕处理
test_timeline_packages.py::test_live_agent_gateway_package_roundtrip_scopes_files_without_large_json 1 3.21 Gateway, disk archive, subprocess CLI, scoped re-import / 网关、大包、CLI 与范围导入

No assertion, parameter case, execution environment gate or watchlist entry is removed. No new case is moved to nightly. Module marks are not used to sweep fast critical cases into merge.

不删除断言、参数用例、能力门禁或 watchlist 条目,不新增 nightly 分类,也不通过整个模块标记把快速关键用例一起移走。

Coverage floor and conservation / 保护清单与覆盖守恒

The contract now covers 15 capability groups and 45 parameter-expanded Python cases, plus browser MP4 export. All 45 representatives passed in the baseline sample. Local full collection after adding audit regression tests contains 1851 cases: 1805 ready, 42 merge and 4 nightly; 1715 remain transitional/unmarked ready. Baseline function/parameter counts are preserved, with 15 new layer-audit cases; exactly 12 common IDs change from ready to merge, with no overlapping layers. Three raw parameter IDs differ between Linux and local Windows because they embed interpreter paths or generated PNG bytes. Those test sources are unchanged; exact raw-ID conservation must be checked against a subsequent same-platform sample rather than silently normalizing distinct cases.

清单覆盖 15 项能力、45 个展开后的 Python 用例及浏览器 MP4 导出;45 个代表在基线样本均通过。本地完整收集为 1851:ready 1805、merge 42、nightly 4,其中 1715 个未显式分类,仍属于 ready。基线各函数的参数用例数量保留,新增 15 个核对测试,12 个共同 ID 从 ready 改为 merge。Linux 与 Windows 有 3 个原始参数 ID 因解释器路径或动态 PNG 字节而不同,这两份测试源码未改;后续需用同平台样本核对原始 ID,不能静默归一化并声称完全一致。

The audit rejects missing/duplicate IDs, conflicting marks, filtered inventories, representatives outside ready and loss of the browser export gate. With --require-executed, skipped or unexecuted representatives are not treated as proof. This protects selection and minimum execution evidence; it does not certify every creative requirement or replace full media/output acceptance.

核对会拒绝漏收集、重复 ID、冲突标记、过滤后的清单、代表被移出 ready 或导出 gate 丢失;要求执行证据时,skip 和未执行不算通过。这是最低选择与执行保护,不代表完整创作质量或输出验收。

All live PR/main/nightly callers still select the full Python suite. These labels do not reduce the current release bar. Before switching PRs to ready, retain an independent full-collection audit and enable the complete merge-queue gate; measure the actual ready workflow before claiming end-to-end savings or tightening its timeout.

现有 PR/main/nightly 仍调用全量 Python,分类不会提前缩小发布门槛。切换 ready 前必须保留完整收集核对并接通合并队列完整门禁;真正运行 ready 工作流后,才评估端到端耗时和是否收紧超时。

Second classification pass / 第二轮分类(2026-11-23)

Baseline main: 6a41c5703d31ed56f138993a037266929002db72. Two successful, unfiltered Linux Python profiles use Python 3.12.16 and pytest 9.1.1: 45100623255 and 45044280781 (the latter at 8c00a9e5564a73afc24964a9651a8857da28c4c2). Download artifact python-test-evidence-1 and use python.json; bundled OpenCode and harness visual profiles remain separate evidence, not duplicate main-suite passes.

基线是上述 main;两次成功、无筛选的 Linux 样本均为 2,993 个用例,原始 ID 集合完全相同,分类均为 ready 2,927、merge 56、nightly 10。最新样本为 2,875 passed、118 skipped,profile 墙钟 364.61 秒(不含依赖安装)。 新增测试不能直接沿用 11 月 12 日样本的耗时和分类结论。

Decision / 决策 Scope and reason / 范围与原因
merge The two model variants of the standard 5-second/120-frame full HTTP generation round trip; rejection at 103 frames, acceptance at 104 and fractional 107/24-second conversion remain ready for both models. / 两个模型的标准 5 秒完整往返移入 merge;拒绝边界、接受边界和非整秒帧数换算仍留 ready。
merge test_storage_bench_emits_the_fields_the_suite_tracks: runs real storage scenarios through subprocesses. Threshold/report logic stays ready. / 实际存储微基准子进程流程移入 merge;阈值与报告逻辑仍留 ready。
ready Retain request/entry equivalence, FastH3 admission and recovery, MiniMax speech download security after model changes, and BigModel recovery without resubmission. / 保留入口一致性、FastH3 接受与恢复、模型变化后的下载安全和不重复提交。

Only three cases move, totaling 2.60 phase seconds in the latest sample. This is a semantic split, not an end-to-end performance claim. No new nightly moves, assertion removal, parameter-ID edits or workflow filter changes. The ready floor grows from 15 capability groups/45 cases to 18 groups/152 cases; all 152 passed in each Linux baseline under --require-executed.

仅移动三个用例,最新样本阶段耗时合计 2.60 秒,不宣称 CI 端到端提速。 不新增 nightly 分类,不删除断言或修改参数 ID,不切换 CI 筛选。 保护清单新增三项能力,覆盖 152 个展开用例,两份 Linux 基线均通过执行核对。

Local Windows collection retains 2,993 cases: ready 2,924, merge 59, nightly 10. The common IDs have exactly the three declared layer changes. Three raw IDs still differ across platforms (interpreter paths / generated image bytes); no normalization is used to claim exact cross-platform conservation. Local collection is not execution evidence. The first hosted Linux full-suite profile for this change must confirm the same-platform ID set and the three layer changes before treating conservation on the changed revision as verified.

本地 Windows 收集保持 2,993 个用例:ready 2,924、merge 59、nightly 10; 共同 ID 只有上述三个分类变化。仍有三个跨平台原始 ID 差异,不通过归一化 掩盖差异。收集不是执行证据;改动后首次 Linux 全量 CI 仍需确认同平台 ID 守恒及三项分类变化,才能完成该版本的覆盖守恒验收。

Reproduce / 复核命令(下载文件使用各自路径):

python scripts/ci/check_test_layers.py --profile baseline/python.json --require-executed
python -m pytest tests --collect-only -q --ci-profile=collection.json
python scripts/ci/check_test_layers.py --profile collection.json

PR-5 prepares classification and coverage protection only. Hardware marks are separate work; PR-8 must still wait for hardware tagging and live merge-queue acceptance before reducing the active full-suite bar.

PR-5 只准备分类和覆盖保护。机型标记独立开发;PR-8 仍须等待机型轴与真实 合并队列验收,现有全量门槛保持不变。

CPU platform axis / CPU 机型轴(2026-11-23)

This pass starts at main 273153908edd068cde6c339a5fc98ebcbf604af9. The same Windows environment collected 2,994 cases before hardware tagging. After tagging and adding 11 hardware/audit regressions, full collection and CPU-only collection both contain 3,005 cases with zero deselections. Every old raw ID and effective CI layer is preserved; all current cases explicitly inherit CPU from their test module. No cross-platform ID normalization is involved. The final partition is ready 2,936, merge 59, nightly 10.

本轮基于上述 main。同一 Windows 环境修改前收集 2,994 项,显式机型标记及 11 项新增回归后,全量与 CPU 筛选均收集 3,005 项,零排除。原始 ID 和原有 CI 层级全部保持,现有用例均从测试模块显式继承 CPU,不做跨平台 ID 归一化。 最终分类为 ready 2,936、merge 59、nightly 10。

Collection tests exercise migration defaults before -m deselection, inherited platform conflicts (including conflicts that CPU selection would otherwise hide), reserved accelerator isolation, and preservation of the orthogonal layer axis. The full layer audit accepts a CPU profile only when collection is complete, no case was deselected, and every retained case has CPU hardware evidence.

回归通过真实 pytest 子进程检查默认值先于筛选、继承机型冲突、CPU 筛选可能 掩盖的冲突、预留加速器隔离,以及与层级轴的正交性。完整核对仅接受完整收集、 零排除、逐项 CPU 证据齐全的 CPU profile。

PR-7 live queue enforcement and PR-8 layer cutover remain separate work. The CPU selection includes the existing full layer set, bundled native checks and the nightly watchlist. Accelerator names are reserved; no accelerator job, paid model call or migration of the static workflow implementation is introduced.

PR-7 的真实队列强制验收和 PR-8 的层级切换仍独立推进。本轮 CPU 筛选保留 所有原有层级、bundled 原生检查和 nightly watchlist;只预留加速器名称, 不新增加速器车道、付费模型调用,也不搬迁静态工作流实现。