ci.yml: every job runs in the ci-martha image, pinned by one digest (martha#55 A3 step 2) #63

Open
opened 2026-11-22 22:39:35 +00:00 by juno · 1 comment
Member

Purpose (work-package): every martha CI job runs in one container image pinned by a single digest, so jobs can no longer drift apart in Debian release and the run-time installs that only rebuild a runner's tools are gone.

Refs #55 (Part A3 step 2, and row B1), macula-io/macula-ci-images#14 (the image, A3 step 1) and #15, #42/#54 (the break that motivated it), #61 (a private org's job cannot read the org's own package registry — container pulls are a different path, and unproven).

Raf: DECIDED 2026-11-22 "All 18 as proposed (Recommended)", on the cut list in #55, written under DECIDED 2026-11-22 "tight pinning of services in production: fair enough, but the practices the team follows are just slowing down the workflow".

What this does

  1. One digest, one place. Every job in ci.yml gets container: set to the ci-martha image by digest: an anchor on the first job, container: *ci-martha on the rest (or the workflow's env if the runner prefers it). The digest is the one ci-images build 1962 pushes and prints; Terra reads it from the registry and Mars passes it on. There is no second literal.
  2. Deleted, because the image carries it (the design's rows 1-4, 6-8, 11 and 15):
    • the links job's node:24-trixie container and its lychee-action step — the image carries lychee 0.24.2, so the self-test runs lychee itself with the same options and reads its exit code;
    • every actions/setup-node@v7 step (the image's Node is 24.22.3, the version martha ships) and actions/setup-go@v6 in the workflows job (actionlint 1.7.12 is in the image);
    • the git 2.56.1 source build (it lives in the local action today);
    • the apt-get tmux fallback (the image has tmux at or above the floor) — the floor check stays;
    • the archive installs of jq, tini, sudo, locales, strace and bubblewrap; the gate job keeps the bwrap proof (bwrap --unshare-all --ro-bind / / true) and the AppArmor sysctl line, which is GitHub's.
  3. Kept in this step (the tested pins go into the image in A3 step 3): both direnvs, kitty at its floor, the live run's tmux .debs and gh; the clean-install proof's image pin; the release jobs' production pins; the martha-bwrap runner for gate. defaults.run.shell: martha-step {0} stays: the image carries martha-step and the node user with passwordless sudo.
  4. The local action. .github/actions/a_runner_user_with_sudo is what ci.yml uses for its steps today; the image replaces it. Three other workflows use it too — engine-drift.yml, host-drift.yml, standalone.yml. Mars to rule: move those three onto the image in this PR as well (recommended: one image, one digest, one action gone), or keep the action until they move and delete it then.

Proved before the rest is written

#61 says an Actions job in a private org cannot read that org's package registry with its run token, and that container pulls are a different path — unproven either way. So the first proof on the branch is one job pulling the image on a forge runner. If the pull is refused, this step stops there and goes back to Mars with the registry and the error; nothing else in the PR is worth writing first.

Done when

  • One green run on the tip with every ci.yml job running in the image, and the run naming the image digest.
  • The digest written once — one anchor, one literal, no job repeating it.
  • No setup-node, no setup-go, no archive or apt install, no git build left in the jobs the image covers.
  • The lychee self-test still bites, running the image's own lychee and requiring a non-zero exit.
  • The local action deleted, or the three other workflows moved with it, per Mars's ruling.
Purpose (work-package): every martha CI job runs in one container image pinned by a single digest, so jobs can no longer drift apart in Debian release and the run-time installs that only rebuild a runner's tools are gone. Refs #55 (Part A3 step 2, and row B1), macula-io/macula-ci-images#14 (the image, A3 step 1) and #15, #42/#54 (the break that motivated it), #61 (a private org's job cannot read the org's own package registry — container pulls are a different path, and unproven). Raf: DECIDED 2026-11-22 "All 18 as proposed (Recommended)", on the cut list in #55, written under DECIDED 2026-11-22 "tight pinning of services in production: fair enough, but the practices the team follows are just slowing down the workflow". ## What this does 1. **One digest, one place.** Every job in `ci.yml` gets `container:` set to the ci-martha image by digest: an anchor on the first job, `container: *ci-martha` on the rest (or the workflow's `env` if the runner prefers it). The digest is the one ci-images build 1962 pushes and prints; Terra reads it from the registry and Mars passes it on. There is no second literal. 2. **Deleted, because the image carries it** (the design's rows 1-4, 6-8, 11 and 15): - the `links` job's `node:24-trixie` container and its `lychee-action` step — the image carries lychee 0.24.2, so the self-test runs `lychee` itself with the same options and reads its exit code; - every `actions/setup-node@v7` step (the image's Node is 24.22.3, the version martha ships) and `actions/setup-go@v6` in the `workflows` job (actionlint 1.7.12 is in the image); - the git 2.56.1 source build (it lives in the local action today); - the `apt-get` tmux fallback (the image has tmux at or above the floor) — the floor check stays; - the archive installs of jq, tini, sudo, locales, strace and bubblewrap; the `gate` job keeps the bwrap proof (`bwrap --unshare-all --ro-bind / / true`) and the AppArmor sysctl line, which is GitHub's. 3. **Kept in this step** (the tested pins go into the image in A3 step 3): both direnvs, kitty at its floor, the live run's tmux .debs and gh; the clean-install proof's image pin; the release jobs' production pins; the `martha-bwrap` runner for `gate`. `defaults.run.shell: martha-step {0}` stays: the image carries `martha-step` and the `node` user with passwordless sudo. 4. **The local action.** `.github/actions/a_runner_user_with_sudo` is what ci.yml uses for its steps today; the image replaces it. Three other workflows use it too — `engine-drift.yml`, `host-drift.yml`, `standalone.yml`. **Mars to rule:** move those three onto the image in this PR as well (recommended: one image, one digest, one action gone), or keep the action until they move and delete it then. ## Proved before the rest is written `#61` says an Actions job in a private org cannot read that org's package registry with its run token, and that container pulls are a different path — unproven either way. So the first proof on the branch is **one job pulling the image on a forge runner**. If the pull is refused, this step stops there and goes back to Mars with the registry and the error; nothing else in the PR is worth writing first. ## Done when - [ ] One green run on the tip with every `ci.yml` job running in the image, and the run naming the image digest. - [ ] The digest written once — one anchor, one literal, no job repeating it. - [ ] No `setup-node`, no `setup-go`, no archive or apt install, no git build left in the jobs the image covers. - [ ] The lychee self-test still bites, running the image's own lychee and requiring a non-zero exit. - [ ] The local action deleted, or the three other workflows moved with it, per Mars's ruling.
Author
Member

Mars's rulings, recorded so the issue is not open on them:

  1. The local action stays. a_runner_user_with_sudo is not deleted in this PR; engine-drift.yml, host-drift.yml and standalone.yml move onto the image in a follow-up. ci.yml itself no longer uses it once the jobs run in the image (the image carries the node user and martha-step), but the file stays for the other three.
  2. The pull proof first. One job pulling the image on a forge runner, before the rest is written; on a refusal this stops and the registry and the error go to Mars. Run it on build00 or msi00 if the label allows.
  3. On #60 (not this issue): Uranus did not fold the "the rules test" nit into PR 59, so it is kept for PR 62's merge push.

Where the branch is now

juno/55-ci-martha-container, one commit 6737f74e on main b16a8f4d: every ci.yml job has lost the local action step, actions/setup-node@v7 and actions/setup-go@v6 — 38 steps, 59 lines removed, nothing else touched. check:every-check-runs-in-a-job (17 checks, each still run by a job) and check:every-job-has-a-timeout (42 jobs, all with a timeout) are green on it, so the file still parses and every check still runs.

Waiting on the image, not written yet:

  • the container: line on every job with the one digest (the anchor), and whether it runs as the image's node user;
  • the links job: the trixie container line and the lychee-action step go, and the self-test runs the image's own lychee and reads its exit code — needs the real binary to prove the flags;
  • the gate job: the tmux apt-get fallback and the archive install of bubblewrap/strace go; the bwrap proof and the AppArmor sysctl stay;
  • the workflows job: go install actionlint goes, replaced by the image's actionlint.
Mars's rulings, recorded so the issue is not open on them: 1. **The local action stays.** `a_runner_user_with_sudo` is not deleted in this PR; `engine-drift.yml`, `host-drift.yml` and `standalone.yml` move onto the image in a **follow-up**. ci.yml itself no longer uses it once the jobs run in the image (the image carries the `node` user and `martha-step`), but the file stays for the other three. 2. **The pull proof first.** One job pulling the image on a forge runner, before the rest is written; on a refusal this stops and the registry and the error go to Mars. Run it on build00 or msi00 if the label allows. 3. On #60 (not this issue): Uranus did not fold the "the rules test" nit into PR 59, so it is kept for PR 62's merge push. ## Where the branch is now `juno/55-ci-martha-container`, one commit `6737f74e` on main `b16a8f4d`: every ci.yml job has lost the local action step, `actions/setup-node@v7` and `actions/setup-go@v6` — 38 steps, 59 lines removed, nothing else touched. `check:every-check-runs-in-a-job` (17 checks, each still run by a job) and `check:every-job-has-a-timeout` (42 jobs, all with a timeout) are green on it, so the file still parses and every check still runs. **Waiting on the image, not written yet:** - the `container:` line on every job with the one digest (the anchor), and whether it runs as the image's `node` user; - the `links` job: the trixie container line and the `lychee-action` step go, and the self-test runs the image's own lychee and reads its exit code — needs the real binary to prove the flags; - the `gate` job: the tmux `apt-get` fallback and the archive install of bubblewrap/strace go; the bwrap proof and the AppArmor sysctl stay; - the `workflows` job: `go install actionlint` goes, replaced by the image's actionlint.
Sign in to join this conversation.
No labels
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
martha-ai/martha#63
No description provided.