Skip to content

feat(builder): launch a saved recipe from a shell as the builder's Run does - #446

Open
pierreleca wants to merge 13 commits into
ThinkFlowLab:mainfrom
pierreleca:feat/launch-from-the-shell
Open

pierreleca wants to merge 13 commits into
ThinkFlowLab:mainfrom
pierreleca:feat/launch-from-the-shell

Conversation

@pierreleca

Copy link
Copy Markdown
Contributor

Closes #445

What

  • A launch the pages follow started only from the builder's Run; nullius standard run runs outside the server.
  • nullius recipes launch <recipe> sends a saved recipe to the server here as Run does: same compile, prerequisites, POST /run.
  • --where and --workspace choose the machines and the workspace; --yes answers Run's question; --wait returns at the end.
  • --dry-run prints the Review step's rows and what each machine lacks, then stops. Exit 0 when Run would launch.
  • POST /run takes an optional workspace, made when missing; the open one stays open. The builder sends none.
  • nullius recipes list lists the saved recipes. A Harbor recipe is refused.

Verified

  • Route test: a saved recipe on a host starts Run's plan, into the named workspace; --dry-run starts nothing and refuses a missing key as Run does; exit 4 on Run's question without --yes, 3 on a missing recipe.
  • Backend 3,057 tests on main, 3,064 here; routes 712 and 717: nothing fails that main passes.
  • HumanEval's nop on two units, on a server of this branch: --dry-run made no job folder, workspace or launch. Without it the launch ran; --wait returned at done.
  • Not checked: a real host, a model.

Risk

  • POST /run gains an optional field the builder does not send; /new-run/runner adds provider_error to its answer.
  • Undo: revert.

Agents

  • Claude Code, Opus 5.5
  • Codex, gpt-6-astra
  • Claude Code, Fable 5.2

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
pierreleca marked this pull request as ready for review November 26, 2026 09:55
@github-actions github-actions Bot added the needs review Tests pass, no conflict, no verdict on its latest commit label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Tests pass, no conflict, no verdict on its latest commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No command launches a saved recipe as the builder's Run does

1 participant