Repository navigation
feat(builder): launch a saved recipe from a shell as the builder's Run does - #446
Open
pierreleca wants to merge 13 commits into
Open
pierreleca wants to merge 13 commits into
pierreleca wants to merge 13 commits into
Conversation
A run started by POST /run goes into the open workspace. A client other than the builder, a command in a shell, has no open workspace of its own: it would add its jobs to whatever workspace a person has open in the pages, and to open its own first it would have to change theirs. POST /run takes an optional `workspace`, a workspace's name. The run's jobs go into that workspace through adopt_roots(into=...), the path the Launches page's "add to a workspace" takes, and a workspace of that name is made when there is none. The open workspace keeps its roots and stays open. The run's record names the workspace: a restart puts the run back into it. A value that is not a workspace's name is refused and nothing starts. The builder sends no `workspace`, and its runs go into the open workspace as before. The test fakes of adopt_runs take the new argument.
…n does A person launches a run from the builder: Run sends the recipe to the server, which starts it here or on a host, files its jobs under a workspace and follows it as a launch the pages show live. From a shell there was no way to do the same. `nullius standard run` runs in the shell's own process and writes its jobs there; the server neither follows nor lists it, and only one process can follow a runs folder. `nullius recipes launch <recipe>` sends the requests the builder sends to the Nullius server on this machine: GET /new-run for the builder's data and its form token, POST /new-run/runner for the compile the Review step shows, POST /new-run/prerequisites for what each machine lacks, then POST /run. The server compiles the recipe again and starts the plan: a launch from the shell and one from the page are the same launch. The recipe is a saved one, by its name or id, or a recipe file. `--where` replaces the recipe's machines, `--workspace` names the workspace the launch goes into, `--yes` answers the question Run asks before a run of every unit, and `--wait` returns when the launch has ended. It prints the launch's key, each run's jobs folder and its job pages. `nullius recipes list` lists the saved recipes. A Harbor recipe is refused: its plan is made by the page's script, and it runs by the script its Review step generates.
…m a shell A page of its own for `nullius recipes list` and `launch`, beside `standard run`: what each takes, that `launch` needs the server running here and sends the builder's requests, what it refuses and prints, and how the result is read. The table of pages from a shell moves `/new-run` and its Run from "No command yet" to "Covered", says that `standard run` runs in the shell while `recipes launch` goes through the server, and adds `/recipes`. The CLI index, the site's navigation, the builder's Run rules, the exit codes' Writes row and the running rule name the command.
A run of several agents pauses when a part fails and asks, on its page, whether to go on with the next one. `--wait` waited for the run to end and a paused run never ends until someone answers on the page: a caller in a shell, a script or an agent, waited for ever. `--wait` now returns when no run of the launch is going: each has ended or is paused. A paused run is printed with its state and the command exits 4, as for a run that ended otherwise than done. The wait asks each run's state until it stops going and does not ask an ended run again.
… holds The two tests of a launch into a named workspace called it after a role. They call it "trials", as the command's page does in its example.
The project's writing rules now keep guarantees, requirements and refusals in docs/ and drop mechanism, and state each fact on one page. The command's page no longer lists the requests it sends, and its server row says only that a launch needs the server and that `standard run` does not. The builder's page drops its row for the command: the table of pages from a shell already pairs Run with it. The exit codes' Writes row and the running rule say the same in fewer words.
`nullius recipes launch` could only launch. To see what a recipe would start, where, and whether the server would accept it, a caller had to open the builder's Review step. `--dry-run` sends what the Review step sends, the compile and the check of what each machine lacks. It prints the rows the Review step shows, each machine's missing needs and the notes, then stops before POST /run: no launch, no job folder, no workspace. It exits 0 when Run would start the launch and 4, with the reason, when the launch would be refused. With `--json` it prints the compile's answer with the machines' answer and the refusal. The name is the one `standard traces` gives its option that writes nothing. The launch and the dry run share one review. A launch now asks the machines before it refuses on Run's question, as the Review step does, and refuses a `--workspace` that is not a workspace's name with the server's own words.
The fixes before this one make the earlier rows of --workspace and --dry-run true again: they come back as they were. The order in which a saved recipe is matched, and the check behind a refused workspace, are the code's; a reader needs only that a shared name and a linked workspace folder are refused.
pierreleca
marked this pull request as ready for review
November 26, 2026 09:55
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 #445
What
nullius standard runruns outside the server.nullius recipes launch <recipe>sends a saved recipe to the server here as Run does: same compile, prerequisites,POST /run.--whereand--workspacechoose the machines and the workspace;--yesanswers Run's question;--waitreturns at the end.--dry-runprints the Review step's rows and what each machine lacks, then stops. Exit 0 when Run would launch.POST /runtakes an optionalworkspace, made when missing; the open one stays open. The builder sends none.nullius recipes listlists the saved recipes. A Harbor recipe is refused.Verified
--dry-runstarts nothing and refuses a missing key as Run does; exit 4 on Run's question without--yes, 3 on a missing recipe.main, 3,064 here; routes 712 and 717: nothing fails thatmainpasses.nopon two units, on a server of this branch:--dry-runmade no job folder, workspace or launch. Without it the launch ran;--waitreturned at done.Risk
POST /rungains an optional field the builder does not send;/new-run/runneraddsprovider_errorto its answer.Agents