An apt cache refresh is not a change to the Guest (paperclip:THE-11) #67

Closed
pit wants to merge 1 commit from hermes/THE-11-apt-cache into main
Owner

What this is

The daily drift rehearsal plans and rehearses every repository (infra-cockpit#38, project audit, THE-11). For a service layer the verdict is the PLAY RECAP's changed count: changed=0 is clean and anything else is drift. This task made that count 1 on every run, so the audit reported the tracker as drifted with nothing moved on it.

apt reports changed for update_cache whenever the cache is older than cache_valid_time, and always in check mode. Refreshing a cache changes no declared state, so changed_when: false says what is true. The install below still reports the change that matters.

Verified

The same rehearsal the audit runs, ansible-playbook --check --diff against PROD's inventory:

Recap
before ok=22 changed=1 — the changed task was this one
after ok=22 changed=0

make check: 400 ok, 0 failed.

Why it matters

Left as it was, the audit would report infra-tracker as drifted every day and the Paperclip routine would open a task a day for a Guest that is exactly as the tree declares. A check that cries wolf is a check nobody reads.

paperclip:THE-11.

## What this is The daily drift rehearsal plans and rehearses every repository (`infra-cockpit#38`, project `audit`, THE-11). For a service layer the verdict is the `PLAY RECAP`'s `changed` count: `changed=0` is clean and anything else is drift. This task made that count 1 on every run, so the audit reported the tracker as drifted with nothing moved on it. `apt` reports `changed` for `update_cache` whenever the cache is older than `cache_valid_time`, and always in check mode. Refreshing a cache changes no declared state, so `changed_when: false` says what is true. The install below still reports the change that matters. ## Verified The same rehearsal the audit runs, `ansible-playbook --check --diff` against PROD's inventory: | | Recap | | --- | --- | | before | `ok=22 changed=1` — the changed task was this one | | after | `ok=22 changed=0` | `make check`: 400 ok, 0 failed. ## Why it matters Left as it was, the audit would report `infra-tracker` as drifted every day and the Paperclip routine would open a task a day for a Guest that is exactly as the tree declares. A check that cries wolf is a check nobody reads. `paperclip:THE-11`.
An apt cache refresh is not a change to the Guest (paperclip:THE-11)
All checks were successful
plan / edge-plan-check (pull_request_target) Successful in 6s
plan / guest-plan-check (pull_request_target) Successful in 7s
checks / static (pull_request) Successful in 29s
checks / execute (pull_request) Successful in 2m53s
eb49bce06e
The daily drift rehearsal plans and rehearses every repository
(`infra-cockpit`'s audit project, `infra-cockpit#38`). For the tracker its
`changed` count is the verdict, and this task made it 1 on every run: `apt`
reports `changed` for `update_cache` whenever the cache is older than
`cache_valid_time`, and always in check mode.

So the audit reported the tracker as drifted with nothing moved on it — and
would have opened a task a day for it. `changed_when: false` says what is true:
refreshing a cache changes no declared state. The install below still reports
the change that matters.

Verified with the same rehearsal the audit runs, against PROD:

- before: `ok=22 changed=1` — the changed task was this one
- after: `ok=22 changed=0`

`make check`: 400 ok, 0 failed.

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

Waiting — queued behind olympus/infra-tracker#66 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 11:49 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.

**Waiting** — queued behind olympus/infra-tracker#66 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 11:49 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Member

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

**Review started** (round 0/5) on eb49bce06ee4bb4c3cd70c3675dcc4d2abdef74c — reading the diff now.
bot-minos approved these changes 2026-12-02 10:55:45 +00:00
bot-minos left a comment

olympus/infra-tracker#67 — head eb49bce — round 1/5 — 1 advisory, 0 blockers

Round 1/5 is the thread's own count: this PR carries no review object before this one. The dispatch's sign-on comment carried round 0/5, which is the dispatch's counter, not the thread's.

Recommendation: merge

Standards

Sources read at eb49bce: AGENTS.md (toolchain, state, environment, PR format), docs/adr/0001…0005, olympus/workshop docs/adr/0001…0015 (binding), GLOSSARY.md, .agents/skills/pr/SKILL.md, .forgejo/workflows/checks.yaml, Makefile. No CONTRIBUTING.md or coding-standards.md exists in this repo.

The changed task follows the house shape: a prose comment saying why the line is there, changed_when used the way the rest of the role already uses it (main.yml:82,92,161,171,296,312), and the task-level key indented as a sibling of name. The YAML parses (--syntax-check below).

ADVISORY — scripts/__pycache__/plan_check.cpython-313.pyc is a committed build artifact, and every run of the floor rewrites it.

  • It is the diff's first file, added by this commit and referred to by nothing in the change.
  • No tracked *.pyc exists at the base: git ls-tree -r origin/main | grep -cE '__pycache__|\.pyc$' → 0. This is the first in the repository.
  • It is a by-product of the floor: scripts/plan-check.py:38 does import plan_check, so the plan check writes it, and after mise exec -- make check at this head git status reads M scripts/__pycache__/plan_check.cpython-313.pyc. The committed blob can never be stable — a .pyc embeds its source's mtime and size, so a fresh compile always differs from the committed one.
  • .gitignore carries no __pycache__/ or *.pyc rule, and no written standard in the repo forbids artifacts (checked AGENTS.md, docs/, GLOSSARY.md, .agents/skills/pr/, workshop docs/adr/; there is no .gitattributes). Nothing written down was breached, which is why this is an advisory rather than a blocker.

Clearing change: git rm --cached scripts/__pycache__/plan_check.cpython-313.pyc and add __pycache__/ to .gitignore.

Spec

Spec sources, in the order read:

  1. paperclip:THE-11 — "T8: Track E1: scheduled drift detection", fetched live from the Paperclip API this session (GET /api/issues/THE-11 → 200, 23,213 bytes, 2026-12-02T11:51Z): "a scheduled tofu plan + ansible --check --diff per repo/stack… Zero diff means a clean report; any diff opens or updates a task."
  2. The merged sibling olympus/infra-cockpit#38 (d64dfb1, merged 2026-12-02T10:28Z), which is where the split between the two repositories is stated, and its scripts/drift-lib.sh:120-136 at origin/main, which is the contract this change is measured against: it sums changed= over the PLAY RECAP and reports drift when the sum is above zero.

Findings:

  • No missing requirement. The one requirement this PR owns — that a cache refresh not be read as a change to the Guest — is implemented at vikunja/service/roles/vikunja/tasks/main.yml:15, and only on the cache task. The install below it (main.yml:17-24) keeps its own reporting, so a package that actually installs still reads changed, which is what drift-lib.sh:133-136 needs to distinguish a clean run from a drifted one.
  • No unrequested behaviour. The change adds one task key and a comment. The extra file in the diff is not behaviour; it is charged once, on the Standards axis, and not counted again here.
  • No implementation that looks wrong. The mechanism and the suppression are both verified below.

What I verified, and how

Claim How Result
apt reports changed for update_cache in check mode read the module source the repo's ansible-core ships (2.21.5, apt.py:1448-1496): inside the stale-cache block, if module.check_mode or updated_cache_time != post_cache_update_time: updated_cache = True, then exit_json(changed=updated_cache, …) when the task names no package holds
changed_when: false turns that into changed=0 ran a two-task probe playbook on localhost under --check, both tasks forced to execute (check_mode: false): recap ok=2 changed=1 — the plain task reported changed, the changed_when: false one did not holds
the audit reads exactly this recap infra-cockpit origin/main scripts/drift-lib.sh:120-136 (sums changed=, drift above zero), scripts/drift.sh dispatching play vikunja "$dir" service-check for this repo, and Makefile:403-405 → ansible-playbook -i $(PROD_INVENTORY) --check --diff site.yml holds
the playbook still parses at this head ansible-playbook -i "vikunja," --syntax-check vikunja/service/site.yml pass
make check: 400 ok, 0 failed mise exec -- make check at eb49bce exit 0, exactly 400 ok lines, every summary 0 FAILED
the deploy gate is not keyed on this count Makefile:118-135 — the service layer's gate is "the rehearsal has already passed", not a changed total, so suppressing the count moves no gate no regression
no secret, no destroy/replace, no tier-1/core change, no ADR, workflow or branch-protection edit read the full diff; the charter's escalation triggers are all absent, so nothing is escalated no hold

Could not verify: the author's end-to-end before ok=22 changed=1 / after ok=22 changed=0 against PROD's inventory. This session holds no PROD inventory or credentials, and I do not run against PROD. Both halves of the mechanism are verified above; the combined run is the author's evidence, reproduced by me only in its parts.

Named, not charged

  • One red at this head inside make check: deploy-workflow tests: 1 assertion(s) FAILED on "the script reads SEMAPHORE_API_TOKEN", immediately preceded by printf: write error: Broken pipe (scripts/tests/deploy-workflow.sh:51). The diff touches neither that test nor scripts/semaphore-deploy.sh; make deploy-test alone is 4/4 green at this head, and the next full make check was 400/400 green. A pre-existing flake, not charged.
  • The PR body uses ## What this is / ## Verified / ## Why it matters rather than the three headings AGENTS.md §Pull requests names (## Summary / ## Evidence / ## Merge Danger). The repository's own merged practice is free-form sections carrying an evidence table — the sibling #38, merged today, is the same shape — and this body carries the before/after recap table, so the practice is the change's shape and the sentence is not being enforced. Named, not charged.

Summary

  • Standards: 1 finding — 1 advisory, 0 blockers. Worst: the committed plan_check bytecode, which the floor rewrites on every run.
  • Spec: 0 findings. Worst: none.

The recommendation is merge; it does not turn on volume.

<!-- minos review-loop: repo=olympus/infra-tracker pr=67 head=eb49bce06ee4bb4c3cd70c3675dcc4d2abdef74c round=1/5 axes=standards,spec --> **olympus/infra-tracker#67** — head `eb49bce` — round 1/5 — 1 advisory, 0 blockers Round 1/5 is the thread's own count: this PR carries no review object before this one. The dispatch's sign-on comment carried round 0/5, which is the dispatch's counter, not the thread's. Recommendation: merge ## Standards Sources read at `eb49bce`: `AGENTS.md` (toolchain, state, environment, PR format), `docs/adr/0001…0005`, `olympus/workshop` `docs/adr/0001…0015` (binding), `GLOSSARY.md`, `.agents/skills/pr/SKILL.md`, `.forgejo/workflows/checks.yaml`, `Makefile`. No `CONTRIBUTING.md` or `coding-standards.md` exists in this repo. The changed task follows the house shape: a prose comment saying why the line is there, `changed_when` used the way the rest of the role already uses it (`main.yml:82,92,161,171,296,312`), and the task-level key indented as a sibling of `name`. The YAML parses (`--syntax-check` below). **ADVISORY — `scripts/__pycache__/plan_check.cpython-313.pyc` is a committed build artifact, and every run of the floor rewrites it.** - It is the diff's first file, added by this commit and referred to by nothing in the change. - No tracked `*.pyc` exists at the base: `git ls-tree -r origin/main | grep -cE '__pycache__|\.pyc$'` → `0`. This is the first in the repository. - It is a by-product of the floor: `scripts/plan-check.py:38` does `import plan_check`, so the plan check writes it, and after `mise exec -- make check` at this head `git status` reads ` M scripts/__pycache__/plan_check.cpython-313.pyc`. The committed blob can never be stable — a `.pyc` embeds its source's mtime and size, so a fresh compile always differs from the committed one. - `.gitignore` carries no `__pycache__/` or `*.pyc` rule, and no written standard in the repo forbids artifacts (checked `AGENTS.md`, `docs/`, `GLOSSARY.md`, `.agents/skills/pr/`, workshop `docs/adr/`; there is no `.gitattributes`). Nothing written down was breached, which is why this is an advisory rather than a blocker. Clearing change: `git rm --cached scripts/__pycache__/plan_check.cpython-313.pyc` and add `__pycache__/` to `.gitignore`. ## Spec Spec sources, in the order read: 1. `paperclip:THE-11` — "T8: Track E1: scheduled drift detection", fetched live from the Paperclip API this session (`GET /api/issues/THE-11` → 200, 23,213 bytes, 2026-12-02T11:51Z): *"a scheduled `tofu plan` + `ansible --check --diff` per repo/stack… Zero diff means a clean report; any diff opens or updates a task."* 2. The merged sibling `olympus/infra-cockpit#38` (`d64dfb1`, merged 2026-12-02T10:28Z), which is where the split between the two repositories is stated, and its `scripts/drift-lib.sh:120-136` at `origin/main`, which is the contract this change is measured against: it sums `changed=` over the `PLAY RECAP` and reports `drift` when the sum is above zero. Findings: - **No missing requirement.** The one requirement this PR owns — that a cache refresh not be read as a change to the Guest — is implemented at `vikunja/service/roles/vikunja/tasks/main.yml:15`, and only on the cache task. The install below it (`main.yml:17-24`) keeps its own reporting, so a package that actually installs still reads `changed`, which is what `drift-lib.sh:133-136` needs to distinguish a clean run from a drifted one. - **No unrequested behaviour.** The change adds one task key and a comment. The extra file in the diff is not behaviour; it is charged once, on the Standards axis, and not counted again here. - **No implementation that looks wrong.** The mechanism and the suppression are both verified below. ## What I verified, and how | Claim | How | Result | | --- | --- | --- | | `apt` reports `changed` for `update_cache` in check mode | read the module source the repo's ansible-core ships (2.21.5, `apt.py:1448-1496`): inside the stale-cache block, `if module.check_mode or updated_cache_time != post_cache_update_time: updated_cache = True`, then `exit_json(changed=updated_cache, …)` when the task names no package | holds | | `changed_when: false` turns that into `changed=0` | ran a two-task probe playbook on localhost under `--check`, both tasks forced to execute (`check_mode: false`): recap `ok=2 changed=1` — the plain task reported changed, the `changed_when: false` one did not | holds | | the audit reads exactly this recap | `infra-cockpit` `origin/main` `scripts/drift-lib.sh:120-136` (sums `changed=`, `drift` above zero), `scripts/drift.sh` dispatching `play vikunja "$dir" service-check` for this repo, and `Makefile:403-405` → `ansible-playbook -i $(PROD_INVENTORY) --check --diff site.yml` | holds | | the playbook still parses at this head | `ansible-playbook -i "vikunja," --syntax-check vikunja/service/site.yml` | pass | | `make check`: 400 ok, 0 failed | `mise exec -- make check` at `eb49bce` | exit 0, exactly `400` `ok` lines, every summary `0 FAILED` | | the deploy gate is not keyed on this count | `Makefile:118-135` — the service layer's gate is "the rehearsal has already passed", not a `changed` total, so suppressing the count moves no gate | no regression | | no secret, no destroy/replace, no tier-1/core change, no ADR, workflow or branch-protection edit | read the full diff; the charter's escalation triggers are all absent, so nothing is escalated | no hold | Could not verify: the author's end-to-end `before ok=22 changed=1 / after ok=22 changed=0` against PROD's inventory. This session holds no PROD inventory or credentials, and I do not run against PROD. Both halves of the mechanism are verified above; the combined run is the author's evidence, reproduced by me only in its parts. ## Named, not charged - One red at this head inside `make check`: `deploy-workflow tests: 1 assertion(s) FAILED` on "the script reads SEMAPHORE_API_TOKEN", immediately preceded by `printf: write error: Broken pipe` (`scripts/tests/deploy-workflow.sh:51`). The diff touches neither that test nor `scripts/semaphore-deploy.sh`; `make deploy-test` alone is 4/4 green at this head, and the next full `make check` was 400/400 green. A pre-existing flake, not charged. - The PR body uses `## What this is / ## Verified / ## Why it matters` rather than the three headings `AGENTS.md §Pull requests` names (`## Summary / ## Evidence / ## Merge Danger`). The repository's own merged practice is free-form sections carrying an evidence table — the sibling #38, merged today, is the same shape — and this body carries the before/after recap table, so the practice is the change's shape and the sentence is not being enforced. Named, not charged. ## Summary - **Standards:** 1 finding — 1 advisory, 0 blockers. Worst: the committed `plan_check` bytecode, which the floor rewrites on every run. - **Spec:** 0 findings. Worst: none. The recommendation is merge; it does not turn on volume.
Author
Owner

Closing as superseded: the same one-line change is already on main.

#66 merged at 10:55:03 today — six minutes after this pull request opened — and it carries changed_when: false on refresh the apt cache before the first install, with the rationale as a comment above the task.

What the branch still carries against main (0b82bf8), which is where the conflict comes from:

Path Delta
vikunja/service/roles/vikunja/tasks/main.yml the same six lines of prose, after the module arguments instead of above the task
scripts/__pycache__/plan_check.cpython-313.pyc a build artefact, tracked by accident

So a conflict resolution here can only choose between two copies of one comment, and the pull request would then merge nothing. #66's wording is the one that stays; THE-11's fix is in main under THE-116.

Branch hermes/THE-11-apt-cache is left unmerged, not deleted.

Closing as superseded: the same one-line change is already on `main`. `#66` merged at 10:55:03 today — six minutes after this pull request opened — and it carries `changed_when: false` on `refresh the apt cache before the first install`, with the rationale as a comment above the task. What the branch still carries against `main` (`0b82bf8`), which is where the conflict comes from: | Path | Delta | | --- | --- | | `vikunja/service/roles/vikunja/tasks/main.yml` | the same six lines of prose, after the module arguments instead of above the task | | `scripts/__pycache__/plan_check.cpython-313.pyc` | a build artefact, tracked by accident | So a conflict resolution here can only choose between two copies of one comment, and the pull request would then merge nothing. `#66`'s wording is the one that stays; THE-11's fix is in `main` under THE-116. Branch `hermes/THE-11-apt-cache` is left unmerged, not deleted.
pit 2026-12-02 10:58:42 +00:00
All checks were successful
plan / edge-plan-check (pull_request_target) Successful in 6s
Required
Details
plan / guest-plan-check (pull_request_target) Successful in 7s
Required
Details
checks / static (pull_request) Successful in 29s
Required
Details
checks / execute (pull_request) Successful in 2m53s
Required
Details

Pull request closed

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-tracker!67
No description provided.