Commit Graph
3 Commits
Author SHA1 Message Date
34f6d27ea6 fix(ops): the box register follows revampit to evig, and conformance notices a unit that lost its guards (#475)
revampit was renamed to evig on the box on 2026-09-02 (/opt/revampit -> /opt/evig,
revampit-app -> evig-app). The app repo caught up. This repo — which holds the
box register and the tooling that watches it — did not, and two of the stale
references were load-bearing:

  - verify.sh ran `systemctl is-active revampit-app` for a unit that no longer
    exists (`inactive`, exit 4), so the full-fleet sweep was permanently FAIL
    and never once checked the app that replaced it. A sweep that always fails
    is a sweep nobody reads.
  - uptime-sweep.sh watched revampit.orangecat.ch, which is now a Caddy `redir`
    block — a static 308 the sweep counts as up. That entry answers "is Caddy
    alive", not "is the app alive", and would have reported up through an evig
    outage. Pointed at evig.orangecat.ch, it probes /api/health for real.

The rest is register hygiene with no live consequence: the push-deploy hook
installed a command at /home/g/dev/revampit/scripts/selfhost-deploy-revampit.sh
(neither path exists any more), and three runner sandboxes listed a
/opt/revampit that is gone while omitting the /opt/evig that replaced it.

The automation, because a fix that only repairs today is worth 1x:

runtime-conformance-audit.sh now asks whether an enabled *-app.service still
has its guardrails — a memory cap and an OnFailure. A rename moves the unit
file; it does NOT move the .service.d/ drop-ins beside it. evig-app ran for two
days with MemoryMax=infinity on a shared box and no failure alert because its
drop-ins were still in the old unit's directory, and nothing noticed, because
these drop-ins are box state that no repo describes. Every other app unit on
the box carries both, which is what makes an exception a finding rather than a
preference. The audit already runs every 6h and alerts per finding, so this
class now pages instead of waiting to be stumbled over.

Evidence, on the real box:

  # after restoring evig-app's drop-ins by hand
  $ sudo bash runtime-conformance-audit.sh
  checked 26 app dirs on node 24.20.0
  findings=0 unreadable=0

  # negative control: move the drop-ins away again
  FINDING|evig|unit has no memory cap (MemoryMax=infinity) on a shared box
  FINDING|evig|unit has no OnFailure= — it can die without alerting anyone

  $ bash scripts/hetzner/verify.sh
  OK   evig                   systemd=active   local=200  public=200
  ... 23 checks, exit 0

`npm run verify` green: tsc clean, eslint 0 errors / 3 warnings, 130/130 unit
test files, 150 home tests, 66 uptime-sweep tests, all ops suites.


Claude-Session: https://claude.ai/code/session_01LmyE2aLaXKB2V7WA3XQprm

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 00:55:37 +00:00
GandClaude Opus 5 20ff75ef33 fix(ops): only flag units that are meant to be running (#440)
The unit check asked "is it active?" and flagged aoz-demo, which is stopped AND
disabled with nothing routed to its port — deliberately retired. A check that
reports a decision as a fault is one people learn to ignore, and an ignored
check is worse than none.

"Is it supposed to be running?" is a different question from "is it running?".
Enabled-but-inactive is the fault; disabled-and-inactive is a choice.


Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 10:00:57 +02:00
GandClaude Opus 5 63c9f2e943 feat(ops): audit what is DEPLOYED, not what is committed (#439)
bitbaum/fleet already has hosted-supabase-audit.sh, whose stated job is "does
any repo still point at a Supabase we retired?". It ran on 2026-08-28 and
reported SUCCESS while printcraft returned 500 in production, pointing at a
hosted project whose DNS no longer resolved.

It missed because it runs `git grep` over repo checkouts, and the reference
lived in /opt/printcraft/shared/.env — not in git, deliberately, because the
box is the environment SSOT. The gate was scoped to the wrong substrate: it
checked the artifact while the configuration lived in the running system. A
check that looks in the wrong place is worse than no check, because it answers.

The rule this implements: SOURCE audits run in CI against git, RUNTIME audits
run on the box against what is actually deployed. The fleet had a good
collection of the first kind and none of the second.

Five checks, each a shape that has already bitten:
  - an env still naming a retired managed host (supabase.co, neon, planetscale)
  - a configured host that no longer resolves
  - a process running with keys its .env can no longer provide — config broken
    on disk for hours while the process holds the old values, which is exactly
    how 25 vitareba cron jobs died at the next restart
  - a declared node engine the box cannot satisfy
  - an app unit that is not active

Found on its first run, before it was committed:
  revamp-info  declares node >=22, box runs 20.20.2 — and it IS deployed
  revampit     points at a dead trycloudflare.com quick-tunnel host
  aoz-demo     unit inactive

Alerts per finding, never one aggregate: host-check spent six weeks unable to
fire because one permanently-failed unit pinned a single boolean at `bad`.


Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 09:13:04 +02:00