Commit Graph
21 Commits
Author SHA1 Message Date
jackos1998andClaude Opus 5.5 e80b5b60fc policy: Check the fields rules match
CI / Check (push) Successful in 4m57s
Each operation lists the scope fields its rules can match, so a rule
that names any other field, which never matched and so was silently
ignored, is refused: by the module's typed `match` options at
evaluation, and by `Config::validate`. The design doc now shows a
policy's per-operation settings and each operation's fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 23:12:37 +00:00
jackos1998andClaude Opus 5.5 c26a74565c docs: Say each fact in one of design and architecture
CI / Check (push) Successful in 4m59s
The design keeps behaviour and rationale, and the architecture the code.
The SSH options and the builder approval's rules are only in the design
now, and the message encoding only in the architecture. The modules'
details link to the design, and the tests move to the architecture,
without the commands that `AGENTS.md` lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:57:12 +00:00
jackos1998andClaude Opus 5.5 552b175ebf docs: Nest the demo's repository bullets
Also extend the writing rules: long bullets and steps get nested
bullets, and the design and architecture docs each own their half.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:55:49 +00:00
jackos1998andClaude Opus 5.5 d1b6147878 ops: Name operations with an enum
Policies were keyed by any string, so a mistyped operation was silently
denied. `OpName` makes the broker refuse it when loading the config,
and the module's `ops` names each operation, so evaluation fails
first.

`Parsed::new` fills in the defaults, so each operation sets only what
it uses; what's found before approval moves to `Parsed::prepared`, and
whether an operation is built in follows from its name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:54:47 +00:00
jackos1998andClaude Opus 5.5 f844ab7264 deploy: Move the comparison script into its own file
A file of its own reads as a script, says what its output looks like
and is checked by a new `shellcheck` lint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:50:45 +00:00
jackos1998andClaude Opus 5.5 cd9cb27544 docs: Break up the long sections
CI / Check (push) Successful in 4m50s
Turn the architecture's policy, execution, approver and NixOS sections
and the design doc's long bullets and steps into short nested bullets
and tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:15:35 +00:00
jackos1998andClaude Opus 5.5 7f25910094 docs: Draw the demo's parts
Also say the demo's targets are the repository's deploy-rs nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:15:35 +00:00
jackos1998andClaude Opus 5.5 4e4c68cb83 docs: Describe the builder on its own
CI / Check (push) Successful in 4m52s
The builder runs separately from the broker, and which of its requests
need an approval first depends on whose code each one evaluates. A
diagram shows its state, and a table what each request runs, whose code
and whether it waits for an approval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 20:27:16 +00:00
jackos1998andClaude Opus 5.5 3fe20acc65 docs: Show the broker's parts and each request's steps
CI / Check (push) Successful in 4m53s
The overview puts the builder on its own box, which can be the
broker's, and a second diagram shows the parts inside the broker. The
request lifecycle keeps the steps every request takes, with nested
details, and then describes each kind on its own: queries and SSH,
secrets, deploys (with the sequence diagram) and builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 19:31:57 +00:00
jackos1998andClaude Opus 5.5 0293cfac65 ssh: Take targets only from the main branch
`ssh.targets` duplicated what the main branch's deploy-rs nodes
already say, and a configured target could drift from them. The
nodes are now the only targets, so SSH needs `deploy`, whose builder
reads them.

The VM test gets a real builder and a repository with the nodes, and
the demo's targets move into its repository's flake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 19:31:57 +00:00
jackos1998andClaude Opus 5.5 5fffc796df docs: Add diagrams, requests by kind and protocol types
CI / Check (push) Successful in 4m41s
The architecture gets an overview of the parts and a deploy's sequence,
the request lifecycle splits the steps every request takes from those
of each kind, and the protocol is shown as its types and fields. The
design starts with what happens to each kind of request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:18:32 +00:00
jackos1998andClaude Opus 5.5 5e25159fa4 ssh: Find deploy targets on the main branch
With `ssh.branchNodes`, every deploy-rs node on the main branch is a
target too, so adding a box takes a commit there rather than a new
broker config. The builder evaluates the branch's `deploy` output
(hostname, SSH user and options, `sudo`), cached per commit, and the
broker looks it up again when stale or when a request names a node it
doesn't know. Only the protected branch's Nix is evaluated, as for
secrets; configured targets win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:17:50 +00:00
jackos1998andClaude Opus 5.5 2af7c55a17 ha: Remove Home Assistant notifications
CI / Check (push) Successful in 4m56s
The web app's Web Push notifications replace them: they are encrypted
end to end, and the page holds every pending request, so a dismissed
notification loses nothing. Drops `src/ha.rs`, the
`services.slop-broker.homeAssistant` options and `tokio-tungstenite`.
A config that still has `home_assistant` is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:39:53 +00:00
jackos1998andClaude Opus 5.5 9d54664f5c demo: Deploy to the box VM
The demo repository's flake gets a deploy-rs node, `box`, with a small
custom profile whose activation writes its version, using nixpkgs'
deploy-rs so builds are quick, and its nixpkgs locked to this
repository's. The box VM lets `box` use `sudo` and copy unsigned
paths, and the broker's policy covers the builder and deploys, so a
pushed branch can be deployed and its package changes approved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 02:01:35 +00:00
jackos1998andClaude Opus 5.5 ddee51d092 demo: Add a repository, a builder and secrets
`devenv up` seeds a bare repository with an agenix rules file and two
secrets, encrypted to the demo person and the broker; a pre-receive
hook protects `master`, and `demo-merge` moves it. The agents' VM
clones it over a QEMU guestfwd to `git daemon`, and the broker reaches
`slop-broker builder` through an `ssh` wrapper, so secret requests
work as in a real deployment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 01:42:48 +00:00
jackos1998andClaude Opus 5.5 63b256c21b detail: Structure what approvers see
Request details become fields, then tables, lists and text, with a
tone on fields and rows. The web app shows them as a grid and tables
like the audit log; everything else, the audit log and passkey
fingerprints use the text rendering, with headline fields first in
notifications. Deploys get a packages table per profile, secrets a
recipients table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 01:28:47 +00:00
jackos1998andClaude Opus 5.5 005e3d32df ops: Add age secrets
`slop secret keys|set|generate|rekey|read` work with an agenix secret
in the requester's checkout: it sends the ciphertext, and the broker
decrypts it with its own age identity and returns new ciphertext.
Field edits work on env and JSON secrets.

The path and recipients are the requester's, so before approval the
builder reads the protected main branch: it looks the ciphertext's
blob up there, so approvers see which file it really is, and
evaluates that branch's rules file to compare the recipients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 00:56:17 +00:00
jackos1998andClaude Opus 5.5 652e80961a web: Ask for the passkey on every sign-in
Signing out only ended the app's session: the next sign-in went
through the provider's still-valid session without a prompt, so
signing out seemed to do nothing. Sign-ins now ask the provider to
authenticate afresh and check the token's auth_time, as passkey
confirmations already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:31:23 +00:00
jackos1998andClaude Opus 5.5 538a288182 ci: Add a Gitea Actions workflow
CI / Check (push) Successful in 4m44s
Every push runs `nix flake check`: the package with its tests, new
`clippy` (warnings as errors) and `fmt` checks, and the VM test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:37 +00:00
jackos1998andClaude Opus 5.5 1f834df326 docs: Add the design, architecture and agent rules
The design and architecture docs come from nixfiles'
`docs/slop-broker.md` and its working notes, rewritten to describe the
broker rather than one deployment: roles such as the agents' VM and
the broker's box replace box names, and the rollout plan and
deployment's agent setup stay in nixfiles. `AGENTS.md` carries over
the general rules from nixfiles plus this repository's commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:37 +00:00
jackos1998andClaude Opus 5.5 313c028ad9 nix: Add a demo
A setup for trying the broker by hand, laid out like a deployment.
`devenv up` runs the broker from the checkout with its web app, Pocket
ID for approvers to sign in with, and a box VM for the SSH targets; a
setup task creates the approver, their group and the broker's OIDC
client through Pocket ID's API. `demo` boots the agents' VM on the
terminal, which reaches the broker only over vsock.

Approvers use `slop-approve` in the devenv shell, or the web app after
signing in with a link from `demo-sign-in`, so passkey approvals can
be tried without deploying anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:36 +00:00