Release 6.0.0: Ctrl+C grace-period fix, CI reliability, release-pin guard, doc cleanup - #161
Merged
Conversation
…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>
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.
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()wrapsConsolePlus.BeginCriticalRender()around the wholemethod. For Task/MultiTasks/ProgressBar,
FinalizeControl()did_cancellationTokenSource.Cancel(); _executionTask.GetAwaiter().GetResult();with notimeout — if the caller's delegate takes longer than ConsolePlus's 300ms exit grace
period to observe cancellation,
Environment.Exitfires mid-wait, starving theterminal-restoration cleanup that runs right after of the time it needs.
FinalizeControlnow takes anabortedflag; the three affected controls skip theblocking join on abort (the normal completion path is unchanged — that join is correct
and required there for result/exception propagation).
TimerControl'sFinalizeControlis 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.CancelTokeninjectable so a test can exercise the realconsole.CancelTokenpropagation path, not just a caller-supplied token. Documented thegrace period's actual duration (300ms, non-configurable) and updated behavior.
CI / release pipeline
changes/path-filter job had no checkout, so on a direct push it failed silentlyand skipped tests instead of running thee
on.push.paths/on.pull_request.pathstriggers.dotnet teststep to the releasild → Pack →Publish with zero test execution on the release path).
own version comes from the tag, but the
ConsolePlus.netPackageReferenceversion isa literal
-p:Versionnever touches — a pin is still aprerelease would silently ship a stable package depending on a prerelease dependency,
permanently. The guard fails the release
Release / packaging
6.0.0-rc2→6.0.0;C the now-published stable1.0.0`.GeneratePackageOnBuildscoped to `Debupacking an unusednupkg on every CI Release build.
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, verifiedagainst the real remote rather than a st
Tooling
adr-config.adrplus:adrplus1.0.0 config fieldsoutright (
lenscope,scopes,folderbyscope,skipdomain) — confirmed the configwas actually broken before this fix, ver
Testing
PromptPlus.Testssuite green (736s` green,including the new regression tests.
dotnet build/dotnet packverified clproduction, not just simulated).
ConsolePlus.net 1.0.0package(not just the local dev feed).
Notes