The merge is the deploy: the workflow, the script, the key and the runbooks (THE-122) #10

Merged
pit merged 2 commits from paperclip/THE-122-media-deploy into main 2026-12-03 06:34:20 +00:00
Owner

Summary

Makes a merge to infra-media main the deploy (THE-122), and closes the two
documentation carry-overs W1's exit check found.

  • .forgejo/workflows/deploy.yml: on a push to main, log in as the media CI
    actor, start this repository's Semaphore task and follow it. One deploy at a
    time; a failed job mails the pusher.
  • scripts/semaphore-deploy.sh: the three-verb shape the family carries — a bare
    call is the task body (make deps, make env ACTOR=runner, make prod NONINTERACTIVE=1), and start is the workflow's half. Snapshot labels carry
    the Semaphore task id.
  • scripts/semaphore-ca.crt: the pinned CA the script verifies Semaphore's TLS
    with, byte-identical to infra-cockpit's committed copy.
  • env.map / .env.example: the runner's SSH key and the media login's
    Semaphore token; runner added to the subwave, slskd, soularr and qbittorrent
    service rows.
  • Makefile: the service, service-check and verify Targets load the runner's key
    into an agent they start and kill; make deploy-test joins the floor.
  • scripts/snapshot.sh: a Semaphore deploy's restore point is labelled with the
    task, not by hand.
  • docs/deploy.md: re-measured on 2026-12-02 — what exists, what is missing per
    Guest, and the order the first green merge follows.
  • docs/runbook-qbittorrent.md, docs/runbook-slskd.md: the NFS mount contract
    for 110 and 148; docs/runbook-arr.md links each NAS-backed Guest's page
    instead of promising one.

Evidence

  • mise exec -- make check → rc 0: env-check, then 94 assertions on the
    script's task body, poll matrix, timeout and TLS refusals; 53 on the workflow's
    trigger, login, variables, order and clean-up; 33 on the runner's key reaching
    Ansible, including one against a real ssh-agent with a throwaway key; then
    fmt-check.
  • The suite reads the workflow with its comments stripped, and a stub Semaphore
    over TLS with a throwaway CA, so it proves the wiring and the refusals offline.
  • Prerequisite readings in docs/deploy.md come from the store (path status),
    pvesh get /pools/prod on burns, and the Guests' authorized_keys.

Merge Danger

Door: one-way for the first merge, by design. The merge commit is a push to
main, so the new workflow starts a task that walks all twelve Guests, and the
task applies them. Until the Operator's prerequisites are in place — the ten
missing state records, ten pool memberships, the runner's key on every Guest, the
five service secrets, and the ci-media token and Variables — that walk stops at
the first Guest that is missing one, after taking its snapshot and judging its
plan. docs/deploy.md names the order: merge infra-secrets, then
infra-cockpit, mint the token and set the Variables, finish the per-Guest items,
then merge this.

Blast radius: the twelve media Guests (100, 103, 104, 105, 106, 107, 110, 117,
124, 147, 148, 152) — one predeploy snapshot each, then plan-and-apply per Stack
and an Ansible run per service. A revert does not undo what was applied; it takes
a new deploy, and a plan that would replace a Guest is refused by the judge.

## Summary Makes a merge to `infra-media` `main` the deploy (THE-122), and closes the two documentation carry-overs W1's exit check found. - `.forgejo/workflows/deploy.yml`: on a push to `main`, log in as the `media` CI actor, start this repository's Semaphore task and follow it. One deploy at a time; a failed job mails the pusher. - `scripts/semaphore-deploy.sh`: the three-verb shape the family carries — a bare call is the task body (`make deps`, `make env ACTOR=runner`, `make prod NONINTERACTIVE=1`), and `start` is the workflow's half. Snapshot labels carry the Semaphore task id. - `scripts/semaphore-ca.crt`: the pinned CA the script verifies Semaphore's TLS with, byte-identical to `infra-cockpit`'s committed copy. - `env.map` / `.env.example`: the runner's SSH key and the `media` login's Semaphore token; `runner` added to the subwave, slskd, soularr and qbittorrent service rows. - `Makefile`: the service, service-check and verify Targets load the runner's key into an agent they start and kill; `make deploy-test` joins the floor. - `scripts/snapshot.sh`: a Semaphore deploy's restore point is labelled with the task, not `by hand`. - `docs/deploy.md`: re-measured on 2026-12-02 — what exists, what is missing per Guest, and the order the first green merge follows. - `docs/runbook-qbittorrent.md`, `docs/runbook-slskd.md`: the NFS mount contract for 110 and 148; `docs/runbook-arr.md` links each NAS-backed Guest's page instead of promising one. ## Evidence - `mise exec -- make check` → rc 0: `env-check`, then 94 assertions on the script's task body, poll matrix, timeout and TLS refusals; 53 on the workflow's trigger, login, variables, order and clean-up; 33 on the runner's key reaching Ansible, including one against a real `ssh-agent` with a throwaway key; then `fmt-check`. - The suite reads the workflow with its comments stripped, and a stub Semaphore over TLS with a throwaway CA, so it proves the wiring and the refusals offline. - Prerequisite readings in `docs/deploy.md` come from the store (path status), `pvesh get /pools/prod` on burns, and the Guests' `authorized_keys`. ## Merge Danger **Door:** one-way for the first merge, by design. The merge commit is a push to `main`, so the new workflow starts a task that walks all twelve Guests, and the task applies them. Until the Operator's prerequisites are in place — the ten missing state records, ten pool memberships, the runner's key on every Guest, the five service secrets, and the `ci-media` token and Variables — that walk stops at the first Guest that is missing one, after taking its snapshot and judging its plan. `docs/deploy.md` names the order: merge `infra-secrets`, then `infra-cockpit`, mint the token and set the Variables, finish the per-Guest items, then merge this. **Blast radius:** the twelve media Guests (100, 103, 104, 105, 106, 107, 110, 117, 124, 147, 148, 152) — one predeploy snapshot each, then plan-and-apply per Stack and an Ansible run per service. A revert does not undo what was applied; it takes a new deploy, and a plan that would replace a Guest is refused by the judge.
The merge is the deploy: the workflow, the script, the key and the runbooks (THE-122)
All checks were successful
pr-checks / check (pull_request) Successful in 49s
0c01d03db2
infra-media's deploy path, in the shape the family carries: a `deploy.yml` push
job that logs in as the `media` CI actor, starts the Semaphore task and follows
it, and a `scripts/semaphore-deploy.sh` with a bare task body (deps, the
runner's environment, `make prod NONINTERACTIVE=1`) and the `start` verb the
workflow runs. The task's snapshots are labelled with the Semaphore task id.

The environment map gains the runner's SSH key and the CI login's Semaphore
token, and the subwave, slskd, soularr and qbittorrent service rows name
`runner` beside the Operator: the plays seed those files from the store, and a
row the store refuses refuses the whole fetch.

The service and verify Targets load the runner's key into an agent they start
and kill, so the deploy reaches the Guests over SSH without a key file. The
suite proves the body's order, the poll matrix, the TLS refusals, the workflow's
wiring and the key's route to Ansible, offline.

The two W1 carry-over pages: 110 and 148 get the runbook section that records
the NFS mount contract, and `runbook-arr.md` links each NAS-backed Guest's page
instead of promising one. `docs/deploy.md` is re-measured: what exists, what
does not, and the order the first green merge follows.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Author
Owner

Waiting — queued behind olympus/infra-secrets#68 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 22:10 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.

**Waiting** — queued behind olympus/infra-secrets#68 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 22:10 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Member

Review started (round 0/5) on 0c01d03db2 — reading the diff now.

**Review started** (round 0/5) on 0c01d03db297a841f9ee1d331390b746e716d3a8 — reading the diff now.
bot-minos requested changes 2026-12-02 21:28:57 +00:00
Dismissed
bot-minos left a comment

olympus/infra-media#10 · head 0c01d03 · round 0/5 · verdict: fix

Recommendation: fix

Spec source: paperclip:THE-122 (read live from the board), with the PR body as its repository-side half. Standards: this repository carries no AGENTS.md/CONTRIBUTING.md/coding-standards file (git ls-files — none), so the Standards axis is judged by general good practice plus the olympus/workshop ADRs the change itself cites (0009, 0010, 0011). Saying so, as asked.


Standards — 4 findings (1 blocker, 3 advisories)

BLOCKER · scripts/tests/service-key.test.sh:54-55 with :145, :147, :225 — the key-leak assertions cannot fail.
The fixture the suite is built around was scrubbed before the commit:

54: canary='CANARYb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQ'
55: fake_key=$(printf '%s\n' '[REDACTED PRIVATE KEY]')

The canary is no longer part of the key, so grep -qF -- "$canary" over the recorded command lines (:145), over the recipe's output (:147) and over the curl arguments (:225) can never match. Checked: the canary occurs exactly once in the tree (its own definition, grep -rn CANARYb3Blb → 1 hit), and printf '%s' "[REDACTED PRIVATE KEY]" | grep -c -F "$canary" → 0. Three assertions that pass whatever the Makefile does. Lines 16–18 of the same file promise the property they are supposed to pin: "the key is on standard input and nowhere else: no argument of any command the recipe starts carries it".
Smallest clearing change: restore the fake key so the canary is inside it (a CANARY-prefixed, obviously-throwaway PEM), or grep the recorded calls and the output for "$fake_key" instead of "$canary". No production code changes.

ADVISORY · scripts/semaphore-deploy.sh:127 — a citation to a file this repository does not have.
# Every other make runs under the manager (AGENTS.md §Toolchain). There is no AGENTS.md in infra-media (the four sibling infrastructure repos each carry one; this one does not). A reader following the reference finds nothing. Either add the rule or point at the page that carries it.
Clearing change: drop the parenthetical or name Makefile:20-22 (.SHELLFLAGS/.ONESHELL), where the toolchain rule actually lives here.

ADVISORY · scripts/tests/deploy-workflow.sh:29 — names a Target that does not exist.
# Run with make deploy-workflow-test, or directly — the Makefile's target is deploy-test (Makefile:281). make deploy-workflow-test is No rule to make target, so the one instruction at the top of the file is wrong on the first try.
Clearing change: say make deploy-test (or make -C … deploy-test), one word.

ADVISORY (nit) · scripts/semaphore-ca.crt — added mode 100755.
git ls-tree HEAD scripts/ → 100755 blob ee39478… scripts/semaphore-ca.crt; the byte-identical copy it comes from is 100644 (infra-cockpit semaphore/service/files/ca.crt). A certificate is data, not a program.
Clearing change: git update-index --chmod=-x scripts/semaphore-ca.crt.


Spec — 2 findings (2 advisories)

ADVISORY · docs/runbook-slskd.md:25-26, :33, :67 — the runbook says the play gates the mounts; the gate is in a later step, in a different file.
The page says: "the play asserts them (findmnt in slskd/service/roles/slskd/tasks/main.yml)", "the play refuses to seed or converge", and "The play asserts both before it writes".

  • slskd/service/roles/slskd/tasks/main.yml contains no findmnt — its first assert (:17-30) is the five credentials; grep -rn findmnt slskd/ finds exactly one line, slskd/service/verify.yml:68.
  • The mounts are asserted in slskd/service/verify.yml:85-91, and make prod runs snapshot → guest → service → verify (Makefile:117, :355-362). So on a Guest whose Node mount is gone, the service play does seed and converge, and the failure arrives at verify, after the apply.
    Clearing change: cite slskd/service/verify.yml, and say the deploy stops at verify rather than claiming the apply is refused. (110's page gets this right — docs/runbook-qbittorrent.md:27 cites the file that really asserts it.)

ADVISORY · docs/runbook-qbittorrent.md:16 — "110 is the one Guest in the fleet that mounts the NAS inside itself."
147 nzbget does too: docs/runbook-nzbget.md:8-12 gives the Guest's own /etc/fstab entry for 10.12.0.6:/volume1/ws/nzbget/downloads, and nzbget/guest/variables.tf:64-67 says "the Guest mounts them itself … Nothing on the Node is bound in". This PR's own docs/runbook-arr.md:86 carries the same fact.
Clearing change: say 110 is the one Guest that mounts the whole /volume1/ws inside itself (147 mounts one subtree), or drop "the one".


Verified (my own runs, on the head SHA in a worktree)

What Result
mise exec -- make check at 0c01d03 rc 0 — env-check (pin + 38 names), 94 + 53 + 33 assertions, fmt-check silent
make deploy-test ×8, deploy-workflow.sh ×40 green every time (94 / 53 / 33)
openssl s_client -connect 10.12.0.143:3000 -CAfile scripts/semaphore-ca.crt Verify return code: 0 (ok), issuer CN=Semaphore Local CA — the pin verifies the live server
sha256sum scripts/semaphore-ca.crt 5a62c581… = infra-cockpit's committed semaphore/service/files/ca.crt (same blob ee39478) — "byte-identical" holds
sha256sum scripts/env.sh 477f36c6… = infra-secrets paperclip/THE-122-media-deploy scripts/env.sh
.forgejo/workflows/deploy.yml parsed one trigger (push/[main]), one job, 6 steps in the claimed order; concurrency and enable-email-notifications match infra-cockpit's deploy workflow
env.map ↔ companion store grants actors=runner secret/services/semaphore/deploy-ssh has its grant at infra-secrets automation-runner.hcl:73; actors=media secret/ci/media/semaphore-api matches ci-media.hcl; the twelve media-*-guest/deploy keys are all in the same file
ADR-0011 on the now-automated path confirm_and_apply (Makefile:208-216) judges the artifact under NONINTERACTIVE=1 and applies only the judged bytes — the merge path keeps the plan gate
Every changed file 17/17 read; the script and its suites diff against infra-silo's copies to repo-name substitutions only

I also checked the three claims in the ticket's carry-over: the NFS contract for 110 (fstab entry, drop-in Requires=/After=mnt-evilwitness.mount at qbittorrent/service/roles/qbittorrent/tasks/main.yml:181-187) and for 148 (mp0/mp1 in slskd/guest/variables.tf:62-69, features.mount = ["nfs"]) are accurate, and every row of the arr page's link table matches the Guest declaration it names.

Could not verify

  • That a merge actually starts the Semaphore task: this repository's Actions Variables answer [] (docs/deploy.md item 7), so there is no project or template id to start against.
  • SEMAPHORE_TASK_DETAILS_ID against the installed Semaphore (the script claims 2.19.16's shell-template environment). No access to the server's version; the label degrades safely to "the Semaphore deploy task" without it.
  • The store-side measurements in docs/deploy.md (state records, /pool/prod membership, authorized_keys, service secrets). No store credential in this session; I read them as the author's measurement, dated 2026-12-02.
  • The twelve-Guest walk itself (everything above is offline).
  • One unexplained red floor: my first make deploy-test printed deploy-workflow tests: 1 assertion(s) FAILED. (make error 2). I piped that run's output through tail and kept no log, so I cannot name the assertion; 48 subsequent runs (8 through make, 40 direct) were green. I am not charging it as a finding — there is a symptom and no nameable defect — but a floor that can go red without saying which assertion failed is worth watching in CI.

Summary

  • Standards: 4 findings — worst: the three vacuous key-leak assertions in service-key.test.sh (blocker); the rest are advisory.
  • Spec: 2 findings — worst: docs/runbook-slskd.md claims an apply-time mount gate that lives in verify.yml instead (advisory).
  • The recommendation turns on the one blocker. The advisory count (5) would also have turned it, by the volume rule; none of them is dressed up as a blocker.
  • Escalated to the board: THE-123 — a new deploy workflow on push: main plus the required check target's recipe gaining three suites is a CI-gate change and a one-way door for the first merge. Filed unassigned: the board agent's slot answers paused, so POST with it is refused (409); THE-123 reads back status=todo, assignee=null.
<!-- minos-review repo=olympus/infra-media pr=10 head=0c01d03db297a841f9ee1d331390b746e716d3a8 round=0/5 verdict=fix --> **olympus/infra-media#10** · head `0c01d03` · round 0/5 · verdict: **fix** Recommendation: fix Spec source: `paperclip:THE-122` (read live from the board), with the PR body as its repository-side half. Standards: this repository carries no `AGENTS.md`/`CONTRIBUTING.md`/coding-standards file (`git ls-files` — none), so the Standards axis is judged by general good practice plus the `olympus/workshop` ADRs the change itself cites (0009, 0010, 0011). Saying so, as asked. --- ## Standards — 4 findings (1 blocker, 3 advisories) **BLOCKER · `scripts/tests/service-key.test.sh:54-55` with `:145`, `:147`, `:225` — the key-leak assertions cannot fail.** The fixture the suite is built around was scrubbed before the commit: ``` 54: canary='CANARYb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQ' 55: fake_key=$(printf '%s\n' '[REDACTED PRIVATE KEY]') ``` The canary is no longer part of the key, so `grep -qF -- "$canary"` over the recorded command lines (`:145`), over the recipe's output (`:147`) and over the `curl` arguments (`:225`) can never match. Checked: the canary occurs exactly once in the tree (its own definition, `grep -rn CANARYb3Blb` → 1 hit), and `printf '%s' "[REDACTED PRIVATE KEY]" | grep -c -F "$canary"` → `0`. Three assertions that pass whatever the Makefile does. Lines 16–18 of the same file promise the property they are supposed to pin: "the key is on standard input and nowhere else: no argument of any command the recipe starts carries it". *Smallest clearing change:* restore the fake key so the canary is inside it (a `CANARY`-prefixed, obviously-throwaway PEM), or grep the recorded calls and the output for `"$fake_key"` instead of `"$canary"`. No production code changes. **ADVISORY · `scripts/semaphore-deploy.sh:127` — a citation to a file this repository does not have.** `# Every other make runs under the manager (AGENTS.md §Toolchain).` There is no `AGENTS.md` in `infra-media` (the four sibling infrastructure repos each carry one; this one does not). A reader following the reference finds nothing. Either add the rule or point at the page that carries it. *Clearing change:* drop the parenthetical or name `Makefile:20-22` (`.SHELLFLAGS`/`.ONESHELL`), where the toolchain rule actually lives here. **ADVISORY · `scripts/tests/deploy-workflow.sh:29` — names a Target that does not exist.** `# Run with `make deploy-workflow-test`, or directly` — the Makefile's target is `deploy-test` (`Makefile:281`). `make deploy-workflow-test` is `No rule to make target`, so the one instruction at the top of the file is wrong on the first try. *Clearing change:* say `make deploy-test` (or `make -C … deploy-test`), one word. **ADVISORY (nit) · `scripts/semaphore-ca.crt` — added mode `100755`.** `git ls-tree HEAD scripts/` → `100755 blob ee39478… scripts/semaphore-ca.crt`; the byte-identical copy it comes from is `100644` (`infra-cockpit` `semaphore/service/files/ca.crt`). A certificate is data, not a program. *Clearing change:* `git update-index --chmod=-x scripts/semaphore-ca.crt`. --- ## Spec — 2 findings (2 advisories) **ADVISORY · `docs/runbook-slskd.md:25-26`, `:33`, `:67` — the runbook says the play gates the mounts; the gate is in a later step, in a different file.** The page says: "the play asserts them (`findmnt` in `slskd/service/roles/slskd/tasks/main.yml`)", "the play refuses to seed or converge", and "The play asserts both before it writes". - `slskd/service/roles/slskd/tasks/main.yml` contains no `findmnt` — its first `assert` (`:17-30`) is the five credentials; `grep -rn findmnt slskd/` finds exactly one line, `slskd/service/verify.yml:68`. - The mounts are asserted in `slskd/service/verify.yml:85-91`, and `make prod` runs `snapshot → guest → service → verify` (`Makefile:117`, `:355-362`). So on a Guest whose Node mount is gone, the service play **does** seed and converge, and the failure arrives at `verify`, after the apply. *Clearing change:* cite `slskd/service/verify.yml`, and say the deploy stops at `verify` rather than claiming the apply is refused. (110's page gets this right — `docs/runbook-qbittorrent.md:27` cites the file that really asserts it.) **ADVISORY · `docs/runbook-qbittorrent.md:16` — "110 is the one Guest in the fleet that mounts the NAS inside itself."** 147 nzbget does too: `docs/runbook-nzbget.md:8-12` gives the Guest's own `/etc/fstab` entry for `10.12.0.6:/volume1/ws/nzbget/downloads`, and `nzbget/guest/variables.tf:64-67` says "the Guest mounts them itself … Nothing on the Node is bound in". This PR's own `docs/runbook-arr.md:86` carries the same fact. *Clearing change:* say 110 is the one Guest that mounts the *whole* `/volume1/ws` inside itself (147 mounts one subtree), or drop "the one". --- ## Verified (my own runs, on the head SHA in a worktree) | What | Result | | --- | --- | | `mise exec -- make check` at `0c01d03` | **rc 0** — env-check (pin + 38 names), 94 + 53 + 33 assertions, `fmt-check` silent | | `make deploy-test` ×8, `deploy-workflow.sh` ×40 | green every time (94 / 53 / 33) | | `openssl s_client -connect 10.12.0.143:3000 -CAfile scripts/semaphore-ca.crt` | `Verify return code: 0 (ok)`, issuer `CN=Semaphore Local CA` — the pin verifies the live server | | `sha256sum scripts/semaphore-ca.crt` | `5a62c581…` = `infra-cockpit`'s committed `semaphore/service/files/ca.crt` (same blob `ee39478`) — "byte-identical" holds | | `sha256sum scripts/env.sh` | `477f36c6…` = `infra-secrets` `paperclip/THE-122-media-deploy` `scripts/env.sh` | | `.forgejo/workflows/deploy.yml` parsed | one trigger (`push`/`[main]`), one job, 6 steps in the claimed order; `concurrency` and `enable-email-notifications` match `infra-cockpit`'s deploy workflow | | `env.map` ↔ companion store grants | `actors=runner secret/services/semaphore/deploy-ssh` has its grant at `infra-secrets` `automation-runner.hcl:73`; `actors=media secret/ci/media/semaphore-api` matches `ci-media.hcl`; the twelve `media-*-guest/deploy` keys are all in the same file | | ADR-0011 on the now-automated path | `confirm_and_apply` (`Makefile:208-216`) judges the artifact under `NONINTERACTIVE=1` and applies only the judged bytes — the merge path keeps the plan gate | | Every changed file | 17/17 read; the script and its suites diff against `infra-silo`'s copies to repo-name substitutions only | I also checked the three claims in the ticket's carry-over: the NFS contract for 110 (fstab entry, drop-in `Requires=`/`After=mnt-evilwitness.mount` at `qbittorrent/service/roles/qbittorrent/tasks/main.yml:181-187`) and for 148 (`mp0`/`mp1` in `slskd/guest/variables.tf:62-69`, `features.mount = ["nfs"]`) are accurate, and every row of the arr page's link table matches the Guest declaration it names. ## Could not verify - That a merge actually starts the Semaphore task: this repository's Actions Variables answer `[]` (`docs/deploy.md` item 7), so there is no project or template id to start against. - `SEMAPHORE_TASK_DETAILS_ID` against the installed Semaphore (the script claims 2.19.16's shell-template environment). No access to the server's version; the label degrades safely to "the Semaphore deploy task" without it. - The store-side measurements in `docs/deploy.md` (state records, `/pool/prod` membership, `authorized_keys`, service secrets). No store credential in this session; I read them as the author's measurement, dated 2026-12-02. - The twelve-Guest walk itself (everything above is offline). - **One unexplained red floor:** my first `make deploy-test` printed `deploy-workflow tests: 1 assertion(s) FAILED.` (make error 2). I piped that run's output through `tail` and kept no log, so I cannot name the assertion; 48 subsequent runs (8 through `make`, 40 direct) were green. I am not charging it as a finding — there is a symptom and no nameable defect — but a floor that can go red without saying which assertion failed is worth watching in CI. ## Summary - **Standards:** 4 findings — worst: the three vacuous key-leak assertions in `service-key.test.sh` (**blocker**); the rest are advisory. - **Spec:** 2 findings — worst: `docs/runbook-slskd.md` claims an apply-time mount gate that lives in `verify.yml` instead (**advisory**). - The recommendation turns on the one blocker. The advisory count (5) would also have turned it, by the volume rule; none of them is dressed up as a blocker. - **Escalated to the board: THE-123** — a new deploy workflow on `push: main` plus the required `check` target's recipe gaining three suites is a CI-gate change and a one-way door for the first merge. Filed unassigned: the board agent's slot answers `paused`, so `POST` with it is refused (`409`); THE-123 reads back `status=todo, assignee=null`.
bot-minos requested changes 2026-12-02 21:29:03 +00:00
Dismissed
bot-minos left a comment

olympus/infra-media#10 · head 0c01d03 · round 0/5 · verdict: fix

Recommendation: fix

Spec source: paperclip:THE-122 (read live from the board), with the PR body as its repository-side half. Standards: this repository carries no AGENTS.md/CONTRIBUTING.md/coding-standards file (git ls-files — none), so the Standards axis is judged by general good practice plus the olympus/workshop ADRs the change itself cites (0009, 0010, 0011). Saying so, as asked.


Standards — 4 findings (1 blocker, 3 advisories)

BLOCKER · scripts/tests/service-key.test.sh:54-55 with :145, :147, :225 — the key-leak assertions cannot fail.
The fixture the suite is built around was scrubbed before the commit:

54: canary='CANARYb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQ'
55: fake_key=$(printf '%s\n' '[REDACTED PRIVATE KEY]')

The canary is no longer part of the key, so grep -qF -- "$canary" over the recorded command lines (:145), over the recipe's output (:147) and over the curl arguments (:225) can never match. Checked: the canary occurs exactly once in the tree (its own definition, grep -rn CANARYb3Blb → 1 hit), and printf '%s' "[REDACTED PRIVATE KEY]" | grep -c -F "$canary" → 0. Three assertions that pass whatever the Makefile does. Lines 16–18 of the same file promise the property they are supposed to pin: "the key is on standard input and nowhere else: no argument of any command the recipe starts carries it".
Smallest clearing change: restore the fake key so the canary is inside it (a CANARY-prefixed, obviously-throwaway PEM), or grep the recorded calls and the output for "$fake_key" instead of "$canary". No production code changes.

ADVISORY · scripts/semaphore-deploy.sh:127 — a citation to a file this repository does not have.
# Every other make runs under the manager (AGENTS.md §Toolchain). There is no AGENTS.md in infra-media (the four sibling infrastructure repos each carry one; this one does not). A reader following the reference finds nothing. Either add the rule or point at the page that carries it.
Clearing change: drop the parenthetical or name Makefile:20-22 (.SHELLFLAGS/.ONESHELL), where the toolchain rule actually lives here.

ADVISORY · scripts/tests/deploy-workflow.sh:29 — names a Target that does not exist.
# Run with make deploy-workflow-test, or directly — the Makefile's target is deploy-test (Makefile:281). make deploy-workflow-test is No rule to make target, so the one instruction at the top of the file is wrong on the first try.
Clearing change: say make deploy-test (or make -C … deploy-test), one word.

ADVISORY (nit) · scripts/semaphore-ca.crt — added mode 100755.
git ls-tree HEAD scripts/ → 100755 blob ee39478… scripts/semaphore-ca.crt; the byte-identical copy it comes from is 100644 (infra-cockpit semaphore/service/files/ca.crt). A certificate is data, not a program.
Clearing change: git update-index --chmod=-x scripts/semaphore-ca.crt.


Spec — 2 findings (2 advisories)

ADVISORY · docs/runbook-slskd.md:25-26, :33, :67 — the runbook says the play gates the mounts; the gate is in a later step, in a different file.
The page says: "the play asserts them (findmnt in slskd/service/roles/slskd/tasks/main.yml)", "the play refuses to seed or converge", and "The play asserts both before it writes".

  • slskd/service/roles/slskd/tasks/main.yml contains no findmnt — its first assert (:17-30) is the five credentials; grep -rn findmnt slskd/ finds exactly one line, slskd/service/verify.yml:68.
  • The mounts are asserted in slskd/service/verify.yml:85-91, and make prod runs snapshot → guest → service → verify (Makefile:117, :355-362). So on a Guest whose Node mount is gone, the service play does seed and converge, and the failure arrives at verify, after the apply.
    Clearing change: cite slskd/service/verify.yml, and say the deploy stops at verify rather than claiming the apply is refused. (110's page gets this right — docs/runbook-qbittorrent.md:27 cites the file that really asserts it.)

ADVISORY · docs/runbook-qbittorrent.md:16 — "110 is the one Guest in the fleet that mounts the NAS inside itself."
147 nzbget does too: docs/runbook-nzbget.md:8-12 gives the Guest's own /etc/fstab entry for 10.12.0.6:/volume1/ws/nzbget/downloads, and nzbget/guest/variables.tf:64-67 says "the Guest mounts them itself … Nothing on the Node is bound in". This PR's own docs/runbook-arr.md:86 carries the same fact.
Clearing change: say 110 is the one Guest that mounts the whole /volume1/ws inside itself (147 mounts one subtree), or drop "the one".


Verified (my own runs, on the head SHA in a worktree)

What Result
mise exec -- make check at 0c01d03 rc 0 — env-check (pin + 38 names), 94 + 53 + 33 assertions, fmt-check silent
make deploy-test ×8, deploy-workflow.sh ×40 green every time (94 / 53 / 33)
openssl s_client -connect 10.12.0.143:3000 -CAfile scripts/semaphore-ca.crt Verify return code: 0 (ok), issuer CN=Semaphore Local CA — the pin verifies the live server
sha256sum scripts/semaphore-ca.crt 5a62c581… = infra-cockpit's committed semaphore/service/files/ca.crt (same blob ee39478) — "byte-identical" holds
sha256sum scripts/env.sh 477f36c6… = infra-secrets paperclip/THE-122-media-deploy scripts/env.sh
.forgejo/workflows/deploy.yml parsed one trigger (push/[main]), one job, 6 steps in the claimed order; concurrency and enable-email-notifications match infra-cockpit's deploy workflow
env.map ↔ companion store grants actors=runner secret/services/semaphore/deploy-ssh has its grant at infra-secrets automation-runner.hcl:73; actors=media secret/ci/media/semaphore-api matches ci-media.hcl; the twelve media-*-guest/deploy keys are all in the same file
ADR-0011 on the now-automated path confirm_and_apply (Makefile:208-216) judges the artifact under NONINTERACTIVE=1 and applies only the judged bytes — the merge path keeps the plan gate
Every changed file 17/17 read; the script and its suites diff against infra-silo's copies to repo-name substitutions only

I also checked the three claims in the ticket's carry-over: the NFS contract for 110 (fstab entry, drop-in Requires=/After=mnt-evilwitness.mount at qbittorrent/service/roles/qbittorrent/tasks/main.yml:181-187) and for 148 (mp0/mp1 in slskd/guest/variables.tf:62-69, features.mount = ["nfs"]) are accurate, and every row of the arr page's link table matches the Guest declaration it names.

Could not verify

  • That a merge actually starts the Semaphore task: this repository's Actions Variables answer [] (docs/deploy.md item 7), so there is no project or template id to start against.
  • SEMAPHORE_TASK_DETAILS_ID against the installed Semaphore (the script claims 2.19.16's shell-template environment). No access to the server's version; the label degrades safely to "the Semaphore deploy task" without it.
  • The store-side measurements in docs/deploy.md (state records, /pool/prod membership, authorized_keys, service secrets). No store credential in this session; I read them as the author's measurement, dated 2026-12-02.
  • The twelve-Guest walk itself (everything above is offline).
  • One unexplained red floor: my first make deploy-test printed deploy-workflow tests: 1 assertion(s) FAILED. (make error 2). I piped that run's output through tail and kept no log, so I cannot name the assertion; 48 subsequent runs (8 through make, 40 direct) were green. I am not charging it as a finding — there is a symptom and no nameable defect — but a floor that can go red without saying which assertion failed is worth watching in CI.

Summary

  • Standards: 4 findings — worst: the three vacuous key-leak assertions in service-key.test.sh (blocker); the rest are advisory.
  • Spec: 2 findings — worst: docs/runbook-slskd.md claims an apply-time mount gate that lives in verify.yml instead (advisory).
  • The recommendation turns on the one blocker. The advisory count (5) would also have turned it, by the volume rule; none of them is dressed up as a blocker.
  • Escalated to the board: THE-123 — a new deploy workflow on push: main plus the required check target's recipe gaining three suites is a CI-gate change and a one-way door for the first merge. Filed unassigned: the board agent's slot answers paused, so POST with it is refused (409); THE-123 reads back status=todo, assignee=null.
<!-- minos-review repo=olympus/infra-media pr=10 head=0c01d03db297a841f9ee1d331390b746e716d3a8 round=0/5 verdict=fix --> **olympus/infra-media#10** · head `0c01d03` · round 0/5 · verdict: **fix** Recommendation: fix Spec source: `paperclip:THE-122` (read live from the board), with the PR body as its repository-side half. Standards: this repository carries no `AGENTS.md`/`CONTRIBUTING.md`/coding-standards file (`git ls-files` — none), so the Standards axis is judged by general good practice plus the `olympus/workshop` ADRs the change itself cites (0009, 0010, 0011). Saying so, as asked. --- ## Standards — 4 findings (1 blocker, 3 advisories) **BLOCKER · `scripts/tests/service-key.test.sh:54-55` with `:145`, `:147`, `:225` — the key-leak assertions cannot fail.** The fixture the suite is built around was scrubbed before the commit: ``` 54: canary='CANARYb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQ' 55: fake_key=$(printf '%s\n' '[REDACTED PRIVATE KEY]') ``` The canary is no longer part of the key, so `grep -qF -- "$canary"` over the recorded command lines (`:145`), over the recipe's output (`:147`) and over the `curl` arguments (`:225`) can never match. Checked: the canary occurs exactly once in the tree (its own definition, `grep -rn CANARYb3Blb` → 1 hit), and `printf '%s' "[REDACTED PRIVATE KEY]" | grep -c -F "$canary"` → `0`. Three assertions that pass whatever the Makefile does. Lines 16–18 of the same file promise the property they are supposed to pin: "the key is on standard input and nowhere else: no argument of any command the recipe starts carries it". *Smallest clearing change:* restore the fake key so the canary is inside it (a `CANARY`-prefixed, obviously-throwaway PEM), or grep the recorded calls and the output for `"$fake_key"` instead of `"$canary"`. No production code changes. **ADVISORY · `scripts/semaphore-deploy.sh:127` — a citation to a file this repository does not have.** `# Every other make runs under the manager (AGENTS.md §Toolchain).` There is no `AGENTS.md` in `infra-media` (the four sibling infrastructure repos each carry one; this one does not). A reader following the reference finds nothing. Either add the rule or point at the page that carries it. *Clearing change:* drop the parenthetical or name `Makefile:20-22` (`.SHELLFLAGS`/`.ONESHELL`), where the toolchain rule actually lives here. **ADVISORY · `scripts/tests/deploy-workflow.sh:29` — names a Target that does not exist.** `# Run with `make deploy-workflow-test`, or directly` — the Makefile's target is `deploy-test` (`Makefile:281`). `make deploy-workflow-test` is `No rule to make target`, so the one instruction at the top of the file is wrong on the first try. *Clearing change:* say `make deploy-test` (or `make -C … deploy-test`), one word. **ADVISORY (nit) · `scripts/semaphore-ca.crt` — added mode `100755`.** `git ls-tree HEAD scripts/` → `100755 blob ee39478… scripts/semaphore-ca.crt`; the byte-identical copy it comes from is `100644` (`infra-cockpit` `semaphore/service/files/ca.crt`). A certificate is data, not a program. *Clearing change:* `git update-index --chmod=-x scripts/semaphore-ca.crt`. --- ## Spec — 2 findings (2 advisories) **ADVISORY · `docs/runbook-slskd.md:25-26`, `:33`, `:67` — the runbook says the play gates the mounts; the gate is in a later step, in a different file.** The page says: "the play asserts them (`findmnt` in `slskd/service/roles/slskd/tasks/main.yml`)", "the play refuses to seed or converge", and "The play asserts both before it writes". - `slskd/service/roles/slskd/tasks/main.yml` contains no `findmnt` — its first `assert` (`:17-30`) is the five credentials; `grep -rn findmnt slskd/` finds exactly one line, `slskd/service/verify.yml:68`. - The mounts are asserted in `slskd/service/verify.yml:85-91`, and `make prod` runs `snapshot → guest → service → verify` (`Makefile:117`, `:355-362`). So on a Guest whose Node mount is gone, the service play **does** seed and converge, and the failure arrives at `verify`, after the apply. *Clearing change:* cite `slskd/service/verify.yml`, and say the deploy stops at `verify` rather than claiming the apply is refused. (110's page gets this right — `docs/runbook-qbittorrent.md:27` cites the file that really asserts it.) **ADVISORY · `docs/runbook-qbittorrent.md:16` — "110 is the one Guest in the fleet that mounts the NAS inside itself."** 147 nzbget does too: `docs/runbook-nzbget.md:8-12` gives the Guest's own `/etc/fstab` entry for `10.12.0.6:/volume1/ws/nzbget/downloads`, and `nzbget/guest/variables.tf:64-67` says "the Guest mounts them itself … Nothing on the Node is bound in". This PR's own `docs/runbook-arr.md:86` carries the same fact. *Clearing change:* say 110 is the one Guest that mounts the *whole* `/volume1/ws` inside itself (147 mounts one subtree), or drop "the one". --- ## Verified (my own runs, on the head SHA in a worktree) | What | Result | | --- | --- | | `mise exec -- make check` at `0c01d03` | **rc 0** — env-check (pin + 38 names), 94 + 53 + 33 assertions, `fmt-check` silent | | `make deploy-test` ×8, `deploy-workflow.sh` ×40 | green every time (94 / 53 / 33) | | `openssl s_client -connect 10.12.0.143:3000 -CAfile scripts/semaphore-ca.crt` | `Verify return code: 0 (ok)`, issuer `CN=Semaphore Local CA` — the pin verifies the live server | | `sha256sum scripts/semaphore-ca.crt` | `5a62c581…` = `infra-cockpit`'s committed `semaphore/service/files/ca.crt` (same blob `ee39478`) — "byte-identical" holds | | `sha256sum scripts/env.sh` | `477f36c6…` = `infra-secrets` `paperclip/THE-122-media-deploy` `scripts/env.sh` | | `.forgejo/workflows/deploy.yml` parsed | one trigger (`push`/`[main]`), one job, 6 steps in the claimed order; `concurrency` and `enable-email-notifications` match `infra-cockpit`'s deploy workflow | | `env.map` ↔ companion store grants | `actors=runner secret/services/semaphore/deploy-ssh` has its grant at `infra-secrets` `automation-runner.hcl:73`; `actors=media secret/ci/media/semaphore-api` matches `ci-media.hcl`; the twelve `media-*-guest/deploy` keys are all in the same file | | ADR-0011 on the now-automated path | `confirm_and_apply` (`Makefile:208-216`) judges the artifact under `NONINTERACTIVE=1` and applies only the judged bytes — the merge path keeps the plan gate | | Every changed file | 17/17 read; the script and its suites diff against `infra-silo`'s copies to repo-name substitutions only | I also checked the three claims in the ticket's carry-over: the NFS contract for 110 (fstab entry, drop-in `Requires=`/`After=mnt-evilwitness.mount` at `qbittorrent/service/roles/qbittorrent/tasks/main.yml:181-187`) and for 148 (`mp0`/`mp1` in `slskd/guest/variables.tf:62-69`, `features.mount = ["nfs"]`) are accurate, and every row of the arr page's link table matches the Guest declaration it names. ## Could not verify - That a merge actually starts the Semaphore task: this repository's Actions Variables answer `[]` (`docs/deploy.md` item 7), so there is no project or template id to start against. - `SEMAPHORE_TASK_DETAILS_ID` against the installed Semaphore (the script claims 2.19.16's shell-template environment). No access to the server's version; the label degrades safely to "the Semaphore deploy task" without it. - The store-side measurements in `docs/deploy.md` (state records, `/pool/prod` membership, `authorized_keys`, service secrets). No store credential in this session; I read them as the author's measurement, dated 2026-12-02. - The twelve-Guest walk itself (everything above is offline). - **One unexplained red floor:** my first `make deploy-test` printed `deploy-workflow tests: 1 assertion(s) FAILED.` (make error 2). I piped that run's output through `tail` and kept no log, so I cannot name the assertion; 48 subsequent runs (8 through `make`, 40 direct) were green. I am not charging it as a finding — there is a symptom and no nameable defect — but a floor that can go red without saying which assertion failed is worth watching in CI. ## Summary - **Standards:** 4 findings — worst: the three vacuous key-leak assertions in `service-key.test.sh` (**blocker**); the rest are advisory. - **Spec:** 2 findings — worst: `docs/runbook-slskd.md` claims an apply-time mount gate that lives in `verify.yml` instead (**advisory**). - The recommendation turns on the one blocker. The advisory count (5) would also have turned it, by the volume rule; none of them is dressed up as a blocker. - **Escalated to the board: THE-123** — a new deploy workflow on `push: main` plus the required `check` target's recipe gaining three suites is a CI-gate change and a one-way door for the first merge. Filed unassigned: the board agent's slot answers `paused`, so `POST` with it is refused (`409`); THE-123 reads back `status=todo, assignee=null`.
Member

Acknowledged (round 0/5) — fixing now; what changed and how I verified it follows.

**Acknowledged** (round 0/5) — fixing now; what changed and how I verified it follows.
The key fixture carries its canary, and five citations name what exists (THE-122)
All checks were successful
pr-checks / check (pull_request) Successful in 41s
04baa3693a
Round 0's review: one blocker and five advisories, all on lines this branch
adds.

The blocker: `scripts/tests/service-key.test.sh` defined the canary beside a
`fake_key` that no longer contained it, so the three leak assertions — the
recorded command lines, the recipe's own output, and `verify`'s `curl`
arguments — grepped for a string that never occurs and passed whatever the
Makefile did. Restored the sibling `infra-silo` suite's fixture: a three-line
key whose middle line is the canary, so a search for the canary is a search for
part of the key. Driven red to prove it: an `ssh-add` handed the key as an
argument, a `debug:` echo of it, and `verify`'s `curl` carrying it each failed
exactly the assertion that names it, and the tree is back to 33 green
assertions.

The advisories: `semaphore-deploy.sh` no longer cites an `AGENTS.md` this
repository does not have; `deploy-workflow.sh` names `make deploy-test`, the
Target that runs it; `scripts/semaphore-ca.crt` is data, so 100644 like the
`infra-cockpit` copy it comes from; `docs/runbook-slskd.md` cites
`slskd/service/verify.yml` and says the deploy stops at `verify` rather than
that the play refuses to converge (`grep -rn findmnt slskd/` finds one line, in
`verify.yml`); `docs/runbook-qbittorrent.md` says 110 mounts the whole
`/volume1/ws`, because 147 mounts one subtree of it, `nzbget`'s downloads.

mise exec -- make check: rc 0 — env-check, 94 + 53 + 33 assertions, fmt-check
silent. mise exec -- make validate: rc 0, 12 Stacks valid.
Member

Fix round 0/5 — 04baa36 on paperclip/THE-122-media-deploy

All six findings are cleared in 04baa36 (one commit on top of 0c01d03). Nothing left open, nothing disputed.

Finding Change Where
BLOCKER — the three key-leak assertions cannot fail Restored the fixture the sibling suite carries: the canary is now the middle line of a three-line fake_key, so grep -F "$canary" searches for part of the key again. Four comment lines say why the key looks like that. scripts/tests/service-key.test.sh:54-59
ADVISORY — citation to an AGENTS.md this repository does not have Parenthetical dropped; the sentence stands on the Makefile itself. scripts/semaphore-deploy.sh:127
ADVISORY — make deploy-workflow-test is No rule to make target Names make deploy-test, the Target that runs this suite. scripts/tests/deploy-workflow.sh:29
ADVISORY (nit) — CA added 100755 100644. Blob unchanged (ee39478), so it is still byte-identical to infra-cockpit's copy, now with its mode too. scripts/semaphore-ca.crt
ADVISORY — the slskd runbook says the play gates the mounts Cites slskd/service/verify.yml, and the other two sites now say the service play seeds and converges and the deploy stops at verify. grep -rn findmnt slskd/ → one line, verify.yml:68. docs/runbook-slskd.md:25-26, :32-36, :69-70
ADVISORY — "the one Guest that mounts the NAS inside itself" Now: 110 mounts the whole /volume1/ws inside itself; 147 mounts one subtree of it, nzbget's downloads. docs/runbook-qbittorrent.md:16-17

Proving the blocker's fix can fail

Restoring the fixture is only half the clearing change — three assertions that could not fail are not fixed by making them pass. Each was driven red against the real Makefile and the mutation reverted:

Mutant of Makefile What the suite printed
printf '%s\n' "$$key" | ssh-add -q - -K "$$key" — the key on a recorded argument FAIL the key text appears in a recorded command line
echo "debug: $$key" >&2 — the key in the recipe's own output FAIL the key text reached the recipe's output
verify's curl given -H "X-Key: $$leak", leak read as the key's middle line from .env FAIL curl calls: curl auth=/… — and only that assertion

Tree back to service-key tests: 33 assertions, 0 FAILED. after each revert.

Verification

Run in a worktree on 04baa36, after the commit:

$ mise exec -- make check
env-check: the vendored copy against its pin, and the map against .env.example.
env-check: the pin and the map agree.
semaphore-deploy tests: 94 assertions, 0 FAILED.
deploy-workflow tests: 53 assertions, 0 FAILED.
service-key tests: 33 assertions, 0 FAILED.
rc=0        # fmt-check silent

$ mise exec -- make validate
validate: 12 Stack(s) valid.
rc=0

Review of my own change

code-review over 0c01d03..04baa36, both axes, no new findings. One sentence was corrected before the commit: the slskd page had said the role "asserts only the credentials" when its first assert is also the host — it now says "the host and the five credentials — no mount".

Left alone, and why

  • No finding was disputed, and nothing in this round needs a product decision.
  • The review's own "could not verify" list stands unchanged, and nothing here moves it: this repository's Actions Variables still answer [] (nothing to start a task against), there is no access to the installed Semaphore's version, and the store-side measurements in docs/deploy.md remain the author's, dated 2026-12-02. The twelve-Guest walk itself is still unrun — it needs the Operator's prerequisites, as the merge-danger section says.

State label moved to review/needs-review.

**Fix round 0/5 — `04baa36` on `paperclip/THE-122-media-deploy`** All six findings are cleared in `04baa36` (one commit on top of `0c01d03`). Nothing left open, nothing disputed. | Finding | Change | Where | | --- | --- | --- | | **BLOCKER** — the three key-leak assertions cannot fail | Restored the fixture the sibling suite carries: the canary is now the middle line of a three-line `fake_key`, so `grep -F "$canary"` searches for part of the key again. Four comment lines say why the key looks like that. | `scripts/tests/service-key.test.sh:54-59` | | ADVISORY — citation to an `AGENTS.md` this repository does not have | Parenthetical dropped; the sentence stands on the Makefile itself. | `scripts/semaphore-deploy.sh:127` | | ADVISORY — `make deploy-workflow-test` is `No rule to make target` | Names `make deploy-test`, the Target that runs this suite. | `scripts/tests/deploy-workflow.sh:29` | | ADVISORY (nit) — CA added `100755` | `100644`. Blob unchanged (`ee39478`), so it is still byte-identical to `infra-cockpit`'s copy, now with its mode too. | `scripts/semaphore-ca.crt` | | ADVISORY — the slskd runbook says the play gates the mounts | Cites `slskd/service/verify.yml`, and the other two sites now say the service play seeds and converges and the deploy stops at `verify`. `grep -rn findmnt slskd/` → one line, `verify.yml:68`. | `docs/runbook-slskd.md:25-26`, `:32-36`, `:69-70` | | ADVISORY — "the one Guest that mounts the NAS inside itself" | Now: 110 mounts the whole `/volume1/ws` inside itself; 147 mounts one subtree of it, `nzbget`'s downloads. | `docs/runbook-qbittorrent.md:16-17` | ## Proving the blocker's fix can fail Restoring the fixture is only half the clearing change — three assertions that could not fail are not fixed by making them pass. Each was driven red against the real `Makefile` and the mutation reverted: | Mutant of `Makefile` | What the suite printed | | --- | --- | | `printf '%s\n' "$$key" \| ssh-add -q - -K "$$key"` — the key on a recorded argument | `FAIL the key text appears in a recorded command line` | | `echo "debug: $$key" >&2` — the key in the recipe's own output | `FAIL the key text reached the recipe's output` | | `verify`'s `curl` given `-H "X-Key: $$leak"`, `leak` read as the key's middle line from `.env` | `FAIL curl calls: curl auth=/…` — and only that assertion | Tree back to `service-key tests: 33 assertions, 0 FAILED.` after each revert. ## Verification Run in a worktree on `04baa36`, after the commit: ``` $ mise exec -- make check env-check: the vendored copy against its pin, and the map against .env.example. env-check: the pin and the map agree. semaphore-deploy tests: 94 assertions, 0 FAILED. deploy-workflow tests: 53 assertions, 0 FAILED. service-key tests: 33 assertions, 0 FAILED. rc=0 # fmt-check silent $ mise exec -- make validate validate: 12 Stack(s) valid. rc=0 ``` ## Review of my own change `code-review` over `0c01d03..04baa36`, both axes, no new findings. One sentence was corrected before the commit: the slskd page had said the role "asserts only the credentials" when its first assert is also the host — it now says "the host and the five credentials — no mount". ## Left alone, and why - **No finding was disputed**, and nothing in this round needs a product decision. - The review's own **"could not verify"** list stands unchanged, and nothing here moves it: this repository's Actions Variables still answer `[]` (nothing to start a task against), there is no access to the installed Semaphore's version, and the store-side measurements in `docs/deploy.md` remain the author's, dated 2026-12-02. The twelve-Guest walk itself is still unrun — it needs the Operator's prerequisites, as the merge-danger section says. State label moved to `review/needs-review`.
Author
Owner

Waiting — queued behind olympus/infra-cockpit#41 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 22:32 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.

**Waiting** — queued behind olympus/infra-cockpit#41 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 22:32 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Member

CI on 04baa36: pr-checks / check (pull_request) — success, 41s (run 37). The floor the review ran by hand is green on the pushed commit.

CI on `04baa36`: `pr-checks / check (pull_request)` — **success**, 41s (run 37). The floor the review ran by hand is green on the pushed commit.
Member

Review started (round 0/5) on 04baa3693a — reading the diff now.

**Review started** (round 0/5) on 04baa3693ab49d35405fef04713ccaa5f5c79375 — reading the diff now.
bot-minos approved these changes 2026-12-02 22:13:20 +00:00
bot-minos left a comment

olympus/infra-media#10 · head 04baa36 · round 2/5 · verdict: merge

Recommendation: merge

Round. The step-0 line carried the dispatch's round 0/5 because it was dictated; the thread has one review already (0c01d03, REQUEST_CHANGES), so this is round 2. The fixed point is that review's head, and the delta is git diff 0c01d03 04baa36: one commit, six files, +18/−12. Every prior finding was re-driven at the head rather than restated, and the round adds none.

Spec source. paperclip:THE-122 (read live this round, http=200, status blocked), whose "Done when" names the merge-driven deploy and the two documentation carry-overs. The delta touches only the carry-over pages and the citations.

Standards source. standards: no repo conventions found — infra-media carries no AGENTS.md, CONTRIBUTING.md or coding-standards file at this head (git ls-files). The org records in olympus/workshop docs/adr/ bind and were read at origin/main (fetched this round, 15 records + index): 0009 (the merge is the deploy), 0011 (a deploy never destroys or replaces) and 0012 (the deploy key reads the record and cannot delete it) are the ones this change meets. Baseline smells: none in the delta.

Standards — 0 findings

Prior finding State at 04baa36 Evidence
BLOCKER · scripts/tests/service-key.test.sh:54-55 — three key-leak assertions could not fail cleared :58-59: the canary is now the middle line of a three-line fake_key, so the three grep -F sites (:149, :151, :228) search for part of the key again. Red/green pair below.
ADVISORY · scripts/semaphore-deploy.sh:127 cites an AGENTS.md this repo lacks cleared :126-127 reads without the parenthetical; grep -rn 'AGENTS\.md' over the head tree → 0 hits.
ADVISORY · scripts/tests/deploy-workflow.sh:29 names make deploy-workflow-test cleared :29 says make deploy-test; Makefile:281 is that Target, and it runs this suite (:283).
ADVISORY (nit) · scripts/semaphore-ca.crt added 100755 cleared git ls-tree HEAD scripts/ → 100644 blob ee39478…; infra-cockpit origin/main:semaphore/service/files/ca.crt is the same blob ee39478.
ADVISORY · docs/runbook-slskd.md:25-26, :33, :67 claimed the play gates the mounts cleared The page now cites slskd/service/verify.yml (findmnt at :68, both trees asserted at :85-93), and states that the role's asserts are the host (roles/slskd/tasks/main.yml:7) and the five credentials (:18), no mount, so the deploy stops at verify.
ADVISORY · docs/runbook-qbittorrent.md:16 — "the one Guest that mounts the NAS inside itself" cleared :16-17 now says 110 mounts the whole /volume1/ws, 147 one subtree. Confirmed: docs/runbook-nzbget.md:8-12 gives 147's own fstab entry for 10.12.0.6:/volume1/ws/nzbget/downloads, and nzbget/guest/variables.tf:64-67 records mount_points = [].

The blocker was not cleared by making the assertions pass. Three mutants of the real Makefile, each run against the prior head and this one, same suite:

Mutant 0c01d03 (prior) 04baa36 (head)
ssh-add -q - "$$key" — key on a recorded argument 33 assertions, 0 FAILED; the key-leak assertion stayed green FAIL the key text appears in a recorded command line
echo "debug: $$key" >&2 — key in the recipe's output 33 assertions, 0 FAILED FAIL the key text reached the recipe's output, and only that one
verify's curl given -H "X-Key: <middle line>" 33 assertions, 0 FAILED FAIL curl calls: …, and only that one

Each mutant was reverted by copy and the tree re-hashed to 82223560… (the head blob) before the next. The three assertions were vacuous at the prior head and are live at this one.

Spec — 0 findings

The delta carries no requirement change: it corrects the two runbook pages the ticket's carry-over names (docs/runbook-slskd.md, docs/runbook-qbittorrent.md) and four citations. Both reworded claims were re-read against the artefacts they describe — the slskd role's own asserts, verify.yml's two findmnt calls and its assert, make prod's order (Makefile:355-362), and 147's fstab entry plus its Stack's empty mount_points. No scope creep, nothing missing.

Verified (my own runs, in a worktree at 04baa36)

What Result
mise exec -- make check rc 0 — env-check (pin + map agree), 94 + 53 + 33 assertions, fmt-check silent
scripts/tests/deploy-workflow.sh ×6 53 assertions, 0 FAILED, every run
Mutation wave (3 mutants × 2 revisions) as the table above; red at head, green at prior
git ls-tree HEAD scripts/ CA 100644; blob ee39478 = infra-cockpit origin/main's
Commit statuses at 04baa36 newest per context pr-checks / check (pull_request) → success (runs/37)
Working tree after every mutant git status --porcelain empty; Makefile sha 82223560…
Head at post time refs/pull/10/head = 04baa369…

Could not verify

  • The twelve-Guest walk itself: it needs the Operator's prerequisites, as the PR's Merge Danger says. Unchanged from round 1.
  • This repository's Actions Variables, the installed Semaphore version, and the store-side measurements in docs/deploy.md. None is in this delta, so this round did not re-read them and asserts nothing new about them.

Named, not charged

  • Round 1's single unexplained red in deploy-workflow.sh (one assertion, once, unnamed): six consecutive green runs at this head. A symptom with no nameable defect stays uncharged, as it was.

Named, not charged — the board

The charter's escalation for this change already exists and this round opened no second card: THE-123, status=todo, assigneeAgentId=null, GET /api/issues/<id>/comments → http=200, 0 entries, reviewAttention.state=none. It is this PR's card and it is open and unanswered. Per the dispatch, the review state is the findings' and the change's class is the board's gate, not this state's: merging remains the board's decision, and THE-123 is where it is taken.

Summary

  • Standards: 0 findings. Worst: none — the one blocker is cleared and proved by a red/green pair.
  • Spec: 0 findings. Worst: none.
  • No new blocker and no new advisory: the delta introduces no correctness or security defect, and its own new lines are covered by the mutation pair above.
  • The recommendation is merge; the advisory count is zero.
<!-- minos review-loop: repo=olympus/infra-media pr=10 head=04baa3693ab49d35405fef04713ccaa5f5c79375 round=2/5 verdict=merge axes=standards,spec --> **olympus/infra-media#10** · head `04baa36` · round 2/5 · verdict: **merge** Recommendation: merge **Round.** The step-0 line carried the dispatch's `round 0/5` because it was dictated; the thread has one review already (`0c01d03`, REQUEST_CHANGES), so this is round 2. The fixed point is that review's head, and the delta is `git diff 0c01d03 04baa36`: one commit, six files, +18/−12. Every prior finding was re-driven at the head rather than restated, and the round adds none. **Spec source.** `paperclip:THE-122` (read live this round, `http=200`, status `blocked`), whose "Done when" names the merge-driven deploy and the two documentation carry-overs. The delta touches only the carry-over pages and the citations. **Standards source.** `standards: no repo conventions found` — `infra-media` carries no `AGENTS.md`, `CONTRIBUTING.md` or coding-standards file at this head (`git ls-files`). The org records in `olympus/workshop` `docs/adr/` bind and were read at `origin/main` (fetched this round, 15 records + index): 0009 (the merge is the deploy), 0011 (a deploy never destroys or replaces) and 0012 (the deploy key reads the record and cannot delete it) are the ones this change meets. Baseline smells: none in the delta. ## Standards — 0 findings | Prior finding | State at `04baa36` | Evidence | | --- | --- | --- | | BLOCKER · `scripts/tests/service-key.test.sh:54-55` — three key-leak assertions could not fail | **cleared** | `:58-59`: the canary is now the middle line of a three-line `fake_key`, so the three `grep -F` sites (`:149`, `:151`, `:228`) search for part of the key again. Red/green pair below. | | ADVISORY · `scripts/semaphore-deploy.sh:127` cites an `AGENTS.md` this repo lacks | **cleared** | `:126-127` reads without the parenthetical; `grep -rn 'AGENTS\.md'` over the head tree → 0 hits. | | ADVISORY · `scripts/tests/deploy-workflow.sh:29` names `make deploy-workflow-test` | **cleared** | `:29` says `make deploy-test`; `Makefile:281` is that Target, and it runs this suite (`:283`). | | ADVISORY (nit) · `scripts/semaphore-ca.crt` added `100755` | **cleared** | `git ls-tree HEAD scripts/` → `100644 blob ee39478…`; `infra-cockpit` `origin/main:semaphore/service/files/ca.crt` is the same blob `ee39478`. | | ADVISORY · `docs/runbook-slskd.md:25-26`, `:33`, `:67` claimed the play gates the mounts | **cleared** | The page now cites `slskd/service/verify.yml` (`findmnt` at `:68`, both trees asserted at `:85-93`), and states that the role's asserts are the host (`roles/slskd/tasks/main.yml:7`) and the five credentials (`:18`), no mount, so the deploy stops at `verify`. | | ADVISORY · `docs/runbook-qbittorrent.md:16` — "the one Guest that mounts the NAS inside itself" | **cleared** | `:16-17` now says 110 mounts the whole `/volume1/ws`, 147 one subtree. Confirmed: `docs/runbook-nzbget.md:8-12` gives 147's own fstab entry for `10.12.0.6:/volume1/ws/nzbget/downloads`, and `nzbget/guest/variables.tf:64-67` records `mount_points = []`. | The blocker was not cleared by making the assertions pass. Three mutants of the real `Makefile`, each run against the prior head and this one, same suite: | Mutant | `0c01d03` (prior) | `04baa36` (head) | | --- | --- | --- | | `ssh-add -q - "$$key"` — key on a recorded argument | 33 assertions, **0 FAILED**; the key-leak assertion stayed green | `FAIL the key text appears in a recorded command line` | | `echo "debug: $$key" >&2` — key in the recipe's output | 33 assertions, **0 FAILED** | `FAIL the key text reached the recipe's output`, and only that one | | `verify`'s `curl` given `-H "X-Key: <middle line>"` | 33 assertions, **0 FAILED** | `FAIL curl calls: …`, and only that one | Each mutant was reverted by copy and the tree re-hashed to `82223560…` (the head blob) before the next. The three assertions were vacuous at the prior head and are live at this one. ## Spec — 0 findings The delta carries no requirement change: it corrects the two runbook pages the ticket's carry-over names (`docs/runbook-slskd.md`, `docs/runbook-qbittorrent.md`) and four citations. Both reworded claims were re-read against the artefacts they describe — the slskd role's own asserts, `verify.yml`'s two `findmnt` calls and its assert, `make prod`'s order (`Makefile:355-362`), and 147's fstab entry plus its Stack's empty `mount_points`. No scope creep, nothing missing. ## Verified (my own runs, in a worktree at `04baa36`) | What | Result | | --- | --- | | `mise exec -- make check` | **rc 0** — `env-check` (pin + map agree), 94 + 53 + 33 assertions, `fmt-check` silent | | `scripts/tests/deploy-workflow.sh` ×6 | 53 assertions, 0 FAILED, every run | | Mutation wave (3 mutants × 2 revisions) | as the table above; red at head, green at prior | | `git ls-tree HEAD scripts/` | CA `100644`; blob `ee39478` = `infra-cockpit` `origin/main`'s | | Commit statuses at `04baa36` | newest per context `pr-checks / check (pull_request)` → `success` (`runs/37`) | | Working tree after every mutant | `git status --porcelain` empty; Makefile sha `82223560…` | | Head at post time | `refs/pull/10/head` = `04baa369…` | ## Could not verify - The twelve-Guest walk itself: it needs the Operator's prerequisites, as the PR's Merge Danger says. Unchanged from round 1. - This repository's Actions Variables, the installed Semaphore version, and the store-side measurements in `docs/deploy.md`. None is in this delta, so this round did not re-read them and asserts nothing new about them. ## Named, not charged - Round 1's single unexplained red in `deploy-workflow.sh` (one assertion, once, unnamed): six consecutive green runs at this head. A symptom with no nameable defect stays uncharged, as it was. ## Named, not charged — the board The charter's escalation for this change already exists and this round opened no second card: **THE-123**, `status=todo`, `assigneeAgentId=null`, `GET /api/issues/<id>/comments` → `http=200`, **0 entries**, `reviewAttention.state=none`. It is this PR's card and it is open and unanswered. Per the dispatch, the review state is the findings' and the change's class is the board's gate, not this state's: merging remains the board's decision, and THE-123 is where it is taken. ## Summary - **Standards:** 0 findings. Worst: none — the one blocker is cleared and proved by a red/green pair. - **Spec:** 0 findings. Worst: none. - No new blocker and no new advisory: the delta introduces no correctness or security defect, and its own new lines are covered by the mutation pair above. - The recommendation is **merge**; the advisory count is zero.
pit merged commit 35ab317a39 into main 2026-12-03 06:34:20 +00:00
pit deleted branch paperclip/THE-122-media-deploy 2026-12-03 06:34:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
olympus/infra-media!10
No description provided.