[release/13.4] Fix Y/n input race in ChannelUpdateWorkflowTests + add CLI E2E troubleshooting doc - #17541
Merged
Merged
Conversation
…g.md
The Spectre.Console [Y/n] confirmation prompt is a single-character reader,
not a line reader. Sending TypeAsync("n") + EnterAsync() queues both bytes
in the TTY input buffer; when the CLI returns on "n" and tears down its
stdin handler before \n is consumed, bash receives the stray \n as an
empty command and bumps CMDCOUNT via PROMPT_COMMAND.
The test's SequenceCounter then ends up coincidentally agreeing with bash's
drifted CMDCOUNT. The next WaitForAspireAddSuccessAsync false-positives on
the typed-command prompt header line ([N OK] $ aspire add ...) that bash
printed when accepting the command, returning success before aspire add has
actually written aspire.config.json. The follow-on Assert reads the file
too early and fails.
This matches the existing convention in DeclineAgentInitPromptAsync which
documents the same race and avoids it by not sending Enter after the
single-character answer.
Also adds .github/skills/cli-e2e-testing/troubleshooting.md describing the
diagnostic recipe (right-artifact selection, cast reconstruction, prompt-
counter desync, Y/n race signature) so future agent sessions can recognize
the pattern, and references it from SKILL.md.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17541Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17541" |
Contributor
|
❓ CLI E2E Tests unknown — 107 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26517025961 |
davidfowl
approved these changes
May 27, 2026
Contributor
Author
|
✅ No documentation update needed. docs_optional → No triggered signals ( All 3 changed files are either agent/skill content or test code:
None of these files affect user-facing behavior, public API, CLI commands, dashboard pages, or any other content that belongs on the docs site. |
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.
Backport of #17533 to release/13.4
/cc @mitchdenny
Customer Impact
Testing
Risk
Regression?