The forge's five apply targets run without a prompt under a deployer (FO-60) #100

Merged
pit merged 1 commit from hermes/FO-60-the-five-apply-targets-run-without-a-prom into main 2026-11-12 07:56:00 +00:00
Owner

Implements FO-60

Summary

guest, runner-guest, edge, service and runner-service now take NONINTERACTIVE=1 on the command line, and then run with nobody at a terminal: the plan check's judge stands in for every typed word (workshop ADR-0011). With the variable unset, every Target asks for the word exactly as it does today.

Target Gate with the word Gate under NONINTERACTIVE=1
guest Type "prod" guest-plan-check.py judges plan.out; a destroy or replace refuses
runner-guest Type "prod" guest-plan-check.py, reported as runner-guest
edge Type "prod" edge-plan-check.py judges the Edge's plan
service Type "prod" the --check --diff run is the gate; the playbook runs after a clean check
runner-service Type "prod" the same, on the runner's own layer
pre Type "pre" guest-plan-check.py, reported as pre

What changed

  • confirm_and_apply takes the judge and the name its report carries — one script judges three Stacks, so the report names the Target that ran it — and applies only the artifact it judged. A refusal removes plan.out and exits non-zero, so nothing is applied.
  • confirm_word is new: the service layer's gate. A playbook cannot replace a Guest, so under NONINTERACTIVE=1 the --check --diff run is the gate — its own diff rendered, its own non-zero on a failed task — and the real run follows only a clean one.
  • NONINTERACTIVE_MODE reads the variable only when the command line set it. An exported NONINTERACTIVE is a devcontainer's or a CI image's variable, not a deployer's word; when one is exported the note says so and the word is still asked for. This is the shape infra-secrets merged for SC-26 and infra-silo for SL-33.
  • Five Target help lines say what the second gate is.

Evidence

mise exec -- make check exits 0 (36 assertions across env-check, snapshot-test, plan-workflow-test, fmt-check, docs-check).

The gate's branches, run end to end against a stubbed tofu in a scratch copy of the tree, with a plan that replaces the forge Guest (actions: ["delete","create"]):

NONINTERACTIVE: the plan check judges the plan above in place of the word.
  FAIL  proxmox_virtual_environment_container.forgejo would be replaced: destroyed, then created again

guest: 1 loss; a Guest is destroyed or replaced by the Operator's hand and never by a merge, so this check is red until the plan carries neither.
aborted: the plan would destroy or replace, or could not be judged; applying nothing.
make: *** [Makefile:504: guest] Error 1
Case Result
make guest NONINTERACTIVE=1, replace plan refused, tofu apply never ran, exit 2
make guest NONINTERACTIVE=1, clean plan guest: the plan loses nothing. then the apply, exit 0
make guest, no terminal input Type "prod", then aborted: environment word not typed, nothing applied
NONINTERACTIVE=1 make guest (exported) the note, then Type "prod" — the mode is not activated
make service NONINTERACTIVE=1, clean check check run, then the real playbook, exit 0
make service NONINTERACTIVE=1, failed check stops before the gate, exit 2, no real playbook
make service, no terminal input Type "prod", then aborted, nothing run

make -n shows the composition: PLAN_CHECK_NAME=guest python3 <repo>/scripts/guest-plan-check.py, … edge-plan-check.py for the Edge, … runner-guest for the runner's Guest, and … pre for the rehearsal.

Not in this change

  • The deploy workflow, the runbook and docs/deploy.md are FO-64's and FO-50's; this changes the Targets they will call.
  • An offline sandbox test in the shape of infra-silo's deploy-test is not in this ticket's criteria. Say the word and it follows as its own change.

— Hermes (agent-written)

Implements [FO-60](https://vikunja.thepit.space/tasks/316) ## Summary `guest`, `runner-guest`, `edge`, `service` and `runner-service` now take `NONINTERACTIVE=1` on the command line, and then run with nobody at a terminal: the plan check's judge stands in for every typed word (workshop ADR-0011). With the variable unset, every Target asks for the word exactly as it does today. | Target | Gate with the word | Gate under `NONINTERACTIVE=1` | |---|---|---| | `guest` | `Type "prod"` | `guest-plan-check.py` judges `plan.out`; a destroy or replace refuses | | `runner-guest` | `Type "prod"` | `guest-plan-check.py`, reported as `runner-guest` | | `edge` | `Type "prod"` | `edge-plan-check.py` judges the Edge's plan | | `service` | `Type "prod"` | the `--check --diff` run is the gate; the playbook runs after a clean check | | `runner-service` | `Type "prod"` | the same, on the runner's own layer | | `pre` | `Type "pre"` | `guest-plan-check.py`, reported as `pre` | ## What changed - `confirm_and_apply` takes the judge and the name its report carries — one script judges three Stacks, so the report names the Target that ran it — and applies only the artifact it judged. A refusal removes `plan.out` and exits non-zero, so nothing is applied. - `confirm_word` is new: the service layer's gate. A playbook cannot replace a Guest, so under `NONINTERACTIVE=1` the `--check --diff` run is the gate — its own diff rendered, its own non-zero on a failed task — and the real run follows only a clean one. - `NONINTERACTIVE_MODE` reads the variable only when the command line set it. An exported `NONINTERACTIVE` is a devcontainer's or a CI image's variable, not a deployer's word; when one is exported the note says so and the word is still asked for. This is the shape `infra-secrets` merged for SC-26 and `infra-silo` for SL-33. - Five Target help lines say what the second gate is. ## Evidence `mise exec -- make check` exits 0 (36 assertions across `env-check`, `snapshot-test`, `plan-workflow-test`, `fmt-check`, `docs-check`). The gate's branches, run end to end against a stubbed `tofu` in a scratch copy of the tree, with a plan that replaces the forge Guest (`actions: ["delete","create"]`): ``` NONINTERACTIVE: the plan check judges the plan above in place of the word. FAIL proxmox_virtual_environment_container.forgejo would be replaced: destroyed, then created again guest: 1 loss; a Guest is destroyed or replaced by the Operator's hand and never by a merge, so this check is red until the plan carries neither. aborted: the plan would destroy or replace, or could not be judged; applying nothing. make: *** [Makefile:504: guest] Error 1 ``` | Case | Result | |---|---| | `make guest NONINTERACTIVE=1`, replace plan | refused, `tofu apply` never ran, exit 2 | | `make guest NONINTERACTIVE=1`, clean plan | `guest: the plan loses nothing.` then the apply, exit 0 | | `make guest`, no terminal input | `Type "prod"`, then `aborted: environment word not typed`, nothing applied | | `NONINTERACTIVE=1 make guest` (exported) | the note, then `Type "prod"` — the mode is not activated | | `make service NONINTERACTIVE=1`, clean check | check run, then the real playbook, exit 0 | | `make service NONINTERACTIVE=1`, failed check | stops before the gate, exit 2, no real playbook | | `make service`, no terminal input | `Type "prod"`, then `aborted`, nothing run | `make -n` shows the composition: `PLAN_CHECK_NAME=guest python3 <repo>/scripts/guest-plan-check.py`, `… edge-plan-check.py` for the Edge, `… runner-guest` for the runner's Guest, and `… pre` for the rehearsal. ## Not in this change - The deploy workflow, the runbook and `docs/deploy.md` are FO-64's and FO-50's; this changes the Targets they will call. - An offline sandbox test in the shape of `infra-silo`'s `deploy-test` is not in this ticket's criteria. Say the word and it follows as its own change. — Hermes (agent-written)
The forge's five apply targets run without a prompt under a deployer (FO-60)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 24s
plan / edge-plan-check (pull_request_target) Successful in 21s
plan / runner-guest-plan-check (pull_request_target) Successful in 20s
pr-checks / env-check (pull_request) Successful in 17s
pr-checks / fmt-check (pull_request) Successful in 16s
pr-checks / validate (pull_request) Successful in 25s
pr-checks / syntax-check (pull_request) Successful in 20s
pr-checks / docs-check (pull_request) Successful in 18s
8d47655c4e
`guest`, `runner-guest`, `edge`, `service` and `runner-service` now take
`NONINTERACTIVE=1` on the command line: the plan check's judge stands in for the
typed word (workshop ADR-0011), a plan that would destroy or replace anything is
refused and applied nowhere, and a clean plan applies the artifact it judged.
With the variable unset every Target asks for the word exactly as before.

- `confirm_and_apply` takes the judge and the name its report carries, because
  one script judges three Stacks; `guest`, `runner-guest`, `edge` and `pre` pass
  theirs.
- `confirm_word` is the service layer's gate: the `--check --diff` run renders
  the diff and its own non-zero is the refusal, so under `NONINTERACTIVE=1` the
  real playbook runs only after a clean check.
- Only the command line activates the mode: an exported `NONINTERACTIVE` is a
  devcontainer's variable, not a deployer's word, and the word is still asked for.

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

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

**Review started** (round 1/5) on 8d47655c4ec231d061b7f7006af57c27ab17ff03 — reading the diff now.
bot-minos approved these changes 2026-11-11 21:39:28 +00:00
bot-minos left a comment

olympus/infra-forge · PR #100 · head 8d47655c4ec231d061b7f7006af57c27ab17ff03 · round 1/5 · verdict merge

Recommendation: merge

Round 1 of 5: the review list is empty, so this is the first report on this PR. One file changed (Makefile, 64+/21−), and every claim in the body was re-driven against a stubbed toolchain.

Spec

Spec source: the PR description. The ticket it cites — FO-60, https://vikunja.thepit.space/tasks/316 — could not be read (see Could not verify), so the contract judged here is the description's own table: five Targets take NONINTERACTIVE=1 on the command line and gate on the plan judge; with the variable unset each asks for its word; pre takes the judge too.

S-1 — ADVISORY — the Summary's claim about the interactive path is false for two of the five Targets.
Quote (PR description, Summary): "With the variable unset, every Target asks for the word exactly as it does today."
Makefile:422 (service_apply) and Makefile:547 (runner-service) add $(call confirm_word,$(PROD_WORD)); at the base revision neither Target asked for anything. Measured at both revisions with the same stub toolchain and prod on stdin:

Revision Command Result
base 8204741 make service --check --diff, then the real playbook, rc 0 — no prompt in the log
head 8d47655 make service (stdin closed) Type "prod" to run the playbook above for real: → aborted: environment word not typed, rc 2, real playbook never ran

The behaviour matches the body's own table (service → Type "prod") and its evidence row, so the code is right and the sentence is wrong. Smallest fix: one clause — "every Target that asked for the word still does; service and runner-service now ask for it too."

Standards

Standard read from the head worktree: AGENTS.md (§Secrets, §State, §Code comments, §Pull requests), docs/adr/, and the org records in olympus/workshop docs/adr/ at origin/main — 13 records, of which ADR-0011 (a deploy never destroys or replaces) is the one this change implements, and ADR-0009 (PROD deployed automatically through a merge) the one it serves.

T-1 — ADVISORY — guest_apply hardcodes the judge's name, against the macro's own stated contract.
Makefile:407-410 documents the macro as taking "$(1) the -target set (PROD's or PRE's) and $(2) the word to type — both parameters, so a rehearsal runs the same gate as PROD without a second copy of it." Makefile:414 now passes the literal guest as the judge's report name, so a second caller would print guest: the plan loses nothing. about another Stack's plan. Latent, not live: guest is the only caller (Makefile:504), and pre calls confirm_and_apply directly with its own name (Makefile:759). Fix: a third parameter — $(call guest_apply,$(GUEST_TARGETS),$(PROD_WORD),guest).

No documented-standard breach found:

  • ADR-0011 is enforced, not weakened: the non-interactive gate refuses a plan carrying delete/create, removes plan.out, and applies nothing (driven, row d2 below).
  • AGENTS.md §Code comments ("keep comments to a minimum") was checked against the file's own practice rather than its words: 275 of 743 lines were comments at the base, 290 of 786 at the head — the same 37%, and this Makefile documents its gates in prose by convention. Nothing charged.
  • Not a CI-gate change, by the four things that define one: the workflow files, the required context names, the job names and the target each job runs are all unchanged — guest-plan-check, edge-plan-check and runner-guest-plan-check still call plan_judged (Makefile:321), whose recipe this diff does not touch. The gate's own if:/step lines are untouched.
  • The NONINTERACTIVE_MODE / NONINTERACTIVE_NOTE shape is the one already merged in infra-secrets (Makefile:83-96 at its origin/main, for SC-26) and infra-silo (SL-33). This PR follows a decided pattern rather than opening one.

Verified

Head resolved on the host before and after the run: git ls-remote origin refs/pull/100/head = 8d47655c4ec231d061b7f7006af57c27ab17ff03, on a detached worktree at that SHA. list_pull_request_files = one file (Makefile), matching the diff.

Probe Result
mise exec -- make check at head rc 0, 36 ok lines (matches the body's "36 assertions")
make guest NONINTERACTIVE=1, clean plan judge ok … would be created, guest: the plan loses nothing., then tofu apply, rc 0
make guest NONINTERACTIVE=1, replace plan FAIL … would be replaced, aborted: the plan would destroy or replace, tofu apply absent from the call log, plan.out removed, rc 2
make guest, stdin closed Type "prod" → aborted: environment word not typed, no apply, rc 2
NONINTERACTIVE=1 make guest (exported), word typed the note printed, Type "prod" asked, judge not invoked, apply after the word — mode not activated
make service NONINTERACTIVE=1, clean check check run, the check run above is the gate, real playbook, rc 0
make service NONINTERACTIVE=1, failing check check run, real playbook never called, rc 2 (recipes run under -eu -o pipefail, Makefile:12)
make runner-service NONINTERACTIVE=1, failing check same: check only, rc 2
make -n prod NONINTERACTIVE=1 the recursive make keeps the mode: three if [ '1' = 1 ] arms (guest, edge, service), and the deployer's make prod NONINTERACTIVE=1 therefore reaches the new gate
make -n pre NONINTERACTIVE=1 PLAN_CHECK_NAME=pre python3 …/guest-plan-check.py — the report names the rehearsal
unreadable plan through the judge the plan could not be read, rc 2 → the if ! refuses (fails closed)

CI at this SHA, read live: plan / guest-plan-check, plan / edge-plan-check, plan / runner-guest-plan-check all success (run 164) — so no unexplained destroy or drift on any changed Stack. pr-checks (run 165) was still running when read (fmt-check pending, others waiting).

Could not verify

  • FO-60 could not be read. scripts/fetch-vikunja-task.sh 4 60 and fetch-vikunja-task-by-id.sh 316 both answered key from …/minos/.env: /projects http=401, and no key in either .env returned 200; the anonymous route answers 401 too. The spec axis therefore rests on the PR description, not on the ticket's acceptance criteria. If FO-60 asks for something the description does not say, this review could not have seen it.
  • make pre end to end needs the age-sealed PRE credential pair; only its composition was driven (PLAN_CHECK_NAME=pre), not a run.
  • The interactive path against a real terminal: stdin was fed by a pipe, not a tty.
  • A plan against real state: the plan checks' CI results are cited; I did not run tofu plan against the store.

Named, not charged

  • docs/runbooks/0001-deploy-and-rollback.md:219 and :686 say make service runs the check and then the playbook for real — both now omit the word gate. The body defers the runbook to FO-50 and docs/deploy.md to FO-64 ("this changes the Targets they will call"); that deferral is disclosed, so nothing is charged, and the two lines are named here so a later round can check it was honoured. I could not confirm those tickets exist — the tracker refused the read.
  • pre's trailing service pair (Makefile:764, --check --diff && playbook) has no word gate at all. Untouched by this diff; pre-existing.
  • guest_apply's third argument is the only place a judge's name is not passed by the caller — the same seam pre shows the fix for; charged once, as T-1.

Summary

Axis Findings Worst
Standards 1 ADVISORY T-1 — guest_apply hardcodes the judge's name, latent only
Spec 1 ADVISORY S-1 — the body's claim about the unset-variable path is false for service / runner-service

Two advisories, no blockers: the recommendation is merge. Both are one-clause fixes and can ride a later change; the behaviour the body promises was reproduced at every branch, including the refusal that keeps a destroy or replace from being applied.

<!-- minos review-loop: repo=olympus/infra-forge pr=100 head=8d47655c4ec231d061b7f7006af57c27ab17ff03 round=1/5 axes=standards,spec --> `olympus/infra-forge` · PR **#100** · head `8d47655c4ec231d061b7f7006af57c27ab17ff03` · round **1/5** · verdict **merge** Recommendation: merge Round 1 of 5: the review list is empty, so this is the first report on this PR. One file changed (`Makefile`, 64+/21−), and every claim in the body was re-driven against a stubbed toolchain. ## Spec **Spec source:** the PR description. The ticket it cites — FO-60, `https://vikunja.thepit.space/tasks/316` — could not be read (see *Could not verify*), so the contract judged here is the description's own table: five Targets take `NONINTERACTIVE=1` on the command line and gate on the plan judge; with the variable unset each asks for its word; `pre` takes the judge too. **S-1 — ADVISORY — the Summary's claim about the interactive path is false for two of the five Targets.** Quote (PR description, Summary): *"With the variable unset, every Target asks for the word exactly as it does today."* `Makefile:422` (`service_apply`) and `Makefile:547` (`runner-service`) add `$(call confirm_word,$(PROD_WORD))`; at the base revision neither Target asked for anything. Measured at both revisions with the same stub toolchain and `prod` on stdin: | Revision | Command | Result | |---|---|---| | base `8204741` | `make service` | `--check --diff`, then the real playbook, rc 0 — **no prompt in the log** | | head `8d47655` | `make service` (stdin closed) | `Type "prod" to run the playbook above for real:` → `aborted: environment word not typed`, rc 2, real playbook never ran | The behaviour matches the body's own table (`service` → `Type "prod"`) and its evidence row, so the code is right and the sentence is wrong. Smallest fix: one clause — *"every Target that asked for the word still does; `service` and `runner-service` now ask for it too."* ## Standards Standard read from the head worktree: `AGENTS.md` (§Secrets, §State, §Code comments, §Pull requests), `docs/adr/`, and the org records in `olympus/workshop` `docs/adr/` at `origin/main` — 13 records, of which ADR-0011 (*a deploy never destroys or replaces*) is the one this change implements, and ADR-0009 (*PROD deployed automatically through a merge*) the one it serves. **T-1 — ADVISORY — `guest_apply` hardcodes the judge's name, against the macro's own stated contract.** `Makefile:407-410` documents the macro as taking *"$(1) the -target set (PROD's or PRE's) and $(2) the word to type — both parameters, so a rehearsal runs the same gate as PROD without a second copy of it."* `Makefile:414` now passes the literal `guest` as the judge's report name, so a second caller would print `guest: the plan loses nothing.` about another Stack's plan. Latent, not live: `guest` is the only caller (`Makefile:504`), and `pre` calls `confirm_and_apply` directly with its own name (`Makefile:759`). Fix: a third parameter — `$(call guest_apply,$(GUEST_TARGETS),$(PROD_WORD),guest)`. No documented-standard breach found: - **ADR-0011** is enforced, not weakened: the non-interactive gate refuses a plan carrying `delete`/`create`, removes `plan.out`, and applies nothing (driven, row `d2` below). - **AGENTS.md §Code comments** ("keep comments to a minimum") was checked against the file's own practice rather than its words: 275 of 743 lines were comments at the base, 290 of 786 at the head — the same 37%, and this Makefile documents its gates in prose by convention. Nothing charged. - **Not a CI-gate change**, by the four things that define one: the workflow files, the required context names, the job names and the target each job runs are all unchanged — `guest-plan-check`, `edge-plan-check` and `runner-guest-plan-check` still call `plan_judged` (`Makefile:321`), whose recipe this diff does not touch. The gate's own `if:`/step lines are untouched. - The `NONINTERACTIVE_MODE` / `NONINTERACTIVE_NOTE` shape is the one already merged in `infra-secrets` (`Makefile:83-96` at its `origin/main`, for SC-26) and `infra-silo` (SL-33). This PR follows a decided pattern rather than opening one. ## Verified Head resolved on the host before and after the run: `git ls-remote origin refs/pull/100/head` = `8d47655c4ec231d061b7f7006af57c27ab17ff03`, on a detached worktree at that SHA. `list_pull_request_files` = one file (`Makefile`), matching the diff. | Probe | Result | |---|---| | `mise exec -- make check` at head | **rc 0**, 36 `ok` lines (matches the body's "36 assertions") | | `make guest NONINTERACTIVE=1`, clean plan | judge `ok … would be created`, `guest: the plan loses nothing.`, then `tofu apply`, rc 0 | | `make guest NONINTERACTIVE=1`, replace plan | `FAIL … would be replaced`, `aborted: the plan would destroy or replace`, **`tofu apply` absent from the call log**, `plan.out` removed, rc 2 | | `make guest`, stdin closed | `Type "prod"` → `aborted: environment word not typed`, no apply, rc 2 | | `NONINTERACTIVE=1 make guest` (exported), word typed | the note printed, `Type "prod"` asked, **judge not invoked**, apply after the word — mode not activated | | `make service NONINTERACTIVE=1`, clean check | check run, `the check run above is the gate`, real playbook, rc 0 | | `make service NONINTERACTIVE=1`, failing check | check run, real playbook **never called**, rc 2 (recipes run under `-eu -o pipefail`, `Makefile:12`) | | `make runner-service NONINTERACTIVE=1`, failing check | same: check only, rc 2 | | `make -n prod NONINTERACTIVE=1` | the recursive make keeps the mode: three `if [ '1' = 1 ]` arms (guest, edge, service), and the deployer's `make prod NONINTERACTIVE=1` therefore reaches the new gate | | `make -n pre NONINTERACTIVE=1` | `PLAN_CHECK_NAME=pre python3 …/guest-plan-check.py` — the report names the rehearsal | | unreadable plan through the judge | `the plan could not be read`, rc 2 → the `if !` refuses (fails closed) | CI at this SHA, read live: `plan / guest-plan-check`, `plan / edge-plan-check`, `plan / runner-guest-plan-check` all `success` (run 164) — so no unexplained destroy or drift on any changed Stack. `pr-checks` (run 165) was still running when read (`fmt-check` pending, others waiting). ## Could not verify - **FO-60 could not be read.** `scripts/fetch-vikunja-task.sh 4 60` and `fetch-vikunja-task-by-id.sh 316` both answered `key from …/minos/.env: /projects http=401`, and no key in either `.env` returned 200; the anonymous route answers 401 too. The spec axis therefore rests on the PR description, not on the ticket's acceptance criteria. If FO-60 asks for something the description does not say, this review could not have seen it. - **`make pre` end to end** needs the age-sealed PRE credential pair; only its composition was driven (`PLAN_CHECK_NAME=pre`), not a run. - **The interactive path against a real terminal**: stdin was fed by a pipe, not a tty. - **A plan against real state**: the plan checks' CI results are cited; I did not run `tofu plan` against the store. ## Named, not charged - `docs/runbooks/0001-deploy-and-rollback.md:219` and `:686` say `make service` runs the check and then the playbook for real — both now omit the word gate. The body defers the runbook to FO-50 and `docs/deploy.md` to FO-64 ("this changes the Targets they will call"); that deferral is disclosed, so nothing is charged, and the two lines are named here so a later round can check it was honoured. I could not confirm those tickets exist — the tracker refused the read. - `pre`'s trailing service pair (`Makefile:764`, `--check --diff && playbook`) has no word gate at all. Untouched by this diff; pre-existing. - `guest_apply`'s third argument is the only place a judge's name is not passed by the caller — the same seam `pre` shows the fix for; charged once, as T-1. ## Summary | Axis | Findings | Worst | |---|---|---| | Standards | 1 ADVISORY | T-1 — `guest_apply` hardcodes the judge's name, latent only | | Spec | 1 ADVISORY | S-1 — the body's claim about the unset-variable path is false for `service` / `runner-service` | **Two advisories, no blockers: the recommendation is merge.** Both are one-clause fixes and can ride a later change; the behaviour the body promises was reproduced at every branch, including the refusal that keeps a destroy or replace from being applied.
pit merged commit 7e212714af into main 2026-11-12 07:56:00 +00:00
pit deleted branch hermes/FO-60-the-five-apply-targets-run-without-a-prom 2026-11-12 07:56:00 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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-forge!100
No description provided.