Repository navigation
test(core): let the goal-audit fixture's held preparation observe shutdown cancellation - #366
Merged
Merged
Conversation
…tdown cancellation The audit fixture's loader returned a never-resolving future for every load after the second. The goal driver can queue a further goal run before the test calls shutdown; shutdown cancels it, but the owner awaits preparation before settling, and a non-cooperative pending load never returns, so shutdown hit SHUTDOWN_GRACE and failed with ShutdownTimedOut (about 1 in 30 stress runs, and main CI on a9bff3e and 7750ec7). The held load now awaits RuntimeLoadProgress cancellation and returns an error, matching the loader contract the runtime relies on. No runtime change.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
What changes
This is a test-only fix for the main CI flake
sessions::tests::goal_model_audit::goal_model_audit_late_and_stale_confirmation_cannot_achieve(ShutdownTimedOut). It failed main CI ona9bff3efand on7750ec7f, and failed about 1 in 30 local stress runs. Tracked as gate G-flake indocs/plans/release-0.1.8.md(#364, ENG-1077).Root cause
The fixture's
Loaderreturnedstd::future::pending()for every load after the second. The goal driver can queue a further goal run before the test callsshutdown(). Shutdown cancels that run, but the owner awaits runtime preparation before settling (execution.rs: "the loader owns construction until it returns"). A pending load that never resolves never returns, so shutdown hitSHUTDOWN_GRACE(30 s).The runtime behaves as designed: the
RuntimeLoadercontract requires cooperative or eventually-returning loaders. The fixture violated that contract.Fix
The held load now implements
load_with_progress. It awaitsRuntimeLoadProgress::cancelled()and then returns an error, the same pattern asCooperativePreparationLoaderintests/deadlines.rs. The test's assertions are unchanged: request count 3, no achievement, and the expected terminal goal states.Verification
cargo nextest run -p qq-core -E 'test(/goal_model_audit/)' --retries 0 --stress-count 40: 40/40 iterations passed, all 4 goal-audit tests in each. Before: 1 failure in 30 iterations of the single test.cargo xtask lintandcargo clippy -p qq-core --all-targets --all-features -D warningsare clean.No runtime, protocol, schema or descriptor change.