Repository navigation
Fix Automations CLI host, path, and --at drift from core - #6885
Merged
ymichael merged 1 commit intoNov 3, 2026
Merged
Conversation
The automation CLI's copies of core's thread-spawn helpers had drifted: --environment C:\repo was stored as an environment id because the path check missed Windows separators and drive letters; --new-environment and workspace paths ran on the first host matching a nonexistent "connected" field, then any connected host, then hosts[0] even if offline; and --at accepted a date-only value as UTC midnight. Apply core's path rules, run on the calling thread's machine falling back to primaryHostId (reusing the --script-file thread-host lookup), and reject date-only --at values as ambiguous. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/fix-automations-cli-target-and-date-drift-thr_42m6bgjbxh
branch
November 3, 2026 00:59
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.
Human comments
What was wrong
The Automations CLI copies core's thread-spawn helpers, and the copies drifted. Its path check missed Windows paths (#4659), so
--environment C:\repowas saved as an environment id.--new-environmentand workspace paths picked the first host matching aconnectedfield that doesn't exist, then any connected host, thenhosts[0]even when offline. Core uses the CLI's own machine.--at 2026-12-01was read as UTC midnight, but core rejects a date with no time as ambiguous.What changed
plugins/automations/src/cli.tsonly:primaryHostId. This reuses the thread-host lookup that--script-filealready had. The old host-list scan is deleted.--atis rejected. Other--atvalues parse as before.--environmenthelp text now says where a path runs.No plugin SDK, host-daemon protocol, or RPC contract changes. Open #6056 makes the same default-machine change as part of a larger feature; whichever lands second will need a small conflict fix in
cli.ts.How you verified
New tests in
server-harness.test.tsfailed before the fix and pass after:--environment C:\repoand--new-environment worktreefrom a thread land on that thread's machine. Before, the path was saved asreuseand the worktree went to the first connected host.--atis rejected. Before, it was accepted.Three existing expectations moved from the first connected host to the primary host, so they now cover the no-thread fallback.
pnpm exec turbo run test typecheck lint --filter=bb-plugin-automationspasses: 166 tests; lint has 0 errors and 4 warnings, all pre-existing in other files.🤖 Generated with Claude Code