feat(dispatch): add detached SSH task execution - #1850
Merged
Conversation
3 tasks
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.
Summary
bitfun dispatchprotocol, crash-safe persistent job store, detached worker, explicit unattended approval policies, cursor events, and fail-safe PID/process-group cancellationNo linked issue.
Type and Areas
Type: Feature / UI/UX / CI / test
Areas: CLI, Rust core, SSH services, desktop/Tauri, Server Host, Web UI, release workflows, i18n
Motivation / Impact
This implements Dispatch Phase 1: a user can select an SSH execution target when creating a task, explicitly choose Auto or Reject-and-report approval behavior, and let the target-owned agent job continue after the dispatching Desktop process disconnects or exits. The dispatching client remains a submitter and read-only observer; it never acquires local workspace/runtime ownership or writes the remote session into its local session store.
Targets are intentionally limited to Linux and macOS over SSH in this phase. Account/relay device dispatch remains a later phase.
Verification
Passed after rebasing onto the latest upstream
main:cargo check --workspacecargo test -p bitfun-cli dispatch --no-fail-fast— 43 passedcargo test -p bitfun-services-integrations --features remote-ssh-concrete remote_ssh::dispatch_ssh --lib— 13 passedcargo test -p bitfun-services-integrations --features remote-ssh-concrete remote_ssh::release_verify --lib— 3 passedpnpm run type-check:webpnpm --dir src/web-ui run test:run src/features/dispatch src/flow_chat/components/ChatInputWorkspaceStripLayout.test.ts src/flow_chat/services/FlowChatManager.test.ts src/flow_chat/services/flow-chat-manager/MessageModule.test.ts src/flow_chat/services/flow-chat-manager/SessionModule.test.ts src/flow_chat/store/FlowChatStore.test.ts— 11 files / 145 passednode --test scripts/relay/package-contract.test.mjs— 5 passedpnpm run check:github-configgit diff --check upstream/main...HEADAdditional completed checks:
pnpm run i18n:generate && pnpm run i18n:contract:test && pnpm run i18n:auditpnpm run theme:color-audit:allpnpm run lint:webpnpm run check:repo-hygieneNot yet performed: the clean Linux/macOS VM acceptance matrix covering first-time install,
pkill -9 BitFun, Desktop restart/cursor replay, remote-only filesystem effects, and tampered-archive rejection.Reviewer Notes
Architecture and safety invariants:
job.jsonis the final commit marker, and pre-worker controller crashes recover without replaying an ambiguous turnKnown non-blocking follow-ups include Server Host message-size alignment, visible transcript-gap handling for log rotation/omitted events, canonical path alias handling, an in-progress install cancel affordance, unread-completion parity, and job/outbound retention/GC.
Checklist