chore: version packages - #457
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
Deploying herdctl with
|
| Latest commit: |
82539bb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c40806b6.herdctl.pages.dev |
| Branch Preview URL: | https://changeset-release-main.herdctl.pages.dev |
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.33.1
Patch Changes
#431
9b1e34aThanks @edspencer! - Stop inferring a new CLI session's id — mint it and tell the CLI to use it (CLI runtime: resume:null session-id resolution steals a co-located agent's session id (shared cwd + concurrent stream) #357).waitForNewSessionFileworked out which transcript a freshly-spawnedclaudehad created by looking at the session directory. Issue CLI runtime: resume:null session-id resolution steals a co-located agent's session id (shared cwd + concurrent stream) #357 fixed half of that:
a snapshot taken before spawning identifies the new session by set difference, so
a co-located agent appending to its own session can no longer be mistaken for
ours. The other half was left as a guess:
The newest is not ours — it is whoever spawned last. When two agents share a
working directory they share one
~/.claude/projects/<encoded-cwd>/, and twoconcurrent
resume:nullspawns produce two brand-new files that areindistinguishable by name or mtime. The two agents then trade session ids:
each adopts the other's transcript, and each writes a job record claiming it.
Claude Code accepts
--session-id <uuid>and names the transcript after it (thisalso composes with
--fork-session). So a turn that starts a new session nowmints its own id and passes it, and the file is known by name — no snapshot, no
mtime, no tie-break, nothing to get wrong. A plain resume already knows its id
and is unchanged. Set
HERDCTL_CLI_MINT_SESSION_ID=0to restore the oldinference.
If the expected file never appears — a CLI too old to know the flag, or a test
harness's fake that has not been taught it — herdctl logs a warning and falls
back to the previous inference rather than failing the turn.
While the CLI is still running, the inference paths stay disabled: "take
whichever brand-new file shows up" is exactly the collision
--session-idexiststo remove, so a co-located agent's file cannot be claimed just because it landed
first. But once the process has exited without writing the file we asked for,
that is settled rather than merely unknown, so the fallback runs immediately
instead of burning the full 60 s timeout. That distinction is what keeps this
change survivable for every existing fake-CLI harness.
Also make attribution of a doubly-claimed session id deterministic — CLI runtime: resume:null session-id resolution steals a co-located agent's session id (shared cwd + concurrent stream) #357's
proposed "secondary hardening", which was never implemented.
AttributionIndexBuilderfilled its session→agent map inPromise.allcompletion order, so when two records claimed one session id the winner was
whichever file's stat+parse finished last. That is decided by record size and
machine load: with the same two records on disk, making one record larger flips
the winner (measured 10/10 each way). Claims are now ordered explicitly — newest
started_atwins, ties broken on job id — so the answer is a pure function ofwhat is on disk. Newest-wins rather than first-owner-wins because adopting or
promoting a session is a legitimate change of owner, and those write a newer
record.
Together these turn a failure that was arbitrary in both directions into one that
cannot happen, and — where a collision is somehow still reached — into one that
is at least consistent.
Found via paddock#548, where a project's keeper and its post-turn sweeper share a
cwd: a sweep is scheduled after every keeper turn, so the sweeper's spawn raced
the next keeper turn and a user's chat could be bound to the curator's transcript
— streaming the wrong reply, resuming the wrong history, and disappearing from
the chat list depending on which record won attribution.