Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .skills/patching-hosts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ owner /srv/processor/live self

# --- dormant components (#143) --------------------------------------------
# Both shipped with the exeuntu image (one apt-get, 2026-09-29) and nothing here
# uses them: pruned disable -> savepoint -> purge, the owner's 7-day soak (as
# CannObserv/archiver#375). Masked 2026-11-17T21:57Z by prune.sh. The date is the
# soak: the reader reports soak-ended from 2026-11-25, the purge's prompt, clear
# of the 2026-11-24 window. Drift from the image while it ships them.
exception disabled:nginx 2026-11-24 exeuntu image leftover, never enabled or served here; masked 2026-11-17 (#143)
exception disabled:docker 2026-11-24 exeuntu image leftover, no containers or volumes, processor not in its group; masked 2026-11-17 (#143)
# used them: pruned disable -> savepoint -> purge (as CannObserv/archiver#375, #512).
# Masked 2026-11-17T21:57Z, savepointed 23:54Z (/var/backups/patching-hosts-prune-*),
# purged 2026-11-26T22:17Z by prune.sh, the docker group and the data with them.
# The masks stay, so a reinstall stays down. A purged: line has no next stage: it
# stays while the image ships them (CannObserv/provisioner#164), and its date is a
# recheck of that. Past it, the reader reports expired-exception and the knob test
# goes red: renew it, or drop the line once the image stops shipping them.
exception purged:nginx 2027-02-23 exeuntu image leftover, never enabled or served here; purged 2026-11-26 (#143)
exception purged:docker 2027-02-23 exeuntu image leftover, no containers or volumes; purged with its group 2026-11-26 (#143)

records CannObserv/processor
2 changes: 1 addition & 1 deletion deploy/disk-gc/disk-gc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# `processor` has no home.
homes = /home/exedev
grace_minutes = 60
# The template's, plus worktrees. No docker: the daemon is inactive here.
# The template's, plus worktrees. No docker: it is purged here (#143).
tiers = vscode-servers vscode-clis claude-extensions vsix-cache plugin-cache npx npm-cache pytest-garbage worktrees uv
# The deploy checkout's settings pin SOCRATICODE_SPEC: that npx tree is kept.
npx_spec_files = /home/exedev/processor/.claude/settings.json
Expand Down
2 changes: 1 addition & 1 deletion docs/MONITORING.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Provisioner's disk GC and headroom sensor (provisioner#61), **VERSION 3** (#99),

**This host's choices** (each one is a comment in the config):
- **Homes:** `homes` is `/home/exedev` (`processor` has no home).
- **Tiers:** the template's, plus `worktrees` for this repo's `.worktrees/`. `docker` stays off, because the daemon is inactive. `npx_spec_files` keeps the SocratiCode pin in the deploy checkout's `.claude/settings.json`.
- **Tiers:** the template's, plus `worktrees` for this repo's `.worktrees/`. `docker` stays off, because docker is purged (#143). `npx_spec_files` keeps the SocratiCode pin in the deploy checkout's `.claude/settings.json`.
- **uv cache:** pruned only (`uv_clean_above_mb = 0`). Releases are built with `UV_LINK_MODE=copy`.
- **Lines:** alert at 85% Use% (as `df` reports it), clear at 80%. On 2026-10-27, `/` was 76% used with 1.8G under the line, before the first prune (estimated at about 3.5G of idle VS Code builds and caches; the report-only run measures it, #82).
- **pytest:** `pyproject.toml` keeps one basetemp, and only a failed run's (`tmp_path_retention_*`). A run's basetemp is about 62M.
Expand Down
1 change: 0 additions & 1 deletion docs/PATCHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ The first unattended run reads in `journalctl -u apt-daily-upgrade` and `/var/lo
4. `apply.sh --approve --step bulk --lane maintenance --dry-run <dir>`, in the background, within 24 h of the dry run. It restarts nothing. With no data store there is no recovery point: `recovery-point.sh` refuses ("nothing to dump"), and the bulk records the before-versions, the rollback path, in the `<run>` it creates and prints.
5. Held steps, each approved, each `apply.sh --approve --step <name> --run <run>`:
- `redis`: the scratch server restarts;
- `docker`: `containerd`. Docker and containerd are disabled and inactive here, so nothing is running to restart;
- `tailscale`, if pending: a 2.3 s tailnet blip, sockets survive ([§ Tailnet flaps](NETWORK.md#tailnet-flaps), "A tailscaled restart here").
6. The reboot and restart decision, from the host, never from this run's set: under `automatic` a `-security` library may have landed any day since the last run. `sudo needrestart -b -r l` and `sudo grep -c '(deleted)' /proc/1/maps`. The kernel never decides one on exe.dev. Expect a reboot when `systemd` or `libsystemd0` is in the set: after those families, needrestart listed dbus and logind on co-broker and co-status, and PID 1 mapped deleted files.
7. The reboot: `reboot-chain.sh --run <run>` prints the chain; `--approve` launches it. It stops `processor` (up to `TimeoutStopSec=240`), then reboots in-guest. **Never `exe.dev restart`**: that is a hard reset (#83).
Expand Down
5 changes: 2 additions & 3 deletions docs/PROVISIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ What the operator set up once, on `co-processor` and around it: grants and crede
| SA `co-gcs-processor-writer`: `objectCreator` + `objectViewer` on `co-gcs-processor` (**no delete**), `objectViewer` on `co-gcs-blobs` | GCP | done 2026-10-02, [GCP provisioning](#gcp-provisioning) (spec §2) |
| SA key at `/etc/processor/co-gcs-processor-writer.json` (root 600 since #2; the unit's `LoadCredential=`) | this VM | done 2026-10-02; the writer's preflight reached both buckets |
| User `processor` (system, no home, no sudo, not in `docker`); `/srv/processor` (`exedev`, 755); `/etc/processor` root-only | this VM | #2, [Install](#install-once-2s-stage-b) |
| `docker.socket` disabled | this VM | done 2026-10-05 (operator, #2 gate 1); `disabled` and `inactive` on 2026-10-06 |
| `docker.socket` disabled | this VM | done 2026-10-05 (operator, #2 gate 1); docker purged 2026-11-26, with its group (#143) |
| Landlock ABI ≥ 6 | kernel | 6 on 2026-10-06 (6.12.93); [Containment](#containment) |
| Tailnet `tag:processor` → `tag:status:9000` | tailnet policy | #35 gate 2, done 2026-10-07: `http://status:9000/health` answered `production` from `co-processor` at 14:03Z |
| Status tenant `co-processor`, its production key, and the monitor `co-processor-drift` (`01M4BHMGGTXWQ16J3G5WWDQRYQ`) | `co-status` | CannObserv/status#24 (#35 gate 1), done 2026-10-07 16:02Z |
Expand Down Expand Up @@ -172,7 +172,7 @@ The extraction child is assumed compromised by the document it parses (spec §3,
- **Prerequisites:**
- Landlock ABI ≥ 6 (Linux 6.12; `co-processor`: 6);
- x86_64 or aarch64;
- `docker.socket` disabled. It is enabled by default on exeuntu, and `/run/docker.sock` meant root to the `docker` group; the child can't reach any socket now, but `processor` isn't in that group either.
- `docker.socket` disabled, or docker absent. It is enabled by default on exeuntu, and `/run/docker.sock` meant root to the `docker` group; the child can't reach any socket now. Here docker is purged, group and all (#143).
- **Fail closed.** Under `CO_PROCESSOR_CHILD_CONTAINMENT=required` (the default), `processor run` exits 1 with `child containment unavailable` where the kernel can't contain the child, and systemd restarts it, so the unit flaps visibly.
- **The boot canary.** Before it takes any command, `processor run` makes one real extraction (a tiny HTML page) through the child, under the configured containment. It exits 1 with `child canary failed` (`kind`, `detail`) if that fails. This covers what the ABI check can't see, such as a library outside the allowlist after a host update, which would otherwise crash every command three times and publish a terminal `extraction_error` for each. A child that fails to contain itself exits 70 before it reads its request, which counts as a strike.
- **Debugging the parent.** Being undumpable means no core dump, and `py-spy dump` or `gdb -p` need root (`sudo py-spy dump --pid <pid>`). The child is still dumpable, and its environment holds only `PATH` and `LANG`.
Expand All @@ -190,7 +190,6 @@ ps -o user= -p "$pid" # processor
grep NoNewPrivs "/proc/$pid/status" # 1
sudo -u processor cat "/proc/$pid/environ" >/dev/null # Permission denied (undumpable)
sudo -u processor cat /etc/processor/.env >/dev/null # Permission denied
systemctl is-enabled docker.socket # disabled
# The key as the unit receives it: readable by the service's uid through an ACL,
# from anywhere on the host, so by the child's but for Landlock (CR 9). The control
# proves the uid can read it, so the second line's refusal is Landlock's.
Expand Down
2 changes: 1 addition & 1 deletion docs/SOCRATICODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ apply it. Left in, vendored trees outrank first-party code in `codebase_search`.
the `env` block in `.claude/settings.json` and the key in git-ignored
`.claude/settings.local.json` (installed by the operator with CannObserv/index's
`scripts/install_qdrant_key.sh`; it prints `installed 64 chars`). No Docker
here: `docker.socket` is disabled (#2), so a session that missed the `env` block
here: docker is purged (#143), so a session that missed the `env` block
fails loudly instead of starting a local stack. Collections: `codebase_processor`,
`context_processor`, `processor_symgraph_*`. Adoption: #5.

Expand Down
12 changes: 6 additions & 6 deletions tests/test_patching_knob.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_the_knobs_own_soaks_end_green() -> None:
if words[0].startswith(PRUNE_STAGES)
]
if not soaks:
pytest.skip("no prune stage declared")
pytest.skip("no disabled: or removed: soak declared")
knob = _resolved("--today", (max(soaks) + timedelta(days=1)).isoformat())
assert _unexpected(knob) == []
assert {f["kind"] for f in knob["findings"]} == {"soak-ended"}
Expand All @@ -142,13 +142,13 @@ def test_no_exception_reason_is_cut_short_by_a_comment() -> None:
)


def test_the_dormant_components_are_pruned() -> None:
def test_the_dormant_components_are_purged() -> None:
"""docker and nginx shipped with the exeuntu image and were never used here:
each carries one prune stage line, ``disabled:`` then ``purged:`` (a savepoint
between skips ``removed:``), never ``keep:`` (#143). Drift from the image until
it stops shipping them."""
disabled 2026-11-17, then purged from a savepoint 2026-11-26 (#143), so each
carries one ``purged:`` line and no other stage, never ``keep:``. Drift from the
image until it stops shipping them (CannObserv/provisioner#164)."""
stages = [words[0] for words in _named("exception") if words[0].startswith(STAGES)]
assert sorted(stage.split(":", 1)[1] for stage in stages) == ["docker", "nginx"], stages
assert sorted(stages) == ["purged:docker", "purged:nginx"], stages
assert not [words for words in _named("exception") if words[0].startswith("keep:")]


Expand Down