fix(async-jobs): stop await-tool timers from hanging tests#3414
Open
mastertyko wants to merge 2 commits intogsd-build:mainfrom
Open
fix(async-jobs): stop await-tool timers from hanging tests#3414mastertyko wants to merge 2 commits intogsd-build:mainfrom
mastertyko wants to merge 2 commits intogsd-build:mainfrom
Conversation
Contributor
🟡 PR Risk Report — MEDIUM
Affected Systems
File Breakdown
|
This was referenced Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
What: Stops
await_toolintegration hangs by making completed-job eviction timers non-blocking and shutting test managers down explicitly.Why: The async-jobs test lane could keep late-suite processes alive, which blocked honest local verification for multiple otherwise-correct fixes.
How: Unref the eviction timer in
AsyncJobManagerand add explicit manager teardown/assertions in the await-tool tests.What
This change updates the shared async-jobs blocker used by the current verification round. It keeps completed-job eviction timers from holding the Node process open and tightens the await-tool tests so each test shuts its manager down explicitly.
Affected areas:
src/resources/extensions/async-jobs/job-manager.tssrc/resources/extensions/async-jobs/await-tool.test.tsWhy
This fixes a real late-suite hang in the
await_toolintegration family. Without it, unrelated issue branches could go green on targeted checks and still fail to finish the full local CI mirror honestly because the async-jobs test process stayed alive.How
AsyncJobManager.scheduleEviction()nowunref()s its timer when available, so completed-job eviction does not keep the process alive. The await-tool tests now also shut down their managers explicitly and assert the completed-job timer is unref'd.Change type
fix— Bug fixfeat— New feature or capabilityrefactor— Code restructuring (no behavior change)test— Adding or updating testsdocs— Documentation onlychore— Build, CI, or tooling changesScope
pi-tui— Terminal UIpi-ai— AI/LLM layerpi-agent-core— Agent orchestrationpi-coding-agent— Coding agentgsd extension— GSD workflownative— Native bindingsci/build— Workflows, scripts, configBreaking changes
Test plan
Verified locally with the full CI mirror gate:
npm run buildnpm run typecheck:extensionsnpm run test:unitnpm run test:integrationThe final truth phase was re-run in a plain verification clone on the exact branch head after the worktree signal showed a late verifier-environment stall.
AI disclosure