Files
CatoandClaude Opus 5 f71ad23316 chore(config): stop duplicating the box IP, the old repo path, and the retired host (#489)
Five literals that each duplicated a fact owned somewhere else, or named
something that no longer exists.

1. packages/saldo/package.json — `homepage` pointed at
   `revampit.orangecat.ch/saldo`. That host is retired: the organisation renamed
   to evig, the canonical host is `evig.orangecat.ch`, and this repo's own
   `src/config/urls.ts` and `.env.selfhost.local.example` already say so. A
   published package's homepage is the one copy that would outlive the Caddy
   redirect keeping the old name alive.

2. scripts/setup-deploy-keybind.sh — the generated trigger script baked
   `PROJECT_DIR="/home/g/dev/revampit"`, wrong twice over: it names one
   developer's laptop, and it names the repo by a directory it no longer uses.
   The checkout knows where it is, so ask it: PROJECT_DIR is now derived from
   the setup script's own resolved location (`scripts/` -> repo root), which is
   the same root the rest of the file already assumes. The heredoc had to become
   interpolating for that, so the generated script's own `$PROJECT_DIR`
   references are escaped to stay literal. Verified by running it: the generated
   file lands on the parent of `scripts/`, and `bash -n` passes on both.

3+4. The Hetzner box IP was written out twice — `ssh-keyscan -H 167.233.22.31`
   in .github/workflows/deploy-selfhost.yml and
   `BOX="${BOX:-ubuntu@167.233.22.31}"` in scripts/selfhost-deploy-evig.sh — for
   one fact that already has an org-wide definition: the `HETZNER_IP` Actions
   variable (visibility: all). Both now read it, the workflow passing it to the
   script through the job env.

   Each end fails LOUDLY rather than proceeding on an empty value.
   `ssh-keyscan -H ""` writes nothing and exits 0, so an unset variable would
   have produced a deploy that died much later with an unhelpful host-key error;
   the step now emits `::error::` and stops. The script uses `${HETZNER_IP:?…}`
   so it refuses to guess a target. Setting BOX explicitly still overrides both,
   for a one-off host. Proved by mutation: unset -> exit 1 with the message;
   set -> ubuntu@<ip>; BOX set with HETZNER_IP unset -> BOX wins.

5. src/config/e2e-test-accounts.ts held two real personal addresses as a shipped
   `as const` array. That published who they were in a public repo and made
   changing them a release. The list is configuration: it now comes from
   `E2E_TEST_ACCOUNT_EMAILS` (comma-separated) and defaults to EMPTY.

   Empty is the safe direction and the reason this is not a behaviour risk: the
   list only ever RELAXES a rate limit, so an unset variable means nobody is
   exempt — the strict path every other account already takes. The opposite
   default would trust an address nobody configured on every deployment of this
   code. It is read at call time, not module load, so the value cannot be
   snapshotted before the environment is populated. This follows the direction
   scripts/e2e-inventory-prod.sh already took when it dropped its own hardcoded
   account default.

   OPERATIONAL NOTE: until `E2E_TEST_ACCOUNT_EMAILS` is added to `SELFHOST_ENV`,
   the prod dual-persona smoke runs under normal rate limits. Documented in
   .env.example and .env.selfhost.local.example.

   The test asserted the hardcoded list's length, which is no longer a property
   of the source. It now sets the variable itself with fictional fixture
   addresses — a test naming a real person's mailbox is the same leak the source
   just stopped committing — and adds the two cases that matter most: unset and
   empty must both exempt nobody.

Deliberately NOT touched: src/config/org.ts DEFAULT_CONTACT_EMAIL. The comment
above it records that the gmail address is a live decision because evig.ch is
not registered and the previous address bounced.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 01:57:08 -07:00
..