Repository navigation
fix(core): pause the goal when a held approval times out after its expired owner cancelled the run - #515
Conversation
…pired owner cancelled the run A sponsored child's ask_user hold could time out in the window after its goal-paying parent hit its run deadline and cancelled it. The timeout path concluded the approval with no expired owners, so pause_for_approval saw a cancelled run and left the goal Active instead of pausing it on the unanswered approval. The timeout path now passes the expired owners the same way the cancellation path does.
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. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f387633ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
* chore(release): v0.1.10 * docs(changelog): move the v0.1.10 Upgrading block into its release section and list #515
Change
Fixes the flake that turned
mainred after #510 (goal_parent_deadline_preserves_a_sponsored_childs_unanswered_approval). The flake came from a real ordering bug in the runtime.The scenario: a goal's run spawns a child, and the child asks the user a question. The parent's run deadline expires before anyone answers. The goal should pause on that unanswered question so the user can answer and resume it.
Two timers race: the child's approval wait (10 min by default) and the parent's run deadline.
expire_goal_hold. That path passes the expired goal owners, and the goal pauses. ✔conclude→Store::conclude_tool_approvalpassed&[]as the expired owners.pause_for_approvalthen saw a cancelled run with no expired owner and left the goal Active. ✘ The user loses the "needs your answer" pause.concludenow collects the expired goal owners the same wayexpire_goal_holddoes and passes them through. This is one helper,expired_goal_owners, used by both paths.Verification
a_childs_timed_out_hold_pauses_the_goal_after_its_expired_owner_cancelled_itforces the bad ordering: the child's hold, an expired parent deadline, a cancelled child, then the approval timeout fires. It fails onorigin/mainwithmust pause the goal: Activeand passes with the fix.cargo nextest run -p qq-core --profile ci -E 'test(=…goal_parent_deadline_preserves_a_sponsored_childs_unanswered_approval)' --stress-count 300: 300/300 passed.cargo nextest run -p qq-core -E 'test(/approval|goal/)': 245 passed.cargo xtask check --full: passed.ci:full, so the PR runs the full suite likemaindoes.Known impact
None. No protocol, store or config change. The release PR (
chore(release): v0.1.10) is stacked on this one.