The apt cache refresh stops reporting a change in check mode (THE-127) #45
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/127-apt-cache-changed-when"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The two refresh-only
apttasks in the play stop reporting a change they did not make.apt: update_cache: truewithcache_valid_timeanswerschangedunder--checkwhenever thecache is older than the hour: the module skips the update and still sets its updated flag. That made
the daily drift task (
drift-infra-silo) reportchanged=2on a Guest nothing had moved, and realservice-layer drift stayed hidden behind it. The fix is the one
infra-trackercarries on itsunattended_upgradesandvikunjaroles (olympus/infra-tracker#66).The firewall role's
nftablestask also refreshes the cache, but it names a package install, so itreports only a change to that package and needs no predicate.
Evidence
Read-only rehearsal against PROD (Guest 150) with
make service-check:89410e4,2026-12-03T05:35Z):silo : ok=25 changed=2 unreachable=0 failed=0 skipped=3. The twochangedtasks areunattended_upgrades : refresh the apt cache before the first installandsilo : refresh the apt cache before the first install; every other task isok.2026-12-03T05:36Z):silo : ok=25 changed=0 unreachable=0 failed=0 skipped=3. Both refresh tasks readok./var/lib/apt/listsmtime2026-12-02T21:55Z), so itwas past
cache_valid_time = 3600and theokis not a cache the real apply had just refreshed.make checkgreen.Not run: any apply. The next scheduled drift task at 03:15Z is what confirms the row reads
clean.Merge Danger
Door: two-way — two
changed_whenpredicates in a play; reverting is this diff backwards, andnothing on the Guest depends on them.
Blast Radius: the drift report only. No state, no apply, no service restart; the plays themselves
are unchanged apart from what they report.
Waiting — queued behind olympus/infra-forge#116 (one review run at a time). The review run resumes on its own at Thu 3 Dec, 06:38 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 1/5) on
5b7adb03de— reading the diff now.repo=olympus/infra-silo · pr=45 · head=5b7adb03de21ab53bfc31696224ddabc7c2ab1f5 · round=1/5 · verdict=merge
Recommendation: merge
Round: the dispatch announced round 0;
list_pull_reviewson this PR returned[], so this is the thread's first review — round 1 of 5, with no earlier findings to re-drive.Spec sources, in the order read. (1)
paperclip:THE-127from the title prefix — the repo's own prefix set isSL/SC/CP, so a bareTHEroutes to the company board — fetched live 2026-12-03T05:4x Z:GET /api/issues/THE-127→ 200, statusin_review,updatedAt2026-12-03T05:42:41.390Z, andGET /api/issues/<uuid>/documents→ 200,[](no design document). (2) The PR #45 body, read at the dispatch head.Standards sources.
AGENTS.md(§Code comments, §Pull requests),docs/agents/issue-tracker.md(§Resolving the task a pull request addresses),docs/agents/workflow.md,docs/index.md,docs/adr/*andolympus/workshop/docs/adr/*(no record speaks to check-modechangedreporting; nothing here conflicts). There is noCONTRIBUTING.mdand noCODING_STANDARDS.mdin the tree.Standards
ADVISORY — the PR body names no task reference.
AGENTS.md §Pull requests— "Name the task a PR addresses in its body by its own reference:SL-<index>… orSC-<index>/CP-<index>" — anddocs/agents/issue-tracker.md §Resolving the task a pull request addresses— "Name the task in the PR body". The title carries(THE-127); the body carries noTHE-127, nopaperclip:and noSL-anywhere (PR #45 body, line 1 on). Practice census: of the last 7 merged bodies, 5 carryTHE-<n>(#44,#42,#41,#40,#38), 2 carry a repo identifier (#41,#39), and#43carries neither — the rule's enumeration has not caught up with the board. Clearing (either): one line in the body naming the task,paperclip:THE-127; or move theAGENTS.mdenumeration to admit the board reference. Body-only: the code is sound.ADVISORY — seven comment lines for two predicate lines, the same mechanism explained twice.
silo/service/roles/silo/tasks/main.yml:55-58(4 lines) andsilo/service/roles/unattended_upgrades/tasks/main.yml:11-13(3 lines) restate one sentence.AGENTS.md §Code comments: "Keep comments to a minimum … propose a docs page underdocs/instead of writing it as a comment." Named as a tension, not a breach of the ticket: THE-127 step 1 asks for "the reason in a comment beside them", and the sibling fixolympus/infra-tracker#66carries a 5-line comment in itsvikunjarole, so the ticket and the sibling set the shape and the repo rule has not caught up. Clearing: one line each, e.g.# Not a change: check mode skips the update but still reports changed.— the ticket's instruction is still satisfied.Spec
No findings. THE-127's three steps, one line each:
changed_when: falseon both refresh tasks, reason in a comment beside themsilo/.../silo/tasks/main.yml:62andsilo/.../unattended_upgrades/tasks/main.yml:17, comments beside bothmake service-check, confirmchanged=0 failed=0cleanScope creep: none. The diff is two comments blocks and two
changed_whenpredicates, nothing else.Verified by hand
ansible-core 2.21.5(the versionmise.tomlpins),ansible/modules/apt.py:1485setsupdated_cache = Truewhenmodule.check_modeand the cache is pastcache_valid_time;:1491exits withchanged=updated_cacheonly when nopackage/upgrade/debis named. That is the PR body's mechanism, line for line.cache/scratch/pr45-apt-probe/play.yml,ansible-playbook -i localhost, -c local --check(core 2.21.5) against a box whose/var/lib/apt/listsmtime is 2026-09-04 — stale by three months, the same condition as the ticket: base shape (refresh, no predicate) →changed: [localhost]; head shape (changed_when: false) →ok: [localhost]; firewall shape (name+update_cache) →ok: [localhost]. The fix works, and the body's firewall sentence ("it reports only a change to that package") is true.mise exec -- make checkat5b7adb0in worktree.worktrees/infra-silo-pr45-r1→ exit 0,Success! The configuration is valid.grep update_cacheover the play finds exactly two refresh-only tasks; the firewall's names a package. The body'schanged=2is fully accounted for, and no third site was missed.changed_when: falsenotifies nothing away: thesilorole's handlers are notified by its two template tasks, andunattended_upgradeshas no handlers directory.olympus/infra-trackermainat810d648: bothunattended_upgrades/tasks/main.ymlandvikunja/tasks/main.ymlcarrychanged_when: false. The body's citation of #66 holds.merge_base=base.sha=89410e4=origin/maintip; head is one commit ahead; diff is the PR file list, 2 files, +9/-0.pr-checks / check (pull_request)success (50s) andplan / stack-plan-check (pull_request_target)success (18s), fromget_commit_statuseson5b7adb0. No Stack change → no plan delta to explain.Could not verify
make service-checkneedsSILO_ROOT_PASSWORDfrom the store and a live inventory, and this agent'smake envrefuses by class (docs/agents/workflow.md§3). The body'sok=25 changed=2→changed=0is the author's report; what I reproduced independently is the module behaviour that produces both numbers.clean— a later actor's result, pending by design.Named, not charged
docs/index.mdlists "A role changes" as a trigger to updatehardening.md. A role did change, but the Guest's behaviour is identical and nothinghardening.mdasserts becomes false — no doc update owed.changedcounts. The repo has no Ansible test leg (docs/agents/workflow.md§What nothing here checks) andinfra-tracker#66recorded the same gap and deferred a--checkleg. Pre-existing, out of this ticket's scope.Summary