diff --git a/docs/plans/2026-10-20_hub-own-uid.md b/docs/plans/2026-10-20_hub-own-uid.md index a9fbe3445..45be7f09a 100644 --- a/docs/plans/2026-10-20_hub-own-uid.md +++ b/docs/plans/2026-10-20_hub-own-uid.md @@ -1,77 +1,66 @@ -# Brief: Melanie's hub instance on its own host (row 195, was 190b) +# Brief: the Case 1 install on 10.1.1.53 (row 195) -Sage, 2026-10-20. Rewritten for Mos's rulings mos-0998 and mos-1005 (Vikunja #418, #419). The first version -put the hub under its own Linux user on dragon-lin. That form can't pass Duckworth's B7 there, because the -factory uid's `sudo -n` succeeds on dragon-lin (Mos's recon, brain-redux -`projects/mosaic-mvp/MELANIE-HOST-RECON.md`). Melanie's own server is ruled out too: it has 1.2 GiB RAM free -with her two Hermes bots running, and co-tenancy would share her user and her passwordless sudo. The hub runs -on a separate host. Which host is Jason's decision (#419): hardware outside the cluster, a cluster VM with -factory PVE root removed, or a cluster VM with that residual accepted. This row is written so the host choice -doesn't change it. Gitea #1693. On the 10-27 MVP path. Federation R8 (Gizmoduck's design r4, 04a6112be) needs -this row or nothing. +Sage, 2026-10-20, third version, for Darkwing's rewrite request and sage-1439. Gitea #1693. -Owner Darkwing (Opus 5.5), reviewer Duckworth (author of B5 and B7), gate owner Sage. Chained on row 190 -(Q177): the hub runs under row 190's config canon. Design first. The first deliverable is -`agents/darkwing/work/queue-190b/DESIGN.md`. +Why it changed: +- The first two versions put Melanie's hub on its own Linux user, then on its own host, Jason's choice under + #419. +- Q181 settled the hosts: Case 1 (Jason's software factory) runs on 10.1.1.53 and Case 2 (Melanie's hub) on + 10.1.1.54. +- Q182 and Q183 made the hub's privilege checks a recorded acceptance. They report and don't refuse + (federation R8, mos-1055, mos-1063, mos-1066). +- The Case 2 install on .54 is Gosalyn's C2-13 plus its window (#416, due by 2026-10-27). It is not this row. + +This row now installs Case 1 on .53. On the 10-27 MVP path (mos-0974, T1 item 1). + +Owner Darkwing (Opus 5.5), reviewer Duckworth, gate owner Sage. Chained on row 190's candidate (the config +canon) and on C2-13's candidate (the install script), Q177. It reuses C2-13's `case2-install.sh`, +`case2-precheck.sh` and `case2-unit.sh` by input, not by copy. A gap in them goes to Gosalyn as a C2-13 +change, or into this row's manifest as a named, reviewed change to those files. Design first: +`agents/darkwing/work/queue-195/DESIGN.md`. ## Goal -Melanie's hub instance (Case 2, C2-13) runs on its own host. No factory agent can read or write the hub's -config, data root or secrets, reach its bus socket, or log in to the hub host. Her writing reaches the hub only -through the existing git.mosaicstack.dev remotes, books repo only. +Jason's software factory runs on 10.1.1.53 as `mosaic` under `/srv/mosaic`, in the same unit form as Case 2 +(design 9, Q181). It uses row 190's config canon and the model account the factory uses today (Q185, +mos-1081 item 1). No new provider account. -## Provision (blank until Jason answers #419) +## Provision -Who provisions the host and how is left open. Sizing from Mos (mos-0998): 4 vCPU, 8 GB RAM, 64 GB disk, -internal network only. Each agent process measures 300 to 390 MB RSS on dragon-lin. The design takes the host -as given: a fresh Linux host with a named admin path, reachable by the deploying seat while the row runs. +- ops-01 runs the root steps over ssh as `localadmin`: `useradd mosaic`, `/srv/mosaic` and the unit through + `case2-unit.sh` from a root-owned checkout. #423 step 1 (localadmin with NOPASSWD sudo on .53 and .54) was + applied at 20:05:47Z (mos-1066, mos-1077), and nothing else in #423 gates this row. +- #423 step 4 (jarvis sudo) waits until Case 1 is live on .53. +- The host list comes from Q181. Agents may run read-only checks on .53 as `localadmin`. ## The design must state -1. The deploy. Exactly what Darkwing installs on the hub host and how: the stack copy, node, the units, the - config dir and data root under row 190's canon (O1: `~/.config/mosaic-NAME`, and "`~` is the home of the OS - user that runs the instance"). Which commands run as which user on the hub host, and which need its root. -2. Re-pin, rollback and backup on the hub host, and who runs them after the deploy key is gone. -3. How the hub gets model access without a copy of jwoltje's `claude-session.env` or any factory credential. - If that needs the credentials row (T1 item 6), say so and name the interim. If it needs a new subscription - or a new provider account, flag it for Jason and don't pick one (mos-1008). -4. The books repo path. Which git.mosaicstack.dev remote, which credential the hub holds for it, and that it - can't read or push any other repository. -5. The admin path and the end state. The host ends with no key the factory uid can read. The design names the - admin path that remains (for example the hypervisor console, or a key kept off the factory uid) and who - holds it. -6. The acceptance script, as code Duckworth can read. It takes Gizmoduck's list of infrastructure gate items - as its input (mos-1011), not a fixed set of checks. Each item names a path, its closed form and its - accepted form, and the script reports which form holds for each, or fails. The list covers at least: - - federation R8's separate-host form: the hub's bus socket, data root and config dir don't exist on the - factory host, the factory host mounts nothing of the hub's, and no factory agent holds a login or key - for the hub host - - B7: from the factory uid, `sudo -n`, `doas -n`, `su`, polkit, and `ssh -o BatchMode=yes` to the hub - host all fail - - the hypervisor and backup paths ops-01 measured (mos-1011: one PVE node the factory key has root on, - PBS on that node with unencrypted backups, a flat /16 LAN), each closed or accepted by Jason -7. The identity provider and TLS front end (B8, mos-1008, mos-1011). Either the factory holds no credential - that can create users, change groups, issue tokens or impersonate in the issuer the hub trusts, or the hub - uses an issuer the factory can't administer. A brand, tenant or app inside the same Authentik does not - count as separate. The same holds for the TLS front end that serves the hub. The proof is a failed admin - call from every token the factory's root can read. No credential value is printed in that proof. +1. The install as input values to C2-13's scripts: user, home, business file, roles, the human id, the + token slot path. Which commands run as `mosaic` through `sudo -u mosaic -H`, and which as root through + ops-01. +2. Where Case 1 differs from Case 2: the factory roles in place of the library business, no library sync, + and any precheck item that doesn't apply, each with a reason. +3. Model access through the existing factory account (Q185). Placing the credential on .53 is a step under + the Q173 secrets rule, done in the window. It is never copied by the script, and its value is never + printed. +4. Re-pin, rollback and backup on .53, and who runs them. +5. The acceptance checks, as code Duckworth can read. Each check names a path and gives it one of three + marks: closed, accepted under Q182 or Q183, or "not named in Q182 or Q183". An accepted path doesn't + fail the row. An unnamed one is reported to Mos, who takes it to Jason (the R8 N1 rule). The functional + checks fail the row when they fail: the unit runs as `mosaic`, the Console answers on its port on the + internal network only, and one tester message gets a reply. ## Boundaries -- Provisioning, hypervisor access and any infra or k3s change are Jason's (Q173 exclusions). Mos takes the - hypervisor residual (factory root on the PVE nodes, Q172) to Jason. It doesn't block this row. -- Melanie's server (`melanie@10.1.1.54`) is reference only, read only, under Jason's authorization in - mos-0995. Nothing on it changes, and her Hermes bots keep running. -- No tunnel, Traefik or other exposure outside the internal network. That waits for Jason, after Q175 SSO. -- No credential value is printed, logged or committed. Keys made for the deploy are removed at the end, and - the acceptance script proves it. -- The admin-call proof in point 7 and any call to the issuer or the TLS front end run only in a window Mos - approves, never as a test or an anonymous probe (Q175). -- Tests in the repository use scratch roots and stand-ins. The live deploy and the acceptance run on the hub - host are a window with a backup first (where there is state) and a STATE report after. +- Infra and k3s changes, exposure outside the internal network, and spend stay Jason's (Q173 exclusions). +- No change to dragon-lin's `~/.mosaic-dev`, `~/.config/mosaic-dev`, its live units or `~/.mosaic`. +- No credential value is printed, logged or committed. +- Tests use scratch roots and stand-ins. Nothing in a test reaches .53. +- The run on .53 is a window with Jason's or Mos's go, a backup first where state exists, and a STATE report + after. ## Gate Duckworth approves DESIGN.md, then the manifest. Any repository change is green on Sage's gate (cli suite and -every `scripts/test-*.sh`), with the design's mutants killed. The row is done when the acceptance script passes -on the hub host from the factory uid, Duckworth reads its output, and Mos confirms. +every `scripts/test-*.sh`), with the design's mutants killed. The row is done when the window's acceptance +run passes on .53, Duckworth reads its output, and Mos confirms.