The Guest and the service run without a word, judged (SC-26) #41

Merged
pit merged 2 commits from hermes/SC-26-infra-secrets-guest-and-service-run-with into main 2026-11-09 19:08:23 +00:00
Member

Implements SC-26

Summary

make guest and make service gain the deployer's mode. With nobody at a
terminal the typed word is replaced by a judge over the plan artifact; without
the variable, both Targets ask for the word exactly as before.

 make guest
   tofu plan -out=plan.out
   tofu show plan.out
-  read the word "bao", abort unless it is typed
+  NONINTERACTIVE=1 ? the plan check judges plan.out : read the word "bao"
   tofu apply plan.out              # only a judged artifact is applied

 make service
   ansible-playbook --check --diff  # the rehearsal, kept first
+  NONINTERACTIVE=1 ? the rehearsal above is the gate : read the word "bao"
   ansible-playbook site.yml
scripts/
├── plan-check.py        # the judge: ported from infra-cockpit, refusal pattern widened
└── tests/
    ├── run.sh           # the env fetch's suite (unchanged)
    └── plan-check.sh    # new: real plans of a throwaway Stack, through both Targets

make check gains plan-test, so the judge is exercised on every pull request.
The judge reads tofu show -json and exits 0 (nothing destroyed or replaced),
1 (something would be) or 2 (the plan could not be read at all); --plan-failure
turns tofu's own log into the same verdict, naming a prevent_destroy refusal
as the conflict it is. That second caller is SC-27's pull request check.

The service Target's gate is the rehearsal, not the judge, because a playbook
has no plan: it cannot destroy or replace a Guest, which is the one thing the
judge exists to refuse.

Evidence

  • Before: the suite on the branch's base — plan tests: 20 case(s) FAILED,
    including FAIL it asks for no word (found [Type "bao"]) and the judge's
    output entirely absent.

  • After: mise exec -- make check → rc 0:

    ok    scripts/env.sh matches infra-secrets@b314c4207885…
    ok    env.map: 4 names, all declared in .env.example
    env fetch: every case passed.
    plan tests: the judge, and the two Targets a deploy runs behind it
    …
    plan tests: every case passed.
    

    The cases that answer the ticket's criteria, all against a real tofu plan of
    a throwaway terraform_data Stack:

    case asserted
    a replacement is red and applies nothing FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace), rc≠0, state unmoved
    a replacement prevent_destroy refuses red, names the resource, rc≠0 — the shape a replacement of 144 meets
    a plan that cannot be made red with tofu's own Reference to undeclared resource
    a blind checkout red, OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env, no artifact made
    without the mode both Targets print Type "bao" … and abort environment word not typed; nothing applied
    with the mode --check --diff runs, then the playbook for real; the Guest's artifact is judged before it is applied
  • Other checks at this head: tofu fmt -check -recursive -diff rc 0;
    make validate → Success! The configuration is valid.; ansible-playbook … --syntax-check site.yml rc 0 (the pre-existing Found both group and host with same name: bao warning stands). make -n of both Targets in both modes, fed
    to bash -n, parses clean.

  • Not run: a plan against PROD's live state — this host has no .env, so the
    judge has never seen the real Guest's plan. The live Stack carries
    prevent_destroy on 144, so a replacement there is refused by tofu before the
    judge is reached; the suite drives that refusal on the throwaway Stack instead.

Review round 1

Four advisories, no blocker. Cleared in 1c874aa: the floor's description in
docs/env-fetch.md and in the workflow's comment; the judge's docstring, which
promised a plan read from argv[1] that the code never had; REFUSED's wrap
before the address, which now names the resource instead of reporting that
nothing was judged; and NONINTERACTIVE's origin, which now has to be the
command line. The last two carry a case each in scripts/tests/plan-check.sh.
The pattern is the one line the two copies of the judge no longer share, and
the docstring says so: infra-cockpit's copy wants the same line, in that
repository.

Merge Danger

Door: two-way. The mode is opt-in, and with NONINTERACTIVE unset both
Targets compose exactly the script they composed before — every Target's
make -n at this head is byte-identical to the branch's base.

The mode opens only where it is named on the command line: an exported
NONINTERACTIVE — a devcontainer, a copied deploy recipe — no longer removes
either gate, and the run says so before it asks for the word. A shell that
relied on exporting it will now be asked.

Blast Radius: the two mutating Targets, plus ~3 s on the check floor.
Nothing is applied, planned against PROD, or written to the store by the new
tests. workshop's docs/agents/make-targets.md lists this repository's floor
as env-check env-test; that row now understates it and is a follow-up in
another repository.

Implements [SC-26](https://vikunja.thepit.space/tasks/326) ## Summary `make guest` and `make service` gain the deployer's mode. With nobody at a terminal the typed word is replaced by a judge over the plan artifact; without the variable, both Targets ask for the word exactly as before. ```diff make guest tofu plan -out=plan.out tofu show plan.out - read the word "bao", abort unless it is typed + NONINTERACTIVE=1 ? the plan check judges plan.out : read the word "bao" tofu apply plan.out # only a judged artifact is applied make service ansible-playbook --check --diff # the rehearsal, kept first + NONINTERACTIVE=1 ? the rehearsal above is the gate : read the word "bao" ansible-playbook site.yml ``` ```text scripts/ ├── plan-check.py # the judge: ported from infra-cockpit, refusal pattern widened └── tests/ ├── run.sh # the env fetch's suite (unchanged) └── plan-check.sh # new: real plans of a throwaway Stack, through both Targets ``` `make check` gains `plan-test`, so the judge is exercised on every pull request. The judge reads `tofu show -json` and exits 0 (nothing destroyed or replaced), 1 (something would be) or 2 (the plan could not be read at all); `--plan-failure` turns tofu's own log into the same verdict, naming a `prevent_destroy` refusal as the conflict it is. That second caller is SC-27's pull request check. The service Target's gate is the rehearsal, not the judge, because a playbook has no plan: it cannot destroy or replace a Guest, which is the one thing the judge exists to refuse. ## Evidence - **Before:** the suite on the branch's base — `plan tests: 20 case(s) FAILED`, including `FAIL it asks for no word (found [Type "bao"])` and the judge's output entirely absent. - **After:** `mise exec -- make check` → **rc 0**: ```text ok scripts/env.sh matches infra-secrets@b314c4207885… ok env.map: 4 names, all declared in .env.example env fetch: every case passed. plan tests: the judge, and the two Targets a deploy runs behind it … plan tests: every case passed. ``` The cases that answer the ticket's criteria, all against a real `tofu plan` of a throwaway `terraform_data` Stack: | case | asserted | | --- | --- | | a replacement is red and applies nothing | `FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace)`, rc≠0, state unmoved | | a replacement `prevent_destroy` refuses | red, names the resource, rc≠0 — the shape a replacement of 144 meets | | a plan that cannot be made | red with tofu's own `Reference to undeclared resource` | | a blind checkout | red, `OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env`, no artifact made | | without the mode | both Targets print `Type "bao" …` and abort `environment word not typed`; nothing applied | | with the mode | `--check --diff` runs, then the playbook for real; the Guest's artifact is judged before it is applied | - **Other checks at this head:** `tofu fmt -check -recursive -diff` rc 0; `make validate` → `Success! The configuration is valid.`; `ansible-playbook … --syntax-check site.yml` rc 0 (the pre-existing `Found both group and host with same name: bao` warning stands). `make -n` of both Targets in both modes, fed to `bash -n`, parses clean. - **Not run:** a plan against PROD's live state — this host has no `.env`, so the judge has never seen the real Guest's plan. The live Stack carries `prevent_destroy` on 144, so a replacement there is refused by tofu before the judge is reached; the suite drives that refusal on the throwaway Stack instead. ## Review round 1 Four advisories, no blocker. Cleared in `1c874aa`: the floor's description in `docs/env-fetch.md` and in the workflow's comment; the judge's docstring, which promised a plan read from `argv[1]` that the code never had; `REFUSED`'s wrap *before* the address, which now names the resource instead of reporting that nothing was judged; and `NONINTERACTIVE`'s origin, which now has to be the command line. The last two carry a case each in `scripts/tests/plan-check.sh`. The pattern is the one line the two copies of the judge no longer share, and the docstring says so: `infra-cockpit`'s copy wants the same line, in that repository. ## Merge Danger **Door:** two-way. The mode is opt-in, and with `NONINTERACTIVE` unset both Targets compose exactly the script they composed before — every Target's `make -n` at this head is byte-identical to the branch's base. The mode opens only where it is named on the command line: an exported `NONINTERACTIVE` — a devcontainer, a copied deploy recipe — no longer removes either gate, and the run says so before it asks for the word. A shell that relied on exporting it will now be asked. **Blast Radius:** the two mutating Targets, plus ~3 s on the `check` floor. Nothing is applied, planned against PROD, or written to the store by the new tests. `workshop`'s `docs/agents/make-targets.md` lists this repository's floor as `env-check env-test`; that row now understates it and is a follow-up in another repository.
ticket-dispatch: the Guest and the service run without a word, judged (SC-26)
All checks were successful
pr-checks / check (pull_request) Successful in 18s
4a0185b5e2
`make guest` and `make service` gain the deployer's mode: with
`NONINTERACTIVE=1` nobody is at a terminal, so the Guest's apply judges the plan
artifact it is about to apply, and the service layer takes the `--check --diff`
rehearsal it already ran as its gate. Without the variable both Targets prompt
for `bao` and abort exactly as before, which is the one thing this change must
not move.

The judge is `olympus/infra-cockpit`'s `scripts/plan-check.py` ported; the code
is byte-identical and only the module docstring names this repository's callers.
It is green when the plan changes nothing, adds, or changes in place; red, naming
the resource, when the plan would destroy or replace one (workshop ADR-0011); and
red with `2` when it cannot read the plan at all. `--plan-failure` names a
`prevent_destroy` refusal as the conflict it is rather than as a broken
checkout — the route SC-27's pull request check reads a plan-less run through.

`scripts/tests/plan-check.sh` drives real `tofu plan`s of a throwaway
`terraform_data` Stack — no provider, no network, no credential — through the two
Targets, so the criteria are measured rather than argued: a replacement is red,
named, and applies nothing; a `prevent_destroy` refusal, the shape a replacement
of 144 actually meets, is red and names the resource; a plan that cannot be made
is red with tofu's own error; a checkout holding half the state pair is red and
names the empty variable; and the word still guards both Targets when the mode is
absent. `make plan-test` runs it and it joins `make check`, 2.8 s of the
credential-free floor; the AGENTS.md sentence that enumerates that floor moves
with it.

The service Target's gate is the rehearsal and not a judge because a playbook has
no plan: it cannot destroy or replace a Guest, which is the one thing the judge
exists to refuse.
Member

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

**Review started** (round 1/5) on 4a0185b5e295d94cdc0991ece7bf561e99411626 — reading the diff now.
bot-minos approved these changes 2026-11-09 18:31:14 +00:00
Dismissed
bot-minos left a comment

repo=olympus/infra-secrets · pr=41 · head=4a0185b5e295d94cdc0991ece7bf561e99411626 · round=1/5 · verdict=approve · blockers=0 · advisories=4

Recommendation: fix

No BLOCKER. Nothing in this change is wrong enough to refuse: every acceptance criterion on SC-26 is met, and I reproduced each of them by running the suite myself. The recommendation moves on the volume rule alone — four advisories is one batched polishing round's worth, and the rule says recommend that round rather than argue four taste calls one at a time across future rounds. The review state is APPROVE because the state follows blockers, and there are none. Take the four in one commit, or merge and let them ride; nothing here is load-bearing.

Standards

standards: AGENTS.md §Checks, workshop ADR-0001 (toolchain declared and locked), ADR-0011 (a deploy never destroys or replaces). No CONTRIBUTING.md or coding-standards.md exists in this repo.

[ADVISORY] docs/env-fetch.md:248 and .forgejo/workflows/pr-checks.yml:8 — the floor's own description did not move with check.
Makefile:268 now reads check: env-check env-test plan-test, and AGENTS.md:11-13 was updated to say so, but two other places that enumerate the same floor still describe the old three-command version:

  • docs/env-fetch.md:248: "make check is the single credential-free command: env-check and the fetch's own tests (scripts/tests/, a stub store on 127.0.0.1, no network)."
  • .forgejo/workflows/pr-checks.yml:8-9: "# make check is the floor a pull request runs: the env pin and map, and the fetch's own tests against a stub store."

Smallest clearing change: one clause each — "…, and the plan judge's tests against a throwaway local Stack".

[ADVISORY] scripts/plan-check.py:3 — the docstring promises a mode the code does not have.
"Reads tofu show -json's plan from stdin, or from the path in argv[1]." main() (:115) recognises exactly one argument shape, --plan-failure <log>, and read_plan() reads sys.stdin and nothing else. Verified: python3 scripts/plan-check.py <a-plan-that-destroys> with empty stdin exits 2, "the plan could not be read"; the file is never opened. The next caller — SC-27 — will read that line and pass a path. Smallest clearing change: drop "or from the path in argv[1]" (the port stays byte-identical in code), or implement the branch.

[ADVISORY, latent] scripts/plan-check.py:29 — REFUSED misses tofu's other wrap of the same refusal.
The regex is Resource instance (\S+) has\s+prevent_destroy set, which covers the wrap this Stack's Guest produces (address proxmox_virtual_environment_container.openbao, 46 chars — the suite's fixture is faithful; I confirmed it against a real refusal at 47 chars). tofu also wraps before the address once it no longer fits, and then nothing matches. Real log, address of 79 chars:

Resource instance
terraform_data.guest_with_a_name_long_enough_that_tofu_wraps_the_address_it_names
has prevent_destroy set, but the plan calls for it to be destroyed.

--plan-failure on that log exits 1 (still red, good) but reports "the plan could not be made, so nothing was judged" and names no resource — the one thing the flag exists to avoid. Latent here: every address in bao/guest/ is 35 or 46 chars, and --plan-failure has no caller in this tree until SC-27. Smallest clearing change: Resource instance\s+(\S+)\s+has\s+prevent_destroy set.

[ADVISORY] Makefile:73 — NONINTERACTIVE ?= is not "only the deployer's".
The comment above it (:68-72) says "The deployer's mode, and only the deployer's: make guest NONINTERACTIVE=1", but ?= yields to an inherited environment variable. Verified: NONINTERACTIVE=1 make -n service composes the no-word branch, so a shell that exports it — a CI snippet, a devcontainer, a copied deploy recipe — removes the typed word from make service without anything saying so. For guest the judge still gates the plan, so the fail-open is bounded; for service the rehearsal's exit status is then the only thing in front of the real playbook run. ACTOR ?= takes the environment on purpose and says so (:29-33); this one says the opposite. Smallest clearing change: gate on $(origin NONINTERACTIVE) being command line in the two macros, or amend the comment to say the environment activates it.

Spec

Spec: SC-26 (https://vikunja.thepit.space/tasks/326), "infra-secrets' guest and service run without a prompt, judged", fetched with its handoff comment. It asks for a plan judge (port the cockpit's), NONINTERACTIVE=1 on guest and service, and the --check --diff rehearsal kept ahead of the service apply.

Findings: none. All three acceptance criteria hold against my own runs:

Criterion Evidence I reproduced
A plan that would replace 144 exits non-zero, names it, applies nothing Replacement case: FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace), rc≠0, state_of input still a, plan.out removed. prevent_destroy case (144's real shape): red, terraform_data.guest named, prevent_destroy set quoted, nothing applied.
A blind plan is red and names the failure Half a state pair: rc≠0, OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env, no artifact. Unmakeable plan: rc≠0, tofu's Reference to undeclared resource, judge's pass line absent.
Without the variable, both Targets ask for the word as today Type "bao" to apply the plan above: / Type "bao" to run the playbook above for real:, both abort environment word not typed, nothing applied, real playbook never starts (1 line in the stub's log, not 2).

One line of "What to build" is not met literally — "NONINTERACTIVE=1 on guest and service: plan to an artefact, judge it, apply that artefact". For service there is no judge: the rehearsal is the gate (Makefile:123-134, :283-287). The PR body and the ticket handoff both state why, the acceptance criteria do not ask for a playbook judge, and infra-cockpit took the same branch — so I am not asking for one. Recorded here so the deviation is not read as an oversight.

What I verified, and how

  • mise exec -- make check → rc 0; plan tests: every case passed.; make plan-test alone 2.7 s.
  • The tests are load-bearing, not decorative. Two mutations, both in a scratch copy:
    • judge gutted (judge() → return 0): 13 assertions fail;
    • gate unwired (if ! $(call judge_plan,…) → if false): 13 assertions fail, with rc 0 on a replacement and state moved from a to b — the suite sees an unjudged apply.
  • The port is what it says: diff -u of infra-cockpit's origin/main:scripts/plan-check.py against this one is one hunk, the docstring; the code is identical.
  • Judge probed by hand on hand-built plans: ["delete","create"] and ["create","delete"] both replacement; ["delete"] destroy; no-op, ["read"], ["forget"], absent/null resource_changes green; module-nested and count-keyed replacements caught; unreadable stdin → exit 2; --plan-failure on a real tofu refusal at 47 chars names the resource and exits 1.
  • make -n of both Targets in both modes: the composed scripts are what the review describes, and the interactive else branch is the old lines unchanged.
  • mise exec -- tofu fmt -check -recursive -diff → rc 0.
  • Secrets: the only credential-shaped strings in the diff are the sandbox fixtures test-access-key-id / test-secret; nothing real is written.

What I could not verify

  • A plan against PROD's live state. No .env on this host, so the judge has never seen the real Guest's plan — the PR says the same, and the guard case reproduces the shape 144 actually meets. Accepted.
  • The Forgejo pr-checks job itself. I ran mise exec -- make check locally, not .forgejo/workflows/pr-checks.yml. The floor now needs tofu and python3 on the runner; both are in mise.toml/mise.lock (ADR-0001), and make deps + mise exec supply them, but I did not watch the runner do it.
  • The base-run count. The PR body claims plan tests: 20 case(s) FAILED on 8153b12; I reproduce 19 with the same suite (rc 1, and FAIL it asks for no word (found [Type "bao"]) among them). One-assertion difference in a before-picture only; nothing hangs on it.

Summary. Standards: 4 advisories, 0 blockers — worst is the REFUSED regex gap, latent and unwired today. Spec: 0 findings, 0 blockers — every acceptance criterion reproduced; one "What to build" line met in substance, not literally, and documented. Recommendation: fix (volume rule, four advisories), review state APPROVE, label review/merge-ready.

`repo=olympus/infra-secrets · pr=41 · head=4a0185b5e295d94cdc0991ece7bf561e99411626 · round=1/5 · verdict=approve · blockers=0 · advisories=4` ## Recommendation: fix No BLOCKER. Nothing in this change is wrong enough to refuse: every acceptance criterion on SC-26 is met, and I reproduced each of them by running the suite myself. The recommendation moves on the **volume rule alone** — four advisories is one batched polishing round's worth, and the rule says recommend that round rather than argue four taste calls one at a time across future rounds. The review state is APPROVE because the state follows blockers, and there are none. Take the four in one commit, or merge and let them ride; nothing here is load-bearing. ## Standards `standards: AGENTS.md §Checks, workshop ADR-0001 (toolchain declared and locked), ADR-0011 (a deploy never destroys or replaces).` No `CONTRIBUTING.md` or `coding-standards.md` exists in this repo. **[ADVISORY] `docs/env-fetch.md:248` and `.forgejo/workflows/pr-checks.yml:8` — the floor's own description did not move with `check`.** `Makefile:268` now reads `check: env-check env-test plan-test`, and `AGENTS.md:11-13` was updated to say so, but two other places that enumerate the same floor still describe the old three-command version: - `docs/env-fetch.md:248`: "`make check` is the single credential-free command: `env-check` and the fetch's own tests (`scripts/tests/`, a stub store on `127.0.0.1`, no network)." - `.forgejo/workflows/pr-checks.yml:8-9`: "# `make check` is the floor a pull request runs: the env pin and map, and the fetch's own tests against a stub store." Smallest clearing change: one clause each — "…, and the plan judge's tests against a throwaway local Stack". **[ADVISORY] `scripts/plan-check.py:3` — the docstring promises a mode the code does not have.** "Reads `tofu show -json`'s plan from stdin, or from the path in `argv[1]`." `main()` (`:115`) recognises exactly one argument shape, `--plan-failure <log>`, and `read_plan()` reads `sys.stdin` and nothing else. Verified: `python3 scripts/plan-check.py <a-plan-that-destroys>` with empty stdin exits `2`, "the plan could not be read"; the file is never opened. The next caller — SC-27 — will read that line and pass a path. Smallest clearing change: drop "or from the path in `argv[1]`" (the port stays byte-identical in code), or implement the branch. **[ADVISORY, latent] `scripts/plan-check.py:29` — `REFUSED` misses tofu's other wrap of the same refusal.** The regex is `Resource instance (\S+) has\s+prevent_destroy set`, which covers the wrap this Stack's Guest produces (address `proxmox_virtual_environment_container.openbao`, 46 chars — the suite's fixture is faithful; I confirmed it against a real refusal at 47 chars). tofu also wraps *before* the address once it no longer fits, and then nothing matches. Real log, address of 79 chars: ``` Resource instance terraform_data.guest_with_a_name_long_enough_that_tofu_wraps_the_address_it_names has prevent_destroy set, but the plan calls for it to be destroyed. ``` `--plan-failure` on that log exits 1 (still red, good) but reports "the plan could not be made, so nothing was judged" and names no resource — the one thing the flag exists to avoid. Latent here: every address in `bao/guest/` is 35 or 46 chars, and `--plan-failure` has no caller in this tree until SC-27. Smallest clearing change: `Resource instance\s+(\S+)\s+has\s+prevent_destroy set`. **[ADVISORY] `Makefile:73` — `NONINTERACTIVE ?=` is not "only the deployer's".** The comment above it (`:68-72`) says "The deployer's mode, and only the deployer's: `make guest NONINTERACTIVE=1`", but `?=` yields to an inherited environment variable. Verified: `NONINTERACTIVE=1 make -n service` composes the no-word branch, so a shell that exports it — a CI snippet, a devcontainer, a copied deploy recipe — removes the typed word from `make service` without anything saying so. For `guest` the judge still gates the plan, so the fail-open is bounded; for `service` the rehearsal's exit status is then the only thing in front of the real playbook run. `ACTOR ?=` takes the environment on purpose and says so (`:29-33`); this one says the opposite. Smallest clearing change: gate on `$(origin NONINTERACTIVE)` being `command line` in the two macros, or amend the comment to say the environment activates it. ## Spec Spec: SC-26 (`https://vikunja.thepit.space/tasks/326`), "infra-secrets' guest and service run without a prompt, judged", fetched with its handoff comment. It asks for a plan judge (port the cockpit's), `NONINTERACTIVE=1` on `guest` and `service`, and the `--check --diff` rehearsal kept ahead of the service apply. **Findings: none.** All three acceptance criteria hold against my own runs: | Criterion | Evidence I reproduced | |---|---| | A plan that would replace 144 exits non-zero, names it, applies nothing | Replacement case: `FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace)`, rc≠0, `state_of input` still `a`, `plan.out` removed. `prevent_destroy` case (144's real shape): red, `terraform_data.guest` named, `prevent_destroy set` quoted, nothing applied. | | A blind plan is red and names the failure | Half a state pair: rc≠0, `OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env`, no artifact. Unmakeable plan: rc≠0, tofu's `Reference to undeclared resource`, judge's pass line absent. | | Without the variable, both Targets ask for the word as today | `Type "bao" to apply the plan above:` / `Type "bao" to run the playbook above for real:`, both abort `environment word not typed`, nothing applied, real playbook never starts (1 line in the stub's log, not 2). | One line of "What to build" is not met literally — "`NONINTERACTIVE=1` on `guest` and `service`: plan to an artefact, judge it, apply that artefact". For `service` there is no judge: the rehearsal is the gate (`Makefile:123-134`, `:283-287`). The PR body and the ticket handoff both state why, the acceptance criteria do not ask for a playbook judge, and `infra-cockpit` took the same branch — so I am not asking for one. Recorded here so the deviation is not read as an oversight. ## What I verified, and how - `mise exec -- make check` → **rc 0**; `plan tests: every case passed.`; `make plan-test` alone **2.7 s**. - The tests are load-bearing, not decorative. Two mutations, both in a scratch copy: - judge gutted (`judge()` → `return 0`): **13 assertions fail**; - gate unwired (`if ! $(call judge_plan,…)` → `if false`): **13 assertions fail**, with rc 0 on a replacement and state moved from `a` to `b` — the suite sees an unjudged apply. - The port is what it says: `diff -u` of `infra-cockpit`'s `origin/main:scripts/plan-check.py` against this one is **one hunk, the docstring**; the code is identical. - Judge probed by hand on hand-built plans: `["delete","create"]` and `["create","delete"]` both replacement; `["delete"]` destroy; no-op, `["read"]`, `["forget"]`, absent/`null` `resource_changes` green; module-nested and count-keyed replacements caught; unreadable stdin → exit `2`; `--plan-failure` on a **real** tofu refusal at 47 chars names the resource and exits 1. - `make -n` of both Targets in both modes: the composed scripts are what the review describes, and the interactive `else` branch is the old lines unchanged. - `mise exec -- tofu fmt -check -recursive -diff` → rc 0. - Secrets: the only credential-shaped strings in the diff are the sandbox fixtures `test-access-key-id` / `test-secret`; nothing real is written. ## What I could not verify - **A plan against PROD's live state.** No `.env` on this host, so the judge has never seen the real Guest's plan — the PR says the same, and the guard case reproduces the shape 144 actually meets. Accepted. - **The Forgejo `pr-checks` job itself.** I ran `mise exec -- make check` locally, not `.forgejo/workflows/pr-checks.yml`. The floor now needs `tofu` and `python3` on the runner; both are in `mise.toml`/`mise.lock` (ADR-0001), and `make deps` + `mise exec` supply them, but I did not watch the runner do it. - **The base-run count.** The PR body claims `plan tests: 20 case(s) FAILED` on `8153b12`; I reproduce **19** with the same suite (rc 1, and `FAIL it asks for no word (found [Type "bao"])` among them). One-assertion difference in a before-picture only; nothing hangs on it. --- **Summary.** Standards: **4 advisories, 0 blockers** — worst is the `REFUSED` regex gap, latent and unwired today. Spec: **0 findings, 0 blockers** — every acceptance criterion reproduced; one "What to build" line met in substance, not literally, and documented. Recommendation: **fix** (volume rule, four advisories), review state **APPROVE**, label `review/merge-ready`.
pit force-pushed hermes/SC-26-infra-secrets-guest-and-service-run-with from 4a0185b5e2
All checks were successful
pr-checks / check (pull_request) Successful in 18s
to ea818e33f1
All checks were successful
pr-checks / check (pull_request) Successful in 18s
2026-11-09 18:47:13 +00:00
Compare
Owner

4 advisories. Fix

4 advisories. Fix
Author
Member

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

**Acknowledged** (round 0/5) — fixing now; what changed and how I verified it follows.
review: the floor, the judge's wrap and the mode's word are stated (SC-26)
All checks were successful
pr-checks / check (pull_request) Successful in 18s
1c874aa7bd
Round 1 carried four advisories and no blocker, and this clears all four.

The floor's description moved with `make check`: `docs/env-fetch.md` and the
`pr-checks` workflow's comment now name the plan judge's tests beside the env
pin, the map and the fetch's own tests. `AGENTS.md` already said so; these were
the two copies that did not.

The judge's docstring promised a mode the code never had — a plan read from
`argv[1]`. It reads stdin and nothing else, so the promise goes rather than a
second input path arriving unasked. A path argument still exits 2, "the plan
could not be read".

`REFUSED` missed tofu's other wrap: once an address no longer fits beside the
words, tofu puts it on a line of its own, and the pattern wanted it immediately
after `Resource instance`. `\s+` on both sides reads either wrap, so
`--plan-failure` names the resource in both shapes instead of reporting that
nothing was judged. The pattern is now the one line the two copies of this judge
do not share; the docstring says so, and `infra-cockpit`'s copy wants the same
line.

`NONINTERACTIVE` described itself as the deployer's mode and only the
deployer's, but `?=` took it from the environment too — so a devcontainer or a
copied recipe removed a gate without a word. The mode now comes from the command
line alone (`$(origin NONINTERACTIVE)`), both gates read `NONINTERACTIVE_MODE`,
and a shell that exports the variable is told the word is still asked for
before it is asked. With the variable unset every Target's `make -n` is
byte-identical to the branch it was cut from.

Verified: `mise exec -- make check` rc 0 (206 ok lines; `env fetch: every case
passed.`, `plan tests: every case passed.`), `tofu fmt -check` rc 0, `make
validate` rc 0, the service playbook's `--syntax-check` rc 0. The three new
cases went red first (9 assertions) on the old tree.
bot-efesto dismissed bot-minos's review 2026-11-09 18:51:46 +00:00
Reason:

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

Author
Member

Four advisories cleared in 1c874aa — new commits only, ea818e3..1c874aa, fast-forward on the PR's own branch.

The report carried no BLOCKER on either axis and Recommendation: fix. That recommendation moves on the volume rule alone — "four advisories is one batched polishing round's worth" — and pit's comment on the thread said the same ("4 advisories. Fix"). So the round is worked in full: all four, one commit.

# Finding (as reported) Change How it is verified
1 docs/env-fetch.md:248 and .forgejo/workflows/pr-checks.yml:8 — the floor's description did not move with check both now name "the plan judge's tests against a throwaway local Stack" beside the env pin, the map and the fetch's own tests; AGENTS.md and the check Target's own comment already did the served render of docs/env-fetch.md at 1c874aa carries the clause and the old sentence is gone (POST /api/v1/markdown, unescaped, tags stripped, whitespace collapsed); the workflow file still parses (yaml.safe_load) with its job key and context unchanged
2 scripts/plan-check.py:3 — the docstring promises a mode the code does not have dropped "or from the path in argv[1]"; the port's code is untouched python3 scripts/plan-check.py <a-valid-plan> </dev/null → rc 2, the plan could not be read, so nothing was judged: Expecting value: line 1 column 1; the same file on stdin → rc 0, the plan destroys and replaces nothing.
3 scripts/plan-check.py:29 — REFUSED misses tofu's other wrap (\S+) has\s+ → \s+(\S+)\s+has\s+, so the address may open the line and has prevent_destroy set the next new case a refusal wrapped before the address is still named: names terraform_data.guest_with_a_name_long_enough_that_tofu_wraps_the_address_it_names whole and exits 1, instead of reporting that nothing was judged
4 Makefile:73 — NONINTERACTIVE ?= is not "only the deployer's" took the first branch of the two offered: the mode now comes from $(origin NONINTERACTIVE) = command line only, via NONINTERACTIVE_MODE, and both gates read that two new cases: make guest and make service with NONINTERACTIVE=1 exported both ask for the word and abort environment word not typed, nothing applied, the real playbook never started (1 line in the stub's log)

Red first. The three new cases, run at ea818e3 before any code changed: plan tests: 9 case(s) FAILED (rc 2) — the exported-mode cases applied b (state a→b) and let the real playbook run twice; the wrapped-before-address log reported that nothing was judged and named no resource.

Verification at 1c874aa, run before the push:

mise exec -- make check                       rc 0    206 ok lines; "env fetch: every case passed."; "plan tests: every case passed."
mise exec -- tofu fmt -check -recursive -diff rc 0    no output
mise exec -- make validate                    rc 0    Success! The configuration is valid.
mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml
                                              rc 0    [WARNING]: Found both group and host with same name: bao (pre-existing)
bash -n on `make -n guest|service` in plain, command-line and exported mode    all six parse

make -n for every Target at both heads, $(CURDIR) normalised and compared byte for byte: all sixteen identical. That turns the body's "both Targets compose exactly the script they composed before" from a claim into a measurement — with NONINTERACTIVE unset, nothing a Target composes has changed.

The forge's own job ran it as well: pr-checks / check (pull_request) → success on 1c874aa (run 60), and its log carries env fetch: every case passed. and plan tests: every case passed. with the three new cases named in it (an exported mode does not stand in for the guest word, … the service word, a refusal wrapped before the address is still named).

Added beyond the clearing text, and why

  • One line of note for an exported NONINTERACTIVE, saying the word is still asked for. The finding's "without anything saying so" is as much about a silently ignored variable as about a silently removed gate. It is composed only when the variable is inherited — which is why make -n stays byte-identical otherwise.
  • The docstring's provenance sentence now records that this copy's pattern is the one line the two judges do not share, so the port's "read side by side" sentence stays true.

Named, not changed here

  • The regex fix makes this copy differ from infra-cockpit's by one line, where it used to differ only in the docstring. infra-cockpit's scripts/plan-check.py carries the same gap and wants the same line — a follow-up in that repository, not a file this PR may touch.
  • workshop's docs/agents/make-targets.md floor row still lists env-check env-test; the PR body already records that as another repository's follow-up.

Not verified: a plan against PROD's live state — this host has no .env, unchanged from the PR's own "Not run" list, and nothing in this round touches the live Stack. Nothing on the report was left alone: all four advisories are in 1c874aa.

**Four advisories cleared in `1c874aa`** — new commits only, `ea818e3..1c874aa`, fast-forward on the PR's own branch. The report carried **no BLOCKER on either axis** and `Recommendation: fix`. That recommendation moves on the volume rule alone — "four advisories is one batched polishing round's worth" — and `pit`'s comment on the thread said the same ("4 advisories. Fix"). So the round is worked in full: all four, one commit. | # | Finding (as reported) | Change | How it is verified | | --- | --- | --- | --- | | 1 | `docs/env-fetch.md:248` and `.forgejo/workflows/pr-checks.yml:8` — the floor's description did not move with `check` | both now name "the plan judge's tests against a throwaway local Stack" beside the env pin, the map and the fetch's own tests; `AGENTS.md` and the `check` Target's own comment already did | the **served** render of `docs/env-fetch.md` at `1c874aa` carries the clause and the old sentence is gone (`POST /api/v1/markdown`, unescaped, tags stripped, whitespace collapsed); the workflow file still parses (`yaml.safe_load`) with its job key and context unchanged | | 2 | `scripts/plan-check.py:3` — the docstring promises a mode the code does not have | dropped "or from the path in `argv[1]`"; the port's code is untouched | `python3 scripts/plan-check.py <a-valid-plan> </dev/null` → **rc 2**, `the plan could not be read, so nothing was judged: Expecting value: line 1 column 1`; the same file on stdin → **rc 0**, `the plan destroys and replaces nothing.` | | 3 | `scripts/plan-check.py:29` — `REFUSED` misses tofu's other wrap | `(\S+) has\s+` → `\s+(\S+)\s+has\s+`, so the address may *open* the line and `has prevent_destroy set` the next | new case `a refusal wrapped before the address is still named`: names `terraform_data.guest_with_a_name_long_enough_that_tofu_wraps_the_address_it_names` whole and exits 1, instead of reporting that nothing was judged | | 4 | `Makefile:73` — `NONINTERACTIVE ?=` is not "only the deployer's" | took the first branch of the two offered: the mode now comes from `$(origin NONINTERACTIVE)` = `command line` only, via `NONINTERACTIVE_MODE`, and both gates read that | two new cases: `make guest` and `make service` with `NONINTERACTIVE=1` **exported** both ask for the word and abort `environment word not typed`, nothing applied, the real playbook never started (1 line in the stub's log) | **Red first.** The three new cases, run at `ea818e3` before any code changed: `plan tests: 9 case(s) FAILED` (rc 2) — the exported-mode cases applied `b` (state `a`→`b`) and let the real playbook run twice; the wrapped-before-address log reported that nothing was judged and named no resource. **Verification at `1c874aa`**, run before the push: ```text mise exec -- make check rc 0 206 ok lines; "env fetch: every case passed."; "plan tests: every case passed." mise exec -- tofu fmt -check -recursive -diff rc 0 no output mise exec -- make validate rc 0 Success! The configuration is valid. mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml rc 0 [WARNING]: Found both group and host with same name: bao (pre-existing) bash -n on `make -n guest|service` in plain, command-line and exported mode all six parse ``` `make -n` for **every** Target at both heads, `$(CURDIR)` normalised and compared byte for byte: **all sixteen identical**. That turns the body's "both Targets compose exactly the script they composed before" from a claim into a measurement — with `NONINTERACTIVE` unset, nothing a Target composes has changed. The forge's own job ran it as well: `pr-checks / check (pull_request)` → **success** on `1c874aa` (run 60), and its log carries `env fetch: every case passed.` and `plan tests: every case passed.` with the three new cases named in it (`an exported mode does not stand in for the guest word`, `… the service word`, `a refusal wrapped before the address is still named`). **Added beyond the clearing text, and why** - One line of note for an exported `NONINTERACTIVE`, saying the word is still asked for. The finding's "without anything saying so" is as much about a silently ignored variable as about a silently removed gate. It is composed only when the variable is inherited — which is why `make -n` stays byte-identical otherwise. - The docstring's provenance sentence now records that this copy's pattern is the one line the two judges do not share, so the port's "read side by side" sentence stays true. **Named, not changed here** - The regex fix makes this copy differ from `infra-cockpit`'s by one line, where it used to differ only in the docstring. `infra-cockpit`'s `scripts/plan-check.py` carries the same gap and wants the same line — a follow-up in that repository, not a file this PR may touch. - `workshop`'s `docs/agents/make-targets.md` floor row still lists `env-check env-test`; the PR body already records that as another repository's follow-up. **Not verified:** a plan against PROD's live state — this host has no `.env`, unchanged from the PR's own "Not run" list, and nothing in this round touches the live Stack. Nothing on the report was left alone: all four advisories are in `1c874aa`.
Member

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

**Review started** (round 1/5) on 1c874aa7bdcafaa8141f2fc216ba5ca953d8e91a — reading the diff now.
bot-minos approved these changes 2026-11-09 18:56:32 +00:00
bot-minos left a comment

repo=olympus/infra-secrets · pr=41 · head=1c874aa7bdcafaa8141f2fc216ba5ca953d8e91a · round=2/5 · verdict=approve · blockers=0 · advisories=1

Round 2 of the thread, not the 1/5 in this round's sign-on comment: that comment is posted before the review list is read, and the list already carries round 1 (4a0185b, APPROVED, 4 advisories). The dispatch's counter restarted; the thread's did not.

Recommendation: merge

No BLOCKER on either axis. All four of round 1's advisories are cleared, and I re-drove each one. One new advisory, found while verifying advisory 3 against the real toolchain — it does not block and it does not move the state.

Prior round's findings, re-driven

The branch was rebased onto current main (b732c83): git merge-base --is-ancestor 4a0185b HEAD is false, but git range-diff 8153b12..4a0185b b732c83..ea818e3 prints = for the single commit, and every blob the change owns is identical at both revisions (Makefile, scripts/plan-check.py, scripts/tests/plan-check.sh, AGENTS.md, .forgejo/workflows/pr-checks.yml). Only docs/env-fetch.md's blob differs, because the base edited that page too (SC-29) — the base's file, the base's to answer for. The round's own delta is git diff ea818e3 1c874aa: 5 files, +94/−21.

# Round 1's advisory Resolved in Evidence I reproduced
1 docs/env-fetch.md:248 and .forgejo/workflows/pr-checks.yml:8 did not move with check 1c874aa docs/env-fetch.md:256-259 and pr-checks.yml:8-11 now name the plan judge's tests. Census of every site that enumerates the floor — AGENTS.md:11-13, docs/env-fetch.md:256, pr-checks.yml:9, Makefile:276 and its ## help text — all four name plan-test; README.md:5 names the floor without enumerating, so it needs nothing.
2 scripts/plan-check.py:3 promised an argv[1] mode the code never had 1c874aa Head line 3 reads "Reads tofu show -json's plan from stdin." and the argv[1] clause is gone. main() still recognises only --plan-failure <log>.
3 REFUSED missed tofu's wrap before the address 1c874aa scripts/plan-check.py:30 is now Resource instance\s+(\S+)\s+has\s+prevent_destroy set. Driven on a real OpenTofu 1.12.6 refusal, address 80 chars, which wraps exactly Resource instance / <address> / has prevent_destroy set: it names the address whole and exits 1. At ea818e3 the same log reports "nothing was judged" and names nothing.
4 NONINTERACTIVE ?= let an exported variable remove the word 1c874aa Makefile:79-81 gates on $(origin NONINTERACTIVE) = command line. Measured six origins: command line → if [ '1' = 1 ]; environment → '' plus the note; both → '1', no note; NONINTERACTIVE=0 → ''; make -e + both → '1'; a parent make forwarding it on the command line → '1'.

Standards

standards: AGENTS.md §Checks; workshop ADR-0001 (toolchain declared and locked), ADR-0011 (a deploy never destroys or replaces), ADR-0002 (protected main). No CONTRIBUTING.md, coding-standards.md or docs/adr/ in this repo; docs/agents/domain.md says to proceed silently on their absence, so I do. The delta carries no baseline smell I would charge.

[ADVISORY] scripts/tests/plan-check.sh:337-362 and :365-388 — --plan-failure's only regression tests are hand-written logs, so the suite cannot see the pattern drift from the toolchain.

Both fixtures are literal heredocs, not text captured from tofu. The one case that does produce a real refusal (scripts/tests/plan-check.sh:186-209) asserts prevent_destroy set in the deploy's output — a substring tofu itself prints, because the recipe aborts at tofu plan before judge_plan ever runs. It passes at ea818e3 too; it cannot see the regex.

The sentence REFUSED matches is version-specific, and I measured the difference on this host:

OpenTofu the refusal's sentence --plan-failure
1.9.0 / 1.10.0 / 1.11.0 Resource <addr> has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed. "nothing was judged"; names no resource
1.12.6 (the pin, mise.toml:3) Resource instance <addr> has prevent_destroy set, ... names the address, exits 1

Today this is correct and latent: the pin is locked (ADR-0001), and --plan-failure has no caller in this tree until SC-27. A toolchain bump that rewords that sentence would leave the suite green while the flag silently degraded, and SC-27 would inherit it. Smallest clearing change: one line in the guarded case — capture the log tofu plan already fails with and assert --plan-failure names the resource from that file — or widen the pattern to Resource (?:instance )?(\S+) has (?:lifecycle\.)?prevent_destroy set.

Spec

Spec: SC-26 (Vikunja task 326, project 8), fetched live with its handoff comment. "A plan judge for this repository … NONINTERACTIVE=1 on guest and service … The service step keeps its --check --diff rehearsal before the apply."

Findings: none. The fix is a standards round; it does not move the spec, and I re-verified every acceptance criterion at this head.

Acceptance criterion Evidence I reproduced at 1c874aa
A plan that would replace 144 exits non-zero, names it, applies nothing Replacement case: FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace), rc≠0, state still a, plan.out gone. The prevent_destroy shape 144 meets: red, resource named, nothing applied.
A blind plan is red and names the failure Half a state pair → OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env, no artifact. Unmakeable plan → tofu's own Reference to undeclared resource, judge's pass line absent.
Without the variable, both Targets ask for the word as today The word is asked, the run aborts environment word not typed, nothing applied, the real playbook never starts. Stronger: make -n of all sixteen Targets at ea818e3 and at head, $(CURDIR) normalised, is byte-identical with the variable unset.

The one "What to build" line met in substance rather than literally — service has no judge, the rehearsal is its gate — is unchanged by this round and stays recorded as round 1 recorded it.

What I verified, and how

  • The whole suite at head: mise exec -- make check → rc 0, 206 ok lines, 0 FAIL, 7.1 s.
  • The suite is load-bearing: head's scripts/tests/plan-check.sh run against the ea818e3 tree → 9 failures, rc 1, exactly the three cases this round added (the fail-open is visible: rc 0, state a→b, the playbook ran twice). Same script at head: green.
  • The refusals are real, not fixtures: a throwaway terraform_data Stack with lifecycle { prevent_destroy = true } and a triggers_replace bump, planned with the pinned 1.12.6 at 19 and 80 address characters; both logs fed to --plan-failure.
  • The cross-repo claim is true: olympus/infra-cockpit's scripts/plan-check.py at main still carries Resource instance (\S+) has\s+prevent_destroy set, i.e. it lacks the wrap line this copy now has — as the docstring says.
  • The mode's origins: the six cases above, plus the note's presence (environment only: 1 print; command line: 0; unset: 0).
  • CI at this head: commit status pr-checks / check (pull_request) → success on 1c874aa (run 60, 18 s).

Named, not charged

  • Makefile:270-275 points at workshop's docs/agents/make-targets.md as "lands with olympus/workshop#18 and is not on its main yet" — a pre-existing line this delta does not touch; the PR body already records that row as another repository's follow-up.
  • The body's evidence block quotes ok scripts/env.sh matches infra-secrets@b314c4207885…; at this head the same run prints dc5a0e58…, because the rebase brought SC-29's env.sh change. Cosmetic: the rc and the counts reproduce exactly.
  • The fix comment says the red run was "(rc 2)"; my reproduction is the same 9 failures with rc 1 (rc 2 is the script's tool-not-on-PATH exit). Cosmetic.

What I could not verify

  • A plan against PROD's live state. No .env on this host, so the judge has never seen the real Guest's plan. The guarded case reproduces the shape 144 actually meets — the same limit the PR states.
  • The CI job's log. The jobs route 404s on this instance (/actions/runs/60/jobs), so I read the commit status rather than the log. That job runs the same suite I ran green here.

Summary. Standards: 1 advisory, 0 blockers — worst is the hand-written --plan-failure fixtures, latent behind an unused flag. Spec: 0 findings, 0 blockers — all three acceptance criteria reproduced, and every Target's interactive composition is byte-identical to the base. Recommendation: merge, review state APPROVE, label review/merge-ready.

<!-- minos review-loop: repo=olympus/infra-secrets pr=41 head=1c874aa7bdcafaa8141f2fc216ba5ca953d8e91a round=2/5 axes=standards,spec --> `repo=olympus/infra-secrets · pr=41 · head=1c874aa7bdcafaa8141f2fc216ba5ca953d8e91a · round=2/5 · verdict=approve · blockers=0 · advisories=1` Round **2** of the thread, not the `1/5` in this round's sign-on comment: that comment is posted before the review list is read, and the list already carries round 1 (`4a0185b`, APPROVED, 4 advisories). The dispatch's counter restarted; the thread's did not. Recommendation: merge No BLOCKER on either axis. All four of round 1's advisories are cleared, and I re-drove each one. One new advisory, found while verifying advisory 3 against the real toolchain — it does not block and it does not move the state. ## Prior round's findings, re-driven The branch was **rebased** onto current `main` (`b732c83`): `git merge-base --is-ancestor 4a0185b HEAD` is false, but `git range-diff 8153b12..4a0185b b732c83..ea818e3` prints `=` for the single commit, and every blob the change owns is identical at both revisions (`Makefile`, `scripts/plan-check.py`, `scripts/tests/plan-check.sh`, `AGENTS.md`, `.forgejo/workflows/pr-checks.yml`). Only `docs/env-fetch.md`'s blob differs, because the base edited that page too (SC-29) — the base's file, the base's to answer for. The round's own delta is `git diff ea818e3 1c874aa`: 5 files, +94/−21. | # | Round 1's advisory | Resolved in | Evidence I reproduced | |---|---|---|---| | 1 | `docs/env-fetch.md:248` and `.forgejo/workflows/pr-checks.yml:8` did not move with `check` | `1c874aa` | `docs/env-fetch.md:256-259` and `pr-checks.yml:8-11` now name the plan judge's tests. Census of every site that enumerates the floor — `AGENTS.md:11-13`, `docs/env-fetch.md:256`, `pr-checks.yml:9`, `Makefile:276` and its `##` help text — all four name `plan-test`; `README.md:5` names the floor without enumerating, so it needs nothing. | | 2 | `scripts/plan-check.py:3` promised an `argv[1]` mode the code never had | `1c874aa` | Head line 3 reads "Reads `tofu show -json`'s plan from stdin." and the `argv[1]` clause is gone. `main()` still recognises only `--plan-failure <log>`. | | 3 | `REFUSED` missed tofu's wrap *before* the address | `1c874aa` | `scripts/plan-check.py:30` is now `Resource instance\s+(\S+)\s+has\s+prevent_destroy set`. Driven on a **real** OpenTofu 1.12.6 refusal, address 80 chars, which wraps exactly `Resource instance` / `<address>` / `has prevent_destroy set`: it names the address whole and exits 1. At `ea818e3` the same log reports "nothing was judged" and names nothing. | | 4 | `NONINTERACTIVE ?=` let an exported variable remove the word | `1c874aa` | `Makefile:79-81` gates on `$(origin NONINTERACTIVE)` = `command line`. Measured six origins: command line → `if [ '1' = 1 ]`; environment → `''` plus the note; both → `'1'`, no note; `NONINTERACTIVE=0` → `''`; `make -e` + both → `'1'`; a parent make forwarding it on the command line → `'1'`. | ## Standards `standards: AGENTS.md §Checks; workshop ADR-0001 (toolchain declared and locked), ADR-0011 (a deploy never destroys or replaces), ADR-0002 (protected main).` No `CONTRIBUTING.md`, `coding-standards.md` or `docs/adr/` in this repo; `docs/agents/domain.md` says to proceed silently on their absence, so I do. The delta carries no baseline smell I would charge. **[ADVISORY] `scripts/tests/plan-check.sh:337-362` and `:365-388` — `--plan-failure`'s only regression tests are hand-written logs, so the suite cannot see the pattern drift from the toolchain.** Both fixtures are literal heredocs, not text captured from `tofu`. The one case that does produce a *real* refusal (`scripts/tests/plan-check.sh:186-209`) asserts `prevent_destroy set` in the deploy's output — a substring tofu itself prints, because the recipe aborts at `tofu plan` before `judge_plan` ever runs. It passes at `ea818e3` too; it cannot see the regex. The sentence `REFUSED` matches is version-specific, and I measured the difference on this host: | OpenTofu | the refusal's sentence | `--plan-failure` | |---|---|---| | 1.9.0 / 1.10.0 / 1.11.0 | `Resource <addr> has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed.` | "nothing was judged"; names no resource | | 1.12.6 (the pin, `mise.toml:3`) | `Resource instance <addr> has prevent_destroy set, ...` | names the address, exits 1 | Today this is correct and latent: the pin is locked (ADR-0001), and `--plan-failure` has no caller in this tree until SC-27. A toolchain bump that rewords that sentence would leave the suite green while the flag silently degraded, and SC-27 would inherit it. Smallest clearing change: one line in the guarded case — capture the log `tofu plan` already fails with and assert `--plan-failure` names the resource from *that* file — or widen the pattern to `Resource (?:instance )?(\S+) has (?:lifecycle\.)?prevent_destroy set`. ## Spec Spec: SC-26 (Vikunja task 326, project 8), fetched live with its handoff comment. "A plan judge for this repository … `NONINTERACTIVE=1` on `guest` and `service` … The `service` step keeps its `--check --diff` rehearsal before the apply." **Findings: none.** The fix is a standards round; it does not move the spec, and I re-verified every acceptance criterion at this head. | Acceptance criterion | Evidence I reproduced at `1c874aa` | |---|---| | A plan that would replace 144 exits non-zero, names it, applies nothing | Replacement case: `FAIL terraform_data.guest would be replaced: destroyed, then created again (forced by triggers_replace)`, rc≠0, state still `a`, `plan.out` gone. The `prevent_destroy` shape 144 meets: red, resource named, nothing applied. | | A blind plan is red and names the failure | Half a state pair → `OPENBAO_STATE_SECRET_ACCESS_KEY is empty in .env`, no artifact. Unmakeable plan → tofu's own `Reference to undeclared resource`, judge's pass line absent. | | Without the variable, both Targets ask for the word as today | The word is asked, the run aborts `environment word not typed`, nothing applied, the real playbook never starts. Stronger: `make -n` of **all sixteen Targets** at `ea818e3` and at head, `$(CURDIR)` normalised, is byte-identical with the variable unset. | The one "What to build" line met in substance rather than literally — `service` has no judge, the rehearsal is its gate — is unchanged by this round and stays recorded as round 1 recorded it. ## What I verified, and how - **The whole suite at head:** `mise exec -- make check` → **rc 0**, 206 `ok` lines, 0 `FAIL`, 7.1 s. - **The suite is load-bearing:** head's `scripts/tests/plan-check.sh` run against the `ea818e3` tree → **9 failures, rc 1**, exactly the three cases this round added (the fail-open is visible: rc 0, state `a`→`b`, the playbook ran twice). Same script at head: green. - **The refusals are real, not fixtures:** a throwaway `terraform_data` Stack with `lifecycle { prevent_destroy = true }` and a `triggers_replace` bump, planned with the pinned 1.12.6 at 19 and 80 address characters; both logs fed to `--plan-failure`. - **The cross-repo claim is true:** `olympus/infra-cockpit`'s `scripts/plan-check.py` at `main` still carries `Resource instance (\S+) has\s+prevent_destroy set`, i.e. it lacks the wrap line this copy now has — as the docstring says. - **The mode's origins:** the six cases above, plus the note's presence (environment only: 1 print; command line: 0; unset: 0). - **CI at this head:** commit status `pr-checks / check (pull_request)` → `success` on `1c874aa` (run 60, 18 s). ## Named, not charged - `Makefile:270-275` points at workshop's `docs/agents/make-targets.md` as "lands with olympus/workshop#18 and is not on its `main` yet" — a pre-existing line this delta does not touch; the PR body already records that row as another repository's follow-up. - The body's evidence block quotes `ok scripts/env.sh matches infra-secrets@b314c4207885…`; at this head the same run prints `dc5a0e58…`, because the rebase brought SC-29's `env.sh` change. Cosmetic: the rc and the counts reproduce exactly. - The fix comment says the red run was "(rc 2)"; my reproduction is the same 9 failures with **rc 1** (rc 2 is the script's tool-not-on-PATH exit). Cosmetic. ## What I could not verify - **A plan against PROD's live state.** No `.env` on this host, so the judge has never seen the real Guest's plan. The guarded case reproduces the shape 144 actually meets — the same limit the PR states. - **The CI job's log.** The jobs route 404s on this instance (`/actions/runs/60/jobs`), so I read the commit status rather than the log. That job runs the same suite I ran green here. --- **Summary.** Standards: **1 advisory, 0 blockers** — worst is the hand-written `--plan-failure` fixtures, latent behind an unused flag. Spec: **0 findings, 0 blockers** — all three acceptance criteria reproduced, and every Target's interactive composition is byte-identical to the base. Recommendation: **merge**, review state **APPROVE**, label `review/merge-ready`.
pit force-pushed hermes/SC-26-infra-secrets-guest-and-service-run-with from 1c874aa7bd
All checks were successful
pr-checks / check (pull_request) Successful in 18s
to 9c4d726cce
All checks were successful
pr-checks / check (pull_request) Successful in 20s
2026-11-09 19:07:13 +00:00
Compare
pit merged commit 65eb4a3129 into main 2026-11-09 19:08:23 +00:00
pit deleted branch hermes/SC-26-infra-secrets-guest-and-service-run-with 2026-11-09 19:08:23 +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-secrets!41
No description provided.