Files
loki/REVIEW.md
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

1.7 KiB

REVIEW.md — loki review bar

Judge the DIFF against these gates, in order. Flag correctness and requirement gaps only — lint owns style. Global standards load via CLAUDE.md; this file is ONLY loki's scars.

Fatal invariants (one violation = block)

  1. API envelope is {ok: true|false} — NOT the global {success, data} convention. This repo deliberately overrides it (see CLAUDE.md).
  2. Dispatch/orchestration state has ONE owner — no new /tmp signal files, no new claude-* compat paths, no second writer to dispatch status. The split-authority loop is the repo's #1 historical bug source (13 of 15 recent commits were dispatch reliability fixes). Regression net: scripts/test/ dispatch tests — extend, never bypass.
  3. Design system — only ui-* component classes + tokens from globals.css; no arbitrary hex/radius/shadow. Check check:design passes.
  4. Runner protocol changes need a runner RELEASE — publishing goes through the loki-releases feed (NOT loki); a protocol change without a release strands every installed runner.

Repo gotchas that have bitten before

  • Tailwind v4 silently drops an entire @layer components block if any rule uses a responsive variant inside @apply (e.g. sm:p-6) — no error. If component classes vanish, check this first.
  • bashrc zellij auto-attach can hijack a runner-owned PTY — guard with $BASH_EXECUTION_STRING (already in dotfiles; don't regress it).

Process gates

  • npm run test:unit green (auto-discovers scripts/test/*.ts); CI green on PR.
  • Diff updates CLAUDE.md/docs if it changes documented structure/behavior.
  • Second fix of the same bug class ships the rule/test that ends the class.