fix(dispatch): harden session delivery and snapshot reuse - #1924
Merged
bobleer merged 11 commits intoJul 31, 2026
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.
Summary
Fixes: N/A
Type and Areas
Type:
Regression fix / UI/UX / performance
Areas:
Rust core, CLI, desktop/Tauri, remote SSH transport, Web UI, docs
Motivation / Impact
Dispatch sessions previously diverged from normal sessions, could appear under the wrong workspace or assistant section, could lose the sender-side turn, and could create duplicate observer entries after restart. Target readiness also relied too heavily on version strings, model synchronization exposed generated ids, and every new job could repeat an expensive workspace package and transfer.
This PR makes dispatch a session-level concern, preserves normal chat behavior, gates submission while preparation is in progress, uses capability-based compatibility checks, and keeps observer ownership deterministic. Verified snapshots are cached by content on the target and by canonical workspace plus capture mode on the controller. Unchanged workspaces no longer reread/recompress/retransfer the full archive, while each job still receives its own writable workspace.
Verification
pnpm run type-check:web— passedpnpm run i18n:audit— passed with 0 warningscargo test -p bitfun-services-core --features dispatch-workspace source_fingerprint_reuses_ignored_state_and_invalidates_included_changes --lib— passedcargo test -p bitfun-core workspace_cache_reuses_unchanged_source_across_dispatch_jobs --lib— passedcargo build --release --locked -p bitfun-cli --bin bitfun --bin bitfun-clion the aarch64 Linux dispatch target — passedbitfun dispatch probeon the deployed target reported protocol v2, configured models,dispatch_worker_cli_profile,workspace_snapshot_cache, anddetached_workerReviewer Notes
current/directories.Checklist