Skip to content

feat(dispatch): complete detached multi-device workflows - #1856

Merged
bobleer merged 4 commits into
GCWing:mainfrom
bobleer:bob/dispatch-completion
Jul 29, 2026
Merged

feat(dispatch): complete detached multi-device workflows#1856
bobleer merged 4 commits into
GCWing:mainfrom
bobleer:bob/dispatch-completion

Conversation

@bobleer

@bobleer bobleer commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • complete detached dispatch over account devices, including correlated Relay RPC, target-side CLI delegation, target discovery, offline handling, and durable observer adoption
  • add exact one-time workspace snapshot delivery for SSH and account-device targets with bounded archives, manifest and SHA-256 validation, resumable staging, and atomic target publication
  • add remote approval responses, idempotent steering messages, completion notifications, multi-observer event cursors, retention cleanup, target filters, badges, and account-device UX
  • document workspace ownership and synchronization semantics in docs/architecture/detached-task-dispatch.md and expose the completed CLI surface

Type and Areas

Type: Feature / UI/UX / docs / test

Areas: Rust core, CLI, desktop/Tauri, server, SSH services, Relay device transport, web UI, i18n

Motivation / Impact

This finishes the work after #1850 so a task can be dispatched to either an SSH host or another signed-in BitFun device and continue after the controller disconnects. Users can choose an existing target directory or send an exact workspace snapshot, supervise permissions remotely, append instructions, and recover observation from another client.

Workspace snapshots are intentionally one-way and immutable: .git metadata is excluded, links and special files are rejected, the target copy becomes authoritative, and there is no implicit live sync or automatic sync-back.

Verification

  • cargo check --workspace
  • cargo test -p bitfun-cli dispatch: 53 passed
  • cargo test -p bitfun-core service::dispatch: 11 passed
  • cargo test -p bitfun-services-core --features dispatch-workspace dispatch_workspace: 6 passed
  • cargo test -p bitfun-services-integrations --features remote-ssh-concrete remote_ssh::dispatch_ssh::tests: 13 passed
  • cargo test -p bitfun-desktop dispatch: 3 passed
  • pnpm run type-check:web
  • pnpm run lint:web
  • focused Web dispatch and flow-chat tests: 11 files, 113 passed
  • pnpm run i18n:generate
  • pnpm run i18n:contract:test: 37 passed
  • pnpm run i18n:audit: passed with 0 warnings
  • pnpm run check:repo-hygiene
  • pnpm run check:github-config: 7 passed
  • node scripts/check-core-boundaries.mjs

Manual clean-VM SSH survival and two-device Relay acceptance were not run in this environment because they require external target hosts and accounts.

Reviewer Notes

The exact snapshot contract is bounded at 100,000 entries, 256 MiB per file, 2 GiB uncompressed, and 1 GiB compressed. SSH streams the archive over SFTP; account-device delivery uses bounded encrypted RPC chunks. Materialization is detached and target-side so controller or RPC timeout does not cancel publication.

The target job record is authoritative. Controller-side outbound records are observer projections only, carry independent cursors, and are retained separately.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer force-pushed the bob/dispatch-completion branch from 2f86339 to fcd54d8 Compare July 29, 2026 11:48
@bobleer
bobleer merged commit b5f4db7 into GCWing:main Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant