Repository navigation
Flush active recording when Dev Proxy shuts down. Closes #1945 - #1946
Merged
waldekmastykarz merged 2 commits intoOct 21, 2026
Merged
Conversation
Restores v3 behavior: stopping the proxy (Ctrl+C, devproxy stop, API) while recording now runs AfterRecordingStopAsync so plugins like HarGeneratorPlugin still write their output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 545e4fa5-3816-4970-a2d0-8f8083d93163
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues remain; only a nonblocking shutdown-order documentation correction is needed.
1 open issue
What changed in this PR
Restores recording export on shutdown after the Kestrel migration, addressing #1945.
Changes:
- Stops the hotkey loop, then awaits completion of any active recording.
- Adds tests for shutdown with and without active recording.
| File | Description |
|---|---|
| DevProxy/Proxy/InteractiveConsoleService.cs | Flushes active recording during shutdown so plugins can export output. |
| DevProxy.Tests/InteractiveConsoleServiceTests.cs | Tests conditional recording shutdown. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Closes #1945
Restores v3 behavior lost in the Kestrel migration: stopping Dev Proxy (Ctrl+C,
devproxy stop, API) while recording now stops the recording first, soAfterRecordingStopAsyncruns and plugins like HarGeneratorPlugin write their output.InteractiveConsoleService.StopAsyncstops the hotkey loop, then flushes the active recording. Hosted services stop in reverse registration order, so this runs before the proxy engine shuts down.InteractiveConsoleServiceTests.