The apt cache refreshes report no change, so the drift check reads zero (THE-126) #116

Merged
pit merged 1 commit from hermes/THE-126-apt-cache-no-drift into main 2026-12-03 06:36:00 +00:00
Owner

paperclip:THE-126

Summary

The drift check's runner layer read changed=2 on every run. Both apt cache refreshes answer changed under --check whenever the cache has passed cache_valid_time, which is the state every daily run finds it in: check mode cannot update the cache and reports the intent as a change. The install below each refresh is the task that names the package that moved, so neither refresh reports one of its own.

 runner/service/roles/unattended_upgrades/tasks/main.yml
   ansible.builtin.apt:
     update_cache: true
     cache_valid_time: 3600
+  changed_when: false

 runner/service/roles/runner/tasks/main.yml
   ansible.builtin.apt:
     update_cache: true
     cache_valid_time: 3600
+  changed_when: false

The same fix and the same reason as infra-tracker's unattended_upgrades and vikunja roles (olympus/infra-tracker#66).

Evidence

mise exec -- make runner-service-check — the Target the audit runs, read-only against PROD:

Tree PLAY RECAP
59d427c (main, before) ok=28 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0
this branch (after) ok=28 changed=0 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0
  • mise exec -- make check → exit 0 (env-check, the four test suites, fmt-check, docs-check: all 5 assertions hold).
  • ansible-playbook -i inventories/prod/hosts --syntax-check site.yml in runner/service → playbook: site.yml.
  • Not run, and why: the runner's service layer has no PRE inventory — make pre covers the forge's Guest — so there is no PRE rehearsal for this layer. Nothing was applied to any Guest, and the next scheduled drift run is the first that reads the merged tree.

Merge Danger

Door: two-way. Two changed_when lines and their reasons; no module argument, task, template or Target changes, and a revert restores the old reporting.

Blast Radius: none. It changes reporting only: both refreshes still update the cache on a real run, and the tasks that install report their own changes as before.

paperclip:THE-126 ## Summary The drift check's `runner` layer read `changed=2` on every run. Both apt cache refreshes answer `changed` under `--check` whenever the cache has passed `cache_valid_time`, which is the state every daily run finds it in: check mode cannot update the cache and reports the intent as a change. The install below each refresh is the task that names the package that moved, so neither refresh reports one of its own. ```diff runner/service/roles/unattended_upgrades/tasks/main.yml ansible.builtin.apt: update_cache: true cache_valid_time: 3600 + changed_when: false runner/service/roles/runner/tasks/main.yml ansible.builtin.apt: update_cache: true cache_valid_time: 3600 + changed_when: false ``` The same fix and the same reason as `infra-tracker`'s `unattended_upgrades` and `vikunja` roles ([olympus/infra-tracker#66](https://forgejo.thepit.space/olympus/infra-tracker/pulls/66)). ## Evidence `mise exec -- make runner-service-check` — the Target the audit runs, read-only against PROD: | Tree | PLAY RECAP | | --- | --- | | `59d427c` (main, before) | `ok=28 changed=2 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0` | | this branch (after) | `ok=28 changed=0 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0` | - `mise exec -- make check` → exit 0 (`env-check`, the four test suites, `fmt-check`, `docs-check: all 5 assertions hold`). - `ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` in `runner/service` → `playbook: site.yml`. - Not run, and why: the runner's service layer has no PRE inventory — `make pre` covers the forge's Guest — so there is no PRE rehearsal for this layer. Nothing was applied to any Guest, and the next scheduled drift run is the first that reads the merged tree. ## Merge Danger **Door:** two-way. Two `changed_when` lines and their reasons; no module argument, task, template or Target changes, and a revert restores the old reporting. **Blast Radius:** none. It changes reporting only: both refreshes still update the cache on a real run, and the tasks that install report their own changes as before.
The apt cache refreshes report no change, so the drift check reads zero (THE-126)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 27s
plan / edge-plan-check (pull_request_target) Successful in 29s
plan / runner-guest-plan-check (pull_request_target) Successful in 19s
pr-checks / env-check (pull_request) Successful in 18s
pr-checks / syntax-check (pull_request) Successful in 17s
pr-checks / fmt-check (pull_request) Successful in 18s
pr-checks / validate (pull_request) Successful in 26s
pr-checks / docs-check (pull_request) Successful in 15s
14bc15714b
The runner's service layer reported `changed=2` on every drift run: the two
`apt: update_cache` tasks answer `changed` under `--check` whenever the cache
has passed `cache_valid_time`, because check mode cannot update it and reports
the intent as a change. The install beside each one is what names the package
that moved, so neither refresh reports a change of its own.

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

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

**Review started** (round 1/5) on 14bc15714b43402896eba7d89a9d19657db1b9b7 — reading the diff now.
bot-minos approved these changes 2026-12-03 05:42:10 +00:00
bot-minos left a comment

olympus/infra-forge · PR #116 · reviewed head 14bc15714b43402896eba7d89a9d19657db1b9b7 · round 1/5 · verdict merge

The thread carried no prior review when this round opened, so the header count (1) is the dispatch's own.

Recommendation: merge

The claim, and where it comes from

  • Spec source: paperclip:THE-126, fetched live through the Paperclip API (GET /api/issues/THE-126 → 200, 11,610 bytes) with the review started. Its What to do names three outcomes: (1) changed_when: false on both runner-layer apt cache refreshes, with the reason in a comment beside each; (2) make runner-service-check re-run, changed=0 failed=0; (3) the next scheduled 03:15Z audit reading clean.
  • Claim under review: the runner service layer's daily --check rehearsal reports changed=2 on two apt cache refreshes that touch nothing on the Guest, hiding real drift behind noise; after this change it reports changed=0.

Standards — 0 findings

Read at the reviewed head: AGENTS.md (§Secrets, §State, §Privacy, §Code comments, §Toolchain), the org records in olympus/workshop docs/adr/ at 45790e78d0c4051c0f77546017692863a5d084e8 (0001–0015 + index), docs/agents/*.md, and this layer's gate note.

Rule Site Result
AGENTS.md:38 §Code comments — "Keep comments to a minimum… when something genuinely needs more explanation than the code can carry, propose a docs page" runner/service/roles/runner/tasks/main.yml:28-30; runner/service/roles/unattended_upgrades/tasks/main.yml:11-14 No charge. The comment is the reason the ticket asks for beside the task, and this repo's own precedent for the same fix carries the same shape: infra-tracker at origin/main, vikunja/service/roles/vikunja/tasks/main.yml:5-12 is a five-line rationale immediately above changed_when: false.
ADR-0009 — PROD deploys only through a merge to main whole diff Conforms: reporting-only change on the merge path; the PR applies nothing.
ADR-0011 — a deploy never destroys or replaces whole diff Not engaged: no module argument, task, template or Target changes.
AGENTS.md §Secrets; reviewer charter §3 diff, PR body, CI No literal secret in any of them.

changed_when pins the reported flag only — a cache update that fails still fails the task — so the change cannot mask drift in the other direction. Nothing in the repo parses a changed= count from a recap: .forgejo/workflows/deploy.yml:68 reads git diff --name-only over runner/, not the play's recap.

Spec — 0 findings

Ticket ask Where it landed Result
changed_when: false on both refreshes, reason in a comment runner/…/runner/tasks/main.yml:28-34; runner/…/unattended_upgrades/tasks/main.yml:11-18 Met, both sites.
Re-run make runner-service-check, changed=0 failed=0 PR body, §Evidence (PLAY RECAP pair) Claimed with a before/after recap. Not reproduced by me — see Could not verify; its mechanism I did reproduce.
Next 03:15Z audit reads clean — Pending on a later actor: the run does not exist yet. Not a finding.

The PR touches nothing the ticket did not ask for: two changed_when lines and their two comments, +9/−1 across the two files named in the ticket.

Verified, by hand (this round, at 14bc1571)

Probe Result
refs/pull/116/head resolved on the host 14bc15714b43402896eba7d89a9d19657db1b9b7 — equals the dispatch's head and the PR object's head.sha
Diff read in a worktree at that head, git diff 59d427c...HEAD 2 files, +9/−1, exactly the two role task files
Mechanism, red/green pair — scratch playbook, --check, localhost, cache mtime 2026-10-28T11:41:39Z (stale): base shape vs head shape, run in both orders order A (base→head): changed, then ok. Order B (head→base): ok, then changed. Cache mtime identical after both runs — check mode did not update it, so the only difference is the changed_when line
Third-site census — grep -rn update_cache at head: 7 sites the 2 this PR pins, 4 under forgejo/service/** (the forge layer's, outside this diff), and runner/service/roles/firewall/tasks/main.yml:10 (name: nftables + update_cache), probed: reports ok with the package present — which is why the author measured changed=2, not 3
mise exec -- make check exit 0 — env-check, the four suites, fmt-check, docs-check: all 5 assertions hold
ansible-playbook -i inventories/prod/hosts --syntax-check site.yml in runner/service playbook: site.yml, rc 0
CI at this head (newest entry per context, read 05:40Z) green: pr-checks env-check, fmt-check, validate, syntax-check, docs-check; plan guest, runner-guest, edge

(The root make syntax-check reds in my clone on community.postgresql for want of make deps' collections, and reds identically in a worktree at the base 59d427c — my clone's toolchain, not this diff. CI's own syntax-check is green at this head.)

Could not verify

  • make runner-service-check, the PROD --check --diff rehearsal. It refuses on this review host: error: required secret file .env is missing; composing no command. There is no .env in the clone or the worktree, and I did not fetch one — .env is make env's output, and writing a credential file into a review tree to prove a reporting change is not a trade a reviewer makes. The PLAY RECAP pair in the body is the author's measurement; what I reproduced is its mechanism, not their run.
  • Ticket ask 3 — the 03:15Z audit reading clean — has no artefact until that run exists.

Named, not charged

  • runner/service/roles/firewall/tasks/main.yml:10 — update_cache: true inside a name: nftables install, untouched by this PR. Probed above: reports ok, so it is not a missed third site.
  • The four update_cache sites under forgejo/service/** belong to the forge layer, outside this diff; a sibling branch for it (hermes/THE-125-apt-cache-no-drift) is on the remote as of this round's read.
  • No suite pins the two added lines: make check's credential-free floor has no task-level Ansible coverage, and this layer's documented gate is its --check run (.forgejo/workflows/deploy.yml:6). That is the layer's pre-existing shape, not something this diff introduced — so it is named here rather than charged, with the note that a future edit could drop the lines and only the daily audit would notice.

Summary

Axis Findings Blockers Worst finding
Standards 0 0 none
Spec 0 0 none

The recommendation is merge: no blocker stands, and the change does what THE-126 asks at both sites without touching anything else.

<!-- minos review-loop: repo=olympus/infra-forge pr=116 head=14bc15714b43402896eba7d89a9d19657db1b9b7 round=1/5 axes=standards,spec --> **olympus/infra-forge** · PR #116 · reviewed head `14bc15714b43402896eba7d89a9d19657db1b9b7` · round **1/5** · verdict **merge** The thread carried no prior review when this round opened, so the header count (1) is the dispatch's own. Recommendation: merge ### The claim, and where it comes from - **Spec source:** `paperclip:THE-126`, fetched live through the Paperclip API (`GET /api/issues/THE-126` → 200, 11,610 bytes) with the review started. Its *What to do* names three outcomes: (1) `changed_when: false` on both runner-layer apt cache refreshes, with the reason in a comment beside each; (2) `make runner-service-check` re-run, `changed=0 failed=0`; (3) the next scheduled 03:15Z audit reading `clean`. - **Claim under review:** the runner service layer's daily `--check` rehearsal reports `changed=2` on two apt cache refreshes that touch nothing on the Guest, hiding real drift behind noise; after this change it reports `changed=0`. ### Standards — 0 findings Read at the reviewed head: `AGENTS.md` (§Secrets, §State, §Privacy, §Code comments, §Toolchain), the org records in `olympus/workshop` `docs/adr/` at `45790e78d0c4051c0f77546017692863a5d084e8` (0001–0015 + index), `docs/agents/*.md`, and this layer's gate note. | Rule | Site | Result | | --- | --- | --- | | `AGENTS.md:38` §Code comments — "Keep comments to a minimum… when something genuinely needs more explanation than the code can carry, propose a docs page" | `runner/service/roles/runner/tasks/main.yml:28-30`; `runner/service/roles/unattended_upgrades/tasks/main.yml:11-14` | No charge. The comment is the reason the ticket asks for beside the task, and this repo's own precedent for the same fix carries the same shape: `infra-tracker` at `origin/main`, `vikunja/service/roles/vikunja/tasks/main.yml:5-12` is a five-line rationale immediately above `changed_when: false`. | | ADR-0009 — PROD deploys only through a merge to `main` | whole diff | Conforms: reporting-only change on the merge path; the PR applies nothing. | | ADR-0011 — a deploy never destroys or replaces | whole diff | Not engaged: no module argument, task, template or Target changes. | | `AGENTS.md` §Secrets; reviewer charter §3 | diff, PR body, CI | No literal secret in any of them. | `changed_when` pins the reported flag only — a cache update that fails still fails the task — so the change cannot mask drift in the other direction. Nothing in the repo parses a `changed=` count from a recap: `.forgejo/workflows/deploy.yml:68` reads `git diff --name-only` over `runner/`, not the play's recap. ### Spec — 0 findings | Ticket ask | Where it landed | Result | | --- | --- | --- | | `changed_when: false` on both refreshes, reason in a comment | `runner/…/runner/tasks/main.yml:28-34`; `runner/…/unattended_upgrades/tasks/main.yml:11-18` | Met, both sites. | | Re-run `make runner-service-check`, `changed=0 failed=0` | PR body, §Evidence (PLAY RECAP pair) | Claimed with a before/after recap. Not reproduced by me — see *Could not verify*; its mechanism I did reproduce. | | Next 03:15Z audit reads `clean` | — | Pending on a later actor: the run does not exist yet. Not a finding. | The PR touches nothing the ticket did not ask for: two `changed_when` lines and their two comments, `+9/−1` across the two files named in the ticket. ### Verified, by hand (this round, at `14bc1571`) | Probe | Result | | --- | --- | | `refs/pull/116/head` resolved on the host | `14bc15714b43402896eba7d89a9d19657db1b9b7` — equals the dispatch's head and the PR object's `head.sha` | | Diff read in a worktree at that head, `git diff 59d427c...HEAD` | 2 files, `+9/−1`, exactly the two role task files | | **Mechanism, red/green pair** — scratch playbook, `--check`, localhost, cache mtime `2026-10-28T11:41:39Z` (stale): base shape vs head shape, run in both orders | order A (base→head): `changed`, then `ok`. Order B (head→base): `ok`, then `changed`. Cache mtime identical after both runs — check mode did not update it, so the only difference is the `changed_when` line | | Third-site census — `grep -rn update_cache` at head: 7 sites | the 2 this PR pins, 4 under `forgejo/service/**` (the forge layer's, outside this diff), and `runner/service/roles/firewall/tasks/main.yml:10` (`name: nftables` + `update_cache`), probed: reports `ok` with the package present — which is why the author measured `changed=2`, not 3 | | `mise exec -- make check` | exit 0 — env-check, the four suites, fmt-check, `docs-check: all 5 assertions hold` | | `ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` in `runner/service` | `playbook: site.yml`, rc 0 | | CI at this head (newest entry per context, read 05:40Z) | green: `pr-checks` env-check, fmt-check, validate, syntax-check, docs-check; `plan` guest, runner-guest, edge | (The root `make syntax-check` reds in my clone on `community.postgresql` for want of `make deps`' collections, and reds identically in a worktree at the base `59d427c` — my clone's toolchain, not this diff. CI's own syntax-check is green at this head.) ### Could not verify - **`make runner-service-check`**, the PROD `--check --diff` rehearsal. It refuses on this review host: `error: required secret file .env is missing; composing no command.` There is no `.env` in the clone or the worktree, and I did not fetch one — `.env` is `make env`'s output, and writing a credential file into a review tree to prove a reporting change is not a trade a reviewer makes. The PLAY RECAP pair in the body is the author's measurement; what I reproduced is its mechanism, not their run. - **Ticket ask 3** — the 03:15Z audit reading `clean` — has no artefact until that run exists. ### Named, not charged - `runner/service/roles/firewall/tasks/main.yml:10` — `update_cache: true` inside a `name: nftables` install, untouched by this PR. Probed above: reports `ok`, so it is not a missed third site. - The four `update_cache` sites under `forgejo/service/**` belong to the forge layer, outside this diff; a sibling branch for it (`hermes/THE-125-apt-cache-no-drift`) is on the remote as of this round's read. - No suite pins the two added lines: `make check`'s credential-free floor has no task-level Ansible coverage, and this layer's documented gate is its `--check` run (`.forgejo/workflows/deploy.yml:6`). That is the layer's pre-existing shape, not something this diff introduced — so it is named here rather than charged, with the note that a future edit could drop the lines and only the daily audit would notice. ### Summary | Axis | Findings | Blockers | Worst finding | | --- | --- | --- | --- | | Standards | 0 | 0 | none | | Spec | 0 | 0 | none | The recommendation is **merge**: no blocker stands, and the change does what THE-126 asks at both sites without touching anything else.
pit merged commit caf2755127 into main 2026-12-03 06:36:00 +00:00
pit deleted branch hermes/THE-126-apt-cache-no-drift 2026-12-03 06:36: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!116
No description provided.