Repository navigation
fix(agy-proxy): flush unterminated tail line before judging no-output on close (#683) - #3173
Merged
Merged
Conversation
… on close (#683) SessionWorker close path now flushes lineBuffer through the normal line path (_processLine) before _fail, so a final step_update delta without a trailing newline counts as output: the delta is delivered and the resume-retry gate no longer retries a failed resumed turn as a fresh conversation. Adds the FAILTAIL stub case + regression test (fails without the fix, passes with it; full file 11/11 with the stub reachable).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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. |
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.
Fixes #683 (triage task 1066 confirmed on main; queue task 4595).
What
AgyWorker's close handler judged a failed turn before ever looking atlineBuffer: a finalstep_updatedelta that arrived without a trailing newline was invisible, so_failsethasOutput=falseand the resume-retry gate (allowRetry && resumed && !err.hasOutput) silently retried the turn as a fresh conversation, discarding the partial output._flushLineBuffer()first: the unterminated tail runs through the exact same per-line path (_processLine, extracted from_onStdout) as a terminated line — delta delivered / result handled — before_failjudges output.Tests
FAILTAIL(resumed conversation emits an unterminatedpartial taildelta, then exits 3) + regression test: non-stream 502 with the stub's stderr, stream delivers thepartial taildelta chunk then an error event, never astop.node --test bin/agy-proxy.test.mjs, run on the laptop with the stub reachable — note the laptop's systemagyat/run/current-system/sw/bin/agyshadows the test stub in-place, a pre-existing environment quirk that makes the unmodified suite fail identically on clean main; CI does not have that shadow).Need help on this PR? Tag
@codesmith-botwith what you need.