fix(core): 🐛 converge orphaned subagents and account final turns for judge-completed goals#226
Open
HayWolf wants to merge 1 commit into
Open
fix(core): 🐛 converge orphaned subagents and account final turns for judge-completed goals#226HayWolf wants to merge 1 commit into
HayWolf wants to merge 1 commit into
Conversation
…judge-completed goals When a run finishes while a subagent (e.g. a Judge) is still active in the DB, its helper row can linger at `running` forever because only live SubagentCompleted/Failed events flip the status. This adds a backstop in the run-finalization path that: - Marks all non-terminal helpers for the run as `interrupted` - Emits matching `SubagentFailed` events so the DB and live stream converge Additionally, a Judge can flip a goal to `complete` within the same run, but the normal turn-accounting path is skipped for non-active goals, causing the finished turn count to drop by one. A new `account_turn_if_unevaluated` function idempotently bills that final turn so the running-vs-finished display stays consistent. The frontend now also maps `helper_judge` to "Judge Agent".
AI Code Review SummaryPR: #226 (fix(core): 🐛 converge orphaned subagents and account final turns for judge-completed goals) Overall AssessmentNo blocking issue was detected in the reviewed diff; keep focused regression testing before merge. Major Findings by SeverityNo major issues identified from the reviewed diff. Actionable Suggestions
Potential Risks
Test Suggestions
File-Level Coverage Notes
Inline Downgraded Items (processed but not inline)
Coverage Status
Uncovered list:
No-patch covered list:
Runtime/Budget
|
| @@ -16,7 +16,7 @@ use crate::ipc::app_events::{ | |||
| use crate::ipc::frontend_channels::ThreadStreamEvent; | |||
There was a problem hiding this comment.
Automated review completed for this PR diff. No concrete inline issue was selected after aggregation.
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
interruptedwhen a run finishes, preventing them from lingering atrunningforever after interrupt/cancelhelper_judgeto the frontend helper kind formatter so Judge Agent shows correctly in the UITest Plan
🤖 Generated with TiyCode