fix(runtime-host): defer Graph wakes while Session execution is paused - #4992
Open
99Gaoxiaoqi wants to merge 1 commit into
Open
fix(runtime-host): defer Graph wakes while Session execution is paused#499299Gaoxiaoqi wants to merge 1 commit into
99Gaoxiaoqi wants to merge 1 commit into
Conversation
Preserve durable checkpoints during Plan mode or missing connection identity, then resume after explicit configuration or Plan execution changes. Keep foreground Plan admission ahead of background recovery. Fixes apache#4991 Generated-by: OpenAI Codex
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.
Summary
Fixes #4991
A recovered Graph checkpoint could exhaust three background admission attempts while its Session was in Plan mode or lacked an explicit connection identity, then drain the whole Host during startup. Preserve pending/retryable wakes while admission is paused and resume them after explicit account binding or execution resume.
Recovery waits for existing wake tasks and any foreground Plan turn, then rechecks the checkpoint before delivery. Plan cancellation, receipt replay, unrelated model changes, archive and Graph stop retain their existing semantics. Other execution errors retain the existing failure handling.
Verification
npm run build,npm run lint,npm run format:check,npm run typecheck, and both required knip workspace checks passed.f4abd4918(attemptCount3 instead of 1) and pass with this fix. Reproduction commands and results.git diff --checkpassed. Full repositorynpm testand Windows/Linux execution were not run locally; this changes no UI, wire format or database schema.AI use
Tool(s) and scope: OpenAI Codex performed diagnosis, implementation, regression tests, local validation, and prepared/submitted this PR at the human contributor's request. The commit includes
Generated-by: OpenAI Codex. Final human review and merge remain with the contributor and maintainers.Checklist
Does this PR entail a change in behavior?