Fix release workspace test failures#4980
Conversation
Local verification reportEnvironment: macOS, Node v22.18.0, npm 10.9.3. Commands run locally: cd packages/cli && npx vitest run src/ui/utils/statsDataService.test.tsResult: passed, 17 tests. cd packages/core && npx vitest run src/utils/yaml-parser.test.tsResult: passed, 35 tests. npm run build && npm run typecheckResult: passed. The build step emitted existing VS Code companion lint warnings, but exited successfully; typecheck completed successfully. Scope note: I did not run the full workspace test suite locally or cross-platform local runs. |
|
Thanks for the PR! Template looks good ✓ On direction: this is a straightforward CI fix — the scheduled Release workflow was failing due to a time-of-day-dependent test and stale YAML parser expectations. Clearly within scope; no direction concerns. On approach: the scope is tight — three files, test-only changes plus a stale comment removal. The Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 方向:这是一个直接的 CI 修复——定时 Release 工作流因为依赖时间的测试和过期的 YAML parser 断言而失败。明确在范围内,没有方向问题。 方案:范围紧凑——三个文件,仅测试变更加上移除过期注释。 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewIndependent proposal: For the stats test, I'd use Diff comparison: The PR's approach matches my independent proposal precisely. No correctness issues, no missed simpler path.
No blockers found. Code follows project conventions. Test VerificationThis is a test-only change with no runtime behavior impact, so tmux testing focuses on running the affected test suites. All 52 tests pass. ✅ 中文说明代码审查独立方案: 对于 stats 测试,我会使用 Diff 对比: PR 的方案与我的独立方案完全吻合。没有正确性问题,没有遗漏更简单的路径。
无阻塞问题。代码遵循项目规范。 测试验证这是仅测试变更,无运行时行为影响。两个受影响的测试套件全部通过(17 + 35 = 52 个测试)。✅ — Qwen Code · qwen3.7-max |
|
This PR does exactly what it says — fixes two CI test failures and cleans up a stale comment. The scope is tight (3 files, +15/-31), the fixes are correct, and there's nothing extraneous. The stats timestamp fix is the right approach: All 52 affected tests pass locally. CI is still running on the PR. LGTM — approving. 中文说明这个 PR 完全做到了它所承诺的——修复两个 CI 测试失败并清理一个过期注释。范围紧凑(3 个文件,+15/-31),修复正确,没有多余内容。 stats 时间戳修复是正确的方法: 本地全部 52 个受影响的测试通过。CI 仍在 PR 上运行。 通过——批准。 — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Clean merge — brings in main's fix for the yaml-parser 'known limitations' pin tests so the Test suite is green against current main.
Clean merge — brings in main's yaml-parser pin-test fix so this docs PR's Test suite is green against current main.
What this PR does
This PR fixes the scheduled Release workflow workspace-test failures by making the stats delta test independent of the time of day and by updating the YAML parser assertions to match the parser behavior currently on
main.It also removes a stale internal comment that still described the YAML parser migration as future work.
Why it's needed
The failed CI run was Release / Quality Checks #27315318446. It failed in two places: the stats test created a “today” record one hour after midnight, which is a future timestamp when CI runs shortly after midnight, and the YAML parser tests expected nested YAML to be garbled even though the parser now uses the full
yamlpackage.The stats regression came from #4779. The stale YAML expectations came from #4842, after #4870 had already added full YAML parser support.
Reviewer Test Plan
How to verify
Confirm the targeted tests pass and that the broader build/typecheck gate still succeeds. The relevant local checks are
cd packages/cli && npx vitest run src/ui/utils/statsDataService.test.ts,cd packages/core && npx vitest run src/utils/yaml-parser.test.ts, andnpm run build && npm run typecheck.Evidence (Before & After)
Before: the scheduled Release run failed with
expected -100 to be close to +0in the stats delta test and two YAML parser expectation failures for nestedmcpServers/hooksinput.After: the targeted stats and YAML parser test files pass locally, and
npm run build && npm run typecheckexits successfully.Tested on
Environment (optional)
Node v22.18.0, npm 10.9.3.
Risk & Scope
Linked Issues
References #4779, #4842, and failed CI run 27315318446.
中文说明
What this PR does
这个 PR 修复了定时 Release 工作流中的 workspace 测试失败:一处是让 stats delta 测试不再依赖当天的具体时间,另一处是把 YAML parser 的断言更新为当前
main分支上真实的解析行为。它还移除了一个过期的内部注释,该注释仍然把 YAML parser 迁移描述成未来工作。
Why it's needed
失败的 CI 运行是 Release / Quality Checks #27315318446。它有两处失败:stats 测试把 “today” 记录放在午夜后一小时,因此当 CI 在午夜后不久运行时这个时间戳仍然属于未来;YAML parser 测试则仍然预期嵌套 YAML 会被错误解析,但当前 parser 已经使用完整的
yaml包。stats 回归来自 #4779。过期的 YAML 断言来自 #4842,而 #4870 已经在此之前加入了完整 YAML parser 支持。
Reviewer Test Plan
How to verify
确认相关的定向测试通过,并确认更广的 build/typecheck 门禁仍然成功。对应的本地检查是
cd packages/cli && npx vitest run src/ui/utils/statsDataService.test.ts、cd packages/core && npx vitest run src/utils/yaml-parser.test.ts和npm run build && npm run typecheck。Evidence (Before & After)
Before:定时 Release 运行中,stats delta 测试失败为
expected -100 to be close to +0,并且嵌套mcpServers/hooks输入的两个 YAML parser 期望失败。After:本地定向 stats 和 YAML parser 测试文件通过,且
npm run build && npm run typecheck成功退出。Tested on
Environment (optional)
Node v22.18.0,npm 10.9.3。
Risk & Scope
Linked Issues
引用 #4779、#4842,以及失败的 CI 运行 27315318446。