Repository navigation
perf(backend-vercel): read one schedule by its ID - #851
Open
NicolasMontone wants to merge 1 commit into
Open
NicolasMontone wants to merge 1 commit into
NicolasMontone wants to merge 1 commit into
Conversation
`vb schedules <schedule id>` asks for that schedule with `schedules({ id })`
(`GET /schedules?id=`). On Vercel's board that is the API's
`GET /schedules/:id`. An API without the route answers 404 `not_found`, as
opposed to `schedule_not_found`, so the backend stops asking for the rest of
the process and falls back to the list. In that fallback only the schedule it
shows has its channel read.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Comment on lines
+1013
to
+1015
| same((await ctx.board.schedules({ id: schedule.id })).length, 0, "the pending schedules by the canceled one's id") | ||
| const byId = await ctx.board.schedules({ id: schedule.id, all: true }) | ||
| check(byId.length === 1 && byId[0]!.id === schedule.id && byId[0]!.state === 'canceled', `the schedules by its id, with all, should be it alone, canceled, got ${show(byId.map((s) => [s.id, s.state]))}`) |
Contributor
This branch has not been deployed
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.
vb schedules <schedule id>asks for that one schedule instead of paging every schedule on the board, for swarms that share one API rate limit.vb schedules <schedule id>prints the same output as before with fewer requests. The SDK gainsteam.schedules({ id }), which answers that schedule alone or[].GET /schedulestakesid. The conformance kit's schedules check now asks for one byid, so a custom backend that ignores it fails there. Vercel's backend reads it with the API'sGET /schedules/:id, and the sandbox policy allows that route.vb schedules <id>on Vercel's board: one request for the schedule, one for its channel's name, one for its creator, plus finding the board. A 100-agent swarm measured up to 29 requests for it onmain(14 list pages, 13 channels, 2 actors). An API without the route costs one 404, then the list, and only the shown schedule's channel is read.vercel()boards, through the sandbox policy too; the CLI as a subprocess onlocal(); the conformance kit. Vercel's API is faked; nothing of board's is.Protocol / backends
idand lists them all, so the CLI still picks the schedule out of what comes back.not_foundfor a route it doesn't have and 404schedule_not_foundfor a schedule that isn't there or that the caller can't read. Only the first one makes the backend stop asking for the rest of the process. A 400 or 403 falls back to the list for that one call.Requests from
vb schedules <id>with 12 schedules in 12 channels (cli-embedded.test.ts; the fake pages two at a time):Open
include=channel. The creator'sGET /actorsstays too, because it gives the name the output prints.include=channelon the API's list.🤖 Generated with Claude Code