* fix(ai): no box timer or background path spends the shared free AI tier
Removes the frontier-digest, feedback-digest and scout-events cron routes and
timers; the digest email is built without a model; check-model-ids no longer
sends a one-token completion per pinned model; the DoD model judge on run
close (page poll / runner push / cron sweep) is gone - precheck only; the
Today Watch nudge composes on click, rate-limited, not on mount; the loki-e2e
check (a real chat turn 4x/day) is on demand only; standing-rule calendar
bookings never call the model to recover a date.
scripts/test/no-free-background-ai.ts walks the call graph from every cron
route and close path and fails if any reaches a model endpoint.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
* fix(ai): delete the scout and feedback-digest producers the removed crons left dead
Also lowers the telemetry monitored-path floor to 2: frontier_digests was
demoted on purpose with its cron.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
---------
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Two defects hit one Skif dispatch on 2026-09-25, and either alone loses work.
1. The dispatch was NACKed "claude cannot generate because its usage limit
is exhausted" 14s in, while Claude was visibly working on the brief. The
capacity check scanned the WHOLE PTY buffer with a topic-word regex
("rate limit", "credit", "context window"), so the echoed prompt, the boot
banner or a file the agent printed read as a quota wall. Now it reads only
what the CLI printed after the injection, ignores lines that are just the
prompt echoed back, and for Claude defers to its own session status: a
session still generating has not hit a wall.
2. Two minutes later the box runner restarted and killed every session. The
post-deploy drain waited for agent processes to EXIT, and interactive CLIs
never exit, so it always ran to its 30-minute cap and then killed whatever
had started most recently. It now counts agents that are WORKING: an idle
Claude does not hold the restart; generating, waiting mid-task, or any
status it cannot read does.
Fleet Runner 0.8.32 (desktop/ changed, so it ships as a release).
Tests: terminal-run-view (echo vs real wall, mutation-checked) and a new
test-drain-and-restart-runner.sh (18 checks, four mutations each caught).
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
apply-schema.sh runs migrations as the postgres superuser, so every table
belongs to postgres and the app's own role can read none of them. skif's
first deploy printed "schema applied ✓" over 14 tables its role could not
SELECT.
Before the batch, set ALTER DEFAULT PRIVILEGES (plain DML, sequences,
functions) for the role named after the database. After it, report any
EXISTING table the role still cannot read, with the GRANT to run. Existing
tables are never re-granted, so a deliberate REVOKE (kivvi's append-only
audit log) survives deploys. Identifiers are validated, not quoted.
Mutation-tested: re-granting existing tables, GRANT ALL, defaults after the
batch, and a missing identifier guard each fail the suite.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hourly /api/cron/auto-updates drafts new leads only for readers who opted
in, on their stored key and daily cap. Nobody opted in = no model call; the
site's free AI is never spent in the background (substrata ratchet test).
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No background job may spend the shared free AI pool (George 2026-09-25).
The surf-your-life digest becomes an on-demand staff action; its route is
removed in that repo. Timer was already stopped and disabled on the box.
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No background job may spend free-tier AI (George, 2026-09-25): it used up the
shared free credits. The unit is already disabled on the box.
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
skif's row said db=- and kind=client-site.
db=- makes every deploy skip the schema step, so drizzle/0000_init.sql
would never be applied: the signed-in pages would serve against a
database with no tables (the exact botsmann shape the format note
records). The database now exists on the box: role and db `skif`,
pg_hba rules inserted above the reject block, public schema owned by
the role, verified by connecting and creating a table.
kind=client-site was wrong on its face: Skif is bitbaum's own product,
owner=bitbaum, federating to OrangeCat. And bitbaum has no clients.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Both were hand-made on the box (the sweep) or not yet made (filings), so a
rebuild would have lost them and neither had OnFailure alerting.
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`echo "$x" | grep -q PAT` under `set -o pipefail` can report "not found"
for text that IS there: grep -q exits on its first match and closes the
pipe, the writer takes SIGPIPE (141), and pipefail makes the pipeline
status 141. An `if` then takes the else branch on a successful match.
#587 found this in one file and noted it "only fires when the payload
exceeds the ~4KB pipe buffer". That is not so, and the belief is why
82 copies in 22 scripts survived. Measured today on retire-site's real
1,158-byte plan output with has()'s exact pattern, 3,000 calls each:
'DRY RUN' line 3 of 20 echo|grep -q 2/3000 false misses
'apps.conf row' line 11 of 20 echo|grep -q 2/3000 false misses
last phrase line 20 of 20 echo|grep -q 0/3000
'DRY RUN' here-string 0/3000
Rare per call, but verify makes hundreds of these calls, and the
retire-site suite went red on those two exact phrases twice this week,
passing every rerun. It is worse in a NEGATIVE check - hasnt() read a
false miss as a PASS. And several copies are not tests: deploy-hetzner.sh
exits 1 on a false miss, and the sshd drift watch would raise a false
security alert.
All 82 rewritten to `grep -q PAT <<<"$x"` (a here-string is not a
pipeline, so there is no writer to signal) by a script that only touched
the simple quoted-variable form and reported anything else. Checked: all
22 files pass `bash -n`, every file is a 1:1 line swap (82 lines), and
the 20 line-continuation sites keep the here-string before the trailing
backslash (the first draft of the rewrite got those wrong; caught in a
dry-run diff before anything was written).
#587's comment is corrected so it stops teaching the wrong threshold.
Gate: scripts/test/no-grep-q-in-a-pipe.ts ratchets it repo-wide,
including forms the rewrite skipped (e.g. "$(cmd)" | grep -q), and
self-tests that its detector still fires. Proven by restoring the
original deploy-hetzner.sh line.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Two follow-ons found by the gate from the previous commit.
1. The summary SHAPE was declared three times. NotificationPanel and
NotificationsPill each carried a structural copy of
ProjectFeedbackSummary. A second declaration never breaks at runtime,
which is why it survives - it just quietly stops seeing any field the
real type gains. Both now import it, and the gate has an eighth check
that refuses a re-declaration. I only spotted the panel by hand; the
gate found the pill.
2. scripts/hetzner/test-retire-site.sh failed once inside a full verify
("expected output to mention 'DRY RUN'") and then passed 25/25
standalone. The cause is still unknown - it only misses under
concurrent load - and it was undiagnosable after the fact because the
assertion prints what it WANTED and never what it GOT. has() now dumps
the first 400 chars of the actual output on a miss, in the three
hetzner suites that share the idiom. Proven by mutating an assertion to
look for a string that is not there.
Not claiming the flake is fixed. Claiming the next occurrence will say
what happened instead of costing an hour of guessing.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The window was twenty minutes and guessed. On 2026-09-15 a cold-start agent
on the box — fresh PTY, boot, trust prompt, then the task — wrote its handoff
at 13:44 for a dispatch injected at 13:23: twenty-one minutes to answer
`git status`. The check aborted at 13:43 and reported a broken loop that was
one minute from succeeding, which is the worst thing a health check can do.
Thirty minutes in the script, thirty-five on the box timer (the timer runs
six-hourly, so the extra slack costs nothing and the check must outlast the
slowest healthy path it exercises).
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
bitbaum.orangecat.ch was in neither register. It is static files Caddy
serves straight from /opt/bitbaum/app, so it has no port, no unit and no
repo path, and it can no more hold an apps.conf row than annushka can —
which is exactly the case EXTRA_TARGETS exists for. Its own header says
why: still public, still on the one box, still unwatched reproduces the
blind spot the sweep was written to close.
It mattered little while nothing linked to the site. It matters now: all
nine package READMEs point at it, the org and personal profiles point at
it, and as of today /hire/ takes waitlist signups through it. An outage
there is silent lost work, and the first person to notice would be someone
who had already decided to get in touch.
Its health route is `/` — a static site's homepage IS its health — declared
in HEALTH_PATHS rather than left to the /api/health default, so it reads UP
instead of joining the LIMITED "no health route" list.
Verified against the live fleet, not just the table: the sweep now probes
16 targets and bitbaum answers health:200. 65/65 test-uptime-sweep.sh pass.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(hardcoded): give every duplicated constant one home
A sweep of all 44 repos' default branches for literals that duplicate an
existing source of truth. Loki's share, in four groups.
WRONG, and live on the public footer. src/config/fleet-site-copy.ts still
called the Zürich clinic "VitaReBa", a name retired on 2026-09-10 — its own
title says "Vita · Metabolische Psychiatrie & Systemische Longevity". The
generated fleet-sites.ts carried it onto loki.orangecat.ch, where it was
serving until this commit. Fixed at the copy file, which is the one place that
owns a site's own words, and the footer regenerated from it.
WOULD HAVE WRITTEN STALE DATA. scripts/seed-fleet-site-urls.ts kept a hand-typed
slug → URL map "read 2026-08-06". Two of its fifteen entries pointed at hosts
retired since (aoz-wohnen.orangecat.ch, revampit.orangecat.ch), so running it
would have filled empty live_url columns with addresses that only 308. It now
derives the map from apps.conf — the same register the footer is generated from
— which also fixes the six live sites the hand list never had. Verified: 19
sites, zero retired hosts.
THE BOX ADDRESS, in seven places. scripts/hetzner/_box-env.sh has been the SSOT
for it all along and sixteen scripts source it; four did not, and the shared
deploy workflow — reused by ~20 repos — had the IP inline twice, so moving the
box meant twenty edits. The workflow now reads the org-level Actions variable
HETZNER_IP and fails loudly if it is unset, rather than ssh-ing to an empty
string. loki's own deploy.yml had `vars.HETZNER_IP || '<literal>'`, a fallback
that guaranteed the variable was never needed and so never noticed if wrong.
ONE LAPTOP, baked into shipped code. site-cd-local.ts listed /home/g/.ssh and
/home/ubuntu/.ssh as deploy-key candidates beside os.homedir() — which already
IS those paths, since loki-app runs as `ubuntu` and a laptop runs as its owner;
both spelled one homedir for one named person. install-push-deploy.sh wired
hooks to /home/g/dev/loki, link-prod-runtime.ts to /home/g/dev/bitbaum, and
scripts/fleet printed an install line only true on one machine: all now DEV_ROOT
or the script's own resolved path.
The two scripts in scripts/local are INSTALLED BY COPY into ~/.local/bin and run
there by systemd timers, so they resolve _box-env.sh beside the real file first,
then under DEV_ROOT, and exit loudly if neither exists — a security check that
cannot find its target must not look like one that found nothing.
Deliberately unchanged: the slug alias map (the mechanism that makes a rename
safe), an executed migration's data row, the retired-handle detector's own
handle list, and test fixtures reproducing past incidents.
Verified: fleet-sites-derived in sync (14 sites), bash -n on every edited
script, and the branch's only remaining literals are in scripts/test fixtures.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(push-deploy): the generated hook must not bake one laptop's path
install-push-deploy.sh writes the hook body through an UNQUOTED heredoc, so
$HERE expanded at generation time and the absolute path of one machine was
committed into every repo's .husky/pre-push. kivvi and botsmann both carried it;
anyone cloning those repos got a hook pointing into a stranger's home directory,
and re-running the installer would have put it straight back after those repos
were cleaned.
The hook now resolves ${DEV_ROOT:-$HOME/dev}/loki/... at RUN time, so the
generator stops re-introducing what the cleanup just removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The repo was renamed today. It was the last place the product was still called
Housing: the name row in fleet's registers/retired.json retired "AOZ Housing" as
the PRODUCT name on 2026-09-10, but the repo kept it, and the repo is public.
The deploy name `aoz-wohnen` is deliberately NOT renamed with it. It is an
infrastructure identifier — systemd unit, /opt path, database — nothing on the
box keys on the repo name, and moving it would touch a live site for no visible
gain. apps.conf's comment block already said as much and still does.
The load-bearing change is apps.conf's fourth field. repo-metadata-audit.mjs
keys the register on that path's BASENAME, so while it read /home/g/dev/
aoz-housing the join against GitHub missed and every metadata check for this
repo was silently skipped — the audit went green by not looking at it. The local
checkout was moved to match and its three worktrees repaired (`git worktree
repair`), not pruned: they hold branches.
Two test failures worth keeping, because both were the rename telling the truth:
- project-mention asserted that "the AOZ housing rebuild" resolves to the
project. With the slug renamed it does not, and should not. The case exists
to prove "a slug with a hyphen, typed with a space" matches, so the INPUT
moved to the current name rather than the expectation being loosened.
- tab-match asserted a terminal tab literally named "AOZ Housing" matches the
slug. Same thing: the fixture now uses the name the tab would actually have.
Consequence worth naming: someone who types "aoz housing" at Loki will no longer
be understood. There is an alias mechanism for exactly this shape
(register/build.ts maps the deploy name to the repo), but wiring the retired
name into mention-matching is a product decision, not a rename chore.
Left alone on purpose: scripts/db/retire-stale-projects.ts, whose data row
records the project names the database actually held when that migration ran;
and content/thoughts/*.md, published essays — one of which quotes a filesystem
path observed during a debugging session, so rewriting it would falsify the
anecdote.
The production user_projects row was updated too (name and git_url), because the
database is a second copy of the repo identity and a past rename left 21 rows
pointing at a dead account. New URL proven to resolve: 431bae7.
Tests green: fleet-register 44, project-mention 28, tab-match 10, fleet-map 7,
loki-project-ranking all.
Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
heidi.orangecat.ch answers 200 and has since it launched. Its apps.conf row
said `prospect`, and because the studio site derives from this register, that
word was rendered on heidi's public page.
`live` in this column means the process is SERVED — a provisioning fact, like
`client-app` two columns over. It is not a release claim, and nothing in this
fleet makes one: everything is beta, OrangeCat included (fleet AGENTS.md,
"Names agents must share"). So this row now reads `live` and bitbaum renders
"Beta — running, not released", which is both true statements at once.
src/config/fleet-sites.ts is derived from this file and is regenerated here
rather than hand-edited — scripts/test/fleet-sites-derived.ts caught the drift
before CI did, which is the entire point of having the pair.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The runner launches agents with 'bash -lic', which sources ~/.bashrc — and
~/.bashrc on the box still exported the retired account's
CLAUDE_CODE_OAUTH_TOKEN. The probe skipped the profile, said ok, and every
real agent was refused. Probe the way the agent is launched or the probe
proves nothing.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The runner user had signed in to Claude Code on the box and that login
worked. A stale CLAUDE_CODE_OAUTH_TOKEN in the runner env — the retired
account — overrode it, and every self-dispatch hung. Deleting the env line
was the fix; the probe then reported "no token" as DOWN, which was the
runner's exact healthy situation.
The probe now does what the runner does: API key, else env token, else the
runner user's own sign-in. Only a missing sign-in file is a verdict. The
DISABLED advice names the override.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The per-repo read (#710) fixed a blind org endpoint and immediately sent 100
Telegram messages: the openclaw FORK carries ~100 open alerts for upstream's
own test fixtures, and the loop paged each one. Now: forks are not read at
all, N new alerts in one repo are ONE line counting by type, and the tick an
install runs right after writing the check is journal-only so a change of
data source never pages the whole baseline as "new". The test plants a fork
with 100 alerts and asserts zero messages, and three alerts in one repo →
one message.
Claude-Session: https://claude.ai/code/session_01G6ax7X9GfarifcZUiqsVJm
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Three testable meanings, one script, no browser and no mocks
(scripts/test/loki-loop-e2e.ts, run as the signed-in operator through the
same API the /loki page uses):
1. knows the fleet — a fleet-shaped question is answered from the studio map
(all three pillars named, fleet_map among the retrieved sources) and the
reply is an answer, not the model's plan for one;
2. publishes the map — /api/fleet/map is public with the pillars live, and
bitbaum's map.json is the same map, recently generated;
3. closes the loop (--dispatch) — a request typed into a thread comes back
into that thread as an outcome turn. A run that never returns is aborted
with a [loki-e2e] marker so no test leaves the operator's queue hanging.
Proven against production before commit: 3/3 without dispatch; with dispatch
and the builder unauthenticated, the loop failed honestly inside two minutes
with the runner's own diagnosis delivered into the thread.
Scheduled on the box every six hours (install-loki-e2e-watch.sh ->
loki-e2e-check.sh, alert on flip; the dispatch leg only when the builder-auth
probe last said ok). pnpm run test:e2e:loki runs it from a laptop.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The org-level secret-scanning endpoint answered [] on 2026-09-14 while
botsmann's own endpoint listed three open alerts (Mailgun key, two MongoDB
URIs), so the daily check would have stayed silent about every existing and
future leak. Iterate the active repos instead; a repo whose alerts cannot be
read (scanning unavailable on the plan, no access) is noted in the journal
and skipped rather than counted as empty. Test fixtures follow.
Claude-Session: https://claude.ai/code/session_01G6ax7X9GfarifcZUiqsVJm
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A 2026-09-14 posture audit found the box well guarded (default-deny ufw,
keys-only SSH, fail2ban, unattended upgrades, offsite restic) but blind: no
intrusion or integrity detection at all, and the GitHub org with secret
scanning off on all 48 repos and every marketplace action allowed with the
box's root SSH key in an org secret. This adds the detection layer on the
existing alert channel, so a break-in becomes one Telegram message within
five minutes instead of a discovery months later.
- install-security-watch.sh: security-check.sh (5-min timer) alerts on
CHANGE only — guards down, sshd drift, edits to the files an intruder
touches (sshd/sudoers/authorized_keys/cron/PAM/ld.so.preload/Caddy/ufw/
monitoring/units), new internet-facing ports, new privileged accounts,
SSH logins from never-seen IPs that are not GitHub runners, processes
from /tmp or miners, new setuid binaries, new containers, stale offsite
backup, week-old pending reboot. Baselines seed silently; one grouped
message per tick; every message ends with what to do.
- github-security-check.sh (daily): new secret-scanning alert, new critical
dependency alert, repo turning public, new member/collaborator/deploy
key, Actions allowlist loosened. Every API call guarded: a failed call
skips its check and keeps the baseline (the first version paged an error
body as a policy change, and a wiped baseline would flood "new" next day).
- Caddy JSON access log on every vhost (snippet + sync-infra template) and
a fail2ban caddy-scan jail: 8 probes for /.env, /.git, wp-login, cgi-bin
… in 10 min = 24h ban. Proven by scanning orangecat.ch from the laptop
(tenth request refused); a real scanner was banned within minutes.
- sshd drop-in: 3 tries, no X11, dead-peer detection, AllowUsers root ubuntu.
- scripts/local/laptop-security-check (user timer, 30 min): new network
listener, sshd running, screen lock off, upgrades off, ~/.ssh changes,
new login account, gh identity change, week-old reboot; delivered through
the box's lib-alert over SSH, desktop notification as fallback.
- test-security-check.sh (test:ops): 39 assertions extracting the shipped
heredocs; the property under test is "speaks once on change, never when
nothing changed".
- docs/telegram-notifications.md: every new message registered.
Applied outside the repo in the same session: secret scanning + push
protection on 41/44 active repos (3 private repos are not eligible on the
plan) and as org defaults; Dependabot alerts + automated security fixes on
all 44; org Actions policy = GitHub-owned + verified + an explicit allowlist
of the 11 third-party actions the fleet uses.
Claude-Session: https://claude.ai/code/session_01G6ax7X9GfarifcZUiqsVJm
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Policy adopted 2026-09-14: the automated path (autopilot, scheduled and
multi-user runs) rides an Anthropic API key with a spending cap, never a
person's subscription token; the subscription belongs to the operator's own
interactive builds in the hosted terminal. The probe now uses the same
precedence the runner does and its alert names both fixes in that order.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The box-runner's CLAUDE_CODE_OAUTH_TOKEN belongs to the Claude account that
minted it. When the operator moved accounts (2026-09-14) the box kept the old
token; every dispatch printed "Your organization has disabled Claude
subscription access for Claude Code" into a PTY nobody reads, went silent,
and was reaped an hour later as "timeout". The product's whole promise was
off and nothing said so.
builder-auth-check.sh asks the builder one question with the runner's own
environment and alerts on the state flip (ok / disabled / down), naming the
fix. Installed hourly by install-builder-auth-watch.sh; tested against the
verbatim line; the token never appears in output.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A request typed into /loki ended at "Dispatch queued". The run closed hours
later into run_events, a push notification and Telegram — everywhere except
the conversation the person was typing in. Learning whether the work happened
meant leaving Loki for GitHub, which is the trip this product exists to make
unnecessary.
- Chat dispatches now carry the conversation id and opt into close
notification. On close, notifyRunClosed also writes an assistant turn of
kind "outcome" into that thread: what happened, the pull request found in
the repo during the run (which merges on its own once green) or the honest
absence of one, and the project's live URL (run-outcome-format.ts, pure and
tested; run-outcome-post.ts does the lookups).
- While the newest turn in a thread is still a dispatch, the workspace
re-reads the thread every 20s so the outcome appears without a reload.
- The dispatch closing and the box agent contract now ask for auto-merge on
the PR the agent opens: CI is the reviewer, a green PR merges and deploys by
itself, and the old "never merge from here" no longer leaves work stranded
behind a button nobody presses.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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>
The sweep counted any line carrying a `link` field as a failure, which was
right only while failures were the sole thing logged. The moment the app
logs a served turn — the next commit in orangecat — that would have read a
link answering seven calls out of ten as ten failures and alerted on it.
So selection is by MESSAGE now, not by the presence of a field: "model call
failed" and "provider failed, trying next fallback" are failures, "model
call served" is a win, and the report divides one by the other.
Where wins are not logged the output still says "a floor, not a rate"
rather than inventing a denominator. A percentage derived from an unseen
denominator is exactly the confident-but-wrong number this script was
written to avoid.
Mutation-checked: selecting on the field alone fails four of the new
tests, including the one where a link that ONLY succeeded gets alerted on.
18 cases now.
A fallback chain hides the thing it protects against. Groq answered 400
json_validate_failed to EVERY structured Cat call — prompt suggestions,
the offer engine, both writing engines, the intent router — for days.
Users got answers, the health route stayed green, and the only trace was
a warn line in a journal nobody reads. It was found by hand.
link-health.ts already makes a dead link cheaper (a 60s in-process
breaker) but deliberately forgets, and forgetting is the problem: a
provider can be down forever and the symptom is a slightly slower reply.
ai-provider-check.sh reads the app journals over 24h, counts failures per
provider/model, names the kind (json_validate_failed, rate_limit, 429),
and alerts through the existing lib-alert plumbing — alert_transition, so
it fires on a state flip rather than nagging daily.
Three things it deliberately does NOT do:
- It does not claim a success RATE. Failures are logged, successes are
not, so this is a floor and says so. A monitor that implies more than
it knows is how the registry audit came to report "zero adopters" for
a package with eight.
- It does not treat an empty journal as health. No lines is COULD NOT
LOOK, and it alerts on that too. A monitor that cannot go red is worse
than no monitor.
- It never disables a provider. Which link to drop is a product decision
with cost and quality on both sides; an automated answer would be
wrong in the direction nobody notices.
The test fixtures are verbatim lines from the incident, and they earned
their keep immediately: they caught a trailing quote that counted one
link as two, and kind-matching that silently excluded every fallback
line — which is exactly where `reason` lives.
Against the live journal it now reports groq at 2 failures in 24h, down
from 11 before this morning's fix, so at the default threshold it stays
silent. That is the fix confirming itself.
heidi's row read `db=-`, meaning the deploy's schema step skipped it. It is
about to ship drizzle migrations for study groups, and `apply-schema.sh`
resolves the target database from THIS column rather than from the app's
DATABASE_URL — so without this line the migrations would be silently
skipped, exactly as botsmann and printcraft shipped green for months while
the pipeline never saw a file.
The database, role, pg_hba rules and credentials are provisioned on the box.
Provisioning set default privileges FOR ROLE postgres in heidi's public
schema, because the schema step runs as the superuser: a table a migration
creates is owned by `postgres`, and the app role is granted nothing on a
table it does not own. That is the failure vitareba's schema-usable health
check exists to catch, and on that database it was repaired by hand
afterwards — `pg_default_acl` there is still empty. Setting it before the
first table exists is cheaper than granting after every one.
The rest of the row was checked at the same time, per the lesson from the
hirnli/evig mix-up: port 4025 matches launch.sh, repo_path, domains, owner
and app_dir are all current. Only `db` was wrong.
Claude-Session: https://claude.ai/code/session_01FzYBD3sZroCAYeRgTYrpfT
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore(register): delete the six experiment sites, and gate what let them linger
Six sites from dogfood and site-factory runs on 10-11 September were still
live today, five with GitHub repositories behind them. Two of them read as
real Zurich businesses that do not exist — "Velokiosk — Bike Repair at
Zürich HB" and "Kaffeeklappe – Kaffee to go in Zürich Wiedikon" — on the
founder's own domain. Nobody decided to keep them. They were never removed
once the thing they proved was proved.
All six are gone from the box (service, vhost, /opt, checkout, port, row,
workflows, and this box's deploy key revoked from each repo first), and the
five repositories are deleted. This removes their rows here, which had
drifted from the box copy.
The gate is the point. check-no-experiment-litter.sh fails the build when a
generated throwaway name reaches the committed register — a dated suffix
(-sep11-0040) or a throwaway prefix (dogfood-, factory-, probe-, e2e-). No
grace period: spinning one up for an hour leaves no trace here, so
committing its row IS the moment a test becomes permanent.
It matches names, not kinds. A first version judged kind=demo and flagged
sbb-fundbuero and camille-boulangerie, which are real work that happens to
sit at demo status — exactly the false positive that gets a gate widened
until it catches nothing. No product is ever called factory-sep11-0040.
* docs(retire): delete the project first, or the box puts the site back
Deleting the six sites in the obvious order looked like it worked — units
stopped, vhosts gone, directories removed. Two minutes later:
[box-prepare] cloning velokiosk-sep10 <- github.com/bitbaum/velokiosk-sep10
and three of the six checkouts were back. A FleetCrown project row that
still names a dirPath is a standing instruction to restore the site, and
it is invisible from the box, so the box cannot know the site was retired
on purpose. The order is now part of the documented cleanup.
* fix(teardown): stop offering a repo deletion no token can perform
Deleting a project with ?deprovision=delete-repo returned
502 {"error":"GitHub delete failed (403)",
"detail":"Must have admin rights to Repository."}
found by running the whole create-and-reverse path against production.
The cause is not a permissions mistake: GitHub requires the delete_repo
scope, and neither credential this product holds asks for it — the org
token has gist/read:org/repo/workflow, the user OAuth grant has
read:user/user:email/repo/workflow. So no FleetCrown token can ever
delete a repository, and the button offering it could only ever fail.
That is the right security posture, so keep it and make the product
honest about it instead:
- the teardown UI drops the delete option and links to the repository's
own Settings page on GitHub, where the owner has rights we never borrow
- a delete attempted through the API reads GitHub's x-oauth-scopes header
(sent on every response, errors included), and when delete_repo is
genuinely absent says so, lists what the token does have, and gives the
URL — rather than echoing a 403 nobody can act on. A token that DOES
hold the scope and still gets 403 keeps the real message.
- retire-site.sh --repo delete refuses up front, before the service,
vhost and files are gone, instead of failing at the last step
Verified against production: repo creation 200, archive 200, publish to
OrangeCat then take it down (public page 200 -> 404), project delete 200.
scripts/test/repo-delete-capability.ts pins both halves of the contract
and fails if either comes back.
* fix(retire): warn while it is a plan, refuse only when told to go
CI runs a GitHub token without delete_repo, so the new preflight aborted
the DRY RUN and took the whole retire-site suite with it. A plan that
cannot run is still worth reading: it now says the scope is missing, and
only --go refuses outright, before anything is torn down.
The test stubs both answers from gh rather than inheriting whichever
token the machine happens to hold — CI has no delete_repo, a laptop may.
Three leftovers from the teardown work, each one something created that could
not be undone.
UNPUBLISHING WAS IMPOSSIBLE. Publishing a project to OrangeCat created a public
page and wrote a back-link that nothing could clear, so `already_published` was
a permanent verdict: the page stayed up, and the only recourse was to sign in
to OrangeCat and change it by hand. The status primitive that would fix it
lives behind their session auth, which a bearer-token integration cannot call.
"Take it down" now sits beside "Published" and sets the OrangeCat project back
to `draft` — the state that is owner-only there (their public list is `active`
and `completed`, mirroring the row-level policy) — then forgets the link so
publishing again works. Nothing is deleted: the project, its funding and its
wall survive, which is why this is unpublish and not delete. Their half is
bitbaum/orangecat#977 (PATCH /api/v1/projects/[id]); a FleetCrown pointed at an
OrangeCat without it gets a message saying exactly that rather than clearing
our back-link and leaving their page public.
A RETIRED SITE'S REPOSITORY KEPT DEPLOYING IT. deploy.yml fires on every push to
main and would rsync to a box path that no longer exists; ci.yml and
auto-merge.yml keep merging agent PRs into a project that is gone. Deleting a
site now disables its workflows — before archiving the repository, because an
archived repository refuses every mutation including that one. Disabled rather
than deleted: gh workflow enable brings them back if the site is rebuilt.
DELETING A PROJECT LEFT WORK RUNNING. The audit tables were the wrong worry:
orchestration_runs, agent_sessions, prompt_history and control_audit_events all
carry project_key beside project_id, so nulling the id leaves them readable by
name — that is history, and deleting it to tidy a foreign key would destroy the
only account of work that really happened. Two things ARE different and are now
cleared: project_states, the Control card's live state, which has no id to null
and would silently re-attach to a new project reusing the name; and unexecuted
pending_commands, which a runner would claim and dispatch into a project that no
longer exists. The danger zone says which of the two happens, because "nothing
says so" was half the complaint.
Verified: pnpm run verify green; 36 assertions on retire-site.sh (extended to
pin that a site taken OFFLINE keeps its workflows and its deploy key — only a
delete removes them).
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Creating a site makes about forty things. Deleting the project undid two of
them, plus the repository if you asked. Everything else survived — and the
part that survived is the part that is public.
After "Delete project" on a kicked-off project you still had: the live site at
<slug>.orangecat.ch, its Caddy vhost and TLS certificate, an enabled systemd
unit, /opt/<slug> with its secrets, the checkout, an apps.conf row holding a
port that could never be reclaimed, a monitoring target that keeps paging about
a site you deleted, the box's SSH deploy key sitting in the repository, and the
project's milestones orphaned onto /goals. The only way off the internet was a
human with SSH.
FOUR LEVELS, because "undo it" means four different things:
offline stops serving at once; code, files and port kept. Reversible.
private keeps working behind a password; repository made private.
restore undoes either of the above.
delete unit, vhost, /opt, checkout, apps.conf row (freeing the port),
monitoring target and the leftover deploy key. The repository is
ARCHIVED, never deleted, unless explicitly asked — that is the one
step nobody can undo, so it is never a default.
NOTHING HAPPENS WITHOUT A SECOND ASK. The default prints exactly what it would
touch and performs no action, and that preview is produced by the same script
that does the work — a plan written separately is a description that drifts.
The route runs the plan through the runner and returns it inline, so the
confirmation is the real thing rather than a promise about it.
Refusals are refusals: thirteen infrastructure slugs (fleetcrown, orangecat,
the bridge…) cannot be retired at all, and a LIVE client engagement needs an
explicit second hand — money terms are not a thing a button decides.
Shape follows new-site.sh, deliberately: a closed set of parameters validated
against a fixed grammar, handed to the script as an ARGUMENT VECTOR via
execFile, armed by the same FLEETCROWN_SITE_FACTORY switch that arms creation.
A runner allowed to bring public hosts into being is the one allowed to take
them away, and no other.
Also fixed, found by the same inventory:
- GitHub visibility could only be set at creation. setGithubRepoVisibility
makes a repository private (or public) afterwards — new-site.sh creates
public repos, so "make this not public" had no answer for the code.
- Deleting a project now deletes the milestones the kickoff wrote FOR it,
instead of leaving them unowned on /goals (ON DELETE SET NULL).
- "Danger zone" says what it does NOT do, and points at the site controls.
Verified: pnpm run verify green. 32 assertions on the script (a dry run never
edits the register; every artifact named in a delete plan; infrastructure
refused; no backticks), 41 on the validator (a plan never carries --go; no mode
defaults to deleting a repository).
DEPLOYMENT: set FLEETCROWN_RETIRE_SITE_SCRIPT in /opt/fleetcrown/runner/.env to
the retire-site.sh in the factory checkout, beside the FLEETCROWN_NEW_SITE_SCRIPT
already there, and update that checkout. Until then the command is rejected with
that exact reason rather than silently doing nothing.
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reverts the rename I made earlier today. The demo is being pitched TO SBB, so
being named after the prospect is the artefact, not drift. The repo's own README
called the name "an open question, not a settled decision"; I settled it, and
that was not mine to do.
Row, domain, repo_path and the cron unit are back. Port 4016 never moved.
lib/tenant.ts is untouched: Nordbahn remains the neutral default tenant, SBB the
opt-in livery with noindex — the design that makes pitching it safe.
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
OnFailure= is a [Unit] directive. It sat in [Service], where systemd does not
reject it — it logs "Unknown key 'OnFailure' in section [Service], ignoring"
and carries on. The unit starts, serves, looks healthy, and simply never alerts
when it dies.
Measured on the box: 10 of 28 app units had NO effective OnFailure —
causius, coldstart-sep10-2339, diplodoctor, dogfood-site-sep10-1201,
factory-sep11-0040, factory-sep11-0110, heidi, kaffeeklappe-sep11,
nordbahn-fundbuero, velokiosk-sep10. Every one of them was created AFTER the
last install-host-alerts run, which installs the drop-in that wires this
separately — the exact gap this template line was added to cover. Its own
comment says "alertable from its first boot"; for a newly-synced app that had
never once been true.
Found while provisioning the nordbahn-fundbuero rename: the journal warning
scrolled past during its first start.
A directive in the wrong section is invisible in every way that matters —
systemctl start works, the warning scrolls past on boot, and the only witness
is `systemctl show -p OnFailure`, which nobody runs. So the test asserts
placement by SECTION, not presence, and is proved by mutation: putting the line
back in [Service] turns it red.
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The repo and the public host both carried the name of a real transport company
this demo has no connection to. The site has always titled itself Nordbahn
Fundbüro, on an operator invented on purpose, and the repo's own Naming section
said the working name "is probably the wrong one". The addresses now say what
the product says.
name sbb-fundbuero -> nordbahn-fundbuero
domain sbbfundbuero.orangecat.ch-> nordbahn.orangecat.ch
repo_path ~/dev/sbb-fundbuero -> ~/dev/nordbahn-fundbuero (moved)
cron unit appcron-sbb-fundbuero-* -> appcron-nordbahn-fundbuero-purge
Port 4016 is kept: it is an address with no name in it, and moving it would
mean a second migration for nothing.
nordbahn-fundbuero#74 already landed the app side (deploy `app:` input,
package.json, its own fallback URLs), so this row is what lets the new app be
provisioned. The old unit keeps serving until the new one is verified; the old
host then becomes a permanent redirect in its own vhost file, which sync-infra
cannot regenerate over — the pattern aoz and sink already use.
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
After the sweep auto-merges an agent's PR on a site, nothing starts Deploy:
the merge uses GITHUB_TOKEN (no push event) and the CI it re-arms is itself a
dispatch, whose workflow_run GitHub suppresses. kaffeeklappe-sep11 sat an
hour on 2026-09-11 with the change merged, CI green, and the box serving the
previous release; the sweep's reconciler is the safety net, up to ten minutes
late and, when its cron does not fire, not at all.
ci.yml gets the ship job bitbaum/fleetcrown's own ci.yml has: on a
workflow_dispatch run of CI on main, dispatch deploy.yml. A dispatch is not a
push, so it is exempt from the no-cascade rule. Only for workflow_dispatch —
a real push chains through workflow_run by itself.
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The checkout guard compared the workspace's remote URL and the requested
owner/name as strings. After kaffeeklappe-sep11 and velokiosk-sep10 were
transferred from catomean to bitbaum, the workspace's remote read
bitbaum/… while FleetCrown still asked for catomean/…, and every
registration stopped with "existing checkout belongs to another
repository" although GitHub redirects the old name to the same repo. The
guard now resolves both names through the API and compares what GitHub
answers; string equality remains the offline fallback. Token-bearing https
remotes are normalised too.
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(site-template): CI defaults .nvmrc when a site has none; register refreshes stale sidecars
Sites scaffolded before the starter shipped .nvmrc have none, and
actions/setup-node fails on a missing version file — the first seeded CI run
on kaffeeklappe-sep11 (PR #3, 2026-09-11) failed there. ci.yml now writes a
default .nvmrc (22) when the repo has none; a committed one wins.
register-site.sh also refreshes ci.yml/auto-merge.yml on the remote when the
site-template's content has moved on, so an existing site does not keep last
week's CI forever.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
* style(site-template): prettier formatting for the .nvmrc default step
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab
The cloud-primary series (#615 routing, #618 OrangeCat auto-kickoff, #624
Fleet Runner 0.8.19, #630 web PTY-only) changed what the product IS. This
sweep makes every surface that describes it say so, so neither an agent
reading the repo nor a person reading the site is told about zellij tabs,
presence-based routing, a cold-start restore, or a handoff that "starts
nothing".
Inventory-driven (≈105 doc lines, ≈30 user-facing strings, ≈22 code
comments, 2 repo-level items), not a grep-and-replace:
User-facing
- /download prerequisites: the "Zellij — bundled" card is gone; copy says
each agent runs in a terminal Fleet Runner owns.
- Quickstart, license page, executor copy (cloud is the default; "This
computer" is a per-project choice under Runs on), marketing pillars,
whitepaper (owned-PTY design, "where a project runs is a decision, not a
guess", ZSH typing-guard section deleted), Control terminal panel strings
(components renamed LiveTerminalPanel / LiveTerminalRows), peek drawer
copy, GitHub release notes for 0.8.19, repo description + topics.
Agent-facing
- README, CLAUDE.md, AGENTS-adjacent SSOTs: cloud-local-workflows.md now
states the stored routing rule; priority plan closes B6; multitenancy plan
routes by builder_pref; HANDOFF.md staleness table + terminals section;
the 2026-09-10 cold-start handoff gets a dated "superseded" section; the
two shipped proposals (fleet-runner-pty-ownership, desktop-app) carry a
status banner; home/README describes the eight modules that exist;
desktop/README describes 0.8.19; roadmap seed marks the migration done;
box-runner unit and log drop FLEETCROWN_RUNNER_PTY; 22 code comments.
Code (one coherent retirement)
- focus_tab is removed from the pending-command contract, the desktop
validator and poller, enqueueTabCommand's type, the validator test and the
failure classifier (START_SESSION | RETRY). The runner had rejected it
since 0.8.19; now it cannot be enqueued at all.
Verified: tsc, eslint, 148/148 unit files, 130/130 home self-tests,
check:desktop (typecheck + build).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
* chore(desktop): 0.8.20 — the focus_tab retirement touches desktop/, so it ships as a release
The release-drift gate is right: a desktop change without a bump goes red on
main once the next tag is minted. 0.8.19's changelog date is corrected to the
release's real publishedAt.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WSNERoZZqW2TgqbAGHSQZf
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The clone under DEV_ROOT is the box agent's workspace. The shim step used it
as a git working tree: on 2026-09-11 it committed the seeded auto-merge.yml
onto the agent's feature branch and then failed to push it with the caller's
token, so the site still had no auto-merge and the agent's branch carried a
stray commit. deploy.yml, ci.yml and auto-merge.yml are now written to the
remote via the Contents API only — this host's gh login first, the caller's
token second — and verified there. No git in the workspace.
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The release under /opt carries scripts/site-template without its .github
directory, so the sidecar seeding from #612 found nothing to seed on the box
("site-template has no ci.yml — skipping"). The durable checkout follows main
and has the files; prefer it, keep the sibling dir as the fallback.
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Production FleetCrown's database is 127.0.0.1/fleetcrown — LOOPBACK ONLY. Nothing
off the box can reach it. new-site.sh ran provision-widget.ts on the LAPTOP, so
the widget step failed on every scaffold; and because agents work in git
worktrees, where the gitignored .env.local does not exist, it failed before it
even reached the network:
Error: DATABASE_POOL_URL or DATABASE_URL is required
The step is non-fatal by design, so each run carried on and built a repo, a box,
a Caddy vhost and a deploy, and the site went live without the one feature that
lets an owner change it without emailing a person.
MEASURED, because my first estimate was too strong. I wrote "every agent-created
site" before checking. Sweeping all 21 registered hosts for a rendered
data-fc-project — following redirects, since four 307s read as absent on the
first pass and three of those four in fact had one — gives 17 with a widget and
4 without: surf-your-life, heidi, causius, dogfood-site-sep10-1201.
The split confirms the mechanism rather than weakening it. coldstart-sep10 and
velokiosk-sep10, both created today FROM THE BOX, have widgets; the ones
scaffolded from a laptop worktree do not. Where it ran decided whether it
worked.
I had written this up as a credential decision for George. It was not one. The
box already holds the credentials, the scaffold already SSHes there for
sync-infra and deploy, and the fix needs no secret to move: run the provisioner
where the data is.
provision-widget-on-box.sh sources the same env the running app uses, names the
owner (the script refuses to guess between seven users — correctly; guessing
puts a client's feedback in a stranger's inbox), and normalises the output into
one env fragment. FLEETCROWN_OWNER_EMAIL, BOX_FLEETCROWN and BOX_FLEETCROWN_ENV
join _box-env.sh, which is where studio constants already live. The owner was
read out of the database, not assumed.
TOLERANT OF A BOX THAT IS BEHIND. That checkout carries the durable register and
is routinely some commits behind main — it is 21 behind right now, with the
register modified by another job, so it is not mine to reset. The older
provisioner prints a bare token on stdout and the project id only in an stderr
status line; this normalises both shapes, so the caller does not care which
version ran.
AND THE READER DROPPED THE TOKEN
First run reported "no token in output" against a run that had SUCCEEDED. The
older provisioner ends with `process.stdout.write(token.token)` — no trailing
newline — and a bare `while read` returns non-zero on an unterminated final
line, so the loop body never runs for it. The reader silently discarded the one
value it exists to read. Third reader in two days that failed for a reason
unrelated to the thing being checked, after the pipefail/SIGPIPE race and the
sed range that deleted the evidence.
PROVEN END TO END, ON THE LIVE SITE
Diplodoctor now serves the widget: script tag present, data-fc-project present,
widget.js 200, and the CTA deep-links to its own project (c93178e5) instead of
the project list. The page's "you can change it from here" claim reappeared on
its own — it is gated on the same token that gates the script, so it came back
because it became TRUE.
test-site-template.sh 28 -> 32. It asserts the box path AND the absence of the
local one, because adding the good call while leaving the old one behind would
read as correct and still take the broken branch. Mutation-proven: reverting
new-site.sh to main fails both; removing the newline guard fails the third.
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* feat(register): one register for every project, joined from the owners of each fact
"Which projects do we have, and which one has a site, a FleetCrown profile, an
OrangeCat profile, a Solon organisation?" had no answer. It had seven: apps.conf,
this database, OrangeCat's, Solon's, bitbaum's companies.json, the public footer's
config, and 24 markdown dossiers. Each is right about its own facts and wrong
about the others; joined by hand they disagreed on 5 names, the footer named a
host that had been renamed and missed 12 live ones, the showcase listed hosts
the hosting register did not know, and Caddy served 38 vhosts of which the
register knew 23.
This does not add an eighth list. It adds the JOIN, computed from the owners:
src/lib/register/apps-conf.ts the one parser for apps.conf (hosting SSOT)
src/lib/register/build.ts pure join keyed on the canonical slug
src/lib/register/solon.ts Solon membership via its public org endpoint,
reported UNCHECKED (not "none") when unreachable
GET /api/fleet/register public JSON — consumers derive, never copy
/fleet the same join, rendered
The join key is the repository name. Names have drifted into several spellings
(aoz-housing/aoz-wohnen, datacat/datacat-web, s-ink/sink, sbb-fundbuero/
sbb-lost-found, wild-spirit/annushka); `canonicalSlug` folds every alias that
has actually bitten, and each is pinned by a test. The durable fix is three
nullable columns on user_projects — slug, hosted_app, solon_org_slug — with
scripts/backfill-project-registry.ts to assign them once (drizzle/0065; the
applier is filename-based, matching how 0064 was shipped).
The footer stops being a list anyone edits. src/config/fleet-sites.ts is now
GENERATED from apps.conf by scripts/generate-fleet-sites.ts (the footer is a
client component and cannot read the register at render, and Atlas needs static
anchors), with editorial copy kept in fleet-site-copy.ts keyed by slug. A gate,
scripts/test/fleet-sites-derived.ts, fails the moment the file drifts.
apps.conf itself gets two corrections found by comparing it with the box:
evig (live on 4004 from the main Caddyfile, never registered) and
hirnli.orangecat.ch, which revamp-info's app serves.
Not done here, on purpose: the bitbaum showcase still renders its own
companies.json — it moves to the API once this is live; annushka and bitbaum are
static Caddy roots with no app process and do not fit the register's app shape.
Verified: 145/145 unit files (24 new assertions in fleet-register, drift gate
green), tsc clean, register gates (port-alloc, register-reality, client-ledger)
green with the new rows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY
* fix(register): evig row names its host database, revampit
The deploy-ready gate found drizzle migrations in the evig checkout and a
db of '-', which is the shape that let botsmann serve PGRST205 for months.
evig is not deployed by deploy.sh at all — its own workflow applies its
migrations — but the register should still say which database that is.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY
* fix(watchdog): evig left the hand-list the day it entered the register
The hand-list is built to die one row at a time: the test that failed is
the one that forces a duplicate out the moment apps.conf registers it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>