This repository was archived by the owner on May 24, 2026. It is now read-only.
fix: address review findings round 3 (PR #802)#805
Closed
github-actions[bot] wants to merge 4 commits into
Closed
Conversation
Before sending a prompt, SendPromptAsync now checks if events.jsonl ends with session.shutdown. If so, it forces a reconnect before sending instead of sending to a dead session and discovering the failure 10+ minutes later via the watchdog. The GetLastEventType helper (tail-read, last 4KB) keeps overhead minimal on the normal send path. Also increases the structural test search window in PrematureIdleSignal_ResetInSendPromptAsync to accommodate the new code. Fixes #397 Co-authored-by: copilot-agentic-workflow[bot] <224017+copilot-agentic-workflow[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nnect When lazy-resume runs (state.Session was null), the pre-check reads stale events.jsonl that still contains session.shutdown, causing a spurious second reconnect. The justResumed guard skips the pre-check in this case. Also fixes OperationCanceledException being wrapped in InvalidOperationException by adding a dedicated catch(OperationCanceledException) that preserves cancellation semantics for callers. Also improves error message to include actual failure cause instead of always blaming server shutdown. Also fixes null vs null! inconsistency on non-nullable Session property. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds 4 new tests: - ShutdownPreCheck_SkipsWhenJustResumed: validates justResumed guard - ShutdownPreCheck_TriggersWhenNotResumed: validates detection flow - Structural test for justResumed guard presence - Structural test for OperationCanceledException handling Also fixes hardcoded /tmp/ path to use Path.GetTempPath(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace Substring(sendIdx, 10000) with IndexOf from sendIdx to avoid fragile window bumps on every SendPromptAsync growth. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Owner
|
Stale fix-round PR — fixes were pushed to the main PR branch. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Addresses review findings from expert review round 3 on PR #802.
Findings addressed (5/5)
justResumedguard to skip pre-check after lazy-resumeOperationCanceledExceptionwrapping breaks cancellation semanticscatch (OperationCanceledException)withthrow;GetLastEventType, not the behavior changeIndexOfsearch fromsendIdxTest results
All 3648 tests pass (3644 existing + 4 new).
Warning
The following domain was blocked by the firewall during workflow execution:
192.0.2.1To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.