Repository navigation
test: make checkpoint-history abort deadline deterministic - #74959
Conversation
Replace the 1 ms real-time timeout with Vitest fake timers and the default one-second budget. Assert lookup starts, remains un-aborted at 999 ms, and aborts exactly once at 1000 ms, restoring real timers in finally. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active issues remain, and the change is limited to making checkpoint-history deadline testing deterministic with controlled timers and cleanup.
No open issues 🎉
What changed in this PR
This PR makes the checkpoint-history abort test deterministic using controlled timers, without changing production behavior.
Changes:
- Uses fake timers with the default one-second deadline.
- Verifies lookup startup and the un-aborted state at 999 ms.
- Verifies exactly one abort at 1000 ms and restores real timers in
finally.
This pull request is ready to be approved.
| File | Summary |
|---|---|
actions/setup/js/finish_work_queue_claim.test.cjs |
Makes checkpoint-history deadline testing deterministic and validates the precise abort timing. |
Review effort: Lite (auto)
|
🎉 This pull request is included in a new release. Release: |
The checkpoint-history abort test could exhaust its 1 ms wall-clock budget before the lookup registered an abort listener, causing an intermittent zero-callback failure. This was reproduced with a controlled clock after surfacing in #74953; it is unrelated to that dependency update.
Use Vitest fake timers and the default one-second budget. Assert that the lookup starts, the signal remains un-aborted at 999 ms, and exactly one abort occurs at 1000 ms. Restore real timers in
finally. Production behavior is unchanged.Validation:
make fmt-cjs,make lint-cjs, andmake agent-report-progresspassed, including build, type-checking, and impacted tests.This branch is independently based on main.