Semaphore deploys infra-monitoring (THE-129) #42

Merged
pit merged 1 commit from wave2/monitoring-121 into main 2026-12-03 18:44:18 +00:00
Owner

Summary

infra-monitoring joins the projects Stack, and this repository's vendored scripts/env.sh moves to the pin that names monitoring — the companion change to olympus/infra-monitoring's first Guest (THE-129).

 semaphore/projects/variables.tf
-  default = [..., "infra-media"]
+  default = [..., "infra-media", "infra-monitoring"]
 scripts/env.sh                   # pin 804e62b8… (classify() knows `monitoring`)
 docs/deploy.md                   # six ci-<repo> users → seven

The line creates the project, the deploy template and the ci-monitoring user; the Operator mints that user's token once, and sets the repository's two Actions Variables from make projects-ids.

Evidence

  • Before: the projects Stack's default list carried six repositories; scripts/env.sh classified six CI actors.
    After: make check rc 0 (the whole credential-free floor, including the vendored pin and the drift suites); tofu fmt -recursive -check clean; tofu validate in semaphore/projects: Success! The configuration is valid.
  • The new pin is 804e62b8c4bd72888dfc603a1801be68ea3193d9b53e3051e72f755f8fb1eb72, the body of infra-secrets' scripts/env.sh in olympus/infra-secrets#70.
  • The project and user are created by this repository's own deploy on merge; nothing is created by hand.

Merge Danger

Door: two-way — a list entry and a vendored file; a revert restores both.

Blast Radius: low — one new project, template and user in Semaphore; no existing project changes, and the infra-monitoring user starts no task until a workflow in that repository asks it to.

## Summary `infra-monitoring` joins the projects Stack, and this repository's vendored `scripts/env.sh` moves to the pin that names `monitoring` — the companion change to `olympus/infra-monitoring`'s first Guest (THE-129). ```diff semaphore/projects/variables.tf - default = [..., "infra-media"] + default = [..., "infra-media", "infra-monitoring"] scripts/env.sh # pin 804e62b8… (classify() knows `monitoring`) docs/deploy.md # six ci-<repo> users → seven ``` The line creates the project, the `deploy` template and the `ci-monitoring` user; the Operator mints that user's token once, and sets the repository's two Actions Variables from `make projects-ids`. ## Evidence - **Before:** the projects Stack's default list carried six repositories; `scripts/env.sh` classified six CI actors. **After:** `make check` rc 0 (the whole credential-free floor, including the vendored pin and the drift suites); `tofu fmt -recursive -check` clean; `tofu validate` in `semaphore/projects`: *Success! The configuration is valid.* - The new pin is `804e62b8c4bd72888dfc603a1801be68ea3193d9b53e3051e72f755f8fb1eb72`, the body of `infra-secrets`' `scripts/env.sh` in `olympus/infra-secrets#70`. - The project and user are created by this repository's own deploy on merge; nothing is created by hand. ## Merge Danger **Door:** two-way — a list entry and a vendored file; a revert restores both. **Blast Radius:** low — one new project, template and user in Semaphore; no existing project changes, and the `infra-monitoring` user starts no task until a workflow in that repository asks it to.
Semaphore deploys infra-monitoring, and env.sh moves to the new pin (THE-129)
All checks were successful
plan / runner-guest-plan-check (pull_request_target) Successful in 19s
plan / guest-plan-check (pull_request_target) Successful in 19s
plan / projects-plan-check (pull_request_target) Successful in 19s
pr-checks / check (pull_request) Successful in 47s
825a2eb3a6
One line in the projects Stack's `repositories`: its deploy creates the
project, the `deploy` template and the `ci-monitoring` user, exactly as it did
for infra-media. The vendored `scripts/env.sh` moves to the pin that names
`monitoring`, so this repository's copy is the interface's current body too.
Author
Owner

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

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

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

**Review started** (round 0/5) on 825a2eb3a665117e4ceece2602a548cf2e655c0a — reading the diff now.
bot-minos approved these changes 2026-12-03 18:28:49 +00:00
bot-minos left a comment

review: repo=olympus/infra-cockpit pr=42 head=825a2eb3a665117e4ceece2602a548cf2e655c0a round=0/5 verdict=merge

Recommendation: merge

Spec — THE-129 (fetched live: GET /api/issues/THE-129)

Item 1 asks for “the monitoring actor in the vendored scripts/env.sh” and “one line in infra-cockpit's semaphore/projects/variables.tf (that line creates the project, the deploy template and the ci-monitoring user)”. Both are present and both do what is claimed; the docs/deploy.md six→seven edit is the direct consequence of the new user row, not scope creep.

# Severity Where Finding
S1 ADVISORY semaphore/projects/projects.tf:48 (URL rendered from variables.tf:8) The repository resource will point at https://forgejo.thepit.space/olympus/infra-monitoring.git, and no such repository exists on the forge at review time: GET /api/v1/repos/olympus/infra-monitoring → 404, the org repo list has no infra-monitoring, and an anonymous git ls-remote falls through to a username prompt. Nothing triggers the template until that repo's deploy.yml calls it, so merging is safe — but THE-129's own item 1 puts repo bring-up before this line, and the order is inverted here. Merge the two so the project's first task cannot start against a missing clone.

No requirement is missing or partial; nothing is implemented that THE-129 did not ask for.

Standards

AGENTS.md §Rules / Secrets is the rule in play — “scripts/env.sh is vendored verbatim from infra-secrets and never edited — a changed byte is a red make env-check”. It holds.

# Severity Where Finding
N1 ADVISORY semaphore/projects/projects.tf:114-118 The comment still reads “a single user shared by six repositories … Six users is what makes ‘its own project only’ true”. This change makes it seven. The file is not in the diff, but the PR falsifies it; the fix is six→seven.

No BLOCKERs on this axis.

Verified by hand (worktree at 825a2eb)

  • make check → rc 0: the env pin, env tests, plan tests, plan-workflow tests, drift tests, tofu fmt -recursive -check -diff.
  • tofu init -backend=false && tofu validate in semaphore/projects → “Success! The configuration is valid.”
  • Offline tofu plan -refresh=false with the S3 backend stripped and an empty local state: 73 to add, 0 to change, 0 to destroy; it includes semaphoreui_project.deploy["infra-monitoring"], its deploy template, semaphoreui_user.ci["infra-monitoring"] (ci-monitoring) and the project membership — reproducing the PR body's claim about what the one line creates. All seven usernames rendered (ci-tracker, ci-forge, ci-secrets, ci-silo, ci-agents, ci-media, ci-monitoring) match docs/deploy.md:196-200 exactly.
  • Vendoring: the diff's scripts/env.sh is byte-identical (diff clean) to olympus/infra-secrets PR #70 head 372030ce's scripts/env.sh, and its header pin 804e62b8… equals the sha256 of its own body (scripts/env.sh:2 vs scripts/env.sh:78-79).
  • CI at this head: pr-checks / check (pull_request) success, plan / projects-plan-check (pull_request_target) success, and both guest plan checks success.

Not verified, and why

  • The real apply against PROD — no store or Semaphore credentials on this host. The repo's own gate, projects-plan-check, ran green in CI against PROD's record with -refresh=false; that is the strongest available evidence that this adds without replacing.
  • Whether the Semaphore provider validates a repository URL at create. Semaphore stores the URL on create and clones at task start, which is why S1 is an ordering advisory rather than a blocker.

Summary

Axis Findings Blockers Worst
Spec 1 0 S1 — the new project points at a repository that does not exist yet (ordering)
Standards 1 0 N1 — stale “six” comment in projects.tf

Two advisories, no blockers; the recommendation does not turn on volume. Merge, and fold both one-liners into the next touch of those files.

review: repo=olympus/infra-cockpit pr=42 head=825a2eb3a665117e4ceece2602a548cf2e655c0a round=0/5 verdict=merge Recommendation: merge ## Spec — THE-129 (fetched live: `GET /api/issues/THE-129`) Item 1 asks for “the `monitoring` actor in the vendored `scripts/env.sh`” and “one line in `infra-cockpit`'s `semaphore/projects/variables.tf` (that line creates the project, the deploy template and the `ci-monitoring` user)”. Both are present and both do what is claimed; the `docs/deploy.md` six→seven edit is the direct consequence of the new user row, not scope creep. | # | Severity | Where | Finding | |---|---|---|---| | S1 | ADVISORY | `semaphore/projects/projects.tf:48` (URL rendered from `variables.tf:8`) | The repository resource will point at `https://forgejo.thepit.space/olympus/infra-monitoring.git`, and no such repository exists on the forge at review time: `GET /api/v1/repos/olympus/infra-monitoring` → 404, the org repo list has no `infra-monitoring`, and an anonymous `git ls-remote` falls through to a username prompt. Nothing triggers the template until that repo's `deploy.yml` calls it, so merging is safe — but THE-129's own item 1 puts repo bring-up *before* this line, and the order is inverted here. Merge the two so the project's first task cannot start against a missing clone. | No requirement is missing or partial; nothing is implemented that THE-129 did not ask for. ## Standards `AGENTS.md` §Rules / Secrets is the rule in play — “`scripts/env.sh` is vendored verbatim from `infra-secrets` and never edited — a changed byte is a red `make env-check`”. It holds. | # | Severity | Where | Finding | |---|---|---|---| | N1 | ADVISORY | `semaphore/projects/projects.tf:114-118` | The comment still reads “a single user shared by six repositories … Six users is what makes ‘its own project only’ true”. This change makes it seven. The file is not in the diff, but the PR falsifies it; the fix is six→seven. | No BLOCKERs on this axis. ## Verified by hand (worktree at 825a2eb) - `make check` → rc 0: the env pin, env tests, plan tests, plan-workflow tests, drift tests, `tofu fmt -recursive -check -diff`. - `tofu init -backend=false && tofu validate` in `semaphore/projects` → “Success! The configuration is valid.” - Offline `tofu plan -refresh=false` with the S3 backend stripped and an empty local state: **73 to add, 0 to change, 0 to destroy**; it includes `semaphoreui_project.deploy["infra-monitoring"]`, its `deploy` template, `semaphoreui_user.ci["infra-monitoring"]` (`ci-monitoring`) and the project membership — reproducing the PR body's claim about what the one line creates. All seven usernames rendered (`ci-tracker`, `ci-forge`, `ci-secrets`, `ci-silo`, `ci-agents`, `ci-media`, `ci-monitoring`) match `docs/deploy.md:196-200` exactly. - Vendoring: the diff's `scripts/env.sh` is byte-identical (`diff` clean) to `olympus/infra-secrets` PR #70 head `372030ce`'s `scripts/env.sh`, and its header pin `804e62b8…` equals the sha256 of its own body (`scripts/env.sh:2` vs `scripts/env.sh:78-79`). - CI at this head: `pr-checks / check (pull_request)` success, `plan / projects-plan-check (pull_request_target)` success, and both guest plan checks success. ## Not verified, and why - The real apply against PROD — no store or Semaphore credentials on this host. The repo's own gate, `projects-plan-check`, ran green in CI against PROD's record with `-refresh=false`; that is the strongest available evidence that this adds without replacing. - Whether the Semaphore provider validates a repository URL at create. Semaphore stores the URL on create and clones at task start, which is why S1 is an ordering advisory rather than a blocker. ## Summary | Axis | Findings | Blockers | Worst | |---|---|---|---| | Spec | 1 | 0 | S1 — the new project points at a repository that does not exist yet (ordering) | | Standards | 1 | 0 | N1 — stale “six” comment in `projects.tf` | Two advisories, no blockers; the recommendation does not turn on volume. Merge, and fold both one-liners into the next touch of those files.
pit merged commit 258db42a64 into main 2026-12-03 18:44:18 +00:00
pit deleted branch wave2/monitoring-121 2026-12-03 18:44:18 +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-cockpit!42
No description provided.