fix(demo): chown modules/ and logs/ from a root container in the wipe #228

Merged
whitlocktech merged 1 commits from fix/demo-wipe-chown into main 2026-10-27 13:15:26 -05:00
Member

What & why

The first scheduled demo wipe (run 358, 18:00 UTC) failed at seed:demo:

ERROR [seed-demo] seed:demo failed: event "Server greeting": spec.phases[0].steps[0].actionId: no module registers "rust.command.run"

Everything before that worked. plan matched Module-Rust 0.6.0 to bundle 2026.10.22, restore wrote the bundle and restarted the rig, and the app came up healthy. The seed process just loaded no modules. The same log shows why: EACCES: permission denied, open '/app/logs/app.log'. The install step's chown 1000:1000 modules logs runs as the runner user, which is not root, so it failed, and 2>/dev/null || true hid the failure. The app (uid 1000) then couldn't unpack the declared module into ./modules, and a module install failure isn't fatal, so the health check still passed.

The fix: run the chown (-R) in a throwaway node:22.23.4-alpine container. That image runs as root, and the runner is in the docker group, so no sudo is needed. Nothing is silenced any more, so a failure stops the run at this step. It also repairs itself on every wipe; nothing has to be set by hand on the host.

(Run 351, the push-triggered wipe on #227's merge, failed earlier for an unrelated reason: it ran 28 s before Module-Rust v0.6.0 was released, so plan correctly refused.)

How it was tested

  • The YAML parses. The step is one docker run with the same volume mount the plan step already uses on this runner.
  • The real test is the wipe itself: this PR touches .gitea/workflows/demo-wipe.yml, so merging it triggers a wipe.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense. (No docs change: DEMO_MODE.md doesn't describe the chown.)
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The first scheduled demo wipe (run **358**, 18:00 UTC) failed at `seed:demo`: ``` ERROR [seed-demo] seed:demo failed: event "Server greeting": spec.phases[0].steps[0].actionId: no module registers "rust.command.run" ``` Everything before that worked. `plan` matched Module-Rust 0.6.0 to bundle 2026.10.22, `restore` wrote the bundle and restarted the rig, and the app came up healthy. The seed process just loaded **no modules**. The same log shows why: `EACCES: permission denied, open '/app/logs/app.log'`. The install step's `chown 1000:1000 modules logs` runs as the runner user, which is not root, so it failed, and `2>/dev/null || true` hid the failure. The app (uid 1000) then couldn't unpack the declared module into `./modules`, and a module install failure isn't fatal, so the health check still passed. **The fix:** run the chown (`-R`) in a throwaway `node:22.23.4-alpine` container. That image runs as root, and the runner is in the docker group, so no sudo is needed. Nothing is silenced any more, so a failure stops the run at this step. It also repairs itself on every wipe; nothing has to be set by hand on the host. (Run 351, the push-triggered wipe on #227's merge, failed earlier for an unrelated reason: it ran 28 s before Module-Rust v0.6.0 was released, so `plan` correctly refused.) ## How it was tested - The YAML parses. The step is one `docker run` with the same volume mount the `plan` step already uses on this runner. - The real test is the wipe itself: this PR touches `.gitea/workflows/demo-wipe.yml`, so merging it triggers a wipe. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. (No docs change: DEMO_MODE.md doesn't describe the chown.) - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-27 13:05:04 -05:00
fix(demo): chown modules/ and logs/ from a root container in the wipe
All checks were successful
PR Checks / bot-tests (pull_request) Successful in 40s
PR Checks / server-tests (pull_request) Successful in 6m1s
PR Checks / client-build (pull_request) Successful in 7m27s
7aafd0dd74
The runner user is not root, so the host chown failed and `|| true` hid it.
The app (uid 1000) then could not unpack the declared module into ./modules,
came up healthy with no module, and seed:demo refused the fixture's
rust.command.run event (website run 358, the first scheduled wipe).

A throwaway container runs as root and the runner is in the docker group, so
the chown now happens there, and a failure stops the run at that step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech approved these changes 2026-10-27 13:07:05 -05:00
whitlocktech scheduled this pull request to auto merge when all checks succeed 2026-10-27 13:07:11 -05:00
whitlocktech merged commit c18250eb07 into main 2026-10-27 13:15:26 -05:00
whitlocktech deleted branch fix/demo-wipe-chown 2026-10-27 13:15:27 -05:00
Sign in to join this conversation.
No description provided.