docs: no end-to-end build-and-run procedure for the operator app (A0 pre-flight) #232

Closed
opened 2026-07-31 18:26:51 +00:00 by ben · 3 comments
Owner

Parent

Reported during QA session preparing #183 Phase A.

What's wrong

#183's driver checklist pre-flights A0 as "operator app current", but no document says how to get there. The steps exist only scattered: dev-shell entry, the one-time Electron binary approval (without which Electron cannot launch at all), the helper build, the app-shell build, the guest-image build-and-install, and launching the unpackaged app for real (not the dev fakes) with its runtime overrides. A driver reconstructs the sequence from the app packaging doc, the guest-image recipe, and ADR 0110 — and none of those are linked from the README.

What I expected

One durable "build and run the operator app" procedure — clean checkout to the real app window on the private path — linked from the README, covering the current stopgap (apt QEMU, nix-built or hand-placed guest image) until payload assembly exists.

Steps to reproduce

  1. Take a clean checkout and try to satisfy A0 "operator app current" from the repo's documentation alone.
  2. No single procedure exists; the sequence must be reconstructed from three separate documents.

Blocked by

None — can start immediately.

Additional context

Found because #183 Phase A is about to run for the first time. The procedure should document the stopgap path now and be updated when payload assembly lands.

## Parent Reported during QA session preparing #183 Phase A. ## What's wrong #183's driver checklist pre-flights A0 as "operator app current", but no document says how to get there. The steps exist only scattered: dev-shell entry, the one-time Electron binary approval (without which Electron cannot launch at all), the helper build, the app-shell build, the guest-image build-and-install, and launching the unpackaged app for real (not the dev fakes) with its runtime overrides. A driver reconstructs the sequence from the app packaging doc, the guest-image recipe, and ADR 0110 — and none of those are linked from the README. ## What I expected One durable "build and run the operator app" procedure — clean checkout to the real app window on the private path — linked from the README, covering the current stopgap (apt QEMU, nix-built or hand-placed guest image) until payload assembly exists. ## Steps to reproduce 1. Take a clean checkout and try to satisfy A0 "operator app current" from the repo's documentation alone. 2. No single procedure exists; the sequence must be reconstructed from three separate documents. ## Blocked by None — can start immediately. ## Additional context Found because #183 Phase A is about to run for the first time. The procedure should document the stopgap path now and be updated when payload assembly lands.
Author
Owner

One more step for the documented procedure, hit on the first real launch (#183 Phase A, Ubuntu 24.04):

Electron's SUID sandbox needs a one-time permission fix. Ubuntu 24.04 restricts unprivileged user namespaces, so Electron falls back to its chrome-sandbox SUID helper — which pnpm's store delivers owned by the user, and Electron then aborts at launch (The SUID sandbox helper binary was found, but is not configured correctly, SIGTRAP). The fix, after the Electron binary is fetched:

sudo chown root:root <electron dist dir>/chrome-sandbox
sudo chmod 4755 <electron dist dir>/chrome-sandbox

(where the dist dir is Electron's package inside the pnpm store, e.g. node_modules/.pnpm/electron@<version>_*/node_modules/electron/dist).

Two properties the doc should capture:

  • It resets: any pnpm install that recreates node_modules (or bumps the Electron version) restores user ownership and the launch aborts again — the step is per-install, not per-machine.
  • Do not document --no-sandbox as the workaround — the permission fix keeps Chromium's sandbox on.

Also discovered on the same first launch, filed separately as its own bug (not a doc gap): #233 — the production renderer's built chunks were never bootable from file://.

One more step for the documented procedure, hit on the first real launch (#183 Phase A, Ubuntu 24.04): **Electron's SUID sandbox needs a one-time permission fix.** Ubuntu 24.04 restricts unprivileged user namespaces, so Electron falls back to its `chrome-sandbox` SUID helper — which pnpm's store delivers owned by the user, and Electron then aborts at launch (`The SUID sandbox helper binary was found, but is not configured correctly`, SIGTRAP). The fix, after the Electron binary is fetched: ``` sudo chown root:root <electron dist dir>/chrome-sandbox sudo chmod 4755 <electron dist dir>/chrome-sandbox ``` (where the dist dir is Electron's package inside the pnpm store, e.g. `node_modules/.pnpm/electron@<version>_*/node_modules/electron/dist`). Two properties the doc should capture: - **It resets**: any `pnpm install` that recreates `node_modules` (or bumps the Electron version) restores user ownership and the launch aborts again — the step is per-install, not per-machine. - **Do not document `--no-sandbox` as the workaround** — the permission fix keeps Chromium's sandbox on. Also discovered on the same first launch, filed separately as its own bug (not a doc gap): #233 — the production renderer's built chunks were never bootable from `file://`.
Author
Owner

This was generated by AI during triage.

Triage

Category: enhancement · State: ready-for-agent

Verification: confirmed — README.md has no links to app/PACKAGING.md, the guest-image recipe, or ADR 0110; the build-and-run sequence is genuinely only reconstructable from three separate documents, matching the report. No existing implementation, no prior .out-of-scope/ rejection.

Agent Brief

Category: enhancement
Summary: Write one durable "build and run the operator app" procedure, linked from the README, covering today's stopgap path.

Current behavior:
The steps to get from a clean checkout to a running operator-app window exist only scattered across app/PACKAGING.md, the guest-image recipe doc (docs/founding/guest-base-image.md), and ADR 0110 — none linked from the README. A driver preparing #183 Phase A had to reconstruct: dev-shell entry, the one-time Electron binary approval, the helper build, the app-shell build, the guest-image build-and-install, and launching the unpackaged app for real (not the dev fakes) with its runtime env overrides. A follow-up comment on the issue also surfaced a required one-time fix for Electron's SUID sandbox on Ubuntu 24.04 (chrome-sandbox ownership/permissions), which resets on every pnpm install that recreates node_modules.

Desired behavior:
One procedure document — clean checkout to the real app window on the private path — linked from the README, that covers the current stopgap (apt-installed QEMU, nix-built or hand-placed guest image) and is written to be updated once payload assembly (#231) lands.

Key interfaces: none — this is a documentation-only change.

Acceptance criteria:

  • A single doc walks clean-checkout → running app window on the private path, referencing (not duplicating) app/PACKAGING.md, the guest-image recipe, and ADR 0110 where appropriate.
  • Covers: dev-shell entry, the one-time Electron binary approval (pnpm approve-builds), helper build, app-shell build, guest-image build-and-install, and launching the unpackaged production app with its runtime env overrides.
  • Documents the one-time Electron chrome-sandbox ownership/permission fix (Ubuntu 24.04: chown root:root + chmod 4755), including that it resets on any pnpm install that recreates node_modules or bumps the Electron version, and explicitly does not recommend --no-sandbox as a workaround.
  • Linked from the README.

Out of scope:

  • Building the payload assembly step itself (#231) — document the stopgap only, with a note to revisit once #231 lands.
  • Packaging/installer work.
> *This was generated by AI during triage.* ## Triage **Category:** enhancement · **State:** ready-for-agent **Verification:** confirmed — `README.md` has no links to `app/PACKAGING.md`, the guest-image recipe, or ADR 0110; the build-and-run sequence is genuinely only reconstructable from three separate documents, matching the report. No existing implementation, no prior `.out-of-scope/` rejection. ## Agent Brief **Category:** enhancement **Summary:** Write one durable "build and run the operator app" procedure, linked from the README, covering today's stopgap path. **Current behavior:** The steps to get from a clean checkout to a running operator-app window exist only scattered across `app/PACKAGING.md`, the guest-image recipe doc (`docs/founding/guest-base-image.md`), and ADR 0110 — none linked from the README. A driver preparing #183 Phase A had to reconstruct: dev-shell entry, the one-time Electron binary approval, the helper build, the app-shell build, the guest-image build-and-install, and launching the unpackaged app for real (not the dev fakes) with its runtime env overrides. A follow-up comment on the issue also surfaced a required one-time fix for Electron's SUID sandbox on Ubuntu 24.04 (`chrome-sandbox` ownership/permissions), which resets on every `pnpm install` that recreates `node_modules`. **Desired behavior:** One procedure document — clean checkout to the real app window on the private path — linked from the README, that covers the current stopgap (apt-installed QEMU, nix-built or hand-placed guest image) and is written to be updated once payload assembly (#231) lands. **Key interfaces:** none — this is a documentation-only change. **Acceptance criteria:** - [ ] A single doc walks clean-checkout → running app window on the private path, referencing (not duplicating) `app/PACKAGING.md`, the guest-image recipe, and ADR 0110 where appropriate. - [ ] Covers: dev-shell entry, the one-time Electron binary approval (`pnpm approve-builds`), helper build, app-shell build, guest-image build-and-install, and launching the unpackaged production app with its runtime env overrides. - [ ] Documents the one-time Electron `chrome-sandbox` ownership/permission fix (Ubuntu 24.04: `chown root:root` + `chmod 4755`), including that it resets on any `pnpm install` that recreates `node_modules` or bumps the Electron version, and explicitly does **not** recommend `--no-sandbox` as a workaround. - [ ] Linked from the README. **Out of scope:** - Building the payload assembly step itself (#231) — document the stopgap only, with a note to revisit once #231 lands. - Packaging/installer work.
Author
Owner

Done in 31f2b9e (on origin/main).

New docs/operator-app/build-and-run.md — one procedure, clean checkout → real operator-app window on founding's private path via today's stopgap — linked from the README (operator-app bullet). It references (not duplicates) app/PACKAGING.md, docs/founding/guest-base-image.md, and ADR 0110.

Covers every enumerated step: nix develop entry, pnpm approve-builds (one-time, per-install), the real (non-dev) helper build, the app-shell build, guest-image build-and-install (#216), and the unpackaged production launch with ADR 0110's dev-only single-artifact env overrides (OURCLOUD_GUEST_IMAGE/QEMU_IMG/QEMU_SYSTEM) standing in for the not-yet-assembled payload (#231) plus the apt-QEMU stopgap (#230).

The Ubuntu-24.04 chrome-sandbox fix is documented as step 4 — chown root:root + chmod 4755, resets on any pnpm install that recreates node_modules or bumps Electron, with --no-sandbox explicitly rejected (keeps Chromium's sandbox on).

Documentation only. A closing section marks the manual helper staging + single-artifact overrides as retiring once payload assembly (#231) and packaging land.

Done in 31f2b9e (on origin/main). New `docs/operator-app/build-and-run.md` — one procedure, clean checkout → real operator-app window on founding's private path via today's stopgap — linked from the README (operator-app bullet). It references (not duplicates) `app/PACKAGING.md`, `docs/founding/guest-base-image.md`, and ADR 0110. Covers every enumerated step: `nix develop` entry, `pnpm approve-builds` (one-time, per-install), the real (non-dev) helper build, the app-shell build, guest-image build-and-install (#216), and the unpackaged production launch with ADR 0110's dev-only single-artifact env overrides (`OURCLOUD_GUEST_IMAGE`/`QEMU_IMG`/`QEMU_SYSTEM`) standing in for the not-yet-assembled payload (#231) plus the apt-QEMU stopgap (#230). The Ubuntu-24.04 `chrome-sandbox` fix is documented as step 4 — `chown root:root` + `chmod 4755`, resets on any `pnpm install` that recreates `node_modules` or bumps Electron, with `--no-sandbox` explicitly rejected (keeps Chromium's sandbox on). Documentation only. A closing section marks the manual helper staging + single-artifact overrides as retiring once payload assembly (#231) and packaging land.
ben closed this issue 2026-07-31 22:15:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#232
No description provided.