Skip to content

flaky(core): health-monitor.test.ts 的「leaves no ref'd timer behind when the health check wins the race」(#4875)在合并队列全量跑间歇红 —— 踢掉 PR #6269 一次,重排即过 #6329

Description

@hotlong

队列健康事项,按「发现 flake 的 PM 立单而不是静默重排绕过」纪律归档。未指派,标签交分诊(落点 packages/core → 域待分诊判)。

签名(取自完整 job 归档,非截断抽取)

  • 失败用例:src/health-monitor.test.ts > PluginHealthMonitor > Health-check timeout guard does not outlive the race (#4875) > leaves no ref'd timer behind when the health check wins the race
  • 断言:AssertionError: expected +0 to be 1 // Object.is equality,位置 packages/core/src/health-monitor.test.ts:144:28,即 expect(refdTimers()).toBe(before) —— ref'd timer 计数读到 0,而前置读数 before 是 1
  • 分片总计:Test Files 1 failed | 26 passed (27) / Tests 1 failed | 497 passed (498),用例耗时 105ms(⇒ 是断言失败,不是超时,与 flaky: spec/src/cloud/tenant.test.ts 的 #4739 导出面用例贴着 5s 超时 —— 今晚已两次把不相干的 PR 踢出合并队列 #4796 的 5000ms 家族不同族)
  • check-test-completeness: OK (6 packages, 2404 tests declared and all 2404 accounted for) —— completeness 绿 + 套件红 = 真断言失败,非静默死 worker
  • turbo 仅点名一个失败任务:Failed: @objectstack/core#test(15 successful / 39 total);日志下方 driver-sql:test 与 mcp:build 的 ELIFECYCLE 是并发收尾,不是第二成因

命中记录

  1. PR refactor(hooks): 摘掉最后三处 hook 上下文的 doc / previousDoc 防御性 alias 读 (#5906) #6269(同源:另外三处 hook context 上的 doc / previousDoc 防御性 alias 读也没有生产者(#5671 全仓 grep 的剩余部分) #5906 hook alias 死码清理,services 车道)—— 队列构建 31181660008,13:2xZ 被踢;受害 PR 自身 PR 级 CI 23/23 全绿,改动面(service-storage / plugin-sharing / runtime / 一处 objectql 测试注释)不含 packages/core;
  2. 原样重排一次即通过并合并(13:5xZ)—— ⇒ 间歇性,非 main 硬红,也非该 PR 的回归。

台账状态

队列管家实读比对确认:对 #5810 台账是新签名,不匹配任何既有行(非 #4796 的 Test Core 5000ms 家族、非 service-datasource 5000ms 行、非 mongodb-memory-server 下载竞态、非跨仓基础设施行)。台账为人工升级,本单可作为管家提请加行的依据。

修复方向(不预判,留给承接座位)

该用例钉的是 #4875 的不变量「health-check 赢得竞速时不留下 ref'd timer」。断言在计数上翻(读 0、期望 1)提示 refdTimers() 的前置读数 before 与断言时点之间存在时序假设:全量并发负载下,若 before 快照期间另有 ref'd timer 恰好到期/清理,两次读数就不再可比。方向候选:把断言改为对该 monitor 自身产生的 timer 精确计数(而非进程全局 ref'd timer 数),或在读数前后加稳定化屏障。⛔ 不建议以调超时收尾——它不是超时。

Refs:#4875(该不变量的来源单)、#5810(队列管家 flaky 台账锚点)、PR #6269(受害 PR 与其上的两条 triage 评论,含完整日志抽取)。查重:三仓 open issue 搜 health-monitor / Health-check timeout guard / refdTimers 零命中,本单是唯一入口。

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions