Skip to content

Release 6.0.0: Ctrl+C grace-period fix, CI reliability, release-pin guard, doc cleanup - #161

Merged
FRACerqueira merged 5 commits into
mainfrom
develop
Aug 28, 2026
Merged

Release 6.0.0: Ctrl+C grace-period fix, CI reliability, release-pin guard, doc cleanup#161
FRACerqueira merged 5 commits into
mainfrom
develop

Conversation

@FRACerqueira

Copy link
Copy Markdown
Owner

Prepares PromptPlus for the 6.0.0 stable release. No public API surface changes.

Fix: Ctrl+C cleanup no longer blocks on a Live control's background task

BaseControlPrompt.Run() wraps ConsolePlus.BeginCriticalRender() around the whole
method. For Task/MultiTasks/ProgressBar, FinalizeControl() did
_cancellationTokenSource.Cancel(); _executionTask.GetAwaiter().GetResult(); with no
timeout — if the caller's delegate takes longer than ConsolePlus's 300ms exit grace
period to observe cancellation, Environment.Exit fires mid-wait, starving the
terminal-restoration cleanup that runs right after of the time it needs.

FinalizeControl now takes an aborted flag; the three affected controls skip the
blocking join on abort (the normal completion path is unchanged — that join is correct
and required there for result/exception propagation). TimerControl's FinalizeControl
is a no-op and was unaffected. Added a regression test simulating an unresponsive
handler (confirmed red on the old behavior, green on the fix). Also made
VirtualTerminal.CancelToken injectable so a test can exercise the real
console.CancelToken propagation path, not just a caller-supplied token. Documented the
grace period's actual duration (300ms, non-configurable) and updated behavior.

CI / release pipeline

  • The changes/path-filter job had no checkout, so on a direct push it failed silently
    and skipped tests instead of running thee
    on.push.paths/on.pull_request.paths triggers.
  • Added a dotnet test step to the releasild → Pack →
    Publish with zero test execution on the release path).
  • Added a guard right after extracting the: PromptPlus's
    own version comes from the tag, but the ConsolePlus.net PackageReference version is
    a literal -p:Version never touches — a pin is still a
    prerelease would silently ship a stable package depending on a prerelease dependency,
    permanently. The guard fails the release

Release / packaging

  • Version bumped 6.0.0-rc26.0.0; C the now-published stable 1.0.0`.
  • GeneratePackageOnBuild scoped to `Debupacking an unused
    nupkg on every CI Release build.
  • README: removed Release Candidate / pre-all
    instructions), fixed 7 wrong return types and 3 missing controls (Slider/Switch/Timer)
    in the Controls Reference table, fixed a a stale widget
    parameter name, and cross-repo doc links (repointed at ConsolePlus's main, verified
    against the real remote rather than a st

Tooling

  • Fixed adr-config.adrplus: adrplus 1.0.0 config fields
    outright (lenscope, scopes, folderbyscope, skipdomain) — confirmed the config
    was actually broken before this fix, ver

Testing

  • Full PromptPlus.Tests suite green (736s` green,
    including the new regression tests.
  • dotnet build/dotnet pack verified cl
  • CI green on this branch after push (native path-filter trigger confirmed working in
    production, not just simulated).
  • Verified end-to-end against the real, now-published ConsolePlus.net 1.0.0 package
    (not just the local dev feed).

Notes

  • No consumer-facing API changes.

FRACerqueira and others added 5 commits August 28, 2026 12:50
…release against a prerelease ConsolePlus.net pin

ci.yml: same fix as ConsolePlus -- the dorny/paths-filter `changes` job had no checkout,
so it silently failed on push (continue-on-error) and skipped tests instead of running
them. Replaced with GitHub-native on.push.paths/on.pull_request.paths triggers.

publish-nuget.yml: added a `dotnet test` step (ConsolePlus's release workflow already had
one; this one didn't -- no verified path ran PromptPlus's tests before a NuGet publish).
Also added a guard step right after extracting the version from the tag: PromptPlus's own
version comes from the tag, but the ConsolePlus.net PackageReference version is a literal
`-p:Version` never touches, so a stable tag (no "-") packed while that pin is still a
prerelease would silently ship a stable package depending on a prerelease dependency,
permanently (published packages can't be edited). The guard fails the release outright
in that case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
BaseControlPrompt.Run() wraps ConsolePlus.BeginCriticalRender() around the whole method,
including FinalizeControl(). For Task/MultiTasks/ProgressBar, FinalizeControl() did
`_cancellationTokenSource.Cancel(); _executionTask.GetAwaiter().GetResult();` with no
timeout -- if the caller's delegate takes longer than ConsolePlus's 300ms exit grace
period to observe cancellation, Environment.Exit fires mid-wait, starving the (fast,
certain) terminal-restoration cleanup that runs right after of the time budget it
needs.

FinalizeControl now takes an `aborted` flag (BaseControlPrompt.Run passes
cts.Token.IsCancellationRequested); the three affected controls skip the blocking task
join when aborted -- that wait never had a real guarantee once Ctrl+C is racing the
grace period anyway. The normal (non-aborted) completion path is unchanged, since the
join there is correct and required for result/exception propagation. TimerControl's
FinalizeControl is a no-op and was unaffected by the bug.

Added a regression test (ProgressBarControlTests) simulating an unresponsive handler --
confirmed red (reverting the guard hangs the test on the blocking join) then green.

Made VirtualTerminal.CancelToken injectable via VirtualTerminalOptions.CancelToken so a
test can exercise the real console.CancelToken propagation path (as opposed to a
caller-supplied stoptoken, which every existing abort test already covers) --
CancelAbortRenderTests now has a test for it.

Documented the grace period's actual duration (300ms, non-configurable) and that Live
controls no longer wait on their own background task on abort.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…-release docs

Version bump:
- PromptPlus.csproj: 6.0.0-rc2 -> 6.0.0; ConsolePlus.net PackageReference: 1.0.0-rc2 ->
  1.0.0 (verified against a real local ConsolePlus.net 1.0.0 build: restore, build, and
  the full test suite all green).
- Scoped GeneratePackageOnBuild to Debug only, same rationale as ConsolePlus: the CI
  Release build step was packing an unused nupkg every run; PromptPlus has no local-feed
  consumer of its own package, so this is pure waste removal, not a behavior change.

Documentation, verified against current source rather than assumed:
- README's Controls Reference table had 7 wrong return types (MultiSelect, File,
  MultiFile, Calendar, ProgressBar, MultiTasks, ChartBar) and was missing Slider/Switch/
  Timer entirely; corrected against every control's actual Run() signature.
- Fixed a false Ctrl+C claim (RemoveHandlerCtrlC has no effect -- confirmed it's stored
  but never read anywhere in src/), a stale widget parameter name (fracionaldig ->
  fractionalDigits), and 4 dead relative links to ConsolePlus's docs (repointed to
  ConsolePlus's develop branch, where those files actually live -- confirmed via
  git ls-tree; main is far behind in both repos).
- Removed the Release Candidate / pre-release language throughout (badge, installation
  instructions, the old RC announcement section) now that the Beta/RC phase is over.
- Documented two DefaultDocumentation generator limitations (silently dropped tuple-
  predicate overloads; dead learn.microsoft.com links for ConsolePlus types) that a docs
  regen can't fix, instead of leaving them unexplained.
- docs/consoleplus-dependency.md: updated the illustrative pin version to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Verified against the real origin/main (not a stale, never-fetched local ref) --
ConsolePlus's main already has these files via its own regular develop->main merge
PRs, so linking at develop here was unnecessary and, going forward, would drift
from main as ConsolePlus's post-1.0 work resumes on its develop branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ields)

Same fix as ConsolePlus's. adrplus 1.0.0 rejects unknown config fields outright --
confirmed this repo's config was actually broken (adrplus plugins --list failed with
"Unexpected fields found: lenscope, scopes, folderbyscope, skipdomain") before this
fix. Removed those 4 leftover pre-1.0.0 fields; verified `adrplus plugins --list` and
`adrplus explore` both work again afterward (26 ADRs found).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@FRACerqueira
FRACerqueira merged commit 5a8b0b8 into main Aug 28, 2026
1 check 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.

1 participant