Repository navigation
feat(web): let a run started over the API name the workspace its jobs go into - #514
Draft
pierreleca wants to merge 9 commits into
Draft
pierreleca wants to merge 9 commits into
pierreleca wants to merge 9 commits into
Conversation
… go into A program that starts a run over the API cannot say where its jobs go: they land in the workspace open on the server, or in a new one with a random name when none is open. A person reading the pages then finds runs they did not start in the workspace they are looking at. A start now takes a workspace: the `workspace` field of `POST /api/v1/runs`, `Client.start(workspace=...)`, `nullius remote run --workspace NAME` and the `workspace` input of MCP's `start_run`. The workspace is made, closed, when there is none, and the run's record names it for a restart. The open workspace stays open with its own jobs, and a restart reopens it, not the one the run went into. A name that is not lowercase letters, digits and dashes is refused with 400, as is a workspace that is a symbolic link or leads outside the workspaces folder. Without the field nothing changes. The builder's Run offers no workspace: its runs go into the open one, as before.
…es it A start that named the open workspace read a second copy of it from disk, added its jobs to that copy and made the copy the open one. A start that names no workspace adds to the first copy, and two such starts at once could each drop the other's job from the open workspace's roots. Under the lock, a named start now makes the workspace when it is missing and adds its jobs through adopt_roots, which uses the open workspace's own object, as before the lock.
The line on `workspace` already gives the names a start takes. The four lines added with the fixes covered a link or a file in the workspace's place, null, and starts at the same moment: the server's answer names each refusal, and no reader acts on them before a start.
…case The repository's test rules ask to extend a nearby case first. The path conflict test already asserts the refusal, no execution and no run record: a folder and a link in the lock's place are two more names in it, and the link's target outside the workspaces folder must not be created. A link to a lock the server holds is refused by the same link check.
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.
Closes #513
What
workspaceonPOST /api/v1/runs,Client.start,remote run --workspace, MCP'sstart_run.runs/check.Verified
nop:remote run --workspace trialsput the job intrials; without it, in the open workspace, still open.readtoken: exit 4, nothing started.mainpasses.Risk
main, two starts at once into the open workspace can drop one job fromworkspace.json.Agents