This repository was archived by the owner on May 24, 2026. It is now read-only.
fix: address review findings round 2 (PR #802)#804
Closed
github-actions[bot] wants to merge 5 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>
The blanket catch(Exception) was wrapping OperationCanceledException in InvalidOperationException, breaking cooperative cancellation semantics in orchestration and reflection paths. Added a separate catch that rethrows OCE directly while still releasing SendingFlag. Also skips the pre-check when lazy-resume just ran (wasLazyResumed guard) to avoid redundant double-reconnect on stale events.jsonl after app restart. Addresses review findings #1 (MODERATE) and #2 (MINOR). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added 3 tests verifying: - OperationCanceledException is not wrapped (separate catch + throw;) - SendingFlag is released in both catch blocks - Pre-check is skipped after lazy-resume (wasLazyResumed guard) These tests verify the dispose→reconnect→send flow and SendingFlag-release invariants that were previously untested. If the pre-check block were deleted from production code, these tests would now fail. Addresses review finding #3 (MODERATE). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Renamed ShutdownPreCheckTests to SessionManagementSmokeTests with honest test names. These tests verify dashboard/prompt UI presence — a baseline smoke test, not the shutdown pre-check feature itself. Addresses review finding #4 (MINOR). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Changed PrematureIdleSignal_ResetInSendPromptAsync test from a 10000-char substring window to IndexOf(string, startIndex) — no longer breaks when SendPromptAsync grows. Addresses review finding #5 (MINOR). 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 5 review findings from expert review round 2.
Changes
🟡 MODERATE —
OperationCanceledExceptioncatch (CopilotService.cs): Added separatecatch (OperationCanceledException)that rethrows directly without wrapping, preserving cancellation semantics in orchestration/reflection paths.🟢 MINOR — Skip pre-check after lazy-resume (
CopilotService.cs): AddedwasLazyResumedguard so the shutdown pre-check is skipped when the lazy-resume block just ran, avoiding redundant double-reconnect on staleevents.jsonl.🟡 MODERATE — Structural tests for pre-check code paths (
ShutdownPreCheckTests.cs): Added 3 structural tests verifying OCE is not wrapped, SendingFlag is released in both catch blocks, and pre-check is skipped after lazy-resume.🟢 MINOR — Integration test rename (
SessionManagementSmokeTests.cs): RenamedShutdownPreCheckTeststoSessionManagementSmokeTestswith honest names reflecting actual coverage (dashboard/prompt UI smoke tests).🟢 MINOR — Fragile test window (
MultiAgentRegressionTests.cs): Replaced fixed 10000-charSubstringwindow withIndexOf(string, startIndex)— no longer breaks whenSendPromptAsyncgrows.Test Results
All 3647 unit tests pass (12 shutdown pre-check tests including 3 new structural tests).
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.