Skip to content

test: make checkpoint-history abort deadline deterministic - #74959

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan/fix-flaky-abort-test
Nov 4, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan/fix-flaky-abort-test

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Focused suite: 105/105 tests passed.
  • Deadline test: 30 consecutive isolated runs passed.
  • make fmt-cjs, make lint-cjs, and make agent-report-progress passed, including build, type-checking, and impacted tests.

This branch is independently based on main.

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>
@pelikhan
pelikhan marked this pull request as ready for review November 4, 2026 20:31
Copilot AI auto review requested due to automatic review settings November 4, 2026 20:31
@pelikhan
pelikhan merged commit b1b58dd into main Nov 4, 2026
33 checks passed
@pelikhan
pelikhan deleted the pelikhan/fix-flaky-abort-test branch November 4, 2026 20:31
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: opus55 xhigh · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt56 max · ~3 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #74959

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

Copilot AI 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.

🟢 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)

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants