The shared-package rollout gate clears when a canary deploys and passes its checks, but nothing woke the held PR's sweep: it waited for the next CI completion in its own repo or for a per-repo hourly cron GitHub does not honour. sweep-wake.mjs dispatches each repo's own auto-merge.yml where a green dependency PR is open; sweep-wake.yml is the reusable entry for canaries and deploy-reconciler.yml runs it on the box timer tick.
* docs(agents): Loki is the execution plane, not engineering
The plane was renamed 2026-09-20 (orangecat src/config/ecosystem.ts
ECOSYSTEM_PILLARS); this sentence still carried the old label.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* feat(audits): hold every doc and every live page to what is true
Agents read README / CLAUDE.md / AGENTS.md / .claude/ before code and act on
them; visitors read pages rendered from components nobody greps. Both drifted
silently: one pass over nine repos on 2026-10-19 found a merge policy said to
live in a repo that no longer holds it, dozens of paths to deleted files,
scripts not in package.json, "Next 15 / TS 5.8 / Tailwind 3.3" in a repo on
16 / 6 / 4, and a retired host presented as production in forty files.
- docs-truth-audit.mjs: holds each repo's docs to its OWN tree — backticked
paths, relative links, `pnpm run X`, stack majors vs package.json, retired
names. Never judges prose; a line saying the thing is gone is history.
Modes: --dir (working tree), --repo, --repo --pr (only what a PR adds),
--sweep --check (every repo, ratcheted by docs-truth.baseline).
- auto-merge sweep: the docs gate. A PR that ADDS docs drift — including by
deleting a file a doc still names — is held with one comment per head
commit naming each line and the fix. Exit 2 (could not look) never holds a
merge. The sweep is the one workflow every repo calls, so this needs no
per-repo copy. DOCS_TRUTH=0 opts a repo out.
- live-claims-audit.mjs: fetches every live site in Loki's map (home + the
pages it links first) and flags retired names/hosts, forbidden claims, a
past copyright year and dead same-site links. Daily, ratcheted.
- repo-metadata-audit: a GitHub description may not carry a retired name or
a forbidden claim.
- registers/org.json gains forbiddenClaims; org-drift-audit.sh reads it, so
the document and served-page gates share one list.
- Workflows docs-truth.yml and live-claims.yml (daily); both test suites run
per-PR in ci.yml. AGENTS.md states the four gates once; README lists them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* feat(audits): fewer false positives, and homepages follow the register
docs-truth: a removal stated across a line break is history; `cd sub &&
pnpm run x` reads the sub-package; an example path (e.g. …) is not a claim;
a file that describes other repos by design (dotfiles' global CLAUDE.md)
opts its paths out with <!-- docs-truth: paths-elsewhere -->. All four came
from the first cleanup pass over the fleet.
repo-metadata: --fix writes a homepage the register already holds, and
repo-metadata.yml runs it daily with FLEET_PAT before the report — five
homepages were missing or wrong on 2026-10-19 and every fleet PR inherited
the red. Descriptions are prose and stay reported, never written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* feat(docs-truth): a name kept on purpose is marked on its line
<!-- docs-truth: keep — why --> records a deliberate exception (a JWT issuer
that still carries a retired name because changing it signs everyone out)
instead of leaving it as drift the gate cannot tell apart from a mistake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* fix(docs-truth): links in code spans are markup; /file links resolve under public/
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* docs(templates): AGENTS.md pointer names the local docs check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
* ci: judge live repo metadata on its own schedule, not per PR
The per-PR --check reads live GitHub state no PR can change; on 2026-10-19 it
was red on every fleet PR over five untouched repos, including the PR adding
the reconciler that repairs them. repo-metadata.yml (daily) fixes homepages
from the register, then reports; the unit test stays per-PR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
---------
Co-authored-by: Claude <noreply@anthropic.com>
A complete, tested Next.js 16 app — next-intl (en/de/fr, localePrefix
"always", parity test, Swiss spelling), better-auth accounts on Drizzle + pg
(email+password with verification, magic link via mail-kit, passkeys, TOTP
2FA, the shared bitbaum sign-in and OrangeCat as env-gated OIDC with
client_secret_post + PKCE, roles in the app's own users table), nonce CSP with
strict-dynamic and connect-src 'self', limitkit on every auth path keyed on the
proxy's hop, secrets sealed with ai-kit seal, ai-kit complete() example route,
own-model settings, bip-kit roadmap/changelog, /api/health asserting the app
can read its own tables, and CI/deploy/live-check/CodeQL/gitleaks/audit
workflows.
scripts/templates/render-app.sh fills the placeholders;
scripts/templates/test-app-template.sh holds the render to the fleet's own
judges (version-currency gapsFor, verify-floor predicates, cicd-hygiene audit)
on every PR, and the new app-template CI job installs it, runs verify and
drives sign-up/sign-in against a real Postgres.
STACK.md records the owner's 2026-10-11 sign-in decision: every app owns its
accounts and offers every method; it supersedes the 2026-09-11 federate-only
rule. SHARED.md and README point new products at templates/app. The
duplication ratchet skips the starter itself (the one canonical copy).
Claude-Session: https://claude.ai/code/session_01W7K2Gm5wcbfCi7THtmV1Hy
Co-authored-by: Claude <noreply@anthropic.com>
The contributor gate held an outside PR to one thing: every commit signed off.
That is a statement about licensing. It says nothing about whether the code is
safe to run, and every repository this sweep serves deploys on merge — so a
signed-off, green pull request from a stranger could reach production without a
human reading it.
An outside PR (author not an owner, member or collaborator) now also needs an
APPROVED review, from an owner, member or collaborator, on the commit actually
being merged. The head check matters: an approval on an earlier commit does not
cover a later push. An association the API cannot report is treated as outside,
and a failed reviews lookup counts as no approval — both fail closed.
The two properties get separate switches on purpose. REQUIRE_DCO=0 is for a
repository with its own licence terms and must never also switch off review;
REQUIRE_OUTSIDE_REVIEW=0 exists only so a repository with no deploy can opt out
deliberately. Members are unaffected.
Four tests, mutation-proven: with the review switch defaulted off, exactly
those four fail and the other 24 still pass. Suite: 28 passed.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The 2026-09-15 cleanup campaign moved seven repos off hand-rolled rate
limiters. Verified on each repo's DEFAULT BRANCH, merged only:
botsmann #198 merged 08:24Z 2 limiter files → 1 (lib/middleware/rate-limit.ts deleted)
evig #488 merged 05:42Z 3 → 2 (src/lib/auth/rate-limiter.ts deleted)
petvity #95 merged 09:09Z 1 → 1 (hand-rolled body replaced by limitkit)
surf-your-life #70 merged 06:33Z 1 → 1 (same)
truthseeker #54 merged 06:46Z 1 → 1 (same)
kivvi #96 OPEN (draft, client) — NOT counted
aoz-housing #242 OPEN (client) — NOT counted
rate-limit 13 → 11 files. Only two files left because five adopters keep a
thin local module holding their own limit values and call limitkit from it —
the intended shape. The row was lowered by hand rather than by --update,
because --update would also have absorbed the logger rise below.
logger is LEFT RED at 6 while the fleet sits at 7, deliberately. The extra
file is datacat's backend/lib/logger.js, created the same day by datacat #271
("one logger") — a repo with no matching file now has exactly one, so a
consolidation scores as a rise. The offsetting fix exists and is unmerged:
kivvi #96 takes kivvi from two loggers to one, which returns the count to 6
on its own. Raising the baseline now would retire the only pressure on it.
The counting half was also lying. `gh api .../git/trees` was `|| continue`,
so any transient failure dropped a repo silently and that repo contributed
zero files — indistinguishable from a repo that deleted its duplicate. One
sweep over 43 repos dropped NINE and showed phantom falls in email-send
(7 → 4), health-route (13 → 11) and slug-util (4 → 3); none had happened.
Now it retries with backoff, names what it could not read, and refuses to
judge OR to write a baseline from an incomplete read — the same guard the
truncation case already had. Six new self-test cases pin both directions.
SHARED.md, next to the limitkit row:
- install is `pnpm add limitkit@^0.2.0` (npm, verified 0.2.0), not the
`github:` form: under pnpm 11 a git dep's `prepare` build is refused
without an allowBuilds entry, so the package installs with no build
output and the adopter's CI fails on an import resolving to nothing.
heidi is still pinned to the github: form and will hit this next rebuild.
- the security finding, because it recurred SEVEN for seven: every
hand-rolled limiter keyed its bucket on the FIRST X-Forwarded-For hop.
That hop is written by the caller, so a client sending a fresh value per
request got a fresh bucket per request and was never limited — the
limiter was decorative. The last hop is the one the trusted proxy
appended; limitkit's clientIp() reads that. vitareba has no IP-derived
limiter at all. botsmann's additionally FAILED OPEN on any database
error, switching itself off under exactly the load it existed for.
- adopter count from registers/packages.json, not by hand: eight
(botsmann, evig, heidi, loki, orangecat, petvity, surf-your-life,
truthseeker). The prose claiming orangecat unified "without limitkit" is
now contradicted by its own package.json — corrected in place.
Also corrected: SHARED.md and README both claimed the ratchet "runs on every
PR here". It does not — a PR runs only the network-free self-test; --check
runs weekly. A gate described in the wrong place is a gate nobody checks.
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
"We believe our systems will work" earns the word when it is observed. This
reads, from sources that are not us, every number the thesis depends on:
stars and forks (GitHub), npm downloads per shared package, paying clients
and CHF/month (loki's apps.conf plan|price over live rows owned by someone
else), and what Solon's originator_share rule has routed (0, by source).
history[] gains a row only when a reading changes, so a flat month is one
row and one commit. Zero is a reading.
First reading, 2026-09-15: 2 stars, 1 fork, 6812 npm downloads/30d (our own
CI installs included), 0 paying of 4 clients (4 favours), CHF 0/month,
originator share paid 0.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
loki's deploy-ready check proves each app can be deployed and the watchdog
proves each URL answers. Nothing checked the part that needs a human who
knows things: whether the secrets an app needs are NAMED in its repo, so an
operator can rotate a key or rebuild the box without reading the code. This
reads loki's apps.conf and each repo's default branch, and ratchets the count
of live apps without a committed env example (5 of 11 today: datacat-web,
vitareba, petvity, sink, substrata). With --box it also asks the box whether
each app can roll back, whether its dump is fresh, and whether dumps leave
the disk — first run: evig is a plain directory with no way back, everything
else rolls back, all nine databases dumped 2h ago, off-box configured.
Ten fixture tests, both directions. Weekly workflow.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
GitHub shows an org's .github/CONTRIBUTING.md on the PR form of every repo
without its own, so one file there covers the fleet and a copy per repo would
be exactly the drift this repo exists to prevent. The template now says so
instead of carrying the text.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
proofs/origin holds the evidence but nobody can read a .ots file. This joins
each public repo's GitHub first-commit date, its newest stamped HEAD, the
oldest anchored manifest naming it (with the Bitcoin block), and its Software
Heritage snapshot into one register, derived nightly by the origin-proof
workflow. Private repos are counted, not listed. generatedAt moves only when
a fact does, so a quiet night is no commit.
First emission: 44 public repos, all proven in block 966918, 19 archived by
Software Heritage so far.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
"Open for as long as it makes sense" is a relicensing option, and it stays
open only while every contribution carries a licence grant. The auto-merge
sweep is the one place every repo's PRs pass through, so the terms are
enforced there: a PR from outside the org merges only when every commit is
Signed-off-by, which under templates/CONTRIBUTING.md certifies the Developer
Certificate of Origin and a grant to relicense. Members are exempt — agents
commit under Cato's own identity. REQUIRE_DCO=0 turns it off per repo.
Five tests against the fake gh pin both directions; the fake's commits
fixture also had to learn that `${VAR:-{...}}` closes at the first brace.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Git dates are fields the committer sets, so they cannot show that the fleet's
code existed before a fork of it. This stamps one manifest of every repo's
default-branch HEAD through OpenTimestamps (Bitcoin-anchored, verifiable
offline forever), asks Software Heritage to snapshot the public repos, and
commits the proofs to proofs/origin. Each manifest links to the previous one
by sha256, so the series is a chain.
The first manifest is included: 47 repos (the one fork skipped), 3 private
ones named only by sha256(org/name) because this repo is public.
Nightly, with no commit on a quiet day. Anonymous Software Heritage saves are
10/h, so the order rotates by day; an SWH_TOKEN secret would cover the org in
one run.
Claude-Session: https://claude.ai/code/session_01DzY8KuwgUM7u95GVTpRL2m
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch,
LOKI_* env keys, loki-* units. This repo referenced the old name in
38 files changed, 119 insertions(+), 119 deletions(-).
Email addresses at the old sending domain stay until the new domain is
verified in Resend.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Behind Caddy a Next.js app never sees its own public URL, so next-auth builds
sign-in and callback URLs from the INTERNAL origin unless NEXTAUTH_URL (v4) or
AUTH_URL (v5) is pinned in the box env. AUTH_TRUST_HOST=true does NOT cover
this path, which is exactly what makes a broken app look configured.
Nothing 500s when it happens. The site renders, and only Google sign-in and
sign-out are impossible. petvity shipped this, fixed it in petvity#39 around
2026-08-14 with a per-app assertion supposedly added — and on 2026-09-10 was
serving https://localhost:4013/api/auth/callback/google again. The regression
stated itself in public JSON for weeks and nothing read it.
next-auth publishes GET /api/auth/providers unauthenticated, and every entry
carries the app's configured origin, so the detector needs no secret, no login
and no box access: fetch it per site, fail if any signinUrl/callbackUrl origin
is not the origin that served the JSON. 404 is a site without next-auth and
SKIPs; 5xx FAILs, because an auth stack that cannot answer is broken too and
reading "no data" as "no problem" is how this check would certify a dead auth.
Sites come from fleetcrown's footer, the same SSOT ui-defect-audit.mjs reads,
so this adds no second app list and no exclusion list — a repo that is not a
deployment is absent by construction.
Self-tested from captured payloads, both sides pinned: the real localhost
regression is caught, the real repaired payload stays silent. The self-test
runs in this repo's CI and again before each scheduled sweep, because a
detector that has quietly stopped detecting prints a ✓ over a broken fleet.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
- registers/org.json: machine-readable register for org facts (publicName,
legalStatus, houseDomain, host, design, ventures). Agents read this, not
READMEs. A new claim is a register row or it does not ship.
- scripts/ci/org-drift-audit.sh: check script that scans bitbaum org repos
for public documents contradicting the register. Forbidden: incorporation
pending, bitbaum AG, AI product studio as identity, github.io host, legal
personal name. Validates live doors against apps.conf. Exits non-zero on
new violations.
- scripts/ci/org-drift-inventory.txt: generated inventory of violations,
updated by the audit script. A ratchet preventing new lies from landing.
- scripts/ci/org-drift.baseline: baseline for existing violations that
predate the gate. May fall or hold, may never rise.
- scripts/ci/test-org-drift-audit.sh: test suite (36 checks, no network,
no checkout). Tests forbidden_patterns, is_public_doc, is_exempt_path,
baseline_keys, apps.conf parsing.
- README.md: documents the drift-prevention system.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cato <catomean@users.noreply.github.com>
verify-floor-audit.sh asks whether each repo runs the right gates. Nothing asked
whether the pipeline around them was wasteful or unsafe, and on 2026-09-07 that
gap cost real deploys:
- evig set `cancel-in-progress: true` on a ~13-minute deploy. 4 of its last 10
deploys were CANCELLED — 40%, against 0% for all seven other repos measured.
Three cancelled each other in a row and a merged fix needed three attempts
to reach production.
- evig's deploy ran `pnpm run verify`: the bundle CI runs, concurrently, on
the same SHA. The commit was built FOUR times per merge and only the last
build shipped.
- Of eight repos measured, exactly ONE restored Next's .next/cache in CI.
Everyone else recompiled from scratch every run, then the deploy compiled
again.
Three checks, one per failure, ratcheted like the duplication count: may fall,
may hold, may never rise. Measured now across 32 repos —
deploy-cancels 0 (was 1; evig fixed today)
deploy-reverifies 0 (was 1; evig fixed today)
cold-ci-build 14
The 14 convert as each repo is touched, which is the pattern SHARED.md already
uses for rate-limit adoption; the ratchet holds the line meanwhile. What stops
the number growing again is the other half of this commit: both golden CI
templates now ship the cache step, so a NEW repo is correct by construction
rather than by somebody remembering.
The predicates are deliberately narrow, because a noisy audit gets muted:
- CI *may* cancel superseded runs — that is correct, and only deploy
workflows are checked for it.
- A deploy that is its repo's ONLY verifier is not duplicating anything and
is not flagged; telling it to stop would delete its gate.
- A non-Next repo has no .next/cache to restore and is not flagged.
- Comments are stripped before matching, so a deploy whose comment EXPLAINS
why it does not cancel is not reported as cancelling.
All four of those negatives are asserted by test-cicd-hygiene-audit.sh, along
with the three positives and both directions of the ratchet — 10 cases against
local fixtures, no network, so it runs on every PR. A predicate that never
matches passes exactly as quietly as one that works; this fleet has shipped
that twice.
templates/ci/README.md gains the reasoning as Rung 5, including the shape worth
copying once a repo earns it: build once, ship the artifact (orangecat, CD 2.5m
against CI 8.0m) — and the warning that the standalone tree must travel as a
TARBALL, because upload-artifact does not reliably preserve the pnpm symlink
farm and a flattened tree dies at boot on @swc/helpers.
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The uniformity review (2026-09-01) found three ORMs, three test runners and
two auth stacks — none chosen, all inherited from whichever template a repo
started from. George's standing decision: uniform on Drizzle (supabase-js
where the app is Supabase-native), Vitest for apps / node:test for packages,
next-auth outside Supabase, and the rest of the table.
STACK.md is the SSOT for WHICH technology each job uses;
blessed-versions.json remains the SSOT for which MAJOR. Exceptions are
documented rows, not habits — when an exception's reason dies, the exception
dies. Migration state is tracked in the file and updated by the landing PRs.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The 2026-08-31 fleet audit found the box on an EOL Node, aoz-housing a full
framework generation behind on every axis, and ai-kit pinned at three tags
across seven consumers — one at the pre-org-move OWNER. None of it hidden,
all of it unmeasured. Same lesson shared-inventory encodes for duplication:
writing 'stay current' in a doc is what already failed.
blessed-versions.json is the SSOT (blessed major per key package + the tag
every internal git pin must carry); version-currency.mjs measures every
default branch against it, reports UNCHECKED for anything it could not read
rather than counting it clean, and --check ratchets the total: fall or hold,
never rise. Baseline seeded at the audit's real number: 80.
Self-test pins both sides with the audit's own fixtures (the aoz manifest,
the dead-owner pin) and runs in ci.yml beside the other detector tests.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The README promised that callers still naming bitbaum/dotfiles keep working via
a forwarding shim. All sixteen have migrated and the shim has been removed, so
that sentence had become an invitation to write a reference that will not
resolve.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The audits, the golden CI templates, the shared-package registry and the
reusable auto-merge sweep now live in a repo whose only job is gating the
fleet. dotfiles goes back to being the environment — a repo holding a .bashrc
is the wrong place for machinery that 16 repos call as a reusable workflow,
and keeping them together made every fleet change look like an environment
change and vice versa (three sessions and the owner collided there in one
week).
Layout is unchanged (SHARED.md, scripts/{ci,fleet,audit}, templates/ci,
.github/workflows), so every script's relative paths still hold. The
reusable sweep now checks out bitbaum/fleet; dotfiles keeps a forwarding
shim so its 16 existing callers keep working unchanged.
All six test suites pass in the new location: shared-inventory 7,
verify-predicates 29, auto-merge-sweep 17, stranded-work 24, worktree-gc 9,
model-pin-audit 102.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna