makecindy / makecindy/cindy

test: Linux 下额度恢复自动继续测试偶发缺少通知

Open
#4,144 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 现象

Linux 单测中,`src/main/goal-host/__tests__/controller.test.ts` 的 `auto-resumes at resetAt: posts a usage-resumed notice and continues` 失败:预期收到 usage-resumed 通知,实际数组仍为空。

- CI:https://github.com/makecindy/cindy/actions/runs/34242383654/job/102115574475
- 提交:420f2cf52a43d1d335d25834e146bb309c0244d2
- 此分片 Desktop 1226 个文件通过,只有该用例失败。

## 已核查

测试通过 `tick()` 等待真实 10ms 定时器,随后立即断言另一条异步恢复链产生的通知。失败符合恢复尚未完成的时序表现,尚未证明只有夹具问题;需确认高负载下恢复链是否可靠。

该测试及 GoalController 相对本 PR 基线 79fe64a74 未变化,模型开关修复不涉及此路径。macOS 单独运行此用例已通过(1/1)。

## 验收

在负载下复现并区分夹具时序与运行时恢复缺陷;保留通知、active 状态、清空 usageResetAt、继续下一轮全部断言。若为测试时序问题,等待实际完成条件,不能删断言或只扩大固定 sleep。

Contributor guide

Open the contributing guide

Research direction

Start with src/main/goal-host/__tests__/controller.test.ts and run the failing “auto-resumes at resetAt: posts a usage-resumed notice and continues” test on Linux under load. Trace the GoalController recovery chain and its real completion condition, distinguishing fixture timing from a runtime defect. Done means reliable notification, active state, cleared usageResetAt, and continuation assertions without removing checks or relying on a fixed longer sleep.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.