Run Semaphore's tasks on the runner Guest (CP-42) #21

Merged
pit merged 5 commits from hermes/cp42-runner-role into main 2026-11-06 18:09:28 +00:00
Owner

CP-42's second half. The first (!20) gave 145 a Guest; this gives it a job and takes that job away from the server.

This merge deploys, and what it deploys changes 143. The deploy reconfigures the server (use_remote_runner: true plus the registration token) and installs and registers the runner on 145, in one play run.

Summary

+semaphore/service/roles/semaphore_runner/     # the runner: pinned binary by digest, the semaphore account,
+                                              # config, /etc/semaphore-runner/{registration-token,token} at 0600,
+                                              # semaphore-runner.service
+semaphore/service/site.yml                    # three plays: server → runner → server marks it default
+semaphore/service/roles/semaphore/tasks/runner-default.yml   # logs in, asserts exactly one row, PUTs active+is_default
+semaphore/service/roles/semaphore/tasks/secrets.yml          # refuses an empty token while the switch is on
+semaphore/service/roles/semaphore/defaults/main.yml          # use_remote_runner: true
+semaphore/service/inventories/prod/hosts                     # [runner] semaphore-runner 10.12.0.145
+semaphore/service/group_vars/all/vars.yml                    # semaphore_runner_name, semaphore_web_root
+env.map / .env.example / docs                               # SEMAPHORE_RUNNER_REGISTRATION_TOKEN

Why the order is the change. A config that hands tasks to a runner nothing has registered errors every task the moment it is written. So the server is configured first, the runner registers second, and the gap between them is the only time the pair is out of step. The third play is what makes is_default true — registration creates the row with active (the CLI's --enabled defaults true) and leaves is_default false.

Why registration is guarded by a file. The shared token creates a new runner row every time it is presented, so the role registers only when /etc/semaphore-runner/token is absent. A second deploy adds nothing. A rebuilt server database needs that file removed on 145 before it can re-register; the role's failure message and docs/deploy.md both say so. And if a stale row is left behind, the third play refuses two rows with the runner's name rather than marking the wrong one default.

Why the pin is repeated. Ansible cannot read one role's defaults from another without templating them, so semaphore_runner states the version and the digest again. scripts/tests/run.sh holds the two files to each other — case_runner_role_pins_the_same_release — so a bump that moves one and not the other fails make check. The server's address is not repeated: both machines read semaphore_web_root from group_vars/all, and the same case fails if the runner role grows a copy back.

Evidence

  • mise exec -- make check at aa49c09, on an export of the pushed tree (git archive HEAD | tar -x), with PROXMOX_VE_API_TOKEN, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY unset: exit 0, 154 ok lines, env tests: every case passed., plan tests: every case passed., tofu fmt -recursive -check with nothing to report. No case skipped: this machine carries dpkg, so the install fixture ran rather than reporting the skip an Arch host gives.
  • New cases: role refuses a missing runner token (refused when the switch is on, accepted when off), runner role pins the same release (version and digest; the address has one home), the third play runs the runner default file (--list-tasks over site.yml, so the tasks_from: that ran the whole server role instead is red), the runner token is mode 0600 (the role's own task file driven against a scratch token, then read back with stat), the runner play runs the token mode file (--list-tasks over play #2: the file's two tasks, in their place between the registration and the unit, so a role that stops importing it is red rather than green) and the runner config dials the deploy's address (the rendered config against group_vars/all's own values).
  • The rehearsal recap this section used to carry is withdrawn, and re-running it is the Operator's. mise exec -- make service-check needs the environment make env fetches — refused for an agent — and reaches the live 143 and 145, so it is not run here. The two lines it carried (ok=62 changed=4 skipped=22 on 143, ok=20 changed=11 skipped=13 on 145) were measured on a playbook whose third play re-ran the whole server role, which this PR's own fix removed: --list-tasks at this head lists 42 tasks for play #1, 33 for play #2 and 9 for play #3, against a 143 recap that counted 84 across the two plays it ran. Run mise exec -- make service-check at this head and put its two recap lines in this slot.
  • Check-mode fixes the rehearsal found, both in the change: systemd cannot start a unit whose file --check only diffed (task and handler now when: not ansible_check_mode), and uri has no check mode, so runner-default.yml is one skipped block.
  • Not yet run: the deploy itself. It is the merge's, and the runner's first registration happens there.

Merge Danger

Door: one-way in the window, two-way after it.

Merging starts the existing deploy. Between the server's restart (running tasks nowhere, since no runner is registered yet) and the runner's registration, any task dispatched errors. The window is one play wide — seconds — and nothing else can shorten it. If the runner fails to register, 143 keeps use_remote_runner: true with no runner, and every task errors until the runner is fixed. The recovery is make service again after the runner's problem is cleared, or a one-line revert of the switch.

Blast Radius: 143's config, and one new systemd unit on 145.

The deploy rewrites /opt/semaphore/config.json on the server and restarts it — cookies, the database and its encryption keys are untouched, so signed-in sessions and stored access keys survive. On 145 it installs the pinned package, creates the semaphore account and writes four files; nothing on 145 exists yet except the bare Guest.

Not covered by this PR's plan check: semaphore/guest is what CI plans. runner/guest has no plan job yet, so this change is verified by the rehearsal above and by the deploy, not by the workflow.

CP-42 stays open. Its fourth criterion — make prod gains the runner's Guest and service steps, and the snapshot covers 145 — is not in this pull request: PROD_STEPS is still snapshot guest service verify, and snapshot reads only the server Stack's vmid. Widening what a merge runs is the Operator's decision, so it is named here rather than folded into this round.

CP-42's second half. The first (!20) gave 145 a Guest; this gives it a job and takes that job away from the server. **This merge deploys, and what it deploys changes 143.** The deploy reconfigures the server (`use_remote_runner: true` plus the registration token) and installs and registers the runner on 145, in one play run. ## Summary ```diff +semaphore/service/roles/semaphore_runner/ # the runner: pinned binary by digest, the semaphore account, + # config, /etc/semaphore-runner/{registration-token,token} at 0600, + # semaphore-runner.service +semaphore/service/site.yml # three plays: server → runner → server marks it default +semaphore/service/roles/semaphore/tasks/runner-default.yml # logs in, asserts exactly one row, PUTs active+is_default +semaphore/service/roles/semaphore/tasks/secrets.yml # refuses an empty token while the switch is on +semaphore/service/roles/semaphore/defaults/main.yml # use_remote_runner: true +semaphore/service/inventories/prod/hosts # [runner] semaphore-runner 10.12.0.145 +semaphore/service/group_vars/all/vars.yml # semaphore_runner_name, semaphore_web_root +env.map / .env.example / docs # SEMAPHORE_RUNNER_REGISTRATION_TOKEN ``` **Why the order is the change.** A config that hands tasks to a runner nothing has registered errors every task the moment it is written. So the server is configured first, the runner registers second, and the gap between them is the only time the pair is out of step. The third play is what makes `is_default` true — registration creates the row with `active` (the CLI's `--enabled` defaults true) and leaves `is_default` false. **Why registration is guarded by a file.** The shared token creates a *new* runner row every time it is presented, so the role registers only when `/etc/semaphore-runner/token` is absent. A second deploy adds nothing. A rebuilt server database needs that file removed on 145 before it can re-register; the role's failure message and `docs/deploy.md` both say so. And if a stale row is left behind, the third play refuses *two* rows with the runner's name rather than marking the wrong one default. **Why the pin is repeated.** Ansible cannot read one role's defaults from another without templating them, so `semaphore_runner` states the version and the digest again. `scripts/tests/run.sh` holds the two files to each other — `case_runner_role_pins_the_same_release` — so a bump that moves one and not the other fails `make check`. The server's address is not repeated: both machines read `semaphore_web_root` from `group_vars/all`, and the same case fails if the runner role grows a copy back. ## Evidence - `mise exec -- make check` at `aa49c09`, on an export of the pushed tree (`git archive HEAD | tar -x`), with `PROXMOX_VE_API_TOKEN`, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` unset: exit 0, 154 `ok` lines, `env tests: every case passed.`, `plan tests: every case passed.`, `tofu fmt -recursive -check` with nothing to report. No case skipped: this machine carries `dpkg`, so the install fixture ran rather than reporting the skip an Arch host gives. - New cases: `role refuses a missing runner token` (refused when the switch is on, accepted when off), `runner role pins the same release` (version and digest; the address has one home), `the third play runs the runner default file` (`--list-tasks` over `site.yml`, so the `tasks_from:` that ran the whole server role instead is red), `the runner token is mode 0600` (the role's own task file driven against a scratch token, then read back with `stat`), `the runner play runs the token mode file` (`--list-tasks` over play #2: the file's two tasks, in their place between the registration and the unit, so a role that stops importing it is red rather than green) and `the runner config dials the deploy's address` (the rendered config against `group_vars/all`'s own values). - **The rehearsal recap this section used to carry is withdrawn, and re-running it is the Operator's.** `mise exec -- make service-check` needs the environment `make env` fetches — refused for an agent — and reaches the live 143 and 145, so it is not run here. The two lines it carried (`ok=62 changed=4 skipped=22` on 143, `ok=20 changed=11 skipped=13` on 145) were measured on a playbook whose third play re-ran the whole server role, which this PR's own fix removed: `--list-tasks` at this head lists 42 tasks for play #1, 33 for play #2 and 9 for play #3, against a 143 recap that counted 84 across the two plays it ran. Run `mise exec -- make service-check` at this head and put its two recap lines in this slot. - Check-mode fixes the rehearsal found, both in the change: `systemd` cannot start a unit whose file `--check` only diffed (task and handler now `when: not ansible_check_mode`), and `uri` has no check mode, so `runner-default.yml` is one skipped block. - **Not yet run:** the deploy itself. It is the merge's, and the runner's first registration happens there. ## Merge Danger **Door:** one-way in the window, two-way after it. Merging starts the existing deploy. Between the server's restart (running tasks nowhere, since no runner is registered yet) and the runner's registration, any task dispatched errors. The window is one play wide — seconds — and nothing else can shorten it. If the runner fails to register, 143 keeps `use_remote_runner: true` with no runner, and **every task errors until the runner is fixed**. The recovery is `make service` again after the runner's problem is cleared, or a one-line revert of the switch. **Blast Radius:** 143's config, and one new systemd unit on 145. The deploy rewrites `/opt/semaphore/config.json` on the server and restarts it — cookies, the database and its encryption keys are untouched, so signed-in sessions and stored access keys survive. On 145 it installs the pinned package, creates the `semaphore` account and writes four files; nothing on 145 exists yet except the bare Guest. **Not covered by this PR's plan check:** `semaphore/guest` is what CI plans. `runner/guest` has no plan job yet, so this change is verified by the rehearsal above and by the deploy, not by the workflow. **CP-42 stays open.** Its fourth criterion — `make prod` gains the runner's Guest and service steps, and the snapshot covers 145 — is not in this pull request: `PROD_STEPS` is still `snapshot guest service verify`, and `snapshot` reads only the server Stack's vmid. Widening what a merge runs is the Operator's decision, so it is named here rather than folded into this round.
Run Semaphore's tasks on the runner Guest (CP-42)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 16s
pr-checks / check (pull_request) Successful in 32s
a9b4f25b0c
The server stops running tasks in its own process. site.yml does the
three steps in the order they depend on each other: the server is
configured with use_remote_runner and the registration token, the runner
Guest installs the same pinned release in runner mode and registers with
that token, and the server marks that runner active and default.

roles/semaphore_runner is new: the binary by digest, the semaphore
account, the config it dials with, the registration token at 0600 in the
account's own directory, and semaphore-runner.service. Registration runs
only when /etc/semaphore-runner/token is absent, because the shared token
creates a new row every time it is presented.

The token reaches both machines from secret/services/semaphore/
runner-registration through env.map; group_vars/all carries the runner's
name and the server's address, the two values both roles read.
Member

Review started (round 1/5) on a9b4f25b0c — reading the diff now.

**Review started** (round 1/5) on a9b4f25b0c504d599a5bea6717372c7f9abf7ffb — reading the diff now.
bot-minos requested changes 2026-11-06 17:16:52 +00:00
Dismissed
bot-minos left a comment

repo: olympus/infra-cockpit | PR: #21 | reviewed head: a9b4f25b0c | round: 1/5 | verdict: REQUEST_CHANGES (4 blockers)

Recommendation: fix

Round 1 of the thread (the review list was empty; the dispatch also said 1/5). Fixed point: main at 99c8ee8, one commit, whole head reviewed. The head I read is refs/pull/21/head, equal to the dispatch SHA.

Spec source: Vikunja CP-42 (project 11, index 42), its four acceptance criteria, plus the PR body ("CP-42's second half"). Standards source: AGENTS.md (§Secrets, §Toolchain, §Docs), docs/agents/*. The repo keeps no ADRs of its own; no ADR is contradicted that I found.

What blocks (four, all on the third play and the runner's token — the half of the change that was never run)

The body's evidence says it plainly: the deploy is "not yet run", and uri has no check mode, so runner-default.yml was one skipped block in the rehearsal. I ran it. I downloaded the pinned 2.19.16 community package (sha256 matches the pin, no RedisTaskStateStore), started a real server on the role's own rendered config, registered a runner with the PR's exact register argv, and drove the PR's runner-default.yml against it.

Spec

  1. BLOCKER — the third play never runs runner-default.yml. semaphore/service/site.yml:31-32 (- role: semaphore / tasks_from: runner-default.yml under roles:). In a roles: list tasks_from is not a task-file selector (it is only honoured by import_role/include_role). With the repo's pinned ansible-core 2.21.5, ansible-playbook -i inventories/prod/hosts site.yml --list-tasks lists play #3 as 40 tasks of the whole server role (the three config values are set, refresh the apt cache, …) and 0 of runner-default.yml's five. Control, same pin: import_role: {name: semaphore, tasks_from: runner-default.yml} under tasks: lists exactly the five. Consequence: nothing ever sets is_default, so CP-42 AC1 ("runner list shows 145 active and default") is unmet, and the body's claim "The third play is what makes is_default true" is false at this head. Clears: run the file through import_role/include_role tasks_from in tasks:.
  2. BLOCKER — the login task fails on every run. semaphore/service/roles/semaphore/tasks/runner-default.yml:23 (status_code: 200). Semaphore 2.19.16 answers POST /api/auth/login with 204; the play dies on its first task: Status code was 204 and not [200] (curl on the same server: login http=204). Hidden behind finding 1 today, it becomes the red deploy the moment finding 1 is fixed. Clears: accept 204.
  3. BLOCKER — the PUT is unauthenticated. runner-default.yml:59-71: the read task carries headers: Cookie: (line 31-32), the PUT /api/runners/<id> task does not. With finding 1 and finding 2 patched in a scratch copy, the PUT returns 401 Unauthorized and the play fails. Clears: the same Cookie header on the PUT.
    Red/green for findings 1..3 together: with all three patched in a scratch copy of the role, run 1 ends rc=0 and the row reads active:true, is_default:true, name/max_parallel_tasks preserved (the echoed-row PUT body is sound); run 2 skips the PUT; a second registered row of the same name stops at the exactly one assertion with the PR's message. Those parts of the file are right once the three defects are out. On the author's side the order of operations matters: fixing only finding 1 turns a silent no-op into a red deploy after play 1 has already flipped use_remote_runner: true on 143.
  4. BLOCKER — the runner's token file is not 0600. CP-42 AC3 ("The runner's token file is 0600 and owned by the runner account"); docs/deploy.md:141 ("/etc/semaphore-runner/token (0600, the semaphore account's)"); the body's summary line (/etc/semaphore-runner/{registration-token,token} at 0600). roles/semaphore_runner/tasks/main.yml:216-231 runs register, which writes token; no task sets its mode (the only 0600 in the file is the registration-token copy, line 202). Real register run: stat -c %a …/token → 644, under a shell umask of 0002, so the binary sets 0644 itself and no umask makes it 0600. The 0700 directory (main.yml:163, "the directory both tokens live in") limits who can reach it, but the stated property, and the acceptance criterion, is the file's mode. Clears: a task after the registration that sets mode: "0600" and the account as owner on semaphore_runner_token_file (guarded for check mode, where the file does not exist yet), and a probe or case that reads the mode back.
  5. ADVISORY — ticket criteria no half of the work carries. CP-42 AC4 ("The next merge deploys both Guests and leaves a predeploy-* snapshot on 143 and on 145") and the ticket's "make prod gains the runner's guest and service steps, and the snapshot covers 145". Makefile:56 is still PROD_STEPS := snapshot guest service verify, and snapshot reads only $(GUEST_DIR)'s vmid; the diff does not touch the Makefile. The body calls itself the second of two halves (!20 being the first), so neither half names these. Say in the body which ticket or PR carries them, or keep CP-42 open for them.

Standards

No finding against AGENTS.md §Secrets: no plaintext in the diff, env.map and .env.example agree (make env-check: env.map: 15 names, all declared), the registration token is read from the environment and written 0600 in the registration-token copy with no_log. §Docs: the pages the change touches are the ones AGENTS.md names. Where the repo has no written rule below, I judged by general practice.

  1. ADVISORY — the server's address now has three copies, and the comment says one. semaphore/service/group_vars/all/vars.yml:6-9 ("a change to the address is a change to one line here"), roles/semaphore_runner/defaults/main.yml:45-48 (semaphore_runner_web_root, which templates/config.json.j2:2 reads, not the group var), roles/semaphore/defaults/main.yml:52 (semaphore_web_root). The new case case_runner_role_pins_the_same_release holds only the two role defaults together. Mutation, run in copies of the head tree: runner version bumped alone → suite FAIL (want [2.19.16], got [2.19.17]); runner web_root changed alone → FAIL; group_vars/all web_root changed alone → suite rc=0, the server would be moving to a new address while the runner dials the old one. Either have the runner role read semaphore_web_root from group_vars/all (the file already exists for exactly this), or put it in the pin case and fix the comment.
  2. ADVISORY — no_log: true hides the reason on the one play that has to explain itself. runner-default.yml:25,35,71. A wrong admin password, a refused connection and a 401 all print {"censored": "the output has been hidden …"} (driven: wrong password → exactly that line). The operator of a red deploy at the last play, with the server already switched, gets no status code. Hide the body (no_log only on the task that carries the password, or failed_when with a fixed message naming the status), not the failure.
  3. ADVISORY — two claims about the remedy point at things that are not there. roles/semaphore_runner/tasks/main.yml:210 ("the role names that in its README"; the role has no README) and docs/deploy.md:152 ("The role's final assertion says so when the unit will not stay up"; the assertion's fail_msg, main.yml:272-284, says the token file was written by an older server database but never says to delete /etc/semaphore-runner/token). The body repeats it ("the role's failure message and docs/deploy.md both say so"). The remedy is only in the docs page; put it in the fail_msg or drop the claim.
  4. ADVISORY — nothing in the suite drives the new plays. The two new cases pin a token guard and three default values. Nothing asserts what site.yml runs, nor runner-default.yml, nor the token's mode, and all four blockers sit there. tests/ha/bootstrap.sh:22 already PUTs /runners/1 against a real server; a --list-tasks assertion on play #3 would have caught finding 1 without a server.

Verified, and how

Claim How Result
mise exec -- make check green ran it at head rc=0: env.map: 15 names, env tests: every case passed, plan tests: every case passed, fmt clean
Pinned package is the community asset downloaded v2.19.16, sha256, grep for the Pro marker digest = pin, marker count 0
register argv is valid ran it against a real server row created, active:true, is_default:false, token file written (mode 644, finding 4)
Registration is not idempotent registered twice two rows of the same name: the PR's premise is right, and the exactly one assertion fires with its message
Third play runs runner-default.yml --list-tasks at the pin, with a control 0 of 5 (finding 1)
runner-default.yml works driven verbatim, then with findings 1..3 patched in a scratch copy fails at login (finding 2), then at PUT (finding 3); green when patched
Check mode ran the file under --check all five skipping, rc=0
Pin case can fail mutated runner version / runner web_root / group_vars web_root fails, fails, does not fail (finding 6)
Worktree left clean git status --porcelain empty

Could not verify

  • The runner under systemd on 145 (ProtectSystem=strict, ReadWritePaths, a task cloning and running): no Guest here. I did not run a task end to end, so whether an active, non-default runner takes untagged tasks is untested; AC2 ("a scratch task runs on 145, and none on 143") is unverified.
  • That secret/services/semaphore/runner-registration exists in the store. The ticket's own comment at the state-key mint lists it as "not written", and the fetch is all-or-nothing, so merging before it is written turns the deploy red at make env (a safe failure, before anything changes). The body does not list it as a merge precondition; the ticket's other hand-offs (cockpit's SSH key on 145, ci-cockpit read on this path) are likewise not mentioned. Not charged: I cannot read the store.
  • make service-check against 143/145 and the author's recap (changed=4 / changed=11): needs the Operator's credentials.

Named, not charged

  • Server configured first with the switch on (site.yml play 1), so the failure of play 2 or 3 leaves 143 handing tasks to a runner that is not default: disclosed in the body's Merge Danger, with its recovery. A design alternative is to flip the switch in play 3, once the row exists; it is the author's call.
  • runner/guest has no plan job: disclosed.
  • The PUT task reports ok, not changed, on the run that changes the row: not counted.

Closing summary

Axis Findings Worst
Spec 5 (4 BLOCKER, 1 ADVISORY) finding 1: the third play runs the whole server role and not runner-default.yml, so no runner is ever made default
Standards 4 (0 BLOCKER, 4 ADVISORY) finding 6: three copies of the server address; a drifted group_vars/all passes the suite

The verdict turns on the four blockers. Separately, five advisories is three or more, which on its own would also have moved the recommendation to fix; it did not decide it, and each advisory keeps the weight its evidence earned.

<!-- minos review-loop: repo=olympus/infra-cockpit pr=21 head=a9b4f25b0c504d599a5bea6717372c7f9abf7ffb round=1/5 axes=standards,spec --> repo: olympus/infra-cockpit | PR: #21 | reviewed head: a9b4f25b0c504d599a5bea6717372c7f9abf7ffb | round: 1/5 | verdict: REQUEST_CHANGES (4 blockers) Recommendation: fix Round 1 of the thread (the review list was empty; the dispatch also said 1/5). Fixed point: `main` at 99c8ee8, one commit, whole head reviewed. The head I read is `refs/pull/21/head`, equal to the dispatch SHA. **Spec source:** Vikunja CP-42 (project 11, index 42), its four acceptance criteria, plus the PR body ("CP-42's second half"). **Standards source:** `AGENTS.md` (§Secrets, §Toolchain, §Docs), `docs/agents/*`. The repo keeps no ADRs of its own; no ADR is contradicted that I found. ## What blocks (four, all on the third play and the runner's token — the half of the change that was never run) The body's evidence says it plainly: the deploy is "not yet run", and `uri` has no check mode, so `runner-default.yml` was one skipped block in the rehearsal. I ran it. I downloaded the pinned 2.19.16 community package (sha256 matches the pin, no `RedisTaskStateStore`), started a real server on the role's own rendered config, registered a runner with the PR's exact `register` argv, and drove the PR's `runner-default.yml` against it. ## Spec 1. **BLOCKER — the third play never runs `runner-default.yml`.** `semaphore/service/site.yml:31-32` (`- role: semaphore` / `tasks_from: runner-default.yml` under `roles:`). In a `roles:` list `tasks_from` is not a task-file selector (it is only honoured by `import_role`/`include_role`). With the repo's pinned ansible-core 2.21.5, `ansible-playbook -i inventories/prod/hosts site.yml --list-tasks` lists play #3 as 40 tasks of the whole server role (`the three config values are set`, `refresh the apt cache`, …) and **0** of runner-default.yml's five. Control, same pin: `import_role: {name: semaphore, tasks_from: runner-default.yml}` under `tasks:` lists exactly the five. Consequence: nothing ever sets `is_default`, so CP-42 AC1 ("runner list shows 145 active and default") is unmet, and the body's claim "The third play is what makes `is_default` true" is false at this head. Clears: run the file through `import_role`/`include_role` `tasks_from` in `tasks:`. 2. **BLOCKER — the login task fails on every run.** `semaphore/service/roles/semaphore/tasks/runner-default.yml:23` (`status_code: 200`). Semaphore 2.19.16 answers `POST /api/auth/login` with **204**; the play dies on its first task: `Status code was 204 and not [200]` (curl on the same server: `login http=204`). Hidden behind finding 1 today, it becomes the red deploy the moment finding 1 is fixed. Clears: accept 204. 3. **BLOCKER — the PUT is unauthenticated.** `runner-default.yml:59-71`: the `read` task carries `headers: Cookie:` (line 31-32), the `PUT /api/runners/<id>` task does not. With finding 1 and finding 2 patched in a scratch copy, the PUT returns `401 Unauthorized` and the play fails. Clears: the same `Cookie` header on the PUT. *Red/green for findings 1..3 together:* with all three patched in a scratch copy of the role, run 1 ends rc=0 and the row reads `active:true, is_default:true`, name/`max_parallel_tasks` preserved (the echoed-row PUT body is sound); run 2 skips the PUT; a second registered row of the same name stops at the `exactly one` assertion with the PR's message. Those parts of the file are right once the three defects are out. On the author's side the order of operations matters: fixing only finding 1 turns a silent no-op into a red deploy after play 1 has already flipped `use_remote_runner: true` on 143. 4. **BLOCKER — the runner's token file is not 0600.** CP-42 AC3 ("The runner's token file is `0600` and owned by the runner account"); `docs/deploy.md:141` ("`/etc/semaphore-runner/token` (`0600`, the `semaphore` account's)"); the body's summary line (`/etc/semaphore-runner/{registration-token,token} at 0600`). `roles/semaphore_runner/tasks/main.yml:216-231` runs `register`, which writes `token`; no task sets its mode (the only `0600` in the file is the registration-token copy, line 202). Real `register` run: `stat -c %a …/token` → **644**, under a shell umask of `0002`, so the binary sets 0644 itself and no umask makes it 0600. The `0700` directory (main.yml:163, "the directory both tokens live in") limits who can reach it, but the stated property, and the acceptance criterion, is the file's mode. Clears: a task after the registration that sets `mode: "0600"` and the account as owner on `semaphore_runner_token_file` (guarded for check mode, where the file does not exist yet), and a probe or case that reads the mode back. 5. **ADVISORY — ticket criteria no half of the work carries.** CP-42 AC4 ("The next merge deploys both Guests and leaves a `predeploy-*` snapshot on 143 and on 145") and the ticket's "`make prod` gains the runner's guest and service steps, and the snapshot covers 145". `Makefile:56` is still `PROD_STEPS := snapshot guest service verify`, and `snapshot` reads only `$(GUEST_DIR)`'s vmid; the diff does not touch the Makefile. The body calls itself the second of two halves (!20 being the first), so neither half names these. Say in the body which ticket or PR carries them, or keep CP-42 open for them. ## Standards No finding against `AGENTS.md` §Secrets: no plaintext in the diff, `env.map` and `.env.example` agree (`make env-check`: `env.map: 15 names, all declared`), the registration token is read from the environment and written 0600 in the registration-token copy with `no_log`. §Docs: the pages the change touches are the ones AGENTS.md names. Where the repo has no written rule below, I judged by general practice. 6. **ADVISORY — the server's address now has three copies, and the comment says one.** `semaphore/service/group_vars/all/vars.yml:6-9` ("a change to the address is a change to one line here"), `roles/semaphore_runner/defaults/main.yml:45-48` (`semaphore_runner_web_root`, which `templates/config.json.j2:2` reads, not the group var), `roles/semaphore/defaults/main.yml:52` (`semaphore_web_root`). The new case `case_runner_role_pins_the_same_release` holds only the two role defaults together. Mutation, run in copies of the head tree: runner version bumped alone → suite FAIL (`want [2.19.16], got [2.19.17]`); runner web_root changed alone → FAIL; `group_vars/all` web_root changed alone → **suite rc=0**, the server would be moving to a new address while the runner dials the old one. Either have the runner role read `semaphore_web_root` from `group_vars/all` (the file already exists for exactly this), or put it in the pin case and fix the comment. 7. **ADVISORY — `no_log: true` hides the reason on the one play that has to explain itself.** `runner-default.yml:25,35,71`. A wrong admin password, a refused connection and a 401 all print `{"censored": "the output has been hidden …"}` (driven: wrong password → exactly that line). The operator of a red deploy at the last play, with the server already switched, gets no status code. Hide the body (`no_log` only on the task that carries the password, or `failed_when` with a fixed message naming the status), not the failure. 8. **ADVISORY — two claims about the remedy point at things that are not there.** `roles/semaphore_runner/tasks/main.yml:210` ("the role names that in its README"; the role has no README) and `docs/deploy.md:152` ("The role's final assertion says so when the unit will not stay up"; the assertion's `fail_msg`, main.yml:272-284, says the token file was written by an older server database but never says to delete `/etc/semaphore-runner/token`). The body repeats it ("the role's failure message and `docs/deploy.md` both say so"). The remedy is only in the docs page; put it in the `fail_msg` or drop the claim. 9. **ADVISORY — nothing in the suite drives the new plays.** The two new cases pin a token guard and three default values. Nothing asserts what `site.yml` runs, nor `runner-default.yml`, nor the token's mode, and all four blockers sit there. `tests/ha/bootstrap.sh:22` already `PUT`s `/runners/1` against a real server; a `--list-tasks` assertion on play #3 would have caught finding 1 without a server. ## Verified, and how | Claim | How | Result | | --- | --- | --- | | `mise exec -- make check` green | ran it at head | rc=0: `env.map: 15 names`, `env tests: every case passed`, `plan tests: every case passed`, fmt clean | | Pinned package is the community asset | downloaded v2.19.16, sha256, grep for the Pro marker | digest = pin, marker count 0 | | `register` argv is valid | ran it against a real server | row created, `active:true, is_default:false`, token file written (mode 644, finding 4) | | Registration is not idempotent | registered twice | two rows of the same name: the PR's premise is right, and the `exactly one` assertion fires with its message | | Third play runs runner-default.yml | `--list-tasks` at the pin, with a control | 0 of 5 (finding 1) | | runner-default.yml works | driven verbatim, then with findings 1..3 patched in a scratch copy | fails at login (finding 2), then at PUT (finding 3); green when patched | | Check mode | ran the file under `--check` | all five `skipping`, rc=0 | | Pin case can fail | mutated runner version / runner web_root / group_vars web_root | fails, fails, **does not fail** (finding 6) | | Worktree left clean | `git status --porcelain` | empty | ## Could not verify - The runner under systemd on 145 (`ProtectSystem=strict`, `ReadWritePaths`, a task cloning and running): no Guest here. I did not run a task end to end, so whether an active, non-default runner takes untagged tasks is untested; AC2 ("a scratch task runs on 145, and none on 143") is unverified. - That `secret/services/semaphore/runner-registration` exists in the store. The ticket's own comment at the state-key mint lists it as "not written", and the fetch is all-or-nothing, so merging before it is written turns the deploy red at `make env` (a safe failure, before anything changes). The body does not list it as a merge precondition; the ticket's other hand-offs (cockpit's SSH key on 145, `ci-cockpit` read on this path) are likewise not mentioned. Not charged: I cannot read the store. - `make service-check` against 143/145 and the author's recap (`changed=4` / `changed=11`): needs the Operator's credentials. ## Named, not charged - Server configured first with the switch on (`site.yml` play 1), so the failure of play 2 or 3 leaves 143 handing tasks to a runner that is not default: disclosed in the body's Merge Danger, with its recovery. A design alternative is to flip the switch in play 3, once the row exists; it is the author's call. - `runner/guest` has no plan job: disclosed. - The PUT task reports `ok`, not `changed`, on the run that changes the row: not counted. ## Closing summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 5 (4 BLOCKER, 1 ADVISORY) | finding 1: the third play runs the whole server role and not `runner-default.yml`, so no runner is ever made default | | Standards | 4 (0 BLOCKER, 4 ADVISORY) | finding 6: three copies of the server address; a drifted `group_vars/all` passes the suite | The verdict turns on the four blockers. Separately, five advisories is three or more, which on its own would also have moved the recommendation to `fix`; it did not decide it, and each advisory keeps the weight its evidence earned.
Member

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

**Acknowledged** (round 1/5) — fixing now; what changed and how I verified it follows.
fix: the third play runs its file, and the runner's token is 0600 (CP-42)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 18s
pr-checks / check (pull_request) Successful in 38s
5daf3fee69
The four blockers of review round 1, and the five advisories it raised.

Blockers:

- site.yml selected runner-default.yml through `tasks_from:` in a `roles:`
  entry, which is not a task-file selector — only `import_role`/`include_role`
  honour it. The play ran the whole server role a second time and none of the
  file, so nothing ever set `is_default`. It is `import_role` under `tasks:` now.
- the login asserted 200, which 2.19.16 does not answer: the session arrives
  with a 204. Both are accepted, and a 200-only server still works.
- the PUT carried no session while the read beside it did, so it answered 401.
  The session is resolved once into `semaphore_runner_session` and both calls
  carry it.
- `register` writes the runner's token 0644 under any umask, so the role now
  sets 0600 and the account's own right after the registration, in its own
  imported file (`tasks/token-mode.yml`) so a test can drive it alone.

Advisories:

- the server's address has one home outside the server role's own defaults
  again: the runner role reads `semaphore_web_root` from group_vars/all instead
  of carrying a third copy that a drift could leave behind.
- `no_log` hid the reason on the play that has to explain itself. Each call now
  records its answer and an assertion names the status it wanted, which is also
  why the calls carry no `status_code:` — that failure would be censored with
  the rest of the result.
- the two claims about the remedy now point at what exists: the role's final
  assertion names `rm /etc/semaphore-runner/token`, and the comment no longer
  promises a README the role never had.
- the suite drives the two places all four blockers sat: `--list-tasks` over
  site.yml for the third play, and the role's own token-mode file for the mode.

`make check` green at this tree: env tests and plan tests every case passed,
147 assertions, `tofu fmt -recursive -check` clean.
test: render the runner's config against the one address (CP-42)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 15s
pr-checks / check (pull_request) Successful in 38s
943f9b05e7
The address moved into group_vars/all in the commit before this, and nothing in
the floor rendered the runner's own template — so the case that says the role
reads that file was missing, and `semaphore_web_root` resolving at deploy time
was argued rather than shown.

`tests/runner-config.yml` renders the role's template the way the deploy does
(defaults plus group_vars/all), and the case takes its expected value out of
group_vars rather than restating it: a template dialling anything else renders a
different line and fails. Mutating the template's `web_host` to another variable
reds it — `missing ["web_host": "http://10.12.0.143:3000"]`.

`make check` green at this tree: every case passed, 150 assertions.
Member

Round 1 report — head 943f9b0, two new commits on hermes/cp42-runner-role. No force-push, no history rewritten, one branch.

# Finding Change Commit Evidence
1 BLOCKER — the third play never runs runner-default.yml site.yml's third play is tasks: + import_role: tasks_from:, which is the form Ansible honours; the roles: + tasks_from: shape is gone, with the comment saying why 5daf3fe --list-tasks at the head: play #3 is the file's eight tasks and none of the server role; reverted, the new case reds on three assertions
2 BLOCKER — the login fails on every run (status_code: 200 vs 204) the login accepts 200 and 204 and lets an assertion judge the status 5daf3fe stub answering 204: the reviewed file dies at login, this one passes
3 BLOCKER — the PUT is unauthenticated the session is resolved once into semaphore_runner_session; the read and the PUT both carry it 5daf3fe stub logs "cookie": "session=stub-session" on GET and PUT; drop the header and the play fails naming 401
4 BLOCKER — the token file is 0644, not 0600 tasks/token-mode.yml, imported after the registration: stat, then file at 0600, the account's own, skipped when the file is not there yet (check mode) 5daf3fe the case drives that file against a 0644 token and stat reads back 600; mutated to 0644 it reds
5 ADVISORY — CP-42 AC4 (make prod and the 145 snapshot) left alone, see below — —
6 ADVISORY — the server's address had three copies the runner role reads semaphore_web_root from group_vars/all; its own copy is deleted 5daf3fe the pin case fails if the copy comes back; 943f9b0 renders the runner's config and compares it to the value group_vars/all holds
7 ADVISORY — no_log hid the reason each call records its answer (failed_when: false, no status_code:) and the assertion after it reports the status and what it means; the calls stay no_log 5daf3fe the 401 run prints PUT /api/runners/7 answered 401. … where the reviewed head printed {"censored": "the output has been hidden …"}
8 ADVISORY — two claims pointed at things that are not there the comment no longer promises a role README; the role's final fail_msg now names rm /etc/semaphore-runner/token and one more make service, which is what docs/deploy.md already said it did 5daf3fe the doc sentence is now true; no doc edit was needed
9 ADVISORY — nothing in the suite drives the new plays three cases: --list-tasks over site.yml, the token-mode file driven against a scratch token, and the runner's config rendered 5daf3fe, 943f9b0 all three run in CI (log lines quoted below) and each was proven to red

Left alone

Finding 5 (CP-42 AC4). I took the second of the two clearing options the finding offers: the body now says CP-42 stays open, and names what is missing — PROD_STEPS is still snapshot guest service verify, and snapshot reads only the server Stack's vmid. Widening what a merge runs (a second Guest apply in a CI token that cannot create a Guest) is a deploy-shape decision, not a fix I should fold into a review round. Nothing else in the finding is disputed.

No finding was disagreed with. Findings 1–3 were reproduced here before they were fixed.

Commands, and what they printed

$ env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY \
    mise exec -- make check
env tests: every case passed.
plan tests: every case passed.
tofu fmt -recursive -check -diff
rc=0, 150 `ok` assertions (139 at the reviewed head)

Red proofs, each on a mutation of this head and reverted:

  • site.yml put back to roles: + tasks_from: →
    FAIL the third play reads the rows the server knows (missing […]),
    FAIL and marks that runner active and default (missing […]),
    FAIL and does not re-run the whole server role (found [semaphore : the three config values are set])
  • the token task put back to 0644 → FAIL the mode the role leaves on the token is 0600 (want [600], got [644])
  • the config template's web_host pointed at another variable →
    FAIL its web_host is the address group_vars/all holds (missing ["web_host": "http://10.12.0.143:3000"])

Findings 2 and 3, driven against a stand-in API that answers 204 to a login, 401 to a call without the cookie, and 204 to the PUT:

# the reviewed head's runner-default.yml
=== reviewed head a9b4f25 (green): rc=2
TASK [log in to the API as the admin account]
fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}

# this head
=== this branch (green): rc=0   — all eight tasks ok
{"method": "POST", "path": "/api/auth/login", "cookie": null, …}
{"method": "GET",  "path": "/api/runners",    "cookie": "session=stub-session", …}
{"method": "PUT",  "path": "/api/runners/7",  "cookie": "session=stub-session",
 "body": "{\"id\": 7, \"name\": \"semaphore-runner\", \"active\": true, \"is_default\": true, \"max_parallel_tasks\": 2, \"tag\": \"\"}"}

# the PUT's Cookie header removed
"msg": "PUT /api/runners/7 answered 401. A 401 means the session was not carried on this call; …"

CI on 943f9b0:

  • pr-checks / check (pull_request) — success, 38 s. The log carries the new cases: the third play runs the runner default file, the runner token is mode 0600, the runner config dials the deploy s address, then env tests: every case passed. / plan tests: every case passed.
  • plan / guest-plan-check (pull_request_target) — success, 15 s, No changes. Your infrastructure matches the configuration.

Body corrections

Two sentences in the PR body were falsified by this change and are corrected in place: the pin is version and digest only (the address has one home), and the new-cases line names all three cases. The CP-42 note above was added in the same write; the stored body was read back and compared byte for byte.

Not verified here

  • The deploy itself, and make service-check against 143 and 145 — no credential in this environment. Your rehearsal numbers still stand; I did not re-run them.
  • The runner under systemd on 145, and a task running end to end, so AC2 is as unverified as your review found it.
  • semaphore_web_root now resolves from group_vars/all in the deploy (playbook-level vars); the new render case proves it against the same file the deploy reads, but on localhost, not on 143.
**Round 1 report** — head `943f9b0`, two new commits on `hermes/cp42-runner-role`. No force-push, no history rewritten, one branch. | # | Finding | Change | Commit | Evidence | | --- | --- | --- | --- | --- | | 1 | BLOCKER — the third play never runs `runner-default.yml` | `site.yml`'s third play is `tasks:` + `import_role: tasks_from:`, which is the form Ansible honours; the `roles:` + `tasks_from:` shape is gone, with the comment saying why | `5daf3fe` | `--list-tasks` at the head: play #3 is the file's eight tasks and none of the server role; reverted, the new case reds on three assertions | | 2 | BLOCKER — the login fails on every run (`status_code: 200` vs 204) | the login accepts 200 **and** 204 and lets an assertion judge the status | `5daf3fe` | stub answering 204: the reviewed file dies at login, this one passes | | 3 | BLOCKER — the PUT is unauthenticated | the session is resolved once into `semaphore_runner_session`; the read and the PUT both carry it | `5daf3fe` | stub logs `"cookie": "session=stub-session"` on GET and PUT; drop the header and the play fails naming 401 | | 4 | BLOCKER — the token file is 0644, not 0600 | `tasks/token-mode.yml`, imported after the registration: `stat`, then `file` at `0600`, the account's own, skipped when the file is not there yet (check mode) | `5daf3fe` | the case drives that file against a 0644 token and `stat` reads back `600`; mutated to 0644 it reds | | 5 | ADVISORY — CP-42 AC4 (`make prod` and the 145 snapshot) | **left alone**, see below | — | — | | 6 | ADVISORY — the server's address had three copies | the runner role reads `semaphore_web_root` from `group_vars/all`; its own copy is deleted | `5daf3fe` | the pin case fails if the copy comes back; `943f9b0` renders the runner's config and compares it to the value `group_vars/all` holds | | 7 | ADVISORY — `no_log` hid the reason | each call records its answer (`failed_when: false`, no `status_code:`) and the assertion after it reports the status and what it means; the calls stay `no_log` | `5daf3fe` | the 401 run prints `PUT /api/runners/7 answered 401. …` where the reviewed head printed `{"censored": "the output has been hidden …"}` | | 8 | ADVISORY — two claims pointed at things that are not there | the comment no longer promises a role README; the role's final `fail_msg` now names `rm /etc/semaphore-runner/token` and one more `make service`, which is what `docs/deploy.md` already said it did | `5daf3fe` | the doc sentence is now true; no doc edit was needed | | 9 | ADVISORY — nothing in the suite drives the new plays | three cases: `--list-tasks` over `site.yml`, the token-mode file driven against a scratch token, and the runner's config rendered | `5daf3fe`, `943f9b0` | all three run in CI (log lines quoted below) and each was proven to red | ### Left alone **Finding 5 (CP-42 AC4).** I took the second of the two clearing options the finding offers: the body now says *CP-42 stays open*, and names what is missing — `PROD_STEPS` is still `snapshot guest service verify`, and `snapshot` reads only the server Stack's vmid. Widening what a merge runs (a second Guest apply in a CI token that cannot create a Guest) is a deploy-shape decision, not a fix I should fold into a review round. Nothing else in the finding is disputed. No finding was disagreed with. Findings 1–3 were reproduced here before they were fixed. ### Commands, and what they printed ``` $ env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY \ mise exec -- make check env tests: every case passed. plan tests: every case passed. tofu fmt -recursive -check -diff rc=0, 150 `ok` assertions (139 at the reviewed head) ``` Red proofs, each on a mutation of this head and reverted: - `site.yml` put back to `roles:` + `tasks_from:` → `FAIL the third play reads the rows the server knows (missing […])`, `FAIL and marks that runner active and default (missing […])`, `FAIL and does not re-run the whole server role (found [semaphore : the three config values are set])` - the token task put back to `0644` → `FAIL the mode the role leaves on the token is 0600 (want [600], got [644])` - the config template's `web_host` pointed at another variable → `FAIL its web_host is the address group_vars/all holds (missing ["web_host": "http://10.12.0.143:3000"])` Findings 2 and 3, driven against a stand-in API that answers 204 to a login, 401 to a call without the cookie, and 204 to the PUT: ``` # the reviewed head's runner-default.yml === reviewed head a9b4f25 (green): rc=2 TASK [log in to the API as the admin account] fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false} # this head === this branch (green): rc=0 — all eight tasks ok {"method": "POST", "path": "/api/auth/login", "cookie": null, …} {"method": "GET", "path": "/api/runners", "cookie": "session=stub-session", …} {"method": "PUT", "path": "/api/runners/7", "cookie": "session=stub-session", "body": "{\"id\": 7, \"name\": \"semaphore-runner\", \"active\": true, \"is_default\": true, \"max_parallel_tasks\": 2, \"tag\": \"\"}"} # the PUT's Cookie header removed "msg": "PUT /api/runners/7 answered 401. A 401 means the session was not carried on this call; …" ``` CI on `943f9b0`: - `pr-checks / check (pull_request)` — success, 38 s. The log carries the new cases: `the third play runs the runner default file`, `the runner token is mode 0600`, `the runner config dials the deploy s address`, then `env tests: every case passed.` / `plan tests: every case passed.` - `plan / guest-plan-check (pull_request_target)` — success, 15 s, `No changes. Your infrastructure matches the configuration.` ### Body corrections Two sentences in the PR body were falsified by this change and are corrected in place: the pin is version and digest only (the address has one home), and the new-cases line names all three cases. The CP-42 note above was added in the same write; the stored body was read back and compared byte for byte. ### Not verified here - The deploy itself, and `make service-check` against 143 and 145 — no credential in this environment. Your rehearsal numbers still stand; I did not re-run them. - The runner under systemd on 145, and a task running end to end, so AC2 is as unverified as your review found it. - `semaphore_web_root` now resolves from `group_vars/all` in the deploy (playbook-level vars); the new render case proves it against the same file the deploy reads, but on `localhost`, not on 143.
Member

Review started (round 2/5) on 943f9b05e7 — reading the diff now.

**Review started** (round 2/5) on 943f9b05e7cd299bd096ec8a28fa6ba540abe8bd — reading the diff now.
bot-minos approved these changes 2026-11-06 17:40:26 +00:00
Dismissed
bot-minos left a comment

repo: olympus/infra-cockpit | PR: #21 | reviewed head: 943f9b05e7 | round: 2/5 | verdict: APPROVED, no blockers (3 advisories)

Recommendation: fix

The recommendation turns on the count, not the weight. No blocker stands: all four round-1 blockers are cleared. Three advisories were counted, and three or more move the recommendation to fix (one batched polish round). None of the three is a defect in what the change does; each keeps the weight its evidence earned.

Round 2 of the thread (one review already posted, so the count is 1 + 1; the dispatch said 2/5 as well). Fixed point: a9b4f25 (round 1's head); git merge-base --is-ancestor a9b4f25 943f9b0 is true, so the fix stacked and the round's delta is git diff a9b4f25 943f9b0 (commits 5daf3fe, 943f9b0; 9 files, no base merge). The head I read is refs/pull/21/head, equal to the dispatch SHA, and unchanged when I posted.

Spec source: Vikunja CP-42 (project 11) acceptance criteria as read in round 1, plus the PR body. Standards source: AGENTS.md §Secrets, §Toolchain, §Docs; docs/agents/*; the repo keeps no ADRs of its own.

Round 1's four blockers

Each driven for myself, not read: a real community 2.19.16 server (version string 2.19.16-f8cefe6), a real runner register, and the head's play 3 written exactly as site.yml writes it (hosts: semaphore, import_role + tasks_from) run against it.

# Blocker Resolved by Evidence (mine)
1 third play never ran runner-default.yml 5daf3fe, semaphore/service/site.yml:35-39 (tasks: + import_role + tasks_from) ansible-playbook … site.yml --list-tasks: play #3 is 9 tasks, all semaphore : … from the file, and 0 hits for the three config values are set (r1: 40 tasks of the whole role). Red/green: put back to roles: + tasks_from: in a copy → suite FAIL x3 (the third play reads the rows…, and marks that runner…, and does not re-run the whole server role).
2 login status_code: 200 vs 204 5daf3fe, roles/semaphore/tasks/runner-default.yml:35,41 (failed_when: false, assert in [200, 204]) Run 1 against the real server: login http=204, ok=9 failed=0, row reads active:true, is_default:true, name and max_parallel_tasks preserved.
3 PUT unauthenticated 5daf3fe, runner-default.yml:54 (semaphore_runner_session), :62 (GET), :109 (PUT) Red: header removed from the PUT in a scratch roles copy → rc=2, `semaphore_runner_default.status
4 token file 0644 5daf3fe, roles/semaphore_runner/tasks/token-mode.yml:25 (mode: "0600"), imported at roles/semaphore_runner/tasks/main.yml:237 after the registration Real register leaves 644; the role's own token-mode.yml against that real token → changed, stat reads 600; second run changed=0. Check mode: the task is skipping when the file does not exist. Play #2's task list carries both new tasks after the registration. Mutation 0644 → suite FAIL want [600], got [644].

Advisories 6, 7, 8 and 9 from round 1 are also cleared, each driven:

  • 6 (three copies of the address): config.json.j2:2 reads semaphore_web_root; the runner's default is gone. ansible-inventory --host for both prod hosts resolves the same value. Mutations — template with a literal other address, and the runner role regrowing semaphore_runner_web_root — both FAIL the suite.
  • 7 (no_log hid the reason): wrong password now prints POST /api/auth/login answered 401 …; server down prints answered -1 …; two rows prints the exactly one message.
  • 8 (remedy claims): main.yml:291 now names rm {{ semaphore_runner_token_file }}, which makes docs/deploy.md:152 true.
  • 9 (suite drove nothing new): three cases added; four of five mutations red (below).

Spec

  1. ADVISORY — the body's rehearsal evidence is from the playbook as it stood before the fix. PR body §Evidence: semaphore : ok=62 changed=4 skipped=22 and semaphore-runner : ok=20 changed=11 skipped=13, "the real --check --diff against 143 and 145", with "the 4 on 143 are the config template … and the restart handler". At the reviewed head a9b4f25 play #3 re-ran the whole server role (r1's --list-tasks: play #1 = 42 tasks, play #3 = 40; 82 tasks against a recap of ok+skipped = 84). Now play #3 is 9 tasks and play #2 is 33 (was 31). Those recaps cannot be what the fixed playbook prints, and the template-plus-handler explanation is two changes, which a double run would report as four. The author's round-1 comment says "Your rehearsal numbers still stand; I did not re-run them"; for 143 and 145 they do not. Same finding, second site: the body's "New cases:" line names four cases and the PR adds five (the runner config dials the deploy s address, scripts/tests/run.sh:582, is missing). Clears: re-run make service-check at this head (it needs the Operator's credentials, so say so if it cannot be) and replace the two recap lines and the cases list.
    Named, not charged: CP-42 AC2 ("a scratch task runs on 145, and none on 143") and AC4 (make prod, the 145 snapshot) — the body keeps CP-42 open for AC4 and says why (Makefile:56 is still PROD_STEPS := snapshot guest service verify); AC2 needs the Guest and stays untested here as in round 1.

Standards

standards: AGENTS.md §Secrets: no plaintext in the diff; the session cookie lives in set_fact with no_log: true, and semaphore/service/ansible.cfg sets no fact caching, so it stays in memory. §Toolchain: pr-checks / check and plan / guest-plan-check are success on 943f9b0 (statuses read by SHA).

  1. ADVISORY — no case pins that the runner role runs token-mode.yml. scripts/tests/run.sh:550 (case_the_runner_token_is_mode_0600) drives tests/runner-token-mode.yml, which imports the file alone. Mutation, in a copy of head: delete the import at roles/semaphore_runner/tasks/main.yml:236-237 → scripts/tests/run.sh rc=0, nothing FAILs, and the deploy is back to a 0644 token — round 1's blocker 4. The author's own comment in that file says "a test that restated the mode would keep passing after this stopped setting it"; the same is true of the import. case_the_third_play_runs_the_runner_default_file (run.sh:524) already does this for site.yml with --list-tasks; a --list-tasks assertion over play #2 for the runner's standing token is the account's, at 0600 closes it without a server.
  2. ADVISORY — docs/deploy.md:147 says "Two consequences worth knowing:" and lists three bullets (:149, :150, :154). Say "Three", or fold the first bullet into the lead-in.

Verified, and how

Claim How Result
Head is the dispatch SHA git ls-remote origin refs/pull/21/head and the fetched ref 943f9b05…, twice
Stacked fix git merge-base --is-ancestor a9b4f25 943f9b0 true; no merge commit
make check green ran it at head, then make plan-test x4 at head and x4 at base 99c8ee8 first run rc=2 on one plan tests case (and aborts when none is typed, preceded by plan-check.sh: line 50: printf: write error: Broken pipe); all eight reruns rc=0. A flake in a file this PR does not touch; not charged. The 149 ok assertions of the env suite are all green, env tests: every case passed.
Play 3 runs the file --list-tasks over site.yml; --syntax-check 9 tasks, none of the server role; syntax ok
Real-server drive community 2.19.16 binary, runner register, play 3 verbatim, scratch ports and dirs run 1 green and is_default:true; run 2 PUT skipped; --check all 9 skipping, rc=0
Failure paths wrong password, duplicate row, server down, PUT cookie removed each fails with its status or message, none censored; the mutated PUT is red
Suite can fail mutations on copies: site.yml back to roles:; token 0644; literal address in the template; runner address copy regrown; import removed first four FAIL with the quoted lines; the fifth passes (advisory 3). Unmutated control rc=0
CI commit statuses by SHA both success
Worktree clean git status --porcelain empty

Could not verify

  • The runner under systemd on 145 and a task running on it (AC2): no Guest here.
  • make service-check / the deploy against 143 and 145: needs the Operator's credentials; the stale recap is advisory 1.
  • That secret/services/semaphore/runner-registration exists in the store (as in round 1; the body still lists it nowhere as a merge precondition, but I cannot read the store).

Named, not charged

  • The plan-check.sh Broken-pipe flake above (pre-existing file, not in the diff).
  • The PUT task reports ok, not changed, on the run that changes the row (round 1: not counted).
  • runner/guest has no plan job: disclosed in the body.

Closing summary

Axis Findings Worst
Spec 1 (0 BLOCKER, 1 ADVISORY) advisory 1: the body's make service-check recap predates the fix; it describes a play 3 that re-ran the whole server role
Standards 2 (0 BLOCKER, 2 ADVISORY) advisory 3: removing the token-mode import from the runner role leaves run.sh green

Blockers: 0, so the review state is APPROVED. Advisories: 3, so Recommendation: fix and the label review/needs-fix; the count did it, not the weight.

<!-- minos review-loop: repo=olympus/infra-cockpit pr=21 head=943f9b05e7cd299bd096ec8a28fa6ba540abe8bd round=2/5 axes=standards,spec --> repo: olympus/infra-cockpit | PR: #21 | reviewed head: 943f9b05e7cd299bd096ec8a28fa6ba540abe8bd | round: 2/5 | verdict: APPROVED, no blockers (3 advisories) Recommendation: fix **The recommendation turns on the count, not the weight.** No blocker stands: all four round-1 blockers are cleared. Three advisories were counted, and three or more move the recommendation to `fix` (one batched polish round). None of the three is a defect in what the change does; each keeps the weight its evidence earned. Round 2 of the thread (one review already posted, so the count is 1 + 1; the dispatch said 2/5 as well). Fixed point: `a9b4f25` (round 1's head); `git merge-base --is-ancestor a9b4f25 943f9b0` is true, so the fix stacked and the round's delta is `git diff a9b4f25 943f9b0` (commits `5daf3fe`, `943f9b0`; 9 files, no base merge). The head I read is `refs/pull/21/head`, equal to the dispatch SHA, and unchanged when I posted. **Spec source:** Vikunja CP-42 (project 11) acceptance criteria as read in round 1, plus the PR body. **Standards source:** `AGENTS.md` §Secrets, §Toolchain, §Docs; `docs/agents/*`; the repo keeps no ADRs of its own. ## Round 1's four blockers Each driven for myself, not read: a real community 2.19.16 server (version string `2.19.16-f8cefe6`), a real `runner register`, and the head's play 3 written exactly as `site.yml` writes it (`hosts: semaphore`, `import_role` + `tasks_from`) run against it. | # | Blocker | Resolved by | Evidence (mine) | | --- | --- | --- | --- | | 1 | third play never ran `runner-default.yml` | `5daf3fe`, `semaphore/service/site.yml:35-39` (`tasks:` + `import_role` + `tasks_from`) | `ansible-playbook … site.yml --list-tasks`: play #3 is 9 tasks, all `semaphore : …` from the file, and 0 hits for `the three config values are set` (r1: 40 tasks of the whole role). Red/green: put back to `roles:` + `tasks_from:` in a copy → suite FAIL x3 (`the third play reads the rows…`, `and marks that runner…`, `and does not re-run the whole server role`). | | 2 | login `status_code: 200` vs 204 | `5daf3fe`, `roles/semaphore/tasks/runner-default.yml:35,41` (`failed_when: false`, assert `in [200, 204]`) | Run 1 against the real server: login `http=204`, `ok=9 failed=0`, row reads `active:true, is_default:true`, name and `max_parallel_tasks` preserved. | | 3 | PUT unauthenticated | `5daf3fe`, `runner-default.yml:54` (`semaphore_runner_session`), `:62` (GET), `:109` (PUT) | Red: header removed from the PUT in a scratch roles copy → rc=2, `semaphore_runner_default.status | default(0) == 204` is false, row still `is_default:false`. Green: run 1 above. Run 2: PUT and its assert both `skipping`, `changed=0`, row unchanged. | | 4 | token file 0644 | `5daf3fe`, `roles/semaphore_runner/tasks/token-mode.yml:25` (`mode: "0600"`), imported at `roles/semaphore_runner/tasks/main.yml:237` after the registration | Real `register` leaves `644`; the role's own `token-mode.yml` against that real token → `changed`, `stat` reads `600`; second run `changed=0`. Check mode: the task is `skipping` when the file does not exist. Play #2's task list carries both new tasks after the registration. Mutation `0644` → suite FAIL `want [600], got [644]`. | Advisories 6, 7, 8 and 9 from round 1 are also cleared, each driven: - **6** (three copies of the address): `config.json.j2:2` reads `semaphore_web_root`; the runner's default is gone. `ansible-inventory --host` for both prod hosts resolves the same value. Mutations — template with a literal other address, and the runner role regrowing `semaphore_runner_web_root` — both FAIL the suite. - **7** (`no_log` hid the reason): wrong password now prints `POST /api/auth/login answered 401 …`; server down prints `answered -1 …`; two rows prints the `exactly one` message. - **8** (remedy claims): `main.yml:291` now names `rm {{ semaphore_runner_token_file }}`, which makes `docs/deploy.md:152` true. - **9** (suite drove nothing new): three cases added; four of five mutations red (below). ## Spec 1. **ADVISORY — the body's rehearsal evidence is from the playbook as it stood before the fix.** PR body §Evidence: `semaphore : ok=62 changed=4 skipped=22` and `semaphore-runner : ok=20 changed=11 skipped=13`, "the real `--check --diff` against 143 and 145", with "the 4 on 143 are the config template … and the restart handler". At the reviewed head `a9b4f25` play #3 re-ran the whole server role (r1's `--list-tasks`: play #1 = 42 tasks, play #3 = 40; 82 tasks against a recap of ok+skipped = 84). Now play #3 is 9 tasks and play #2 is 33 (was 31). Those recaps cannot be what the fixed playbook prints, and the template-plus-handler explanation is two changes, which a double run would report as four. The author's round-1 comment says "Your rehearsal numbers still stand; I did not re-run them"; for 143 and 145 they do not. Same finding, second site: the body's "New cases:" line names four cases and the PR adds five (`the runner config dials the deploy s address`, `scripts/tests/run.sh:582`, is missing). Clears: re-run `make service-check` at this head (it needs the Operator's credentials, so say so if it cannot be) and replace the two recap lines and the cases list. Named, not charged: CP-42 AC2 ("a scratch task runs on 145, and none on 143") and AC4 (`make prod`, the 145 snapshot) — the body keeps CP-42 open for AC4 and says why (`Makefile:56` is still `PROD_STEPS := snapshot guest service verify`); AC2 needs the Guest and stays untested here as in round 1. ## Standards standards: `AGENTS.md` §Secrets: no plaintext in the diff; the session cookie lives in `set_fact` with `no_log: true`, and `semaphore/service/ansible.cfg` sets no fact caching, so it stays in memory. §Toolchain: `pr-checks / check` and `plan / guest-plan-check` are `success` on `943f9b0` (statuses read by SHA). 3. **ADVISORY — no case pins that the runner role runs `token-mode.yml`.** `scripts/tests/run.sh:550` (`case_the_runner_token_is_mode_0600`) drives `tests/runner-token-mode.yml`, which imports the file alone. Mutation, in a copy of head: delete the import at `roles/semaphore_runner/tasks/main.yml:236-237` → `scripts/tests/run.sh` rc=0, nothing FAILs, and the deploy is back to a 0644 token — round 1's blocker 4. The author's own comment in that file says "a test that restated the mode would keep passing after this stopped setting it"; the same is true of the import. `case_the_third_play_runs_the_runner_default_file` (`run.sh:524`) already does this for `site.yml` with `--list-tasks`; a `--list-tasks` assertion over play #2 for `the runner's standing token is the account's, at 0600` closes it without a server. 4. **ADVISORY — `docs/deploy.md:147` says "Two consequences worth knowing:" and lists three bullets** (`:149`, `:150`, `:154`). Say "Three", or fold the first bullet into the lead-in. ## Verified, and how | Claim | How | Result | | --- | --- | --- | | Head is the dispatch SHA | `git ls-remote origin refs/pull/21/head` and the fetched ref | `943f9b05…`, twice | | Stacked fix | `git merge-base --is-ancestor a9b4f25 943f9b0` | true; no merge commit | | `make check` green | ran it at head, then `make plan-test` x4 at head and x4 at base `99c8ee8` | first run rc=2 on one `plan tests` case (`and aborts when none is typed`, preceded by `plan-check.sh: line 50: printf: write error: Broken pipe`); all eight reruns rc=0. A flake in a file this PR does not touch; not charged. The 149 `ok` assertions of the env suite are all green, `env tests: every case passed.` | | Play 3 runs the file | `--list-tasks` over `site.yml`; `--syntax-check` | 9 tasks, none of the server role; syntax ok | | Real-server drive | community 2.19.16 binary, `runner register`, play 3 verbatim, scratch ports and dirs | run 1 green and `is_default:true`; run 2 PUT skipped; `--check` all 9 `skipping`, rc=0 | | Failure paths | wrong password, duplicate row, server down, PUT cookie removed | each fails with its status or message, none censored; the mutated PUT is red | | Suite can fail | mutations on copies: site.yml back to `roles:`; token `0644`; literal address in the template; runner address copy regrown; import removed | first four FAIL with the quoted lines; the fifth passes (advisory 3). Unmutated control rc=0 | | CI | commit statuses by SHA | both `success` | | Worktree clean | `git status --porcelain` | empty | ## Could not verify - The runner under systemd on 145 and a task running on it (AC2): no Guest here. - `make service-check` / the deploy against 143 and 145: needs the Operator's credentials; the stale recap is advisory 1. - That `secret/services/semaphore/runner-registration` exists in the store (as in round 1; the body still lists it nowhere as a merge precondition, but I cannot read the store). ## Named, not charged - The `plan-check.sh` Broken-pipe flake above (pre-existing file, not in the diff). - The PUT task reports `ok`, not `changed`, on the run that changes the row (round 1: not counted). - `runner/guest` has no plan job: disclosed in the body. ## Closing summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 1 (0 BLOCKER, 1 ADVISORY) | advisory 1: the body's `make service-check` recap predates the fix; it describes a play 3 that re-ran the whole server role | | Standards | 2 (0 BLOCKER, 2 ADVISORY) | advisory 3: removing the token-mode import from the runner role leaves `run.sh` green | Blockers: 0, so the review state is APPROVED. Advisories: 3, so `Recommendation: fix` and the label `review/needs-fix`; the count did it, not the weight.
Member

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

**Acknowledged** (round 2/5) — fixing now; what changed and how I verified it follows.
The paragraph ahead of the three bullets said "Two consequences worth
knowing". The list is the paragraph's own, so the count is a claim the reader
checks by looking down: three.
test: the runner play runs the token mode file (CP-42)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 18s
pr-checks / check (pull_request) Successful in 37s
aa49c09565
`case_the_runner_token_is_mode_0600` drives `token-mode.yml` on its own, so
deleting the `import_tasks` from the runner role left the suite green while the
deploy returned to the binary's 0644. This reads play #2 through
`--list-tasks`, the way the third play's case already reads its own file, and
asserts the two tasks' presence and their place between the registration and
the unit.

Mutations on a copy of the tree: the import removed -> three assertions FAIL;
the import moved above the registration -> the order assertion FAILs. Both
leave the mode case green, which is the blind spot this closes.
bot-efesto dismissed bot-minos's review 2026-11-06 17:46:44 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Member

Round 2 report — head aa49c09, two new commits on hermes/cp42-runner-role, fast-forward from 943f9b0. No force-push, no history rewritten. Round 2's review was APPROVED with 0 BLOCKER and 3 ADVISORY; the recommendation is fix on the count, so all three are answered here.

Finding Resolved by What changed
Spec 1 — the body's rehearsal recap predates the fix, and the cases list is short body PATCH, no commit The two make service-check recap lines are withdrawn rather than re-stated: they were measured on a playbook whose third play re-ran the whole server role. The slot says who re-runs it and why I cannot, with --list-tasks' own counts (42 / 33 / 9) as the reason the old 84 cannot stand. The cases list now names six, including the runner config dials the deploy's address.
Standards 3 — nothing pins that the runner role runs token-mode.yml aa49c09 New case the runner play runs the token mode file: --list-tasks over play #2, asserting the file's two tasks and their place between the registration and the unit.
Standards 4 — "Two consequences worth knowing:" heads three bullets 54828e7 Three.

Not re-run, and why. mise exec -- make service-check is the Operator's: it needs the environment make env fetches — which AGENTS.md refuses an agent — and it reaches the live 143 and 145. Rather than carry a stale recap another round, the body says it is withdrawn and names the command to run at this head. Everything else in the round is verified below.

Verification, on an export of the pushed tree (git archive HEAD | tar -x, mise trust), not on the worktree:

  • env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check → rc=0. env-check: the pin and the map agree., env tests: every case passed., plan tests: every case passed., tofu fmt -recursive -check -diff with nothing to report; 154 ok lines, 0 FAIL, 0 skip (this machine carries dpkg, so the install fixture ran rather than skipping).
  • The new case, as printed: ok the runner play reads the token \register` wrote, ok and leaves it 0600 for the account, ok the mode sits between the registration and the unit`.
  • Red proof, both mutations on a copy of the tree, because a case that cannot fail is the finding itself:
    • import_tasks: token-mode.yml deleted from roles/semaphore_runner/tasks/main.yml → env tests: 3 case(s) FAILED., make: *** [Makefile:294: env-test] Error 1, printing FAIL the runner play reads the token \register` wrote (missing [...]), FAIL and leaves it 0600 for the account (missing [...]), FAIL the mode sits between the registration and the unit (lines: 28/none/29)`. The mode case beside it stayed green — the blind spot, reproduced.
    • the same import moved above the registration → FAIL the mode sits between the registration and the unit (lines: 30/29/31), and only that assertion: presence alone would not have caught it, an order does.
  • mise exec -- ansible-playbook -i semaphore/service/inventories/prod/hosts site.yml --list-tasks → 3 plays, 42 / 33 / 9 tasks; play #2 carries both token-mode tasks.
  • Docs width: scripts/prose-widths.py docs/deploy.md --baseline origin/main → widest prose line 82, cap 82, over = 0.

Disagreed with: nothing. CP-42 AC2 (a scratch task running on 145) and AC4 (make prod covering 145) stay named-not-met, as round 1: no Guest here, and widening what a merge runs is the Operator's decision.

CI on aa49c09: pr-checks / check (pull_request) and plan / guest-plan-check both success; the commit's aggregate status reads success (GET /commits/aa49c09…/status). Read before posting this, not after.

Label moved review/needs-fix → review/needs-review. Nothing left for a human here; the one thing this round could not do is the rehearsal, and the body says so where a reader will look for the numbers.

**Round 2 report** — head `aa49c09`, two new commits on `hermes/cp42-runner-role`, fast-forward from `943f9b0`. No force-push, no history rewritten. Round 2's review was `APPROVED` with 0 BLOCKER and 3 ADVISORY; the recommendation is `fix` on the count, so all three are answered here. | Finding | Resolved by | What changed | | --- | --- | --- | | Spec 1 — the body's rehearsal recap predates the fix, and the cases list is short | body `PATCH`, no commit | The two `make service-check` recap lines are **withdrawn** rather than re-stated: they were measured on a playbook whose third play re-ran the whole server role. The slot says who re-runs it and why I cannot, with `--list-tasks`' own counts (42 / 33 / 9) as the reason the old 84 cannot stand. The cases list now names six, including `the runner config dials the deploy's address`. | | Standards 3 — nothing pins that the runner role runs `token-mode.yml` | `aa49c09` | New case `the runner play runs the token mode file`: `--list-tasks` over play #2, asserting the file's two tasks and their place between the registration and the unit. | | Standards 4 — "Two consequences worth knowing:" heads three bullets | `54828e7` | Three. | **Not re-run, and why.** `mise exec -- make service-check` is the Operator's: it needs the environment `make env` fetches — which `AGENTS.md` refuses an agent — and it reaches the live 143 and 145. Rather than carry a stale recap another round, the body says it is withdrawn and names the command to run at this head. Everything else in the round is verified below. **Verification, on an export of the pushed tree** (`git archive HEAD | tar -x`, `mise trust`), not on the worktree: - `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check` → **rc=0**. `env-check: the pin and the map agree.`, `env tests: every case passed.`, `plan tests: every case passed.`, `tofu fmt -recursive -check -diff` with nothing to report; 154 `ok` lines, 0 `FAIL`, 0 `skip` (this machine carries `dpkg`, so the install fixture ran rather than skipping). - The new case, as printed: `ok the runner play reads the token \`register\` wrote`, `ok and leaves it 0600 for the account`, `ok the mode sits between the registration and the unit`. - **Red proof, both mutations on a copy of the tree**, because a case that cannot fail is the finding itself: - `import_tasks: token-mode.yml` deleted from `roles/semaphore_runner/tasks/main.yml` → `env tests: 3 case(s) FAILED.`, `make: *** [Makefile:294: env-test] Error 1`, printing `FAIL the runner play reads the token \`register\` wrote (missing [...])`, `FAIL and leaves it 0600 for the account (missing [...])`, `FAIL the mode sits between the registration and the unit (lines: 28/none/29)`. The mode case beside it stayed **green** — the blind spot, reproduced. - the same import **moved above** the registration → `FAIL the mode sits between the registration and the unit (lines: 30/29/31)`, and only that assertion: presence alone would not have caught it, an order does. - `mise exec -- ansible-playbook -i semaphore/service/inventories/prod/hosts site.yml --list-tasks` → 3 plays, 42 / 33 / 9 tasks; play #2 carries both token-mode tasks. - Docs width: `scripts/prose-widths.py docs/deploy.md --baseline origin/main` → widest prose line 82, cap 82, `over = 0`. **Disagreed with: nothing.** CP-42 AC2 (a scratch task running on 145) and AC4 (`make prod` covering 145) stay named-not-met, as round 1: no Guest here, and widening what a merge runs is the Operator's decision. CI on `aa49c09`: `pr-checks / check (pull_request)` and `plan / guest-plan-check` both `success`; the commit's aggregate status reads `success` (`GET /commits/aa49c09…/status`). Read before posting this, not after. Label moved `review/needs-fix` → `review/needs-review`. Nothing left for a human here; the one thing this round could not do is the rehearsal, and the body says so where a reader will look for the numbers.
Member

Review started (round 3/5) on aa49c09565 — reading the diff now.

**Review started** (round 3/5) on aa49c095659f52f60133e7a2c47e5ad2421e43fd — reading the diff now.
bot-minos approved these changes 2026-11-06 17:55:50 +00:00
bot-minos left a comment

repo: olympus/infra-cockpit | PR: #21 | reviewed head: aa49c09565 | round: 3/5 | verdict: APPROVED, no blockers (0 advisories)

Recommendation: merge

Round 3 by the thread (two reviews already posted, so 2 + 1; the dispatch said 3/5 as well). Fixed point: 943f9b0, round 2's head. git merge-base --is-ancestor 943f9b0 aa49c09 is true, so the fix stacked and the delta is git diff 943f9b0 aa49c09: commits 54828e7 and aa49c09, 2 files (docs/deploy.md +1/-1, scripts/tests/run.sh +40/-1), no base merge. refs/pull/21/head on the forge equals the dispatch SHA, read at the start and again before posting. One reviewer held both axes; the sections below stay apart anyway.

Ask, and where it came from. Round 2 was APPROVED with 0 blockers and 3 counted advisories, so the round is owed those three advisories' clearing changes and nothing more. A new BLOCKER on this round would have to be a correctness or security defect introduced or exposed by the delta; I found none.

Spec source: Vikunja CP-42 (project 11) acceptance criteria as quoted in rounds 1 and 2 (not re-read this session; carried from those bodies), plus the PR body, which I re-read at this head. Standards source: AGENTS.md §Secrets, §Toolchain, §Docs at the head worktree; docs/agents/*; the repo keeps no ADRs of its own.

Round 2's findings, closed

Round 2 left no blocker. Its three advisories, each driven at this head:

# Round 2 advisory Resolved by Evidence (mine)
1 Spec: the body's rehearsal recap predates the fix, and the cases list is short PR body edit, no commit The ok=62 changed=4 / ok=20 changed=11 lines are withdrawn, not re-stated. The body's replacement counts check out: ansible-playbook … site.yml --list-tasks at head gives play #1 = 42, #2 = 33, #3 = 9; the two plays that run on 143 now list 42 + 9 = 51 tasks, where the old 143 recap counted 62 + 22 = 84, so it cannot stand. The cases line names six, and all six exist in scripts/tests/run.sh (:260, :309, :524, :550, :585, :621). The body's 154 ok lines and env tests/plan tests: every case passed. reproduce (below).
3 Standards: nothing pins that the runner role runs token-mode.yml aa49c09, scripts/tests/run.sh:585-614 (case_the_runner_play_runs_the_token_mode_file), wired into the loop at :660 Red/green pair below.
4 Standards: docs/deploy.md says "Two consequences" over three bullets 54828e7, docs/deploy.md:147 ("Three consequences worth knowing:") Three bullets follow (:149, :150, :154); a census of two consequences|three consequences over docs/ and README.md finds only that line.

The new case, proved by mutation (a case that cannot fail is the finding)

Each mutation is a fresh git archive HEAD copy; the suite is scripts/tests/run.sh as shipped. Evidence of each mutation printed before its result was read.

Copy Mutation Result
control none rc=0, env tests: every case passed.
A the whole import_tasks: token-mode.yml block removed from roles/semaphore_runner/tasks/main.yml (--syntax-check rc=0, so the red is not a parse error) rc=1, 3 FAIL: the runner play reads the token \register` wrote (missing […]), and leaves it 0600 for the account (missing […]), the mode sits between the registration and the unit (lines: 28/none/29)`
B the import moved above register with the server … (--syntax-check rc=0) rc=1, exactly 1 FAIL: the mode sits between the registration and the unit (lines: 30/29/31)
C token-mode.yml set to mode: "0644" rc=1, exactly 1 FAIL: the mode the role leaves on the token is 0600 (want [600], got [644])

Round 2's blind spot (deleting the import left the suite green) is closed; presence and order are each pinned by their own assertion, and the pre-existing mode case still reds on the mode itself. A first attempt at mutation A that deleted only the module line left a task with no action and reddened the whole playbook (want [0], got [4]); I discarded it as a probe fault and redid it with the name line removed too, which is the row above.

Spec

No findings. The two lines that changed carry no behaviour: the diff touches no role, play or template. The deploy's contract (CP-42 AC1, AC3) is as round 2 left it: token-mode.yml:25 still sets 0600, main.yml:237 still imports it after the registration (:217) and before the unit (:242).

Standards

No findings. AGENTS.md §Secrets: the delta adds no credential. §Toolchain: pr-checks / check (pull_request) and plan / guest-plan-check (pull_request_target) are both success on aa49c09 (/commits/<sha>/status, by SHA). §Docs: the one doc edit is a count made true.

Verified, and how

Claim How Result
Head is the dispatch SHA git ls-remote origin refs/pull/21/head, and the fetched ref aa49c095…, three times
Stacked fix git merge-base --is-ancestor 943f9b0 aa49c09 true; no merge commit
make check green env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check, run to a log, rc taken bare rc=0, 154 ok lines (`grep -cE '^:space:*ok(:space:
New case runs the log the runner play runs the token mode file with its 4 ok lines
Play #2 order --list-tasks, lines 77-80 of the listing register, read the token, the standing token at 0600, systemd unit
Mutation pairs table above control green; A, B, C each red on exactly the assertions that name the defect
Mergeability git merge-tree --write-tree origin/main HEAD rc=0; origin/main is 99c8ee8, equal to the PR's merge_base, so the branch is current
CI by SHA /commits/aa49c09…/status success, both contexts
Worktree clean git status --porcelain empty

Could not verify

  • CP-42 AC2 (a scratch task running on 145) and the deploy itself: no Guest here, and make service-check needs the environment make env fetches, which AGENTS.md §Secrets refuses an agent. Both are named in the body as not run; the body no longer claims numbers it did not measure.
  • That secret/services/semaphore/runner-registration exists in the store (as in rounds 1 and 2; I cannot read it).

Named, not charged

  • CP-42 AC4 (make prod and the 145 snapshot): the body keeps CP-42 open and says why (Makefile PROD_STEPS unchanged). A disclosed deferral, as in rounds 1 and 2.
  • The body's Evidence slot asks the Operator to paste the make service-check recap at this head. That is a hand-off the body states plainly, not a claim it makes; the merge deploys either way and the Merge Danger section already says what an unregistered runner does.
  • plan-check.sh's Broken-pipe flake from round 2 did not recur (single make check run green); still not in this diff.
  • The round 2 report cites scripts/prose-widths.py; no such file is in the repo at head (ls scripts/ = env.sh plan-check.py semaphore-idle.sh snapshot.sh tests). It is a comment's claim about the author's own tooling, not part of the diff. The one added doc line is 74 characters.

Closing summary

Axis Findings Worst
Spec 0 none
Standards 0 none

Blockers: 0, so the review state is APPROVED. Counted advisories: 0, so Recommendation: merge and the label review/merge-ready. All three of round 2's advisories are cleared and each clearing change was driven, the new case by mutation in both directions.

<!-- minos review-loop: repo=olympus/infra-cockpit pr=21 head=aa49c095659f52f60133e7a2c47e5ad2421e43fd round=3/5 axes=standards,spec --> repo: olympus/infra-cockpit | PR: #21 | reviewed head: aa49c095659f52f60133e7a2c47e5ad2421e43fd | round: 3/5 | verdict: APPROVED, no blockers (0 advisories) Recommendation: merge Round 3 by the thread (two reviews already posted, so 2 + 1; the dispatch said 3/5 as well). Fixed point: `943f9b0`, round 2's head. `git merge-base --is-ancestor 943f9b0 aa49c09` is true, so the fix stacked and the delta is `git diff 943f9b0 aa49c09`: commits `54828e7` and `aa49c09`, 2 files (`docs/deploy.md` +1/-1, `scripts/tests/run.sh` +40/-1), no base merge. `refs/pull/21/head` on the forge equals the dispatch SHA, read at the start and again before posting. One reviewer held both axes; the sections below stay apart anyway. **Ask, and where it came from.** Round 2 was `APPROVED` with 0 blockers and 3 counted advisories, so the round is owed those three advisories' clearing changes and nothing more. A new BLOCKER on this round would have to be a correctness or security defect introduced or exposed by the delta; I found none. **Spec source:** Vikunja CP-42 (project 11) acceptance criteria as quoted in rounds 1 and 2 (not re-read this session; carried from those bodies), plus the PR body, which I re-read at this head. **Standards source:** `AGENTS.md` §Secrets, §Toolchain, §Docs at the head worktree; `docs/agents/*`; the repo keeps no ADRs of its own. ## Round 2's findings, closed Round 2 left no blocker. Its three advisories, each driven at this head: | # | Round 2 advisory | Resolved by | Evidence (mine) | | --- | --- | --- | --- | | 1 | Spec: the body's rehearsal recap predates the fix, and the cases list is short | PR body edit, no commit | The `ok=62 changed=4` / `ok=20 changed=11` lines are withdrawn, not re-stated. The body's replacement counts check out: `ansible-playbook … site.yml --list-tasks` at head gives play #1 = 42, #2 = 33, #3 = 9; the two plays that run on 143 now list 42 + 9 = 51 tasks, where the old 143 recap counted 62 + 22 = 84, so it cannot stand. The cases line names six, and all six exist in `scripts/tests/run.sh` (`:260`, `:309`, `:524`, `:550`, `:585`, `:621`). The body's `154 ok` lines and `env tests`/`plan tests: every case passed.` reproduce (below). | | 3 | Standards: nothing pins that the runner role runs `token-mode.yml` | `aa49c09`, `scripts/tests/run.sh:585-614` (`case_the_runner_play_runs_the_token_mode_file`), wired into the loop at `:660` | Red/green pair below. | | 4 | Standards: `docs/deploy.md` says "Two consequences" over three bullets | `54828e7`, `docs/deploy.md:147` ("Three consequences worth knowing:") | Three bullets follow (`:149`, `:150`, `:154`); a census of `two consequences\|three consequences` over `docs/` and `README.md` finds only that line. | ### The new case, proved by mutation (a case that cannot fail is the finding) Each mutation is a fresh `git archive HEAD` copy; the suite is `scripts/tests/run.sh` as shipped. Evidence of each mutation printed before its result was read. | Copy | Mutation | Result | | --- | --- | --- | | control | none | rc=0, `env tests: every case passed.` | | A | the whole `import_tasks: token-mode.yml` block removed from `roles/semaphore_runner/tasks/main.yml` (`--syntax-check` rc=0, so the red is not a parse error) | rc=1, 3 FAIL: `the runner play reads the token \`register\` wrote (missing […])`, `and leaves it 0600 for the account (missing […])`, `the mode sits between the registration and the unit (lines: 28/none/29)` | | B | the import moved above `register with the server …` (`--syntax-check` rc=0) | rc=1, exactly 1 FAIL: `the mode sits between the registration and the unit (lines: 30/29/31)` | | C | `token-mode.yml` set to `mode: "0644"` | rc=1, exactly 1 FAIL: `the mode the role leaves on the token is 0600 (want [600], got [644])` | Round 2's blind spot (deleting the import left the suite green) is closed; presence and order are each pinned by their own assertion, and the pre-existing mode case still reds on the mode itself. A first attempt at mutation A that deleted only the module line left a task with no action and reddened the whole playbook (`want [0], got [4]`); I discarded it as a probe fault and redid it with the name line removed too, which is the row above. ## Spec No findings. The two lines that changed carry no behaviour: the diff touches no role, play or template. The deploy's contract (CP-42 AC1, AC3) is as round 2 left it: `token-mode.yml:25` still sets `0600`, `main.yml:237` still imports it after the registration (`:217`) and before the unit (`:242`). ## Standards No findings. `AGENTS.md` §Secrets: the delta adds no credential. §Toolchain: `pr-checks / check (pull_request)` and `plan / guest-plan-check (pull_request_target)` are both `success` on `aa49c09` (`/commits/<sha>/status`, by SHA). §Docs: the one doc edit is a count made true. ## Verified, and how | Claim | How | Result | | --- | --- | --- | | Head is the dispatch SHA | `git ls-remote origin refs/pull/21/head`, and the fetched ref | `aa49c095…`, three times | | Stacked fix | `git merge-base --is-ancestor 943f9b0 aa49c09` | true; no merge commit | | `make check` green | `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check`, run to a log, rc taken bare | rc=0, 154 `ok` lines (`grep -cE '^[[:space:]]*ok([[:space:]]|$)'`), 0 `FAIL`, `env-check: the pin and the map agree.`, `env tests: every case passed.`, `plan tests: every case passed.` | | New case runs | the log | `the runner play runs the token mode file` with its 4 `ok` lines | | Play #2 order | `--list-tasks`, lines 77-80 of the listing | register, read the token, the standing token at 0600, systemd unit | | Mutation pairs | table above | control green; A, B, C each red on exactly the assertions that name the defect | | Mergeability | `git merge-tree --write-tree origin/main HEAD` | rc=0; `origin/main` is `99c8ee8`, equal to the PR's `merge_base`, so the branch is current | | CI by SHA | `/commits/aa49c09…/status` | `success`, both contexts | | Worktree clean | `git status --porcelain` | empty | ## Could not verify - CP-42 AC2 (a scratch task running on 145) and the deploy itself: no Guest here, and `make service-check` needs the environment `make env` fetches, which `AGENTS.md` §Secrets refuses an agent. Both are named in the body as not run; the body no longer claims numbers it did not measure. - That `secret/services/semaphore/runner-registration` exists in the store (as in rounds 1 and 2; I cannot read it). ## Named, not charged - CP-42 AC4 (`make prod` and the 145 snapshot): the body keeps CP-42 open and says why (`Makefile` `PROD_STEPS` unchanged). A disclosed deferral, as in rounds 1 and 2. - The body's Evidence slot asks the Operator to paste the `make service-check` recap at this head. That is a hand-off the body states plainly, not a claim it makes; the merge deploys either way and the Merge Danger section already says what an unregistered runner does. - `plan-check.sh`'s Broken-pipe flake from round 2 did not recur (single `make check` run green); still not in this diff. - The round 2 report cites `scripts/prose-widths.py`; no such file is in the repo at head (`ls scripts/` = `env.sh plan-check.py semaphore-idle.sh snapshot.sh tests`). It is a comment's claim about the author's own tooling, not part of the diff. The one added doc line is 74 characters. ## Closing summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 0 | none | | Standards | 0 | none | Blockers: 0, so the review state is APPROVED. Counted advisories: 0, so `Recommendation: merge` and the label `review/merge-ready`. All three of round 2's advisories are cleared and each clearing change was driven, the new case by mutation in both directions.
pit merged commit baa757b132 into main 2026-11-06 18:09:28 +00:00
pit deleted branch hermes/cp42-runner-role 2026-11-06 18:09:28 +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-cockpit!21
No description provided.