4 Commits
Author SHA1 Message Date
CatoandClaude Fable 5.1 95c40a9cd8 refactor: rename the product from FleetCrown to Loki (#695)
The product, its assistant, the repo, the host and every unit on the box now
share one name. 638 files, ~3,000 mentions: UI copy, config, env keys
(FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs,
articles, the deploy workflow other repos reuse, and nine file names.

- Three article slugs carried the old name and had been shared; permanent
  redirects keep those links alive (next.config.ts).
- test-no-retired-name.sh now also forbids the old product name across the
  whole repo, so the rename cannot creep back through templates and examples.
- ASSISTANT_STACK collapses the product and the assistant into one entry,
  because they are now the same name.

Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki`
database and role, loki.orangecat.ch (old host 308s to it; /api, /widget,
/embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases.
The Resend sending domain stays fleetcrown.orangecat.ch until the new domain
is verified in DNS.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:13:10 -07:00
Mao NakamotoandClaude Opus 4.8 0dd31f19f5 chore(devops): gate deploy.yml behind DEPLOY_VIA_CI switch
Make the CI-deploy workflow safe to merge to main while its prerequisites
(HETZNER_SSH_KEY secret, local hook disabled) aren't in place yet: the deploy
job now also requires repo variable DEPLOY_VIA_CI == 'true'. Unset → dormant, so
merging changes nothing until you flip the switch. Apply guide updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:49:36 +02:00
Mao NakamotoandClaude Opus 4.8 ca2150fc08 chore(devops): draft dedicated-fcrunner migration (thorough #1)
The stronger version of the blast-radius fix, beyond the InaccessiblePaths
drop-in: run the box-runner as an unprivileged `fcrunner` that owns only its own
dir instead of `ubuntu` (which owns every app's files).

- scripts/hetzner/migrate-box-runner-to-fcrunner.sh: creates fcrunner, copies the
  agent runtime (.claude auth + credentials.json, the claude CLI in .local, .npm,
  .gitconfig, runner token) from /home/ubuntu → /home/fcrunner (NOT .ssh), chowns
  the runner dir, and installs a systemd drop-in (User=fcrunner + HOME/PATH
  repointed + InaccessiblePaths hiding ALL of /home/ubuntu and every co-tenant
  /opt/<app>). --dry-run / --revert. Idempotent. Prints the claude-auth
  verification + creds-copy fallback.
- deploy-hetzner.sh + install-box-runner.sh now honor FLEETCROWN_RUNNER_OWNER
  (default ubuntu, so no change until you migrate) — otherwise the per-deploy
  runner chown would silently revert ownership to ubuntu.
- Apply guide updated with the migration steps + the coupling reminder.

Still NOT applied. bash -n clean; dry-run verified against the box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:49:36 +02:00
Mao NakamotoandClaude Opus 4.8 cc4c58fcbf chore(devops): prepare blast-radius containment (#1) + CI-gated deploy (#2)
Both prepared, NOT applied. Inert until you act — see
docs/development/devops-prep-apply-guide.md.

#1 — box-runner blast radius:
- scripts/hetzner/harden-box-runner.sh installs a systemd drop-in that makes the
  co-tenant /opt/<app> dirs, /opt/backups, and /home/ubuntu/.ssh kernel-
  inaccessible to the runner AND every agent PTY it spawns. Keeps User=ubuntu
  (the claude CLI lives in /home/ubuntu, so no user migration needed). Safe: the
  runner only touches its own dir + fresh clones under /home/ubuntu/dev, never a
  co-tenant /opt (verified in box-workspace.ts). --dry-run / --revert supported.
- install-box-runner.sh bakes the same InaccessiblePaths into the unit for fresh
  installs.

#2 — CI-gated deploy:
- .github/workflows/deploy.yml runs ONLY after CI succeeds on main, builds
  (schema-only Postgres service), and ships via deploy-hetzner.sh --no-build so
  the flock/rollback/verify logic carries over. A red CI → no deploy. Needs a
  HETZNER_SSH_KEY secret; the local push-deploy hook must be disabled to avoid
  double deploys (documented).
- scripts/setup-branch-protection.sh (opt-in, separate) requires the CI check
  before merge — rejects direct pushes to main, so only for a PR-based flow.

bash -n + deploy.yml structural checks clean; drop-in dry-run verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:49:36 +02:00