fix: restore worktree follow-up sends and deferred spec checks - #3239
Merged
Merged
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
Fix follow-up messages in worktree-isolated sessions. Backend readiness, empty-session recreation, and send retries now use the owning project's workspace ID; turn execution keeps the worktree ID and directory.
Update three tool-pipeline assertions left behind by the GetToolSpec wording change in #3238, which caused its Rust library tests and aggregate validation check to fail.
Type and Areas
Type: bug fix / regression test / CI test repair.
Areas: Web UI session lifecycle; Rust core tool-pipeline tests.
Motivation / Impact
The first message creates and binds the managed worktree after checking the original project. On the second message, readiness previously looked up the worktree's execution ID in the opened/recent workspace catalog and failed with
Workspace ID is unavailable. The owning project is already the established address for session state, and the worktree execution record need not be open.The same identity correction covers backend recreation and retry. Existing sessions retain their execution binding, and unavailable project records still produce an explicit error.
Verification
pnpm --dir src/web-ui exec vitest run --maxWorkers=50% src/flow_chat/services/flow-chat-manager/SessionModule.test.ts src/flow_chat/services/flow-chat-manager/MessageModule.test.ts src/flow_chat/session-drivers/local/LocalSessionDriver.test.ts src/flow_chat/utils/sessionOrdering.test.ts: 127 passed. The added readiness/recreation regressions failed on the original code. Coverage includes direct and queued follow-up submission, legacy config identities, Peer surface mocks, SSH routing mocks, and missing-project rejection.cargo test --locked --offline -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::tools::pipeline::tool_pipeline::tests: reproduced the same three failures as fix: handle compacted tool specs and paused cron badges #3238 before the assertion update; 49 passed afterward.pnpm run check:web: passed after generating the standard Monaco assets and API bindings.pnpm run fmt:rs,git diff --check, andnode scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD: passed.Reviewer Notes
AI-assisted; tested with focused automated suites. No live desktop or remote end-to-end test was run. Remote workspace and Peer Device behavior are covered by mocks; Remote Control and Detached Dispatch were not exercised. No persisted format or wire-protocol change.
Checklist