test(e2e): add ctrl-c propagation test for SIGINT handling#303
Draft
branchseer wants to merge 2 commits intomainfrom
Draft
test(e2e): add ctrl-c propagation test for SIGINT handling#303branchseer wants to merge 2 commits intomainfrom
branchseer wants to merge 2 commits intomainfrom
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c1d1b85 to
97f8b7b
Compare
5781dac to
ad91c93
Compare
4ea2b22 to
e84a708
Compare
786331f to
fbc75db
Compare
e84a708 to
edfdcbc
Compare
fbc75db to
8e34039
Compare
edfdcbc to
8721599
Compare
8e34039 to
cae622a
Compare
8721599 to
9314b46
Compare
cae622a to
d1996eb
Compare
9314b46 to
69e5d13
Compare
d1996eb to
a3716a4
Compare
69e5d13 to
13f2b7b
Compare
a3716a4 to
a2efffe
Compare
13f2b7b to
685193b
Compare
a2efffe to
c7a069c
Compare
685193b to
07348e4
Compare
c7a069c to
91845ad
Compare
07348e4 to
522e8ec
Compare
91845ad to
07283e0
Compare
b6ef94b to
9ae39c0
Compare
07283e0 to
c4118ad
Compare
c4118ad to
e185c1a
Compare
9ae39c0 to
c301f3c
Compare
e185c1a to
ef2c4b4
Compare
c301f3c to
ecf2fbc
Compare
ef2c4b4 to
80980a2
Compare
ecf2fbc to
1b4b4ba
Compare
1b4b4ba to
7292492
Compare
Add a `vtt exit-on-ctrlc` subcommand and e2e fixture that verifies SIGINT propagates to concurrent tasks when the user presses Ctrl+C. The test runs two packages with `vt run -r dev` (using argv spawn mode), synchronizes via milestone protocol, then sends ctrl-c and verifies both tasks handle it. Changes: - `vtt exit-on-ctrlc`: sets up ctrl-c handler, emits "ready" milestone, prints "ctrl-c received" and exits on SIGINT. On Windows, clears the inherited CONSOLE_IGNORE_CTRL_C flag (set by an ancestor process via CREATE_NEW_PROCESS_GROUP) before registering the handler. - `vt main.rs`: register no-op ctrlc handler before tokio runtime so vt survives Ctrl+C and reports actual task exit status. Use process::exit to avoid Windows runtime cleanup issues. - `ctrl-c` WriteKey variant for e2e test interactions (rename_all kebab-case) - Fix `expect_milestone` to preserve unmatched milestones in a local buffer instead of dropping them via `take_unhandled_osc_sequences` - Strip `^C` terminal echo and normalize `ctrl-c received` count in e2e redaction for cross-platform consistency - Fix incorrect comment in pty_terminal test about CTRL_C ignore flag source Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Revert pending_osc buffering in pty_terminal_test (unnecessary) - Remove "ctrl-c receivedctrl-c received" redaction (no longer needed) - Use single-package fixture with vite-task.json command instead of multi-package workspace with two concurrent tasks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7292492 to
dab5d8c
Compare
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.

Add a
vtt exit-on-ctrlcsubcommand and e2e fixture that verifies SIGINTpropagates to concurrent tasks when the user presses Ctrl+C. The test runs
two packages with
vt run -r dev(using argv spawn mode), synchronizesvia milestone protocol, then sends ctrl-c and verifies both tasks handle it.
Changes:
vtt exit-on-ctrlc: sets up ctrl-c handler, emits "ready" milestone,prints "ctrl-c received" and exits on SIGINT. On Windows, clears the
inherited CONSOLE_IGNORE_CTRL_C flag (set by an ancestor process via
CREATE_NEW_PROCESS_GROUP) before registering the handler.
vt main.rs: register no-op ctrlc handler before tokio runtime so vtsurvives Ctrl+C and reports actual task exit status. Use process::exit
to avoid Windows runtime cleanup issues.
ctrl-cWriteKey variant for e2e test interactions (rename_all kebab-case)expect_milestoneto preserve unmatched milestones in a local bufferinstead of dropping them via
take_unhandled_osc_sequences^Cterminal echo and normalizectrl-c receivedcount in e2eredaction for cross-platform consistency
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com