The forge's journals are persistent by declaration (FO-65) #91

Merged
pit merged 2 commits from hermes/FO-65-the-forge-s-journals-are-persistent-by-d into main 2026-11-11 11:44:40 +00:00
Member

Implements FO-65

Summary

The journald persistence is declared in the two service trees whose Guests the deploy will change, as infra-cockpit declares it for the Semaphore pair:

forgejo/service/
  roles/
    journal/        # new: the drop-in, and the restart that applies it
    forgejo/
    forgejo_mcp/
  site.yml          # journal, then forgejo
runner/service/
  roles/
    journal/        # new: the same declaration, for 146
    runner/
  site.yml          # journal, then runner

Each role writes one file, and restarts journald only when it changed:

/etc/systemd/journald.conf.d/persistent.conf
  # Managed by infra-forge (<tree>/roles/journal).
  [Journal]
  Storage=persistent

persistent is what creates /var/log/journal; both Guests carry it today, so
this changes nothing on them and holds a Guest rebuilt from the role to the same
state. journald's default, auto, would otherwise write to disk only where that
directory happens to survive the image.

One copy per tree rather than one shared role: forgejo/service/ and
runner/service/ are separate playbooks with their own inventories, ansible.cfg
and Targets, and neither has ever read the other's roles/. A shared role would
put one tree's playbook on the other tree's directory.

Evidence

  • Before: no file in either tree mentions /var/log/journal or journald (grep -rn journald docs forgejo runner → nothing); a rebuild kept persistent storage only by what the image shipped.
  • After: mise exec -- make syntax-check exits 0 — both playbooks parse with the new role resolved in each.
  • After: the role run in check mode against a host with no /etc/systemd/journald.conf.d, both trees, failed=0 and the diff the copy task would write:
+ # Managed by infra-forge (forgejo/service/roles/journal).
+ [Journal]
+ Storage=persistent
RUNNING HANDLER [journal : restart journald]
localhost : ok=3  changed=3  unreachable=0  failed=0
  • After: mise exec -- make check exits 0 — env-check (pin and map agree) and docs-check (5 assertions hold).
  • Not rehearsed on PRE: this agent's profile carries no ~/.secrets/proxmox/pre.age, so make pre is unavailable and the first-deploy half of the acceptance criterion is unproven here. It is exercised by the first deploy after the merge.

Merge Danger

Door: two-way — a role that writes one drop-in and restarts journald; nothing is destroyed, and reverting leaves that file behind on each Guest until a follow-up removes it.

Blast Radius: the two Guests' journald configuration — 141 and 146, the next time each service layer runs.

Implements [FO-65](https://vikunja.thepit.space/tasks/321) ## Summary The journald persistence is declared in the two service trees whose Guests the deploy will change, as `infra-cockpit` declares it for the Semaphore pair: ```text forgejo/service/ roles/ journal/ # new: the drop-in, and the restart that applies it forgejo/ forgejo_mcp/ site.yml # journal, then forgejo runner/service/ roles/ journal/ # new: the same declaration, for 146 runner/ site.yml # journal, then runner ``` Each role writes one file, and restarts journald only when it changed: ```text /etc/systemd/journald.conf.d/persistent.conf # Managed by infra-forge (<tree>/roles/journal). [Journal] Storage=persistent ``` `persistent` is what creates `/var/log/journal`; both Guests carry it today, so this changes nothing on them and holds a Guest rebuilt from the role to the same state. journald's default, `auto`, would otherwise write to disk only where that directory happens to survive the image. One copy per tree rather than one shared role: `forgejo/service/` and `runner/service/` are separate playbooks with their own inventories, `ansible.cfg` and Targets, and neither has ever read the other's `roles/`. A shared role would put one tree's playbook on the other tree's directory. ## Evidence - **Before:** no file in either tree mentions `/var/log/journal` or `journald` (`grep -rn journald docs forgejo runner` → nothing); a rebuild kept persistent storage only by what the image shipped. - **After:** `mise exec -- make syntax-check` exits 0 — both playbooks parse with the new role resolved in each. - **After:** the role run in check mode against a host with no `/etc/systemd/journald.conf.d`, both trees, `failed=0` and the diff the copy task would write: ```text + # Managed by infra-forge (forgejo/service/roles/journal). + [Journal] + Storage=persistent RUNNING HANDLER [journal : restart journald] localhost : ok=3 changed=3 unreachable=0 failed=0 ``` - **After:** `mise exec -- make check` exits 0 — `env-check` (pin and map agree) and `docs-check` (5 assertions hold). - **Not rehearsed on PRE:** this agent's profile carries no `~/.secrets/proxmox/pre.age`, so `make pre` is unavailable and the first-deploy half of the acceptance criterion is unproven here. It is exercised by the first deploy after the merge. ## Merge Danger **Door:** two-way — a role that writes one drop-in and restarts journald; nothing is destroyed, and reverting leaves that file behind on each Guest until a follow-up removes it. **Blast Radius:** the two Guests' journald configuration — 141 and 146, the next time each service layer runs.
ticket-dispatch: the forge's journals are persistent by declaration (FO-65)
All checks were successful
plan / guest-plan-check (pull_request) Successful in 19s
plan / edge-plan-check (pull_request) Successful in 22s
pr-checks / env-check (pull_request) Successful in 18s
pr-checks / fmt-check (pull_request) Successful in 17s
pr-checks / validate (pull_request) Successful in 22s
pr-checks / syntax-check (pull_request) Successful in 18s
pr-checks / docs-check (pull_request) Successful in 16s
d7bba65fc4
Both Guests the deploy changes — the forge on 141 and the runner on 146 —
already carry /var/log/journal, and nothing in the repo said so. A rebuild
would have kept it only by the image's accident, and journald's default
(`auto`) writes to disk only where that directory happens to exist, so the
boot before a failed deploy would have gone with it.

The `journal` role declares it, as `semaphore/service/roles/journal` does in
`infra-cockpit`: a drop-in under /etc/systemd/journald.conf.d setting
Storage=persistent, and a journald restart so the first deploy creates the
directory. One copy per service tree, because each tree is its own playbook
with its own inventory and Target, and neither has ever read the other's
roles.

architecture.md names the role and counts three in the forge's play.
Member

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

**Review started** (round 1/5) on d7bba65fc4d7b4c06da662689374da65febdbc82 — reading the diff now.
bot-minos approved these changes 2026-11-10 22:16:38 +00:00
bot-minos left a comment

repo: olympus/infra-forge | pr: 91 | head: d7bba65fc4 | round: 1/5 | verdict: APPROVE

Round 1/5 — the thread carried no review before this one, so the thread's count and the dispatch's agree.

Recommendation: merge

0 BLOCKER, 2 counted ADVISORY. The recommendation does not turn on the count: both are advice, and neither is dressed up as a defect.

Spec source. FO-65 — project 4 (infra-forge), index 65, global id 321 — read live from the tracker this round. The tracker's MCP tools are not mounted in this session; the read went through fetch-vikunja-task-by-id.sh 321, which is why it worked where a bare curl at /api/v1/tasks/321 answered 401. The ticket's own text is the contract below.

Standards

ADVISORY — the first acceptance criterion is declared, not exercised. forgejo/service/roles/journal/handlers/main.yml:1-5, runner/service/roles/journal/handlers/main.yml:1-5

docs/agents/workflow.md §The completion bar asks that "Every acceptance criterion or user story in the issue has been exercised on PRE, each reported pass/fail with the command that produced it", and §2 asks for a PRE rehearsal at all. FO-65's criterion 1 is "A Guest rebuilt from these roles carries /var/log/journal after its first deploy". The PR states plainly that it was not rehearsed (no ~/.secrets/proxmox/pre.age, so make pre is unavailable to the author). workflow.md:39-41 sanctions exactly that hand-off — "say so in the PR and let the Operator run the Targets that need it" — which is why this is advice and not a block. What it needs is one command the Operator owns, run before or after the merge:

mise exec -- make pre        # from a checkout holding ~/.secrets/proxmox/pre.age
# then, on the PRE Guest: ls -d /var/log/journal && journalctl --list-boots

ADVISORY — the runner Guest is documented at half the depth the forge Guest is. docs/architecture.md:55-69 vs docs/architecture.md:93-97

The forge section gained the journal paragraph (93-97): the drop-in's path, Storage=persistent, why a rebuild needs it. §"The runner's Guest" still says only "The daemon is the only Service on it", while the identical declaration now lands on 146. The at-a-glance block (150-152) does name the role in both trees, so no page is stale — a reader of the runner section just does not learn the change. One clause, e.g. after line 63.

Checked and not charged

  • AGENTS.md §Code comments ("keep comments to a minimum … propose a docs page under docs/ instead"). The role's 7 lines of rationale would fail a literal reading. But the repo's own practice is the reading: forgejo/service/roles/forgejo/tasks/main.yml spends 121 of its 479 lines on why-not-what comments, and runner/service/roles/runner/tasks/main.yml opens with a five-line rationale. The rule is house practice read as no narration, and the new file matches its neighbours. Not a finding.
  • The role written once per tree. The two copies are byte-identical but for the Managed by path. forgejo/service/ansible.cfg sets no roles_path, and neither tree has ever read the other's roles/, so a shared role means inventing a shared path for 30 lines of stable drop-in — and infra-cockpit's semaphore/service/roles/journal/ (the shape FO-65 names as the precedent) has it once per tree too. Not a finding.

Spec

Requirement (FO-65) State
"Declare a persistent journal for the forgejo role on 141 and for the runner's role on 146, as the cockpit's journal role does." met — forgejo/service/site.yml:5, runner/service/site.yml:5 put journal first in each play; the role is the cockpit's, per-tree.
"Both Guests already carry /var/log/journal. This records the intent and survives a rebuild." met — the intent is one file in the tree; a rebuild re-applies it.
AC 1 — "A Guest rebuilt from these roles carries /var/log/journal after its first deploy." partial — implemented and rendered, not exercised; see the first advisory. One finding, two citations: it is the same gap the completion bar names, counted once.
AC 2 — "mise exec -- make check exits 0." met — reproduced below.

No scope creep. The only change the ticket did not ask for is the documentation edit, and that is the repo's own rule (docs/index.md §Architecture, "update when the topology changes"), not the author's initiative. The three-role count in the prose matches forgejo/service/site.yml, which now runs journal, forgejo in one play and forgejo_mcp in the next.

Verified

Worktree at d7bba65 off 19e3563 (= origin/main, the merge-base); one commit in the range.

Command Result
mise exec -- make check exit 0 — env-check: pin matches infra-secrets@137870c…, env.map 19 names all declared; docs-check: all 5 assertions (50 relative links, 20 fragments, 9 ADR rows, section indexes, 21 documents in the wiki manifest); fmt-check clean.
mise exec -- make syntax-check exit 0 in both trees — after ansible-galaxy collection install -r requirements.yml, which is what make deps does; without it the pre-existing forgejo role fails to resolve community.postgresql.postgresql_user, exactly as the author's hand-off notes.
the journal role, --check --diff, against a host with no /etc/systemd/journald.conf.d localhost : ok=3 changed=3 failed=0; the rendered diff is exactly # Managed by infra-forge (forgejo/service/roles/journal). / [Journal] / Storage=persistent, and RUNNING HANDLER … restart journald fires. The PR's evidence reproduces byte-for-byte.
the same copy task to a scratch destination, run twice run 1 changed=2 plus the handler; run 2 ok=2 changed=0, no handler — idempotent, so the restart is notified on change only and the runbook's "a second run reports 0 changed" still holds.
man journald.conf at the head review host persistent: "stored preferably on disk, i.e. below the /var/log/journal hierarchy (which is created if needed)"; auto: "behaves like persistent if the /var/log/journal directory exists, and volatile otherwise"; SystemMaxUse: "defaults to 10% … capped to 4G". Every claim in the role's comments is true.
git grep at 19e3563 for journald and /var/log/journal nothing — the "Before" claim holds.
diff of the two role copies one line differs: the Managed by path, each naming its own tree.
CI on d7bba65 all seven contexts green: env-check, fmt-check, validate, syntax-check, docs-check, guest-plan-check, edge-plan-check.

Files, all accounted for and passed: docs/architecture.md, forgejo/service/roles/journal/{tasks,handlers}/main.yml, forgejo/service/site.yml, runner/service/roles/journal/{tasks,handlers}/main.yml, runner/service/site.yml.

Not verified, and why

  • The restart running for real. I hold no key to 141 or 146, and the handler on a live Guest is the one thing that would prove journald accepts this drop-in. My run was --check, where ansible.builtin.systemd reports without restarting; restarting the journal of the host this review runs on is not mine to do. This is the first advisory, and the reason the merge carries a leftover action for the Operator rather than a clean bill.
  • "Both Guests already carry /var/log/journal today" — the ticket asserts it as well; no credential reached either Guest from here. If it were false the change still holds, since persistent creates the directory, which is its point.
  • PRE. No pre.age in this profile, so make pre is unavailable to the reviewer too; make pre and journalctl --list-boots on PRE are the Operator's.

Summary

Standards: 2 findings, both ADVISORY; the worst is that FO-65's criterion 1 has never run against a live systemd host, which the PR discloses and one make pre settles. Spec: 0 blocking findings, 1 partial that is the same unexercised criterion, counted once — so nothing to name as a separate worst. Merge.

<!-- minos review-loop: repo=olympus/infra-forge pr=91 head=d7bba65fc4d7b4c06da662689374da65febdbc82 round=1/5 axes=standards,spec --> repo: olympus/infra-forge | pr: 91 | head: d7bba65fc4d7b4c06da662689374da65febdbc82 | round: 1/5 | verdict: APPROVE Round 1/5 — the thread carried no review before this one, so the thread's count and the dispatch's agree. Recommendation: merge 0 BLOCKER, 2 counted ADVISORY. The recommendation does not turn on the count: both are advice, and neither is dressed up as a defect. **Spec source.** FO-65 — project `4` (`infra-forge`), index 65, global id 321 — read live from the tracker this round. The tracker's MCP tools are not mounted in this session; the read went through `fetch-vikunja-task-by-id.sh 321`, which is why it worked where a bare `curl` at `/api/v1/tasks/321` answered `401`. The ticket's own text is the contract below. ## Standards **ADVISORY — the first acceptance criterion is declared, not exercised.** `forgejo/service/roles/journal/handlers/main.yml:1-5`, `runner/service/roles/journal/handlers/main.yml:1-5` `docs/agents/workflow.md` §The completion bar asks that "Every acceptance criterion or user story in the issue has been exercised on PRE, each reported pass/fail with the command that produced it", and §2 asks for a PRE rehearsal at all. FO-65's criterion 1 is "A Guest rebuilt from these roles carries `/var/log/journal` after its first deploy". The PR states plainly that it was not rehearsed (`no ~/.secrets/proxmox/pre.age`, so `make pre` is unavailable to the author). `workflow.md:39-41` sanctions exactly that hand-off — "say so in the PR and let the Operator run the Targets that need it" — which is why this is advice and not a block. What it needs is one command the Operator owns, run before or after the merge: ```sh mise exec -- make pre # from a checkout holding ~/.secrets/proxmox/pre.age # then, on the PRE Guest: ls -d /var/log/journal && journalctl --list-boots ``` **ADVISORY — the runner Guest is documented at half the depth the forge Guest is.** `docs/architecture.md:55-69` vs `docs/architecture.md:93-97` The forge section gained the journal paragraph (93-97): the drop-in's path, `Storage=persistent`, why a rebuild needs it. §"The runner's Guest" still says only "The daemon is the only Service on it", while the identical declaration now lands on 146. The at-a-glance block (150-152) does name the role in both trees, so no page is stale — a reader of the runner section just does not learn the change. One clause, e.g. after line 63. ### Checked and not charged - **`AGENTS.md` §Code comments** ("keep comments to a minimum … propose a docs page under `docs/` instead"). The role's 7 lines of rationale would fail a literal reading. But the repo's own practice is the reading: `forgejo/service/roles/forgejo/tasks/main.yml` spends 121 of its 479 lines on why-not-what comments, and `runner/service/roles/runner/tasks/main.yml` opens with a five-line rationale. The rule is house practice read as *no narration*, and the new file matches its neighbours. Not a finding. - **The role written once per tree.** The two copies are byte-identical but for the `Managed by` path. `forgejo/service/ansible.cfg` sets no `roles_path`, and neither tree has ever read the other's `roles/`, so a shared role means inventing a shared path for 30 lines of stable drop-in — and `infra-cockpit`'s `semaphore/service/roles/journal/` (the shape FO-65 names as the precedent) has it once per tree too. Not a finding. ## Spec | Requirement (FO-65) | State | | --- | --- | | "Declare a persistent journal for the `forgejo` role on 141 and for the runner's role on 146, as the cockpit's journal role does." | met — `forgejo/service/site.yml:5`, `runner/service/site.yml:5` put `journal` first in each play; the role is the cockpit's, per-tree. | | "Both Guests already carry `/var/log/journal`. This records the intent and survives a rebuild." | met — the intent is one file in the tree; a rebuild re-applies it. | | AC 1 — "A Guest rebuilt from these roles carries `/var/log/journal` after its first deploy." | **partial** — implemented and rendered, not exercised; see the first advisory. One finding, two citations: it is the same gap the completion bar names, counted once. | | AC 2 — "`mise exec -- make check` exits 0." | met — reproduced below. | No scope creep. The only change the ticket did not ask for is the documentation edit, and that is the repo's own rule (`docs/index.md` §Architecture, "update when the topology changes"), not the author's initiative. The three-role count in the prose matches `forgejo/service/site.yml`, which now runs `journal`, `forgejo` in one play and `forgejo_mcp` in the next. ## Verified Worktree at `d7bba65` off `19e3563` (= `origin/main`, the merge-base); one commit in the range. | Command | Result | | --- | --- | | `mise exec -- make check` | exit 0 — `env-check`: pin matches `infra-secrets@137870c…`, `env.map` 19 names all declared; `docs-check`: all 5 assertions (50 relative links, 20 fragments, 9 ADR rows, section indexes, 21 documents in the wiki manifest); `fmt-check` clean. | | `mise exec -- make syntax-check` | exit 0 in both trees — after `ansible-galaxy collection install -r requirements.yml`, which is what `make deps` does; without it the pre-existing `forgejo` role fails to resolve `community.postgresql.postgresql_user`, exactly as the author's hand-off notes. | | the `journal` role, `--check --diff`, against a host with no `/etc/systemd/journald.conf.d` | `localhost : ok=3 changed=3 failed=0`; the rendered diff is exactly `# Managed by infra-forge (forgejo/service/roles/journal).` / `[Journal]` / `Storage=persistent`, and `RUNNING HANDLER … restart journald` fires. The PR's evidence reproduces byte-for-byte. | | the same copy task to a scratch destination, run twice | run 1 `changed=2` plus the handler; run 2 `ok=2 changed=0`, no handler — idempotent, so the restart is notified on change only and the runbook's "a second run reports `0 changed`" still holds. | | `man journald.conf` at the head review host | `persistent`: "stored preferably on disk, i.e. below the `/var/log/journal` hierarchy (which is created if needed)"; `auto`: "behaves like `persistent` if the `/var/log/journal` directory exists, and `volatile` otherwise"; `SystemMaxUse`: "defaults to 10% … capped to 4G". Every claim in the role's comments is true. | | `git grep` at `19e3563` for `journald` and `/var/log/journal` | nothing — the "Before" claim holds. | | `diff` of the two role copies | one line differs: the `Managed by` path, each naming its own tree. | | CI on `d7bba65` | all seven contexts green: `env-check`, `fmt-check`, `validate`, `syntax-check`, `docs-check`, `guest-plan-check`, `edge-plan-check`. | Files, all accounted for and passed: `docs/architecture.md`, `forgejo/service/roles/journal/{tasks,handlers}/main.yml`, `forgejo/service/site.yml`, `runner/service/roles/journal/{tasks,handlers}/main.yml`, `runner/service/site.yml`. ## Not verified, and why - **The restart running for real.** I hold no key to 141 or 146, and the handler on a live Guest is the one thing that would prove journald accepts this drop-in. My run was `--check`, where `ansible.builtin.systemd` reports without restarting; restarting the journal of the host this review runs on is not mine to do. This is the first advisory, and the reason the merge carries a leftover action for the Operator rather than a clean bill. - **"Both Guests already carry `/var/log/journal` today"** — the ticket asserts it as well; no credential reached either Guest from here. If it were false the change still holds, since `persistent` creates the directory, which is its point. - **PRE.** No `pre.age` in this profile, so `make pre` is unavailable to the reviewer too; `make pre` and `journalctl --list-boots` on PRE are the Operator's. ## Summary Standards: 2 findings, both ADVISORY; the worst is that FO-65's criterion 1 has never run against a live systemd host, which the PR discloses and one `make pre` settles. Spec: 0 blocking findings, 1 partial that is the same unexercised criterion, counted once — so nothing to name as a separate worst. Merge.
Merge branch 'main' into hermes/FO-65-the-forge-s-journals-are-persistent-by-d
All checks were successful
plan / guest-plan-check (pull_request) Successful in 22s
plan / edge-plan-check (pull_request) Successful in 20s
pr-checks / env-check (pull_request) Successful in 14s
pr-checks / fmt-check (pull_request) Successful in 14s
pr-checks / validate (pull_request) Successful in 21s
pr-checks / syntax-check (pull_request) Successful in 18s
pr-checks / docs-check (pull_request) Successful in 15s
0d832cbe57
pit merged commit dd2a3f1783 into main 2026-11-11 11:44:40 +00:00
pit deleted branch hermes/FO-65-the-forge-s-journals-are-persistent-by-d 2026-11-11 11:44:40 +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-forge!91
No description provided.