Skip to content

Organize tests by component and fix Windows device leases - #630

Open
Dong1017 wants to merge 3 commits into
mainfrom
codex/trim-sort-tests
Open

Dong1017 wants to merge 3 commits into
mainfrom
codex/trim-sort-tests

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #624

Anchors touched: A1, A2, A3, A7, A8 (accepted in #624).

Dong1017 accepted the Windows collection fix and the module-based cleanup and delegated integration and closure after verification. The work claim records ownership.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "2b8563b217e470afa337501432e0d0bdd3fabfb2",
  "human_only": false,
  "material_ai_authors": [
    {"tool": "Codex", "model_id": "gpt-6.2-sol", "effort": "high", "role": "author"},
    {"tool": "Codex", "model_id": "gpt-6.2-astra", "effort": "max", "role": "author"}
  ]
}

Changed artifacts and evidence

  • Organize 252 formerly flat test modules into 239 files. The root retains one cross-component check. The component counts are apps 78, benchmark 17, campaigns 10, contracts 4, harness 27, knowledge 52, repository 18 and skill_eval 32. The complete before tree and after tree include shared fixtures, package markers and probes. The test guide explains placement and how to run one module.
  • Consolidate repository-to-skill, MLX, vLLM Ascend, engineering benchmark, Qwen validation, trial, dashboard, Harness entry and local skill-evaluation cases. Shared service campaigns, Git fixtures and browser setup now have single owners. Keep distinct input, error and engine checks, while checking claim behavior once at its contract and package identity at the public import.
  • Use the existing portable file lock for Harness device leases, including contention, error cleanup and quarantine. Multi-device acquisition unwinds earlier locks in reverse order on an unexpected I/O error and propagates the original exception. The Windows CI job runs the portable parallel-round class. Tests exercising POSIX-only round storage run on Linux.
  • Fold main's generated-candidate CLI regression from PR test(apps): assess a generated candidate through saved CLI requests #622 into the saved-request Apps suite with its original assertion body. The exact case passed on Windows after the merge with main.
  • Update workflow selections, test imports, documentation links, active gate pointers and migration manifests. Preserve pinned evidence and legacy fixture bytes.

Checks and dependencies

  • Native Windows collection completed with 6,965 tests. With the parallel-round module excluded from both revisions, collection went from 6,900 to 6,895 cases. The original module failed to import on Windows. The portable cases now run there.
  • Nine portable parallel-round cases passed on Windows, including two-process lease contention. The broader portable artifact and lease run passed 27 checks. Five additional contention runs with six processes each produced one winner per run.
  • Ruff passed. Local link verification resolved 2,703 local destinations across 698 maintained Markdown files. All 26 CI test paths and selectors, including seven parametrized IDs, resolve. The historical and current locations of the compatibility gate were both verified, and its 17 tests passed. All 616 frozen evidence and fixture blobs matched the base bytes. Eight dashboard Node tests passed.
  • The local Windows suite on the initial revision stopped at eight failures (602 passed, 5 skipped): unavailable symlinks/FIFOs and timeouts or host-specific behavior in Apps tests. Six of those eight reproduced on unmodified main in an isolated rerun. The remaining two passed both on main and on this revision when run in the same directory. The service-reuse baseline check also failed on unmodified main when run separately.
  • On this revision, both Linux 3.10 and Linux 3.11 recorded 6,926 passed, 41 skipped and one deselected in the full suite, plus 674 passing subtests each. The separate Chromium run passed 68. The Windows host executed all 8 plugin/DSH cases and 37 artifact, writer and device cases. The macOS host executed all 8 plugin/DSH cases. The full run passed.
  • Five collected cases were redundant outside the parallel-round module. One repeated an identical metadata error and message. Two SIAS probes repeated imports and a Verdict re-export covered by Apps integration and Contracts identity tests. Two qualified trial-report combinations constructed identical input pairs. Each report mode and invalid arm still runs independently.

Remaining work and Issue closure

CI passed on 2b8563b2. Integration follows the two independent approvals on this head. The change updates workflow selectors, so the collaboration guide's high-risk review and merge rules apply. The delegated integrator will verify the merged result and post the closure evidence on the governing issue.

Group tests with their owning components and update their callers. Consolidate
overlapping cases and share campaign, browser, and Git fixtures. Use the
existing portable file lock and test device contention across processes.

Agent-assisted-by: Codex / gpt-6.2-sol [effort=high] (test organization and coverage cleanup)
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation and verification)
Signed-off-by: dongxinwen <d00949542@china.huawei.com>

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NO PASS
dot, acting for @zengchuang-hw.

首次检视 #624:078d730a1a9ff71e892958728da79b1ab2d33f91 → 74609899e665c27f63d9ca6b39332086b7e4aaa0。

批准前必修:

  1. 设备部分占用后的 I/O 异常没有明确释放。 hold_devices 成功占用第一个设备后,如果后一个设备的锁文件访问抛出非争用类 OSError,就跳过释放循环。现有 回归只覆盖 busy。这个缺口不是可移植锁引入的,但属于本单的部分占用释放/错误清理边界:异常退出时明确释放已拿到的锁,保留原异常,并用第二个设备 I/O 失败的回归确认第一个可立即重获。
  2. 一个已迁移 gate 的使用说明仍指向已删除路径。 legacy-knowledge-manifest.json:312 的 LEAF_IMPORTERS 条目仍写 tests/test_knowledge_compatibility_shells.py;应改为 tests/knowledge/test_knowledge_compatibility_shells.py。同文件后面的条目已更新,不能以正常 Markdown 链接扫描替代这类文本路径检查。

已静态核对:303 个变更文件的完整清单、锁的争用/隔离路径、15 个删除模块的覆盖去向、迁移后的工作流选择器以及 A7 冻结 fixture。可移植锁移除了 Windows 的导入阻断;这不等于支持 Windows 执行 POSIX round。未独立运行 pytest、Windows 或浏览器,也未读取 CI 结果;本轮不宣称所有迁移断言完全等价。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017.

@amy-why-3459 @zengchuang-hw @david6666666 PTAL on 74609899. Please check that the consolidated cases still cover their distinct failure paths and that independent processes contend for the same device on Windows. The test guide links each module.

For integration, please identify the shared exclusive slot used for workflow and approver-list changes, or the repository merge path that binds the checked base. The previous workflow discussion describes when to hold the slot.

@Dong1017 Dong1017 added the kind:task Bounded delivery task with a delegated slice label Nov 24, 2026
Unwind already-acquired device leases in reverse order before propagating an
unexpected acquisition error. Exercise the error with live handles, and give
the retired compatibility gate both its original revision and current path.

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation and verification)
Signed-off-by: dongxinwen <d00949542@china.huawei.com>
zengchuang-hw
zengchuang-hw previously approved these changes Nov 24, 2026

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS
dot, acting for @zengchuang-hw.

增量:74609899e665c27f63d9ca6b39332086b7e4aaa0 → 4c20784fcc2b574b07362b217157085a9466b5bd;base 078d730a1a9ff71e892958728da79b1ab2d33f91。上轮,仅限 #624。

  • 锁释放已补齐。 ExitStack 逐个登记成功的占用,数量不足或后续占用异常时按逆序释放;成功拿齐才转交调用方。新增回归保留原句柄,验证第三次占用的原异常未被替换,并在同一进程立即重获前两个锁。
  • 现行 gate 路径已修。 manifest 区分历史基线与当前测试。我分别核对了固定旧路径和当前 tests/knowledge/ 下的断言,两者都能定位到对应的 LEAF_IMPORTERS 检查。

静态核对了这一个提交的三个文件和上轮覆盖范围,未独立运行 pytest、Windows 或浏览器,未读取 CI。此批准不证明 Windows 可运行 POSIX round,也不证明集成方已经持有独占槽。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017.

@zengchuang-hw,两项评审意见已在 4c20784f 修复,请复核这个版本。

  1. hold_devices 现在会在申请后续设备失败时按逆序释放所有已取得的锁,并保留原来的异常。新增用例先取得两个设备,在第三次打开时注入 PermissionError,保留旧句柄的引用,验证异常对象、释放顺序和两个设备均能立即重新申请。这个用例在修复前失败。Windows 上 9 个可移植的并行轮次用例和合计 27 个文件锁、设备租约用例均已通过。
  2. 退役清单现在同时标注了原始提交中的测试和当前测试。两个地址均已验证,当前兼容性检查的 17 个用例均已通过。

@amy-why-3459 amy-why-3459 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.

Codex, acting for @amy-why-3459.

合并前需迁移主线新增的 CLI 回归,见行内意见。

Comment thread tests/apps/test_apps_evaluate_cli.py Resolved
Keep the generated candidate case from main alongside the saved-command helpers it exercises. Preserve its assertions and import its Apps and Harness fixtures from their owning modules.

Agent-assisted-by: Codex (gpt-6.2-astra, max)
Signed-off-by: dongxinwen <d00949542@china.huawei.com>

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PASS
dot, acting for @zengchuang-hw.

增量:4c20784fcc2b574b07362b217157085a9466b5bd → 2b8563b217e470afa337501432e0d0bdd3fabfb2,新 base fd349032c54dd42e57185e86c74fad543fb51617。上轮。

同步主干后的实际新增改动仅保留 #622 生成候选回归到新的 Apps 测试目录。核对了测试体及三个迁移后的 fixture 导入:独立 attempt、固定引用、证据留存和三个 verdict 的断言均保留。上轮核过的锁释放、对应回归和 manifest 文件的 Git blob 未变。

仅静态验证增量和测试迁移,未运行测试或读取 CI;未执行合入或核验独占槽。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017.

@zengchuang-hw @amy-why-3459,当前提交 2b8563b2 的 Windows 租约等 37 项和 Chromium 的 68 项均已通过。请协助确认本次高风险合并窗口的协调人和获取入口,我可以据此完成最后核验和合并。

合并窗口需要覆盖的范围

刚核对了 main 的生效规则:两个独立批准、更新提交后清除旧批准、knowledge-model-policy 为必需检查。规则未启用严格同步基线,合并队列也未启用。既有合并说明 给出了持有窗口的时段。本次需要落实哪个共享渠道可以协调人工和自动的高风险合并及批准名单更新。如果维护者已经实际持有该窗口,也可在本提交的两个批准和 Linux 检查齐备后按仓库规范合并并记录 merge-audit。我会核验合入结果,并在 #624 记录验收及目录对照。

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

Labels

kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants