test(coding-agent): use current task batch schema#5185
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the task.async-fallback regression test in packages/coding-agent/ to use the current task.batch call shape ({ context, tasks[] }), so the test can reach and validate the synchronous fallback path when async.enabled is on but no asyncJobManager is present.
Changes:
- Replaced legacy task input fields (
id,description,assignment) with the batch schema’scontextplustasks[]items ({ name, agent, task }). - Ensured the test input satisfies current batch validation requirements (non-empty
context, non-emptytasks[]).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
roboomp
left a comment
There was a problem hiding this comment.
P0 / LGTM: the one-line test input change matches the current { context, tasks[] } batch schema in TaskParams, and it still reaches the sync fallback path via execution-time discoverAgents re-discovery.
No inline findings. Verification: bun --cwd=packages/coding-agent run check passed. bun test packages/coding-agent/test/tools/task-async-fallback.test.ts could not enter the test body in this clean worktree because packages/coding-agent/src/export/html/tool-views.generated.js has not been generated; that appears unrelated to this diff.
Thanks for keeping the regression aligned with the current task tool contract.
What
Update the task async-fallback regression input to the current
{ context, tasks[] }batch shape.Why
task.batchis enabled by default, but this test still used the removedid,description, andassignmentfields. Validation therefore returnedMissing tasksbefore the test could exercise the synchronous fallback. This changes only the test input; runtime behavior is unchanged.Testing
bun test packages/coding-agent/test/tools/task-async-fallback.test.tsbun --cwd=packages/coding-agent run checkbun checkpasses