Skip to content

Keep status spinners off redirected and custom output - #2172

Merged
Tyrie Vella (tyrielv) merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/spinner-output-hardening
Nov 12, 2026
Merged

Tyrie Vella (tyrielv) merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/spinner-output-hardening

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

Direct callers can request a spinner even when the destination is a file or pipe. The helper currently trusts that request. This adds carriage-return updates and transient status text to captured output.

Changes

  • Require a recognized console destination before status animation. Check stdout and stderr redirection independently.
  • Keep file, memory, pipe, and unknown writers on the static start/result path. Preserve explicit showSpinner: false behavior.
  • Reject Console.SetOut and Console.SetError replacements through optional runtime metadata. Public redirection flags describe OS handles, not managed replacements. Missing metadata disables animation. Preserve this metadata for NativeAOT.
  • Add unit tests for static FileStream, memory, and pipe writers, completion results, and failure messages. The FileStream test uses a pipe handle without disk access.
  • Add unit tests for independent stdout/stderr eligibility, explicit spinner requests, managed console replacements, runtime metadata compatibility, and conservative metadata fallback. These tests use no sleeps.

Require a recognized console writer and its corresponding unredirected stream before status animation. Keep custom writers on the static start/result path.

Reject managed console replacements through optional runtime metadata. If the runtime metadata is absent, disable animation. Preserve that metadata for NativeAOT.

Add unit tests for static FileStream, memory, and pipe writers and completion messages. Add unit tests for explicit spinner requests, managed replacements, independent redirection, and runtime metadata compatibility. Keep the FileStream test off disk through a borrowed pipe handle.

Assisted-by: GPT-6.1 Sol

Signed-off-by: Tyrie Vella <[email protected]>
@tyrielv
Tyrie Vella (tyrielv) force-pushed the tyrielv/spinner-output-hardening branch from b163c7b to aade8e1 Compare November 11, 2026 20:46
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 11, 2026 23:35
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ No issues found · iteration 1 (aade8e1)

Approach: Right layer: gating animation inside the shared ConsoleHelper fixes the ungated RepairVerb and PrefetchVerb spinners and future direct callers, not another per-call-site check.

Validation

  • ✅ GVFS.UnitTests full suite, head + base
  • ✅ ConsoleHelperTests 20/20; mutants killed
  • ✅ NativeAOT console/file/pipe probes
  • ✅ GVFS.Hooks AOT publish (ILC)
  • ✅ CommandLine.Tests 94/94; FT compile
  • ⏭️ Functional tests, hook E2E, CI — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute

auto-merge was automatically disabled November 12, 2026 17:00

Pull request was closed

@tyrielv
Tyrie Vella (tyrielv) merged commit 3c2cf29 into microsoft:master Nov 12, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants