fix(gsd): retry empty complete-slice runs#3410
Closed
mastertyko wants to merge 10 commits intogsd-build:mainfrom
Closed
fix(gsd): retry empty complete-slice runs#3410mastertyko wants to merge 10 commits intogsd-build:mainfrom
mastertyko wants to merge 10 commits intogsd-build:mainfrom
Conversation
Contributor
🔴 PR Risk Report — CRITICAL
Affected Systems
File Breakdown
|
Collaborator
|
This PR has merge conflicts with the base branch. Please rebase or merge 🤖 Automated PR audit — 2026-04-04 |
Completed async jobs should not keep the host process alive until their eviction TTL expires. Unref the best-effort eviction timer and lock the behavior with a regression in await-tool tests so full integration no longer stalls in unrelated lanes.
12cbbae to
2b53857
Compare
Contributor
Author
|
@jeremymcs Refreshed this PR onto the current |
Contributor
Author
|
Closing this in favor of #3300, which is the version that landed for this issue. |
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: Treat empty
complete-sliceruns as retryable failures instead of successful completions.Why: Context-exhausted complete-slice units could do zero successful tool calls, leave the slice pending, and block all downstream work.
How: Extend the existing zero-tool-call guard to
complete-sliceand add a regression that proves the loop retries instead of silently advancing.What
This change extends the auto-loop's empty-tool-call protection so it also covers
complete-sliceunits.It updates
src/resources/extensions/gsd/auto/phases.tsand adds regression coverage insrc/resources/extensions/gsd/tests/auto-loop.test.ts.Why
A context-exhausted
complete-sliceunit could finish with zero successful tool calls, leave the DB slice status unchanged, and then cycle through verification and dispatch without ever closing the slice. That silently blocks all dependent slices downstream.Closes #2653
This PR is stacked on #3365.
How
complete-slice, not justexecute-task.complete-sliceiteration and verifies that the loop retries before succeeding.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:integrationTargeted regression:
node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/auto-loop.test.tsAI disclosure
This PR includes AI-assisted code — prepared with Codex and verified as described in the test plan above.