Skip to content

#143 prune docker and nginx, phase 1: disabled: lines and the soak-safe knob test - #145

Merged
gregoryfoster merged 5 commits into
mainfrom
143-prune-docker-nginx
Nov 18, 2026
Merged

gregoryfoster merged 5 commits into
mainfrom
143-prune-docker-nginx

Conversation

@gregoryfoster

Copy link
Copy Markdown
Member

Phase 1 of #143: declares the dormant docker and nginx disabled: in the patching knob, plus the ported test that keeps a prune soak's end green. The host stages already ran, each approved by the operator in this session.

Refs #143

On the host (done 2026-11-17, out of any window)

Stage nginx docker
plan 21:06Z, matches the brief 21:06Z, autoremove_would_take = pigz only
disable (prune.sh --approve) 21:57Z: nginx.service masked 21:57Z: docker.socket, docker.service, containerd.service masked
savepoint (fresh plan 23:02Z) 23:54Z: /var/backups/patching-hosts-prune-nginx, config.tar sha256 120a38d7… 23:54Z: /var/backups/patching-hosts-prune-docker, config.tar sha256 85c544c7…

Every verdict was ok. Each run directory is root-only (700/600).

The change

  • .skills/patching-hosts: adds exception disabled:nginx 2026-11-24 … and exception disabled:docker 2026-11-24 …, the owner's 7-day soak. The reader reports soak-ended from 2026-11-25, the purge's prompt, clear of the Tue 2026-11-24 05:00–10:00Z window. Until then the probe reads both as kept, with no finding.
  • tests/test_patching_knob.py: ports Adopt patching-hosts: commit the knob, then take the first monthly run under the skill (gregoryfoster/skills#313) archiver#375's prune-soak allowance, corrected for the skill at 063ba5db:
    • the reader reports a passed disabled:/removed: line as soak-ended (#636), not expired-exception, so the filter matches soak-ended on a prune-stage line;
    • every other expired exception stays red, purged: and keep: included;
    • synthetic knobs drive it, so it can't skip on an empty knob;
    • it also pins that docker and nginx each carry one prune stage and no keep:.

Test evidence

  • Red before green:
    • The filter tests fail under the old findings == []. Shown by mutation this session: 3 failed.
    • test_the_dormant_components_are_pruned failed before the lines landed.
  • The knob's own dates: read at --today 2026-11-24 the knob is clean; at 2026-11-25 it gives two soak-ended findings, which the test allows.
  • Gate: uv run pytest 1063 passed, 15 skipped (the worktree's absent /etc/processor and .env files, and /run/docker.sock); ruff and shellcheck clean.

Code review (reviewing-code-python-fastapi, blanket)

Item Action Result
1 Fixed a08bd90: the declaration test compares components, so a staggered phase 2 doesn't fail a valid knob
2 Fixed 294f697: the docstring no longer pins the 7-day soak
3 Fixed 961ab93: _with_line refuses a knob with a [host] section
4 Stet The filter tests' red is a mutation shown this session, not a red commit
5 Held docs/PROVISIONING.md:194 still expects disabled, and the host now reads masked. Phase 2 retires it, per the brief's scope

Deploy

.skills/patching-hosts is a RUNTIME_FILES path, so this needs scripts/deploy.sh after the merge (a few seconds' restart; no window needed).

🤖 Generated with Claude Code

gregoryfoster and others added 5 commits November 17, 2026 21:08
Port of CannObserv/archiver#375's _assert_clean, corrected for the skill at
063ba5db: the reader reports a passed disabled:/removed: line as soak-ended
(#636), not expired-exception, so the filter matches soak-ended on a
prune-stage line and keeps every other finding red, purged:'s
expired-exception included (knob.md). Synthetic knobs drive it, so it fails
under the old findings == [] before any stage line lands.

Refs #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both shipped with the exeuntu image and nothing here uses them. prune.sh
masked nginx.service, docker.socket, docker.service and containerd.service
at 2026-11-17T21:57Z. Their exception lines carry the owner's 7-day soak:
review-by 2026-11-24, so the reader reports soak-ended from 2026-11-25, the
purge's prompt, clear of that day's window. Until then the probe reads both
as kept, not as named:docker and dormant:nginx findings.

The test pins that each carries one prune stage and no keep:. The synthetic
soak lines move to components this knob never declares: a keyed exception
line replaces another with the same <what>.

Refs #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stage strings

A staggered phase 2 (one purged:, one still disabled:) sorted the stage
strings into nginx, docker and failed a valid knob.

Refs #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Appended after a [host <glob>] header, the line would land in that scope
and the soak tests would pass or fail for the wrong reason.

Refs #143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit 961ab93 into main Nov 18, 2026
3 checks passed
@gregoryfoster
gregoryfoster deleted the 143-prune-docker-nginx branch November 18, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant