chore: version packages - #442
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@herdctl/core@5.31.0
Minor Changes
#441
2a60e82Thanks @edspencer! - feat(core):FleetManager.reapChatSession— close a managed session that the reap policy will never releasedecideReapkeeps a streaming session alive for exactly as long as it holdslive background work, with — by its own header comment — "no idle timer, no
max-lifetime backstop, no idle-concurrency cap". That is the right default:
reaping a session with work in flight kills the work. But it left consumers with
no way out when a session becomes permanently unreapable, and there are at least
two ordinary ways that happens:
untilloop whose sentinelnever arrives), so
backgroundTasksnever drains.limit, say.
activityhas already clearedawaitingTasks, so every laterbackground_tasks_changedreturns early at the guard, and only aturn_endcould re-arm it or reap. None comes. The session is stranded live with no
pending reap.
In both cases the session's message stream never ends, so a consumer rendering
that stream shows the chat as running until the process restarts. There was no
API to end it.
SessionReaper.forceReap(sessionId)closes a live managed sessionregardless of what it is holding, and
FleetManager.reapChatSession(sessionId)exposes it (the lifecycle manager is private on the fleet). Both are idempotent
and return
falsefor an unknown, unmanaged or already-reaped id.This belongs on the reaper rather than being a
close()the consumer calls onthe
RuntimeSessionit already holds. Closing the query directly goes behind thereaper's bookkeeping:
liveByIdkeeps a stale entry, sowhenSessionReapednever resolves — a later resume of that id stalls until its 5-minute ceiling
(openChatSession(resume) spawns a second subprocess for an already-live session → SDK self-interrupt (double-resume class) #403) — and
WakeRegistryskips that session's wakes forever.forceReaproutes through the same private
reapthe policy uses, so the id isunregistered, reap waiters drain, and the consumer observes an ordinary
end-of-stream and unwinds through its ordinary path. No new teardown contract.
The reap log line now carries a reason (
Reaping idle session …is unchanged;a forced one reads
Reaping force-reaped on request session …).Policy is untouched: nothing reaps on its own that didn't before. This only adds
a door that can be opened deliberately, so a consumer can honour a user's "stop
this now". Note that
interrupt()is not that door — it targets an in-flightmodel turn, and a session held open purely for background work has none.
Unblocks paddock#528, where a
chat wedges "running" with a Stop button that cannot do anything.