[Fix] Subtasks process queued feedback before returning - #1318
zoomote[bot] wants to merge 24 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: Mark the PR ready. Required CI must pass before CodeRabbit starts. Review-state labels are managed by this workflow; do not edit them manually. |
0cc0096 to
a83534e
Compare
|
@CodeRabbit review |
✅ Action performedReview finished.
|
✅ Action performedReview finished.
|
4aedd69 to
a6b8d5f
Compare
What changed
Streaming API input is normalized and enqueued directly in the extension host so it cannot race child completion through an asynchronous webview round trip. Text is trimmed, supplied images receive synchronous count/type/deduplication/size validation, and callers get a rejected promise when normalization leaves no usable input instead of a silently dropped message.
The VS Code e2e queues input while a child is completing, verifies the child processes it, and only then allows the parent to resume. Focused tests cover streaming validation, rejection and logging, image budgets, headless delivery, and the child-only request boundary. The MCP fixture still launches the VS Code Electron executable in Node mode because the inherited pnpm executable emits non-JSON output and prevents the MCP e2e suite from starting.
Why this change was made
Queued instructions could be lost when a delegated child reached completion while the API/webview path was still delivering the message. Direct synchronous queue delivery closes that race without weakening image validation or silently accepting unusable input. This addresses #1308 within the task-lifecycle work tracked by #355.
Impact
Subtasks process validated queued steering feedback before returning control to their parent. Streaming API callers can handle rejected empty/invalid payloads explicitly. The branch is rebased onto current
main; full unit tests, complete mocked VS Code e2e, lint, type checks, formatting, docs checks, and changed-line mutation testing pass locally.Linked work items
Closes #1308
Tracked under #355
Related PRs