Fixes, a deploy and binary cache test, and demo tidying, split out of #22. Nothing here changes the protocol, so it can merge before the progress work.
builder: Match results of repeated derivations
Upstream Nix 2.35 repeats nix build --json results for installables that are the same derivation: n of them give n² results.
So deploying two targets with the same profile failed. The VM test below found this.
When the counts differ, the builder now matches results by derivation path.
builder: Point the mirror's HEAD at the main branch: stops Nix warning on every build that it can't read HEAD in the mirror.
test: Tidy the VM test: helpers for running slop as the agent and slop-approve as the reviewer, headings for each part, and the settings grouped with comments.
test: Deploy a built profile to a second box
A profile built from a static busybox, without nixpkgs, in two commits, and a second VM, box, with a store of its own.
Deploys to box and the broker's own box at once (the same derivation, which is how the first fix turned up), checks the closure on box, then deploys the second commit.
test: Push a build to a binary cache: box also holds a cache's store through services.slop-broker-cache. slop build had no test; this checks the printed path, the closure in the cache's store and its GC root.
demo: Read the builder's store through the ssh wrapper
Deploys and builds in the demo failed with Could not resolve hostname builder. The broker's nix reads built paths over ssh-ng://builder@builder with the ssh on its PATH, and the demo's wrapper wasn't named ssh.
The wrapper is now bin/ssh, and handles how Nix calls it: the host as builder@builder, a control master check, and the LocalCommand it waits for.
demo: Move the host side out of devenv.nix: into nix/demo/host.nix, a devenv module that devenv.nix imports. The VMs' settings are grouped with comments, and the longer scripts are in steps.
demo: Add a binary cache for slop build
The box VM holds the cache's store in a cache account, and the demo's broker pushes to it.
services.slop-broker-cache.forcedCommand (read-only) lets the VM authorize the broker's key, which only exists at boot.
web: Show the broker's version in the header, next to the approver's name.
Checked:
nix flake check, including the VM test, passes; clippy and the tests pass.
The whole demo ran with devenv up on #22's branch, which has these demo changes: a deploy to the box VM and a slop build into its cache.
Fixes, a deploy and binary cache test, and demo tidying, split out of #22. Nothing here changes the protocol, so it can merge before the progress work.
1. **builder: Match results of repeated derivations**
- Upstream Nix 2.35 repeats `nix build --json` results for installables that are the same derivation: n of them give n² results.
- So deploying two targets with the same profile failed. The VM test below found this.
- When the counts differ, the builder now matches results by derivation path.
2. **builder: Point the mirror's HEAD at the main branch**: stops Nix warning on every build that it can't read `HEAD` in the mirror.
3. **test: Tidy the VM test**: helpers for running `slop` as the agent and `slop-approve` as the reviewer, headings for each part, and the settings grouped with comments.
4. **test: Deploy a built profile to a second box**
- A profile built from a static busybox, without nixpkgs, in two commits, and a second VM, `box`, with a store of its own.
- Deploys to `box` and the broker's own box at once (the same derivation, which is how the first fix turned up), checks the closure on `box`, then deploys the second commit.
5. **test: Push a build to a binary cache**: `box` also holds a cache's store through `services.slop-broker-cache`. `slop build` had no test; this checks the printed path, the closure in the cache's store and its GC root.
6. **demo: Read the builder's store through the ssh wrapper**
- Deploys and builds in the demo failed with `Could not resolve hostname builder`. The broker's `nix` reads built paths over `ssh-ng://builder@builder` with the `ssh` on its `PATH`, and the demo's wrapper wasn't named `ssh`.
- The wrapper is now `bin/ssh`, and handles how Nix calls it: the host as `builder@builder`, a control master check, and the `LocalCommand` it waits for.
7. **demo: Move the host side out of `devenv.nix`**: into `nix/demo/host.nix`, a devenv module that `devenv.nix` imports. The VMs' settings are grouped with comments, and the longer scripts are in steps.
8. **demo: Add a binary cache for `slop build`**
- The box VM holds the cache's store in a `cache` account, and the demo's broker pushes to it.
- `services.slop-broker-cache.forcedCommand` (read-only) lets the VM authorize the broker's key, which only exists at boot.
9. **web: Show the broker's version in the header**, next to the approver's name.
Checked:
- `nix flake check`, including the VM test, passes; clippy and the tests pass.
- The whole demo ran with `devenv up` on #22's branch, which has these demo changes: a deploy to the box VM and a `slop build` into its cache.
Refs #21
🤖 Generated with [Claude Code](https://claude.com/claude-code)
`nix build --json` gives one result per installable, in order, except
that Nix 2.35 repeats the results of installables that are the same
derivation: two deploy targets with the same profile gave four results
for two installables, and the build failed. When the counts differ,
the builder now matches results by derivation path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mirror only has remote branches, so its HEAD named a branch that
doesn't exist, and Nix warned that it couldn't read it on every build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test script gets helpers for running `slop` as the agent and
`slop-approve` as the reviewer, and headings for what each part
checks. The settings of `machine` are grouped with comments, its
`deploy` account in a module of its own, for the deploy nodes that
come next.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test repository gets two commits of a profile the builder can
build from a static busybox, without nixpkgs, whose `activate-rs`
leaves a mark, and a second VM, `box`, as a node with a store of its
own. The test deploys to `box` and the broker's own box at once, whose
profiles are the same derivation, then the second commit to `box`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`box` also holds a binary cache's store through
`services.slop-broker-cache`, and the agent builds the profile into it
with `slop build`, which no test covered. The test checks the printed
path, the closure in the cache's store and its GC root. The audit
check now reads more than the default 50 records, which the extra
requests outgrew.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploys and builds read built paths from the builder's store over
`ssh-ng`, with the `ssh` the broker's `nix` finds on its `PATH`. The
demo's wrapper wasn't named `ssh`, so `nix` used the real one, which
couldn't resolve `builder`. The wrapper is now `bin/ssh`, and also
handles how Nix calls it: the host as `builder@builder`, a control
master check and the `LocalCommand` it waits for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo's host side is a devenv module of its own,
`nix/demo/host.nix`, which `devenv.nix` imports, so `devenv.nix` is
only the development environment. The VMs' settings are grouped with
comments, and the longer scripts are broken into steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box VM holds the cache's store in a `cache` account, set up by
`services.slop-broker-cache`, and the demo's broker pushes to it, so
`slop build` can be tried by hand. The broker's key is only known at
boot, so the module exposes its forced command for keys it can't list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-in pages show which version of the broker is running, next to
the approver's name, to check a deploy of the broker took effect.
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.
Fixes, a deploy and binary cache test, and demo tidying, split out of #22. Nothing here changes the protocol, so it can merge before the progress work.
nix build --jsonresults for installables that are the same derivation: n of them give n² results.HEADin the mirror.slopas the agent andslop-approveas the reviewer, headings for each part, and the settings grouped with comments.box, with a store of its own.boxand the broker's own box at once (the same derivation, which is how the first fix turned up), checks the closure onbox, then deploys the second commit.boxalso holds a cache's store throughservices.slop-broker-cache.slop buildhad no test; this checks the printed path, the closure in the cache's store and its GC root.Could not resolve hostname builder. The broker'snixreads built paths overssh-ng://builder@builderwith thesshon itsPATH, and the demo's wrapper wasn't namedssh.bin/ssh, and handles how Nix calls it: the host asbuilder@builder, a control master check, and theLocalCommandit waits for.devenv.nix: intonix/demo/host.nix, a devenv module thatdevenv.niximports. The VMs' settings are grouped with comments, and the longer scripts are in steps.slop buildcacheaccount, and the demo's broker pushes to it.services.slop-broker-cache.forcedCommand(read-only) lets the VM authorize the broker's key, which only exists at boot.Checked:
nix flake check, including the VM test, passes; clippy and the tests pass.devenv upon #22's branch, which has these demo changes: a deploy to the box VM and aslop buildinto its cache.Refs #21
🤖 Generated with Claude Code
devenv.nix3f024cd115slop build76eb39fb7e