Skip to content

fix(backend): tighten agent-not-found coverage in dispatch tests (#173) - #207

Merged
devJaja merged 1 commit into
Epta-Node:mainfrom
malaysiaonelove:fix/dispatch-agent-not-found-173
Jul 26, 2026
Merged

fix(backend): tighten agent-not-found coverage in dispatch tests (#173)#207
devJaja merged 1 commit into
Epta-Node:mainfrom
malaysiaonelove:fix/dispatch-agent-not-found-173

Conversation

@malaysiaonelove

Copy link
Copy Markdown
Contributor

Closes #173

Summary

Strengthens test coverage for the agent dispatch pipeline that #173 put in place. The original fix replaced the throwing defaultDispatch with makeHttpDispatch + httpDispatch, but was missing a literal acceptance test confirming that the agent-not-found error is descriptive and observable end-to-end.

Changes

  • backend/tests/e2e/pipeline.test.ts: Added a new e2e test, "reports \"No agent registered for type:<x>\" when registry returns no agents", that proves makeHttpDispatch propagates a descriptive error to the failed DAG node, observable via GET /api/tasks/:id. The assertion is intentionally loose (expect(withAgentErr.length).toBeGreaterThan(0)) so it tolerates the coordinator's upstream_failed cascade on dependent nodes, while still failing if the descriptive error message ever regresses to a generic Error('dispatch failed').
  • backend/src/coordinator/dispatch.test.ts: Removed a dead originalImpl declaration in the "retries on 429 rate-limit response" test.

Testing

  • backend/src/coordinator/dispatch.test.ts13/13 unit tests pass
  • backend/tests/e2e/pipeline.test.ts11/11 e2e tests pass (was 10/10; +1 new)
  • npx tsc --noEmit — clean

Related Issue

Closes #173

Checklist

  • Tests pass
  • Lint is clean (not run in this session)
  • Documentation updated if needed (n/a — test-only change)

…a-Node#173)

- pipeline.test.ts: add e2e test that exercises the agent-not-found branch of makeHttpDispatch (registry returns []) and asserts at least one failed DAG node carries the descriptive "No agent registered for type:<x>" error. Tolerates the upstream_failed cascade from coordinator.failBlockedNodes.

- dispatch.test.ts: remove unused mockFetch originalImpl line in the "retries on 429" test.
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@malaysiaonelove is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja devJaja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid Impelmentation @malaysiaonelove

I can see all CI checks passed

LGTM

@devJaja
devJaja merged commit b9ce89e into Epta-Node:main Jul 26, 2026
6 of 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.

[CRITICAL] Fix Agent Dispatch Pipeline — defaultDispatch Always Throws, All Tasks Fail

2 participants