A web app mode without sign-in, for the demo and tests (#28).
Builds on #22, whose commits this branch includes; merge that first. The new work is the last two commits.
web: Add a mode without sign-in, for the demo and tests
[web.no_sign_in] approver = "<name>" instead of issuer, client_id, client_secret and group. The config is checked as one or the other; existing configs are unchanged.
Every session is that approver, with a session and CSRF token as before, so answering works and push subscriptions belong to that session as before. /auth/login and /auth/callback answer 404.
Guards:
the broker refuses to start unless listen is a loopback address, and logs a warning when it does;
every page has a banner saying there's no sign-in, and no sign-out button;
the audit log records <name> (web, no sign-in);
approving a request that needs a passkey is refused ("needs a web app with sign-in"); denying it works.
The NixOS module has it only as an internal option, web.noSignIn, for the VM test.
The VM test turns it on and, with curl:
checks the banner;
fetches a finished deploy's page, which shows how each phase ended;
reads the start of /events, with its #pending and #running regions;
answers a request from its page, refused with a wrong token, then recorded as tester (web, no sign-in).
demo: Make sign-in to the web app optional
The demo's web app has no sign-in by default.
slopDemo.signIn = true; in devenv.local.nix brings back Pocket ID, moved as it was into nix/demo/sign-in.nix: the process, its setup task, its keys and demo-sign-in.
Checked:
nix flake check, including the VM test with its new web section.
Config tests: OIDC or no sign-in, no sign-in refused off loopback and when mixed with OIDC settings.
The demo without sign-in: no Pocket ID process, the broker's warning, the banner. A router request from the agents' VM: approving it from the web app was refused, denying it worked, and the agent got exit 125.
The devenv shell with slopDemo.signIn = true; has demo-sign-in again. Not checked: a full sign-in through Pocket ID with that setting, though its code moved unchanged.
Not covered by the VM test: the live progress regions during a run, since the test's deploys run without asking and finish in seconds; unit tests render those regions.
A web app mode without sign-in, for the demo and tests (#28).
**Builds on #22**, whose commits this branch includes; merge that first. The new work is the last two commits.
1. **web: Add a mode without sign-in, for the demo and tests**
- `[web.no_sign_in] approver = "<name>"` instead of `issuer`, `client_id`, `client_secret` and `group`. The config is checked as one or the other; existing configs are unchanged.
- Every session is that approver, with a session and CSRF token as before, so answering works and push subscriptions belong to that session as before. `/auth/login` and `/auth/callback` answer 404.
- Guards:
- the broker refuses to start unless `listen` is a loopback address, and logs a warning when it does;
- every page has a banner saying there's no sign-in, and no sign-out button;
- the audit log records `<name> (web, no sign-in)`;
- approving a request that needs a passkey is refused ("needs a web app with sign-in"); denying it works.
- The NixOS module has it only as an internal option, `web.noSignIn`, for the VM test.
- The VM test turns it on and, with `curl`:
- checks the banner;
- fetches a finished deploy's page, which shows how each phase ended;
- reads the start of `/events`, with its `#pending` and `#running` regions;
- answers a request from its page, refused with a wrong token, then recorded as `tester (web, no sign-in)`.
2. **demo: Make sign-in to the web app optional**
- The demo's web app has no sign-in by default.
- `slopDemo.signIn = true;` in `devenv.local.nix` brings back Pocket ID, moved as it was into `nix/demo/sign-in.nix`: the process, its setup task, its keys and `demo-sign-in`.
Checked:
- `nix flake check`, including the VM test with its new web section.
- Config tests: OIDC or no sign-in, no sign-in refused off loopback and when mixed with OIDC settings.
- The demo without sign-in: no Pocket ID process, the broker's warning, the banner. A `router` request from the agents' VM: approving it from the web app was refused, denying it worked, and the agent got exit 125.
- The devenv shell with `slopDemo.signIn = true;` has `demo-sign-in` again. Not checked: a full sign-in through Pocket ID with that setting, though its code moved unchanged.
Not covered by the VM test: the live progress regions during a run, since the test's deploys run without asking and finish in seconds; unit tests render those regions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The builder and the broker run Nix with `--log-format internal-json`
and turn its activities into `Progress` messages for each phase: the
build, each node's copy, comparison and activation, and the push to
the cache. Build logs no longer stream by default, since they're
mostly noise to an agent; `--logs` brings them back, and a failed
build's error still ends with the last lines of its log. Text from Nix
loses its terminal escapes.
The builder now answers with progress frames before its result.
Protocol 4.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a terminal, `slop` keeps a bar for each running phase below other
output, drawn by `indicatif`. Remote output can stop mid-line, which
bars drawn then would overwrite, so they hide until the line ends.
Without a terminal, or with `TERM=dumb`, where `indicatif` draws
nothing, it writes a plain line for a running phase every 30 seconds
and one when it ends, as for agents.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The broker keeps the latest progress of each phase of requests that
build (`runs::Runs`), from the build on. A request's page shows a
full-width bar for the build and a row for each node in its region,
and the main page gets a region of its own listing running requests
with a bar each, both kept current by the page's event stream. A
request's page reads the audit log again only when the queue changes
or a run starts or ends, not with every bit of progress.
The `finished` and `failed` audit events keep how each phase ended,
which the request's page shows afterwards.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploys show progress as plain lines without build logs or escapes,
which only come with `--logs`. Copies count paths and bytes: two paths
to `box` at first, then only the new profile. The push to the cache
counts its closure, and the audit log keeps how each phase ended.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo's app built and copied in moments, which left nothing for the
progress in `slop` and the web app to show. It now has twelve parts in
three layers, each layer built once the one below it is, so a build
takes about a minute and a half; each part adds a few MiB to copy, and
the box VM has room for them. `demo-help` shows `--logs` too.
The parts follow from the version alone, so a version built before is
already in the builder's store and only evaluates, and a new one
rebuilds them all. `demo-bump` in the agents' VM sets a new version
and pushes it on a branch of its own, and a check runs it against a
bare copy of the repository, including from a fresh clone, as after
the VM restarts.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evaluating a big flake can take minutes before Nix builds anything,
which looked like a build stuck at nothing. The build is now two
phases: evaluating, until Nix starts its first build, fetch or copy,
and building. The builder tells the broker when evaluation ends with
`Reply::Evaluated`, or after the build when Nix had nothing to do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Times are formatted by `humantime` and sizes by `indicatif`, which
were already dependencies, instead of by our own code, and the web
app's copy of the time format is gone. Sizes now have two decimals.
The latest progress of each phase, and how each node is getting on,
move from `runs::Run` to `progress::Phases`, so `slop` can use them
too. A phase's counts and what's running now are written once, in
`Progress`, for its line, its bar in `slop` and the web app.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A deploy drew a bar for each phase of each node, so bars came and went
as nodes moved from copying to comparing to activating. Each node now
keeps one bar, labelled with its name, through all three, saying what
it's doing like the web app's rows; it goes once the node is activated
or has failed. Lines for agents are unchanged.
Bars tick every 100 ms: `indicatif` drops draws that come too close
together, which left a stale bar until the next update. Tests draw on
`indicatif`'s in-memory terminal, at stderr's rate, and check the
screen through a node's steps.
Refs #21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`[web.no_sign_in]` instead of the OIDC settings makes everyone who
reaches the web app one approver, so the demo needn't run a sign-in
provider and tests can use the app. It only listens on a loopback
address, every page says there's no sign-in, the audit log records
`<name> (web, no sign-in)`, and it can't approve requests that need a
passkey. The NixOS module has it only as an internal option, for the
VM test.
The VM test uses it to check a finished deploy's page, the event
stream, and answering a request with the session's token.
Refs #28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo's web app has no sign-in by default, so trying it doesn't
need a one-time link and a passkey. `slopDemo.signIn = true;` in
`devenv.local.nix` brings back Pocket ID, now in `sign-in.nix`, for
trying sign-in and passkeys, which approving `router` needs.
Refs #28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A web app mode without sign-in, for the demo and tests (#28).
Builds on #22, whose commits this branch includes; merge that first. The new work is the last two commits.
[web.no_sign_in] approver = "<name>"instead ofissuer,client_id,client_secretandgroup. The config is checked as one or the other; existing configs are unchanged./auth/loginand/auth/callbackanswer 404.listenis a loopback address, and logs a warning when it does;<name> (web, no sign-in);web.noSignIn, for the VM test.curl:/events, with its#pendingand#runningregions;tester (web, no sign-in).slopDemo.signIn = true;indevenv.local.nixbrings back Pocket ID, moved as it was intonix/demo/sign-in.nix: the process, its setup task, its keys anddemo-sign-in.Checked:
nix flake check, including the VM test with its new web section.routerrequest from the agents' VM: approving it from the web app was refused, denying it worked, and the agent got exit 125.slopDemo.signIn = true;hasdemo-sign-inagain. Not checked: a full sign-in through Pocket ID with that setting, though its code moved unchanged.Not covered by the VM test: the live progress regions during a run, since the test's deploys run without asking and finish in seconds; unit tests render those regions.
🤖 Generated with Claude Code
b75b953bb5toeefb04ff48