Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 2.3 KB

workspaces.md

File metadata and controls

45 lines (36 loc) · 2.3 KB

Workspaces screen and the fleet agent

Sub-features

  • A root agent on a Unix socket only the operator's user may open, planning and running fleet operations, writing an audit line per action.
  • Operator-server routes under /api/fleet that forward to the agent, admin scope plus the admin entitlement, 404 without an agent.
  • Settings → Installations: list with state and this month's cost, create, users, suspend, resume, delete (with keep-data), upgrade all.

Driving it

pnpm exec vitest run server/fleet-agent.test.ts server/fleet-cli.test.ts server/fleet-cli-filesystem.test.ts server/fleet.test.ts src/components/WorkspacesSection.test.ts server/request-auth.test.ts

The agent test boots the real agent on a temporary socket over a recording machine with a temporary filesystem root, drives create, list (reading a workspace's own ledger for the month through the usage dependency seam), users, suspend and delete through the same client the operator server uses, checks the audit log names every action and never a key, and checks refusals: bad names, unknown operations, a failed step reported without the tool's secrets, and a plain message when no agent exists.

The fleet filesystem suite runs the actual unprivileged child on disposable ledgers, including hostile links, special files and oversized input. The agent socket fixture checks that unsafe usage returns unavailable/null totals without failing other workspace rows or echoing file contents. Neither this fixture performs a root deployment or proves actual root-to-tenant transitions; qualification still requires a disposable Linux server with the real service identities and protections.

On a real server, after openmausbot fleet init --domain <domain> --operator <user> as root: systemctl status openmausbot-fleet, then ls -l /run/openmausbot/fleet.sock must show root:<user> and mode 660. Sign in to the operator workspace and open Settings → Installations. Create one, add a member, suspend and resume it, and confirm /var/log/openmausbot/fleet.jsonl grew a line per action. A workspace other than the operator's must get 502 from /api/fleet, because it cannot open the socket.

Not proven here

The real server steps need root, systemd, nftables and Caddy; the renderer's forms are proven from fixtures, not driven headlessly.