Commit Graph
54 Commits
Author SHA1 Message Date
CatoandClaude Opus 5 d849b430d2 feat(fleet): ask whether what is on main is actually live (#80)
Nothing was asking. uptime-sweep.sh probes /api/health and treats 5xx as DOWN —
that proves a process is UP, not that it is running the code we merged.
CLAUDE.md already says a health check is not a feature check; this is the
missing half.

WHY IT MATTERS HERE SPECIFICALLY

A push made with GITHUB_TOKEN triggers no workflows, so an auto-merged PR fires
no Deploy. Measured on bitbaum/loki: SIX of the last fifteen commits on main had
no Deploy run of their own. They shipped anyway, because the auto-merge sweep
reconciles every ten minutes.

So that reconciler is the single thing standing between "merged" and "live" for
most commits in this fleet — and it had no alarm on it. If it stops, CI stays
green, PRs keep merging, /api/health keeps answering 200, and the box quietly
serves last week's code.

WHAT IT FOUND ON ITS FIRST RUN

  ✗ reparaturbonus-zh — main tip is 212m old and no deploy has run since it

A client site, merged and not live for three and a half hours. Its Deploy at
d1431ca is completed/FAILURE, six Auto-merge sweeps have run since without
recovering it, and the commit carries TWO CI runs — one success, one cancelled
— which is the documented shape where the shared Deploy reads the cancelled
duplicate as a failed gate.

Two more repos report UNKNOWN rather than clean: aoz-housing and sbb-fundbuero
have a deploy.yml but no successful Deploy run on record.

WHAT IT ASKS

Per repo with a deploy workflow: is main's tip covered by a successful Deploy?
A run for that exact SHA counts, and so does any successful run that STARTED
after the tip was committed — because most commits here ride a later
reconciler dispatch rather than firing their own. Requiring an exact-SHA run
would have reported nearly the whole fleet stale while everything was live,
which is how a check earns being muted.

Anything uncovered is only a finding once it is older than the reconciler's
window (45m: the sweep's 10 minutes plus room for a build). Inside that it is
PENDING, not a problem.

WHAT IT DELIBERATELY DOES NOT DO

It does not judge whether the deployed code works. And it does not read the
app's own /api/health `commit` field: exactly one of thirteen live apps
publishes one, so a check built on that would cover a single app while looking
fleet-wide.

12 self-test assertions, no network — including both grace boundaries, the
vacuous-pass guard, and that a failed, cancelled or still-running deploy never
counts as shipped.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 02:35:10 -07:00
CatoandClaude Opus 5 2460085c4b feat(identity): measure all six, and stop skipping the pillars (#79)
Loki now publishes problem, solution, mission, vision, roadmap and changelog on
/api/fleet/map (bitbaum/loki#724), so the six rows this audit carried as
`published: false` are live. Flipping them is the migration the last commit
promised, and it is the whole of it — the FIELDS table was the only thing that
had to change to widen what is checked.

READING THE MAP INSTEAD OF THE REGISTER IS THE OTHER HALF

The register takes `status` from apps.conf, which deliberately omits the
handcrafted 4001-4004 services. So `loki` and `orangecat` — two of the three
pillars — had no register row, and every rule here skipped them while they
served the public internet. The audit reported that as a blind spot it could
not fix. The map resolves a project with a live URL and no hosting row as live,
which is the truth, so reading the map fixes it at the source: both are now
judged like everything else, and `loki` immediately shows "no solon org".

WHAT IT SAYS NOW

63 gaps across the 16 projects that have shipped, and a per-field count so the
shape is visible at a glance instead of buried in a per-project list:

    what        7 missing        roadmap    14 missing
    problem     4 missing        changelog   5 missing
    solution    4 missing        orangecat  10 missing
    mission     4 missing        solon      11 missing
    vision      4 missing

Roadmap is the fleet's worst field by a wide margin — 14 of 16 — and nothing
said so before, because nothing counted it.

Baseline 31 -> 63 is not a regression: the old number counted one field on a
narrower population. It is raised in this commit so the change is a decision
somebody can read in the diff, which is what that rule is for.

45 assertions, both directions. The mutation now runs over the whole table:
un-publishing each field in turn must remove exactly its own check, or the
table is decoration and the rules are hardcoded elsewhere. Gate proven by exit
status — 63 -> 0, 62 -> 1, dead map -> 2, never 0.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 02:18:52 -07:00
CatoandClaude Opus 5 6b364ef561 feat(identity): the six things a product owes a reader, and the number that notices (#78)
Every product is supposed to carry problem, solution, mission, vision, roadmap
and changelog. All six already have a producer — a Loki project profile, where
they are attribute keys, the `goals` table and `user_projects.dev_log`, injected
into every dispatch. Nothing published them, nothing rendered them, and nothing
counted them, so the state of it was invisible.

Measured against the live register on 2026-09-15:

  35 projects; `description`, its only prose field, null on all 35
   7 of 35 have an OrangeCat profile — two of those seven are dead experiments
   1 of 35 has a Solon organisation: OrangeCat itself
  20 of 33 repos ship none of the six on their own site
  loki, orangecat and wild-spirit have no register row at all, so every
    register-derived rule already skipped them while they served the internet

The register's null description is the sharpest one: build.ts reads
user_projects.description through usefulDescription(), which correctly nulls the
site factory's "Website at <url>" boilerplate — so a 100% gap presented exactly
like a working filter. That is this repo's own thesis (a producer with no
consumer looks wired) landing on the register itself.

So: the contract in AGENTS.md, and a ratchet that reports it. The audit judges
only mechanical claims — a field is empty, a profile is absent — never whether
prose is good, for the reason repo-metadata-audit.mjs gives. It reports two
things it deliberately does not count: generated experiment litter, and live
projects with no register row, because folding those in would let a register fix
look like progress on identity.

Baseline 31. Weekly, not per-PR: the register is served by Loki on the box, and
a gate that goes red for reasons the author cannot fix is a gate that gets muted.
The judgement is a pure function of the rows, so its test runs per-PR with no
network — 36 assertions including a mutation: flipping one FIELDS row to
published must turn a previously clean product red, or the table is decoration.
Verified by exit status, not output: 31→0, 30→1, no baseline→2, dead register→2.

Publishing a field into the API is one row in FIELDS. That is the whole migration.

SHARED.md also gains the two chat rows this measurement produced: ai-kit has no
streaming API, which is why six repos hand-roll a provider client and two SSE
readers drop frames on chunk boundaries.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 23:24:30 -07:00
CatoandClaude Fable 5.1 97da8a75d9 feat(ci): the auto-merge caller is a template, and a miswired caller turns hygiene red (#77)
## What the inventory showed

Read every bitbaum repo's `.github/workflows/auto-merge.yml` from its default branch via the API (not local checkouts): 33 repos carry one. **32 are already callers of `auto-merge-sweep.yml` (`workflow_call`)**; the 33rd is this repo, which runs the script inline because it *is* the reusable workflow. The ratchet in `shared-inventory.baseline` already reads `automerge-script 1 1`. So the consolidation the SHARED.md row still described as "6 remaining, datacat/petvity/solon convert when clear" finished a while ago — that row was stale, and the caller was documented nowhere in `templates/ci/`.

Eight repos across six caller shapes (heidi, ai-kit, sbb-fundbuero, datacat, petvity, solon, evig, orangecat) were checked to actually *run* the reusable job today: each latest Auto-merge run has the nested `sweep / sweep` job checking out `bitbaum/fleet` and executing `Sweep`.

## What it also turned up

- **dotfiles** declared `secrets:` twice under the same job. GitHub refused the file: the workflow is listed by its *path*, every run since 2026-09-13 is a zero-job failure, and the repo has merged nothing — silently. Fixed in bitbaum/dotfiles#69.
- **substrata** and **camille-boulangerie** re-armed a `publish.yml` neither repo has; the sweep dispatched it after every merge and logged an error. Fixed in bitbaum/substrata#36 and bitbaum/camille-boulangerie#34.

## What this PR does (all additive)

- `templates/ci/auto-merge.yml` — the caller, with `CHANGEME` lines, so the next repo copies a template instead of a neighbour.
- `templates/ci/README.md` — "Auto-merge: call it, never copy it": the snippet, an inputs table with what each wrong value looks like, and the findings above.
- `scripts/ci/cicd-hygiene-audit.sh` — a fourth ratcheted check, `automerge-miswired`: a duplicate mapping key, a job that neither calls the reusable workflow nor runs the canonical script, or an input naming a workflow file the repo does not have. Baseline `0` (the three findings have PRs open; see below).
- `scripts/ci/test-cicd-hygiene-audit.sh` — six new mutation cases, both directions: fires on the dotfiles shape, the substrata shape and a hand-rolled job; stays quiet on a sound caller (including two `- cron:` list items, which a naive key counter would flag), on fleet's own inline run, and on a repo with no caller at all. 16/16 pass. Run over the real 33-repo inventory it reports exactly the three known cases and nothing else.
- `SHARED.md` — the row now says 1, and why.

If `--check` runs before the three repo PRs merge it will report `0 → 3`; they are green one-liners and should be in before Monday's scheduled run.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 22:49:48 -07:00
CatoandClaude Fable 5.1 6c1bfd2f01 feat(registers): origin.json names the originator the share rule pays (#76)
Solon's originator_share v1 pays "the first-commit author recorded in the
origin register", so the register now carries it: firstCommit.author is what
GitHub reports (login, or the commit's author name when unlinked) and
firstCommit.originator resolves it through registers/org.json's new
originatorAliases. The first live read showed why the map is needed — five
author strings across 45 repos (catomean, Mao Nakamoto, George, Cato, and
one unconfigured git default "Your Name"), all one person. Without the map
the rule would have paid five originators for one. An unmapped author is
their own originator, pinned by test; that is the point of the rule.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 22:12:27 -07:00
CatoandClaude Fable 5.1 bcbc937d67 feat(registers): readings.json — the numbers the bet rests on, nightly (#75)
"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>
2026-09-14 21:48:30 -07:00
CatoandClaude Fable 5.1 2ee172e9e8 feat(audit): bus factor — could someone who is not Cato operate each live app? (#74)
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>
2026-09-14 21:45:04 -07:00
CatoandClaude Fable 5.1 cae2df179d chore(ratchet): raise health-route 12 → 13 and ai-provider-client 17 → 19, investigated (#73)
`shared-inventory.sh --check` has been red since the rises landed through
repos the gate cannot reach. The first hypothesis — that the FleetCrown →
Loki rename double-counted a repo — is wrong: GitHub renames in place, and
the repo list holds `loki` alone (no `fleetcrown`).

What actually rose, dated by first commit on each path:
- health-route 12 → 13: substrata added app/api/health/route.ts on
  2026-09-14 11:23 UTC (heidi's, 2026-09-10, was the 12th and already in
  the baseline). Its assertion is the research meter; per SHARED.md the
  health-route envelope is deliberately not extracted, so raised, not
  absorbed.
- ai-provider-client 17 → 19: both files in heidi, after the 2026-09-11
  baseline — lib/auth/provider.ts (an OIDC config) and
  lib/domain/model/providers.ts (a BYOK vendor allowlist that uses ai-kit,
  which heidi installs). Neither is a hand-rolled caller; the path pattern
  cannot tell an auth provider from an AI one. Raised knowingly and said
  so in SHARED.md rather than narrowing the pattern in the same PR.

--check is green again: "duplication did not increase (inspected 44 repos)".


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 05:42:41 -07:00
CatoandClaude Fable 5.1 96e702a384 docs(contributing): the terms live in bitbaum/.github; the template is a pointer (#71)
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>
2026-09-14 05:09:44 -07:00
CatoandClaude Fable 5.1 71f19264c0 feat(registers): origin.json — the readable form of the origin proofs (#70)
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>
2026-09-14 04:57:26 -07:00
CatoandClaude Fable 5.1 6bbbe143a9 feat(sweep): the contributor gate — outside PRs merge only with a DCO sign-off (#69)
"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>
2026-09-14 04:51:58 -07:00
CatoandClaude Fable 5.1 c637b0bd23 fix(origin-proof): two stamps in one second must not share a filename (#68)
Manifest names are second-resolution and the chain is ordered by name. On
CI's faster runner the shrink test's second stamp landed in the same second
as the one before it, overwrote it, and broke the chain link — the suite went
red on #67 after it had merged. The script now waits for a free name; the test
no longer sleeps before that run so the collision path is exercised.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 18:55:24 -07:00
CatoandClaude Fable 5.1 3a030d1ceb fix(origin-proof): read private repos via FLEET_PAT and refuse a shrinking manifest (#67)
FLEET_READ_TOKEN does not exist; FLEET_PAT is the org PAT the auto-merge sweep
already runs on, so the nightly run can see all 47 repos. And a manifest that
lists fewer repos than the last one is refused: a token that sees less is far
likelier than repos vanishing, and a wrong manifest sits in the chain forever.
ORIGIN_PROOF_ALLOW_SHRINK=1 confirms a real deletion.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 18:52:34 -07:00
CatoandClaude Fable 5.1 10229a1ec9 feat(fleet): nightly third-party proof of origin for every bitbaum repo (#66)
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>
2026-09-13 18:50:27 -07:00
CatoandClaude Fable 5.1 231ad50706 chore: rename FleetCrown to Loki (#65)
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>
2026-09-13 16:23:38 -07:00
CatoandClaude Opus 5 89d631e2f9 feat(fleet): find local branches that exist only on this disk (#64)
stranded-work.sh examines each checkout's CURRENT branch. A branch that was
never pushed and is not checked out is invisible to it — which is exactly the
work GitHub cannot see, the thing that guard exists to find.

First run: 243 such branches across 24 repos, 564 commits. Most are old and
superseded. Some were not. A 1.1 GB clone nested inside fleetcrown looked
entirely redundant — clean tree, nothing unpushed on its checked-out branch —
and held three commits from the previous day on a DIFFERENT branch with no
remote ref. It was one `rm -rf` from gone.

  A clean tree is a statement about one branch. It says nothing about the
  other forty in the same repository.

Three filters, all needed. Commits absent from the default branch, by patch id.
No remote-tracking ref. And no PR ever opened from the branch name — because
`git cherry` cannot see a squash-merge, which rewrites several commits into one
with a different patch id, so a merged branch scores "absent" forever. Without
that third filter the report is mostly work that shipped weeks ago. The
converse is not covered: a PR opened from a different branch name still reads
as orphaned, so the count is an upper bound and the output is a list to look
at, not a verdict.

--days narrows to recent work, and --push preserves it without opening a PR, so
nothing merges and nothing deploys. --push without --days is refused: pushing
every orphan would put hundreds of stale refs across the remotes.

Fixture branch names (stale, other, main, master) are never reported and never
pushed. Publishing a fixture is how a pre-push hook once force-pushed test data
over main.

15 tests against real git repos with real remotes. Two of them are a regression
guard with a story: while being written, this suite ran `git -C "" add -A` and
`commit` inside the real fleet checkout, because make_repo aborted on a `local
name="$1" dir="$TMP/$name"` that is not reliably in scope under `set -u`, and
returned an empty path. It swept two untracked files into a fixture commit,
created six junk branches and pushed one to the remote. All cleaned up. git_q
now refuses any path that is not under $TMP, and the EXIT trap — inherited by
every $(...) subshell — only fires in the process that made the directory.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 05:25:50 -07:00
Cato 2520698fd4 fix(registry-audit): a manifest we could not read is not a repo that does not use it (#63)
* fix(registry-audit): a manifest we could not read is not a repo that does not use it

Every gh failure was swallowed by `catch { continue }`, so a rate-limited,
unauthenticated or offline run reported the same thing as a clean one:
zero adopters. "Nothing depends on this package" is the sentence that gets
a package deleted.

That is not hypothetical. On 2026-09-12 the same blind spot in a grep —
searching for `@bitbaum/<name>` when bip-kit, limitkit and threadkit
install under bare names — produced "imported by nothing" for three
packages with 8, 3 and 3 adopters, and a recommendation to delete them.
This audit had the right answer the whole time.

So the result is three-valued, the way ai-kit/web's search already is:
found, absent, or COULD NOT LOOK.

- gh's stderr is piped rather than inherited, so the thirteen expected
  404s stop making a working audit look broken
- a 404 means the manifest is absent; anything else is recorded
- the report says the counts are a floor, not a count, and names what it
  could not read
- --emit REFUSES to write registers/packages.json from a partial scan,
  because that file is read as the answer to "who uses this"

isMissing and firstLine are exported and tested against the shapes that
matter: 404 vs rate limit vs bad credentials vs DNS failure. 54 passing.

* chore(org-drift): baseline hire/README.md — it records the rename, it is not an instance of it

The line reads: it named the clinic "VitaReBa", replaced by "Vita".
Editing that sentence to remove the retired name would destroy the record
it exists to keep. The audit's own instructions cover this case: baseline
a historical record with a reason.

* Revert the hire/README.md baseline: another session fixed the file instead

Between two CI runs on the same PR, hire#7 removed the retired name from
the README outright. The baseline line I added forty seconds earlier now
describes a violation that no longer exists, and the ratchet correctly
refused it: a baseline full of unreachable entries is a ratchet that
cannot fall.
2026-09-12 12:12:13 -07:00
CatoandClaude Opus 5 d87fed9a52 fix(registry): generatedAt means when the facts changed, not when it ran (#62)
A timestamp that moves on every run makes the file differ on every run, so
"commit only when something changed" commits every week and says nothing.

Not theoretical, and it took under an hour to prove: the sibling workflow on
bitbaum/hire pushed a commit whose entire diff was one generatedAt line — while
the PR that introduced it claimed a quiet week would produce no commit.

So generatedAt now records when the derived facts last MOVED. When nothing
moved, the previous stamp is kept and the file is byte-identical, which makes
the workflow's own claim true. It is also the more useful reading: "these
adopter counts were true as of X" beats "this script ran at X".

Verified by emitting twice against the live org: the second run produced a
byte-identical file.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 12:04:36 -07:00
CatoandClaude Opus 5 684096ff99 feat(registry): publish the derived package registry as JSON (#61)
SHARED.md curates — a package has a row because a human decided it should.
This derives everything else from package.json across the org and writes
registers/packages.json, so a renderer never types the list. AGENTS.md already
forbids typing the portfolio; the packages had no derived source to render from
until now.

Each row carries the install line taken from what adopters ACTUALLY write,
which matters more than it sounds: listkit's npm name belongs to a stranger, so
a page that assumed `pnpm add <name>` would tell readers to install someone
else's package. Deriving it from real specifiers produces the git install
instead, and records whether a package comes from npm or a tag — the thing an
outsider most needs to know.

An adopted-but-unlisted package is deliberately NOT published: curation stays
the gate, and the audit already fails when a real adopter has no row.

The weekly workflow refreshes the file and commits only when the derived facts
changed, so a quiet week produces no commit.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 11:41:11 -07:00
CatoandClaude Opus 5 755c021f1c fix(version-currency): read workspace manifests, not just the root (#59)
The audit read only each repo's root package.json. A monorepo consumer was
therefore invisible — and worse than invisible, it sat in the "current (0 gaps)"
line, which claims more than "not looked at" and was not true.

Measured before this change: kivvi installed @bitbaum/ai-kit in packages/ai at
^0.15.0 and datacat in backend at ^0.13.0, against a published 1.4.1. Neither
appeared in any gap report. Both repos read as current.

Reading workspace manifests raises the measured total from 13 to 40. The 27 new
findings were all already true; nothing regressed today. The largest were never
once reported by this audit:

  kivvi apps/web      next 14.2.35 < 16, react/react-dom ^18 < 19,
                      tailwindcss ^3.4.1 < 4, eslint ^8.57 < 10
  evig packages/*     typescript ^5.3.2 < 6, jest ^29 < 30, @types/node ^20 < 26
  datacat backend     @bitbaum/ai-kit ^0.13.0 < 1, openai ^5.10.2 < 7

Every probe is evidence-based: a directory is LISTED before a manifest inside
it is fetched, so "no package.json here" is something the listing said rather
than a 404 being read as an answer. Two shapes are handled because the fleet
has two — pnpm workspaces with packages/ and apps/ (kivvi, evig, orangecat,
petvity, fleetcrown), and plain sibling directories with no workspace marker at
all (datacat's frontend/ and backend/). A workspace-only rule would have kept
missing datacat, which is half the reason this exists.

Only repos that actually have those directories pay for the extra listings;
a flat repo issues exactly the same requests as before.

Gaps from a non-root manifest are labelled with their directory, because
"kivvi" and "kivvi packages/ai" are facts about different files and a report
that prints them identically sends someone to edit the wrong one. Root gaps are
unlabelled, so existing output is unchanged.

UNCHECKED still means the ROOT manifest could not be read — that is what "this
repo was measured" has always meant, and a workspace member that fails to load
is not grounds for discarding the repo's real findings. But it is not silent
either: such manifests are listed under PARTIAL, so a repo can never reach
"current (0 gaps)" on the strength of files nobody read.

Baseline raised 13 -> 40 in the same commit, as the process requires.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 10:49:53 -07:00
CatoandClaude Opus 5 c8c0c6077a feat(fleet): make throwaway repos disposable, and point the audits inward (#58)
* feat(fleet): make throwaway repos disposable, and point the audits inward

Six scaffolded repos appeared in two days and nobody created them carelessly —
FleetCrown provisions one per project and agents scaffold sites to test that
path. Together they were 15 of the 26 gaps that were about to turn the
version-currency ratchet red against a committed baseline of 0. That is how a
ratchet dies: not disputed, drowned. A gate whose number is mostly noise gets
muted, and every true finding inside it is muted with it.

The house rule (CLAUDE.md, "Clean up the experiment when the experiment is
over") already says an experiment is torn down in the session that created it,
repo included. This adds the backstop, because that rule covers the session
that creates a repo and nothing covers the session that dies, is interrupted,
or forgets — which is how all six survived.

  scripts/local/prune-ephemeral-repos.sh

A throwaway repo carries the GitHub topic `fleet-ephemeral` from birth: on the
repo, not in a list somebody must remember to update, so a later sweep can find
it without recognising the name. The script lists by default, deletes on
--delete --yes, and refuses anything unmarked — "it is obviously a test repo"
is the reasoning that eventually deletes something real. Deletion is the
intended action, per the house rule; --archive is only a holding position.

Its selector is pinned in both directions on every fixture and its --yes guard
runs through the script itself via an injected repo list, so no assertion is a
re-implementation of the thing it checks. Four mutants were each confirmed to
turn the test red before this shipped: selector ignores the topic, substring
instead of exact match, guard removed, empty result reported silently.

  scripts/ci/shared-registry-audit.mjs

Every audit in this repo sweeps the OTHER repos. None asked whether SHARED.md —
the file whose first line is "check this file, if it is here, install it" —
matches the dependency graph. It did not: bip-kit had eight adopters and no
row. This derives the adopter count from package.json across the org and fails
when a package with 2+ adopters has no registry row. It resolves the npm: and
github: aliases half the fleet installs under, because a key-only reader
reports zero adopters for a package with five, and it counts a row only from
the registry TABLE — bip-kit was mentioned in the prose the whole time, and a
substring search over the file would have called that covered.

It does not judge the content of a row. A gate that guesses at prose gets muted.

  scripts/ci/blessed-versions.json

@bitbaum/ai-kit fell through the seam between `internal_tags` (deleted when it
graduated to npm, correctly) and `majors` (never added — it was 0.x that day).
It shipped 1.0.0 and nothing noticed, because the comment explaining its
absence still described it as a 0.x package. Seven of thirteen consumers sat on
0.x carets while the package was at 1.4.1 and no gate said so. Both it and
design-tokens are now tracked, and the stale exemption is rewritten to say what
actually happened: a version-tracking exemption must be re-read when the
version moves.

  scripts/ci/org-drift-audit.sh

The only org sweep that did not pass --no-archived, so a retired repo still had
its README judged against the org register.

The baseline is raised in the same commit, as the process requires. It covers
real staleness on real repos (causius, diplodoctor, heidi, sbb-fundbuero) plus
the ai-kit gaps that were previously unmeasurable — not the six scaffolds,
which are already deleted.

Known and deliberately not fixed here: version-currency reads only each repo's
ROOT package.json, so kivvi/packages/ai (^0.15.0) and datacat/backend (^0.13.0)
remain invisible to it. Attributing a gap to repo-vs-path changes the report
shape and the fixtures, and folding it in would make this baseline number
un-reviewable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2

* fix(shared-inventory): one red ratchet must not hide the other

Both reports now run before either ratchet, and each ratchet carries
`!cancelled()`. Without it the first failing check ends the job and the second
never runs — reporting green by absence, which is worse than not having the
gate at all.

This was the live case, not a hypothetical: the duplication ratchet was already
red (ai-provider-client 17 -> 19) when the registry gate was added below it, so
the new gate would have been masked from its first scheduled run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 10:03:13 -07:00
CatoandClaude Opus 5 e94c70381d fix(stranded-work): distinguish abandoned from stranded (#56)
The report counted dirty files and their age, which cannot tell a session
mid-work from a worktree abandoned a fortnight ago. Both come out as "N
uncommitted, oldest 15d".

What made that concrete: seven orangecat worktrees each reported "9
uncommitted, oldest 15d". Identical counts, because the diff was identical —
one identity sweep (maonakamoto -> bitbaum) left uncommitted in every worktree
it was run in. Main had not only made that rename, it had moved past it to a
different org path, so treating those as work to rescue would have REVERTED
main. All seven sat 202-215 commits behind. The live worktrees that same day
sat at 0-2.

So scan_repo measures the distance to the default branch and decide() prints it
when it crosses a threshold (STRANDED_BEHIND, default 50 — the fleet's data has
a wide empty gap between 2 and 99). Today that splits a flat 30-line list into
13 directories to delete and 17 pieces of work to finish, which are different
actions.

The marker annotates and never filters: nothing is dropped and the exit status
is unchanged, because a branch left alone for a fortnight can still hold the
only copy of something. It only lets a reader tell the two apart — which is the
difference between a report that gets acted on and one that gets muted, and
this script's own header explains why that is the whole game.

A sentinel is never rendered as a distance. An unreachable default branch
reports -1 and a caller written before this column sends no field at all;
neither is zero, and calling either one "up to date" is exactly the failure the
column exists to prevent. Six-column rows still decide correctly.

30 tests pass (24 existing, 6 new), and four mutations confirm the new ones
catch what they claim: a sentinel rendered as a distance, the marker filtering
instead of annotating, the threshold hardcoded, and a current worktree marked
abandoned. A fifth mutation was dropped as equivalent code — swapping the -n
guard for ${behind:-0} changes nothing for any positive threshold, so it proved
nothing; that guard prevents a silent shell error, not a wrong verdict.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 08:55:11 -07:00
CatoandClaude Opus 5 35c0758696 docs(stack): one way to do auth — federate, or better-auth locally (#54)
The fleet had six auth approaches across eleven repos: next-auth v5
beta (7, two of them on different betas), Supabase Auth (3), Better
Auth (1), next-auth v4 (1), and two hand-rolled. Five repos have no
auth at all, which is the correct amount for a brochure site.

The same bug got written twice independently: petvity and
surf-your-life both shipped a cron guard that failed OPEN when
CRON_SECRET was unset, both comparing against the literal string
"Bearer undefined". That is what N implementations guarantees.

THE RULE

Two populations, and conflating them is the mistake:

  Our own products federate to OrangeCat. Its OIDC provider shipped
  2026-06-17; FleetCrown, Solon and now Heidi consume it. A federated
  app keeps NO users table, no password, no reset flow, no session
  table — it reads id_token.sub and stops. The identity-bridge
  instruction generalises: do not rebuild profiles, payments or
  presence locally.

  Client-owned apps never federate — aoz-housing's residents belong to
  AOZ, not to us. They keep local auth, and the blessed library for
  new local auth is better-auth 1.x.

WHY NOT next-auth

Because it could not be enforced, and this file's premise is that
unenforced choices drift. blessed-versions.json said so itself —
"next-auth is deliberately absent while v5 is beta" — so
version-currency.mjs, the audit that turns every other drift into a
number, was structurally blind to the one technology where
inconsistency costs most. The row said "v5 when stable"; it has been
beta ~3 years, npm latest is still 4.x, and six repos shipped the beta
regardless.

better-auth has a real semver major, so it is now IN
blessed-versions.json and the existing audit measures it for free. No
new machinery. It also uses the blessed ORM, its magic-link plugin
takes our own sender so mail-kit slots in unchanged, and hirnli has
run it in production since 2026-09.

NO AUTH PACKAGE

SHARED.md already lists auth under what must NOT be centralized, and
sitekit is the evidence: centralizing nav markup centralized the bug,
and it serves 2 of 20. Share the decisions and the checks, never the
implementation. Existing apps migrate on contact, never on a schedule
— ADR-0002 sat at Proposed for seven months while its count went 2→4.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 14:13:16 -07:00
CatoandClaude Opus 5 9a600f03e6 fix(ci): the template that let a commit cancel another commit's run (#53)
Twenty-eight of twenty-nine repos in the fleet carry
`group: ci-${{ github.ref }}` with `cancel-in-progress: true`, because
that is what templates/ci/ has always said. It lets a newer merge cancel
an older commit's CI run, and every deploy path keys off that run.

It broke two repos today, in the two ways it can break:

fleetcrown, silently. Deploy chains off workflow_run and requires
conclusion == success; a cancelled run reports cancelled, so Deploy
skipped. Four merges sat on main with every check green, nothing red
anywhere, and the box serving the previous build. Each needed a Deploy
dispatched by hand, and the only way to notice was to compare the box's
build stamp against main's tip.

hirnli, loudly. Its Deploy waits for CI to pass on the commit it is
shipping, found the cancelled run, and failed — which is the better of the
two outcomes, because somebody sees it.

Both had the same second cause underneath: auto-merge re-arms CI with a
dispatch, and under one group-per-branch that dispatch cancels the push
run for the SAME commit.

So the templates key main per commit, and the hygiene audit gains
ci-strands-commits so the repos that already copied the old line are found
by a sweep rather than by an outage. The rule only fires where a collision
is actually possible: a group already keyed by github.sha, or one that
never cancels, is left alone.

The rule has its own test, including the case that matters — a file whose
COMMENT mentions github.sha while its group does not must still flag.
Comments are stripped before matching, because a gate that a comment can
satisfy is not a gate.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 13:57:16 -07:00
CatoandClaude Opus 5 9f5e3bbd40 docs(shared): register listkit, and give list-query a ratchet row (#52)
Filtering, sorting, searching and paging were the concern this file did not
track, and they are past the rule of three several times over. A survey of
twelve repos on 2026-09-11 found twelve incompatible filter-state shapes
with no two alike, ~34 hand-built URL builders, ~25 copies of
toggle-a-value-in-a-set in two encodings, ~11 debounces at five delays, ~11
copies of Math.ceil(total / pageSize), and four of the seven repos that put
a reader's text into a SQL LIKE doing it without escaping % or _.

Two of the toggle copies are character-for-character identical in repos
that share no code. One repo writes that three-line body eight times for
eight facets plus eleven more for its flags.

Four live bugs sit among the URL builders: a preset that rebuilt the params
from scratch and wiped the reader's search, a date range that did not clear
page and stranded them past the end, a builder that preserved three params
by name so every later param had to be remembered in six template strings,
and a debounced box using push rather than replace, so the back button
walked through every spelling of the word.

listkit ships the decisions and none of the markup. The registry row says
so, and says why: nine token vocabularies and six chip treatments among
those same repos, several different on purpose — a monochrome marketplace
fork, a Bitcoin-orange rule, the one RTL-aware surface in the fleet. This
file's own navigation section is the post-mortem of centralizing markup,
and the answer it reaches is the one taken here.

FleetCrown is the proving consumer as of today, because a package with zero
adopters removes zero duplication. The adoption line names the next target
by the same rule the others use: whichever repo's hand-rolled filter bar is
touched next, with hirnli the richest — eight toggle copies, eleven flag
toggles, and two live defects the package's own tests would have caught.

The ratchet row is scoped to the HEADLESS half — hooks and lib files, never
components. A row that counted filter components would score deliberate
divergence as duplication, which is exactly the mistake documented above it.
Baseline set in this commit: list-query 2 5.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 08:56:21 -07:00
CatoandClaude Opus 5 55e0976894 Revert(retired): SBB Fundbüro is not retired — it is the pitch (#51)
I added three retirement rows saying the SBB name was replaced by Nordbahn.
That was backwards. The demo is being pitched TO SBB; naming it after the
prospect is the artefact. Left in place, these rows would have made
org-drift-audit flag the SBB name as drift in every future doc — the check
actively fighting the thing it exists to protect.

Removed: sbbfundbuero.orangecat.ch, sbb-fundbuero, "SBB Fundbüro",
"SBB Lost & Found". Also drops the baseline line for the Blick citation, which
named a repo that no longer exists under that name.

KEPT, because they are real and were verified: sbb.orangecat.ch ->
sbbfundbuero.orangecat.ch and sbb-lost-found -> sbb-fundbuero. That earlier
rename was George's own and still holds.

The lesson this file now carries by omission: a retirement is only a fact when
the OWNER has decided. "The README says the name is probably wrong" is not a
decision, especially when the next sentence says the question is open.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 06:42:16 -07:00
CatoandClaude Opus 5 3dd9be9980 feat(retired): sbb-fundbuero -> nordbahn-fundbuero, and its host (#49)
The repo, the register key and the public host all carried the name of a real
transport company the demo has no connection to. The site had 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".

Migrated 2026-09-11, verified at each step:
  repo    bitbaum/sbb-fundbuero -> bitbaum/nordbahn-fundbuero (GitHub redirects)
  host    sbbfundbuero.orangecat.ch -> nordbahn.orangecat.ch (308, method kept)
  register/unit/cron/checkout all moved; port 4016 kept — it has no name in it

One baselined false positive: the only remaining "sbb-fundbuero" is inside a
Blick article URL cited in the provenance table, about SBB's REAL lost-property
office. A literal-string check cannot tell a citation from a claim; that
judgement belongs in the baseline, with its reason.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 05:57:18 -07:00
CatoandClaude Opus 5 96b18423c4 fix(auto-merge): judge the base from the run that has a verdict, not the newest (#48)
The sweep read one run — the newest for the base branch. The concurrency
group cancels a duplicate run on the same ref, so when that cancelled run is
newest the sweep judged main from a run that never reached a verdict, spent
its three rerun attempts on it, and then deferred on every later sweep. A
SUCCESSFUL run for the very same commit sat beside it, ignored.

Seen on this repo today: the PR it stranded was #44, the fix for the
cancellation. An hour of 'deferring to the next sweep to judge main' with a
green main and a clean PR.

pick_base_run chooses among the runs for the base sha: a success, then a
failure (the other real verdict, and what the red-base carve-out needs to
name the failing jobs), then any completed run, then the newest. Only when no
run belongs to the sha does the newest of all come back, so the 'CI has not
caught up' guard still fires. The test evals the function out of the script
rather than copying it.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 05:55:29 -07:00
CatoandClaude Fable 5.1 9f94d5c111 fix(auto-merge): re-arm CI only when no run exists for the new tip (#44)
A merge made with the org PAT already triggers CI on push; the re-arm then
put a second run on the same ref and the workflow's concurrency group
cancelled one. Under a burst of merges (fleetcrown, 2026-09-10: five in
twenty minutes) main's CI cancelled itself over and over and nothing
deployed for half an hour. The re-arm exists for GITHUB_TOKEN merges, which
trigger nothing; it now checks for a run on the new tip first.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 05:45:22 -07:00
CatoandClaude Opus 5 9d572b6abf feat(ci): check that a repo's GitHub metadata agrees with the register (#47)
A repository page is the first thing anyone opens and the surface furthest from
the code, so it drifts first and silently. Measured 2026-09-11 across 44 live
repos: 13 registered apps had NO homepage while the register knew their host,
evig's pointed at revamp-it.ch (not the app), 4 had no description, and one
described a product by a name its own brand file had retired.

None of that breaks anything, which is why it sat there. The register already
knows the canonical host of every deployed app; nothing compared the two.

All of it is fixed, including the four site-factory scaffolds that appeared
during the sweep. Audit now: 49 repos, 25 registered, clean.

CHECKS ONLY THE MECHANICAL CLAIMS — a registered app's homepage is its
canonical host; a live repo has a description. Deliberately NOT whether a name
or description is right: the live <title> is not a reliable product name (a
multi-tenant app serves the TENANT's title; some sites put the brand after a
pipe), and a gate that guesses at prose gets muted. Retirements are enforced
precisely by org-drift-audit.sh against registers/retired.json.

Exceptions are decisions: repo-metadata.allow carries a reason per line. One
entry — hirnli, whose homepage is the PLATFORM's own host while its register
row holds the tenant's, because listing both would make sync-infra emit the
host twice and fail `caddy validate`.

Verified: 17 checks, no network. The judgement is a pure function of
(repos, register, allow) so the fixtures are the shapes that were live today.
Both directions pinned: a clean fleet passes, each defect fails AND is named,
an archived repo is exempt, and a homepage exception does not excuse a missing
description.

The first version of the test printed the live audit and asserted nothing,
because importing the module executed its top-level CLI. The CLI now sits
behind an is-main guard — a test that runs the real thing and checks nothing is
the same shape as a gate that cannot go red.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 04:23:37 -07:00
CatoandClaude Fable 5.1 bfeba4a5d7 feat(retired): VitaReBa -> Vita (#46)
The clinic's own brand config (vitareba/lib/config/company.ts) is Vita GmbH /
Vita and its live title agrees. "VitaReBa" survived on GitHub's description
and the studio page — the surfaces nobody regenerates — and in one
cross-reference in petvity/CLAUDE.md, fixed at source in petvity.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:53:27 -07:00
CatoandClaude Fable 5.1 80dc37e517 chore(org-drift): lower the retired-name baseline 10 -> 4; the seven are fixed at source (#45)
sbb-fundbuero #70, evig #474, hirnli #109, aoz-housing #237 — each merged,
deployed and verified live (release symlink on the right SHA, unit active,
200). evig/CLAUDE.md stays, with its reason: it documents that the old host
still resolves and must remain a 308 — the record of the retirement, not an
instance of it.

Gated against the API scan before pushing: 4 known violations, no new
contradictions, no stale entries. The inventory is committed as that scan
regenerated it.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 00:07:17 -07:00
CatoandClaude Fable 5.1 2a7319f898 feat(org-drift): find documents using a name or host that has been replaced (#43)
* feat(org-drift): find documents using a name or host that has been replaced

A rename that is only remembered is a rename that drifts.

aoz-wohnen.orangecat.ch, revampit.orangecat.ch, sbb.orangecat.ch and
sink.orangecat.ch all answer 200 — every one is a redirect. So a document
naming any of them looks perfectly healthy from the outside, and nothing ever
reports it. All four were found in 2026-09 by tripping over them, including on
the public studio page, which named a real transport company on a demo that has
no connection to it.

That is the same failure this audit already exists for — a document saying
something that is no longer true — so it is the same sweep, not a second script
with its own copy of the exemption and baseline logic.

THE GAP WAS A REGISTER, NOT A SCRIPT

Nothing recorded that a name had been replaced, so no check could have found a
document still using it. registers/retired.json is that record: kind, from, to,
since, why, and how the retirement was VERIFIED rather than who asserted it.
Adding a retirement is a ROW; the script does not change.

Nine entries to start, each confirmed rather than remembered — the four hosts by
following them with curl, "AOZ Housing" against the app's own brand.ts and live
<title>, "SBB Fundbüro" against the title it actually ships, and the two repo
renames against the commits that made them.

Findings say what to use instead and since when. "This document is wrong" costs
a reader a search; "say X instead, since 2026-09-10" costs them an edit.

THE RATCHET

51 files across 7 repos already use a retired form. Baselined with a reason,
not fixed here: one PR touching 51 files in 7 repos would be a worse change than
the drift it removes. Most are one host (revampit). The sbb-fundbuero ones are
worth doing first — a repo still calling itself "SBB Fundbüro" while the site it
ships is titled "Nordbahn Fundbüro".

A TEST THAT DAMAGED THE ARTIFACT IT CHECKED

Found while running the suite: the vacuous-scan case ran the real script without
overriding INVENTORY, so a test whose entire point is "scan nothing" overwrote
the committed 41-repo inventory with "Scanned 0 repos, found 0 violation(s)" —
the tracked record of the fleet's drift, replaced by the output of a
deliberately empty run, every time anyone ran the tests. Redirected to a temp
file. Same shape as the sed range in #42: a check satisfied just as well by a
broken reader as by a clean file.

Verified: 49 passed, 0 failed (13 new). The new cases pin the mechanism, not
live data — a fixture register, so retiring something tomorrow does not break
the suite. Regex metacharacters must be escaped (an unescaped old.example.ch
also matches oldXexampleYch), a name containing '&' must survive the sed
replacement, a clean line must yield no hint, and the register that RECORDS a
retirement must be exempt from it or the ratchet can never reach zero.

Note: this audit is already red on main for pre-existing org-claim violations
("bitbaum AG", incorporation language in four fleetcrown docs). Confirmed by
running the committed version against the same tree; not introduced here, and
not baselined here either — that is a decision about incorporation wording, not
a drift fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6

* fix(org-drift): baseline the file the API scan found and the local sweep missed

CI caught sbb-fundbuero/CLAUDE.md, which my local USE_LOCAL sweep did not. That
asymmetry is the point of the audit's default: USE_LOCAL greps local checkouts,
which go stale, while the real scan reads the org's default branches. A ratchet
that sees less than production prevents less than it claims.

Also corrects the previous commit message. It said this audit was "already red
on main for pre-existing org-claim violations". It is NOT — that came from the
same misleading local sweep. main's baseline holds three entries and CI was
green before this branch; the only genuinely new finding was the one file above.
The fleetcrown docs mentioning incorporation appear in a local grep because it
walks every docs/*.md, while the API scan reads a narrower set of paths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6

* fix(org-drift): baseline from the API scan, not the local sweep; list the audit in SHARED.md

The baseline is now generated by the instrument that judges it. The previous
commit baselined 51 files from a USE_LOCAL=1 sweep, and CI correctly rejected
44 of them as entries matching nothing production can see — the local sweep
greps every docs/*.md in stale checkouts, while the real scan reads a narrower
set of paths from the org's default branches. A baseline full of unreachable
entries is a ratchet that cannot fall.

Seven real entries remain, in four other repos, each an agent-facing file
(CLAUDE.md / AGENTS.md / README.md) — the worst place for a stale address. The
inventory is committed as the API scan regenerated it: 46 repos, 10 violations.

Also lists org-drift-audit.sh in SHARED.md's central-audits table. It was
missing, which is exactly why a duplicate of it was nearly written today —
the table exists so that "is there already a checker for this?" has an answer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 17:22:39 -07:00
CatoandClaude Opus 5 82cd576fb5 feat(ci): guard every next-auth app's advertised origin, daily (#40)
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>
2026-09-10 16:23:03 -07:00
CatoandClaude Opus 5 ff79e556b5 feat(ci): 17 of 24 repos could not report a CVE, and nothing measured that (#39)
* feat(ci): 17 of 24 repos could not report a CVE, and nothing measured that

surf-your-life.orangecat.ch served Next 16.2.3 — two CRITICAL unauthenticated
RCEs — plus a critical @auth/core flaw and six more high findings. Thirteen in
total, on a live site, for months.

Nothing was ignored. Dependabot alerts were simply OFF for that repo, so GitHub
never raised one and there was no number for anyone to act on. The correlation
across the fleet that day was exact:

  botsmann        alerts ON  -> Dependabot PR #193 took it to 16.3.3 on its own
  orangecat       alerts ON  -> its security job went red, which is how this surfaced
  surf-your-life  alerts OFF -> silence, 1 critical + 6 high

17 of 24 repos were off. The instrument was missing, not the diligence.

WHY THE EXISTING SWEEP COULD NOT SEE IT. version-currency.mjs compares MAJORS
parsed out of package.json ranges: parseMajor("^16.2.12") is 16, blessed is 16,
no gap. Every minor and patch is invisible, and it reads the declared RANGE
while the lockfile decides what ships — a caret that ALLOWS 16.3.4 sits on
16.2.12 forever, because an already-satisfied dependency is never upgraded on
install. Both vulnerable pins returned zero gaps from it. That limit is now
written into its own header rather than left to be rediscovered; the two audits
are complements, not overlaps.

A HARD FLOOR, NOT A RATCHET. Its siblings baseline a count because their
findings have legitimate exceptions. This one has none: a repo with alerts off
cannot report a CVE, so the correct number is zero permanently. A baseline here
would only make "some repos are deaf" an accepted state.

THE POPULATION COMES FROM `gh repo list`. Writing this, I first hand-typed the
repo list from `ls ~/dev` — which invented a repo that does not exist
(~/dev/revamp-info is a checkout whose remote points at bitbaum/hirnli) and
MISSED 17 that do, including every shared package (ai-kit, ai-forms, bip-kit,
limitkit, threadkit, design-tokens) that is published to npm and consumed
fleet-wide. Archived repos and forks are excluded, matching version-currency so
both audits measure the same population.

Ten tests, each a mutation: a repo with alerts off must exit 1, an UNREADABLE
repo must exit 1 rather than pass, and an empty repo list must exit 2 rather
than read as a clean fleet.

All 41 repos now have alerts and automated security-fix PRs enabled; the audit
reports 41/41.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSLwXsPH8mLYtaM8h3oVto

* chore(ci): the org-drift ratchet fell and its baseline still claimed the violation

`org-drift-audit.sh --check` was failing every PR in this repo — not for
anything in the PR, but because fleetcrown/README.md was fixed and its baseline
line outlived it. The audit is built so that a baseline entry with no matching
violation is itself an error, precisely so the list cannot rot into a claim
about a problem that no longer exists. It did its job; nobody deleted the line.

Unrelated to the Dependabot work on this branch, and separated into its own
commit for that reason. Left alone it blocks everyone.

  46 repos swept, 3 known violations, no new contradictions (was: exit 1).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSLwXsPH8mLYtaM8h3oVto

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 15:57:27 -07:00
918a6d6f0e Use gh API by default, baseline existing violations (#33)
* Use gh API by default, baseline existing violations

- org-drift-audit.sh: Default to GitHub API scan via gh CLI, scans all
  bitbaum org repos. Finds 4 existing violations across 41 repos.
  Local DEV_ROOT scan available via USE_LOCAL=1.

- org-drift.baseline: Baselined 4 existing violations found in first run:
  bitbaum/CLAUDE.md (AI product studio claim)
  bitbaum/README.md (bitbaum AG claim)
  crewless/README.md (door disagreement with apps.conf)
  fleetcrown/README.md (door disagreement with apps.conf)

- org-drift-inventory.txt: Generated inventory showing 41 repos scanned,
  4 violations found. The ratchet now prevents new violations from landing.

First real run complete. The count can only fall.

Co-authored-by: Cato <catomean@users.noreply.github.com>

* Fix test suite for gh API mode

Test now uses USE_LOCAL=1 to test the vacuous-pass check,
since gh API mode connects to GitHub. All 36 tests pass.

Co-authored-by: Cato <catomean@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cato <catomean@users.noreply.github.com>
2026-09-09 01:01:27 -07:00
a795806430 Add org register and drift-prevention system (#32)
- 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>
2026-09-09 00:30:59 -07:00
CatoandClaude Opus 5 25de3dcc17 chore(inventory): auto-merge duplication is down to the canonical copy (#30)
automerge-script  5  5   →   1  1

The four repos still carrying their own auto-merge-sweep.sh now call the
reusable workflow instead: datacat #253, petvity #81, hamstercheek #21,
solon #154. What remains is fleet's own copy, which is the definition, not a
duplicate.

For scale: SHARED.md opens with this script as the worked example of writing a
rule down and watching it fail — "22 repos, 8 distinct versions, 11,787 to
19,344 bytes; a fix landing in one reaches at most 9 of them". That is now one
file in one repo, and every consumer picks up a fix the moment it merges here.

The copies were 293-371 lines against this repo's 446, differing on 149-227
lines each. None of them looked broken, which is the whole difficulty: a sweep
merges what it can and exits 0, so a copy missing a third of the canonical is
indistinguishable from a working one until the missing third is what you
needed. Concretely, three of the four listed deploy.yml in REARM_WORKFLOWS —
dispatch once, no idea whether it landed — instead of using the deploy
reconciler, which compares the base tip against the last successful deploy and
retries. Without it a commit sits merged-but-not-live with CI green and nothing
to signal it.

What was deliberately NOT unified: hamstercheek keeps its hourly cron. It is
private, Actions minutes are billed, and */10 would burn ~4,300 billed minutes
a month against a 2,000 allowance to discover there are no PRs. The policy is
what centralises; the triggers stay per-repo because that is where genuine
per-repo truth lives — the CI workflow's exact name, the base branch, and the
bill.

Every other line of the baseline is unchanged, so this ratchets one number down
and holds the rest. `--check` passes.


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 14:42:41 +00:00
CatoandClaude Opus 5 4b959e5c10 chore(ratchet): all three pipeline checks now read zero (#29)
Re-measured across the same 32 repos after the last four adoptions:

  deploy-cancels      0
  deploy-reverifies   0
  cold-ci-build       0   (was 14 this morning)

Fourteen repos adopted the Next build cache today; evig's deploy stopped
cancelling itself and stopped re-running the bundle CI already runs.

Setting the baseline to 0 is the point of a ratchet that can fall. Left at 4,
four repos could regress unnoticed — and this check exists because 'we know we
have this problem' has never once changed a number in this fleet.

From here the ratchet is load-bearing on every new repo: the golden templates
ship the cache step, so a repo scaffolded from them starts at zero and any
regression has to be argued for in a PR rather than inherited.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 07:17:44 -07:00
CatoandClaude Opus 5 faabfd9621 chore(ratchet): lock in the cache win — cold-ci-build 14 → 4 (#28)
Ten repos adopted the Next build cache today (hirnli, petvity, vitareba, s-ink,
biaslens, reparaturbonus-zh, truthseeker, surf-your-life, hamstercheek,
aoz-housing). Re-measured across the same 32 repos: 14 → 4.

Lowering the baseline is the point of a ratchet that can fall — otherwise the
next repo to regress would be measured against a number nobody achieved, and
the win would silently evaporate.

The four remaining are the ones a mechanical sweep should NOT have touched:
botsmann, substrata and camille-boulangerie have no single Install anchor and
solon has two. Each needs reading rather than a regex, and guessing at them is
how one mechanical change breaks four repos.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 13:58:45 +00:00
CatoandClaude Opus 5 4d5d5273b8 ci(fleet): audit the shape AROUND the gates, and fix the templates that seed it (#27)
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>
2026-09-07 13:35:52 +00:00
CatoandClaude Opus 5 e96fcb5495 chore(ratchet): raise two counts on purpose, lock one win in (#26)
The weekly run was green on 2026-08-31 and red on 2026-09-07. Three changes,
none of which could have been blocked where they happened:

  automerge-script  6 -> 5   a win — locked in so it cannot silently regress
  health-route      9 -> 11  raised knowingly
  slug-util         2 -> 3   raised knowingly

**health-route.** The row claimed "identical shape in 8 repos; a 20-line
contract". The shape is identical; the content is not. vitareba's health route
asserts the app's own role can still read its own tables — written because a
migration once created a table the app could not read — while orangecat's checks
Supabase reachability. Extracting the envelope leaves every app still writing
the only part that differs. Raised rather than absorbed.

**slug-util.** Not one function copied three times: three functions that
disagreed, two of them broken, found by reading them rather than counting them.
evig declares eight locales and deleted seven — 'Café Genève' became
'caf-gen-ve', and a Russian or Japanese title produced the EMPTY string, which
under a unique constraint means the second such record cannot save at all.
hirnli transliterated a hand-written list missing ç, so 'Association Française'
became 'association-fran-aise' in a directory of Swiss foundations.

Both are fixed in place today (evig 32 tests, hirnli 26), which is why this PR
raises the count instead of reducing it: the bug was worth fixing now, and
consolidating into sitekit needs a publish plus a minimumReleaseAgeExclude entry
in each consumer — a chain not worth delaying two live fixes for. Recorded in
SHARED.md as the intended end state rather than left as an unexplained number.

Also documents what this ratchet structurally cannot do: it runs here and
measures 38 other repos, so it can name a rise and never block one. Both rises
arrived through repos the gate cannot reach. A detector without an owner is the
muting SHARED.md exists to prevent.

Verified: `--check` exits 0 across 38 repos.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 12:10:12 +00:00
CatoandClaude Opus 5 a7fb23c97f chore(inventory): message threads on the ratchet, and the count corrects the claim (#24)
Adds a `messaging-threads` concern to shared-inventory.sh, with a baseline
entry measured rather than asserted:

    messaging-threads   2 repos   3 files   orangecat(2) vitareba(1)

The intuition that prompted this was "many of our apps have messaging, treat it
like the other fleet-wide duplication". Measuring says otherwise: only two repos
carry thread logic at all. Recorded as such in SHARED.md, because a row that
overstates its own case is worth less than no row.

It still earns its place. The duplicate that existed was not merely a second
copy, it was wrong in three ways that are invisible below three participants —
read receipts reporting READ when any ONE recipient had caught up, a reader
counted outside their own visibility window, and an optimistic bubble sharing
no identity with its stored row, so realtime winning the race rendered the
message twice. threadkit (506 lines, already published, one adopter) made all
three unrepresentable; orangecat converted as the proving consumer.

`--check` still reports two rises, and they are DELIBERATELY not absorbed here:

    ✗ health-route: 9 → 11 files
    ✗ slug-util:    2 → 3 files

Both predate this change and neither is mine. Running --update would have
locked all three in under a messaging PR, which is precisely how an increase
stops being reviewed — the failure mode this ratchet exists to prevent. They
need their own look.

test-shared-inventory.sh: 7 passed, including that every baseline concern still
exists in the script.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-06 20:52:42 +00:00
8af048a117 chore(model-pins): install ai-kit from npm — the v0.3.0 git freeze thaws (#21)
The workflow comment said "switch to npm once it has a token"; that day
came 2026-09-04 (@bitbaum/ai-kit@0.6.2). The audit script learns the
scoped node_modules path; the legacy paths stay as fallbacks.


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>
2026-09-04 16:49:52 +00:00
955e2484d1 chore(ci): retire the ai-kit git-tag pin — it lives on npm now (#18)
ai-kit is published as @bitbaum/ai-kit@0.6.2 and all 7 consumers
(orangecat, fleetcrown, aoz-housing, botsmann, evig, hirnli, truthseeker)
have "^0.6.2" from the registry on their mains (verified 2026-09-04). The
internal_tags entry that policed the github-tag pins has nothing left to
police, so it graduates exactly the way blessed-versions.json always said
it would: delete the entry. As a 0.x package it joins drizzle-orm and
@anthropic-ai/sdk in the "no meaningful major, not listed" convention —
no new mechanism.

- blessed-versions.json: internal_tags now {}, comment records the
  graduation path and the 0.x convention
- test-version-currency.mjs: two new checks pin the now-live config shape
  (absent internal_tags counts only major gaps; empty internal_tags does
  not judge a leftover git pin) — the || {} in gapsFor is proven, not
  assumed
- STACK.md: AI row now names @bitbaum/ai-kit from npm; package-manager
  row and "still open" note say the npm bootstrap is DONE but the pnpm
  sweep is still in progress (5 repos converting) — NOT marked done

Measured before and after: TOTAL GAPS 1 with both main's config and this
one — identical, the ratchet does not move. That 1 is sbb-lost-found's
eslint ^8.57.1 < blessed 10, a pre-existing regression on main (baseline
is 0) that the weekly ratchet will flag; it belongs to sbb-lost-found,
not this PR.


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>
2026-09-04 09:33:42 +00:00
e637589003 feat(ci): forks are exempt, visibly — upstream owns their manifests (#14)
A fork that tracks an upstream does not own its dependency policy: patching
its lockfile buys merge friction and can never be more current than the next
sync. Learned on bitbaum/openclaw (2026-09-01): the openai bump's PR could
only ever be verified by a CI baseline that also belongs to upstream. A
fork's currency action is SYNCING, which this audit cannot ratchet.

listRepos now partitions by isFork; exempted forks are printed by name in
every report so the exemption is visible, never silent. Baseline re-measured
on a verified-clean run (zero UNCHECKED): the fleet's owned repos are fully
current at 0.

(The first push of this branch shipped the baseline without the code — the
patch had been swallowed by a blocked shell command and the commit script
never re-applied it; a rate-limited measurement then wrote 0 with 23 repos
UNCHECKED. Caught because UNCHECKED prints visibly, drafted before the sweep
could take it, re-measured clean, amended.)


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>
2026-09-01 13:03:03 +00:00
e3be335a3f chore(ci): the currency baseline tightens 80 -> 1 (#13)
The 2026-08-31 audit seeded the ratchet at the fleet's real number: 80
gaps. Waves 1-6 of the currency arc closed 79 of them in ~36 hours — every
repo current on its blessed majors, the box off EOL Node 20, both
flagships migrated (zod 4, Vitest, TS 6 fleet-wide).

The one counted survivor is deliberate: openclaw's openai 6->7 is held
until its fork-CI decision (the bitbaum fork has Actions disabled, so a
merge there is unverified; the gateway's own runtime already satisfies
v7's Node>=22 floor). The gap stays measured, not forgotten — exactly what
the ratchet is for.


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>
2026-09-01 01:38:30 +00:00
3abb6eeeb8 feat(ci): a scheduled source-level nav-contract audit, closing the authed-surface gap (#11)
* feat(ci): a repo-level check for the nav defect the rendered audit can't see

ui-defect-audit.mjs renders each site's PUBLIC entry page — it cannot reach a
sidebar behind a login, which is exactly where the original bug in this
sweep lived. This is the other half: a source sweep run from this repo
against every default branch, the same pattern hosted-supabase-audit.sh
already uses (central, not a copy per repo).

THE RULE IS REPO-LEVEL, DELIBERATELY. A first per-FILE draft — "a file that
renders links and computes an active state must contain aria-current" —
produced 19 findings of which roughly a quarter were wrong, because the
active state and the announcement legitimately live in different files:
evig spreads a helper that supplies the attribute, fleetcrown's parent
passes `current` to a child that announces it, a tab list correctly uses
aria-selected. A gate wrong a quarter of the time gets ignored. The repo-
level assertion — somewhere in this repo, aria-current exists at all — has
no false positive in that class, at the cost of not pinpointing the file. The
rendered audit's job is the per-surface precision a live DOM can give; this
gate's job is coverage no renderer can reach.

Proven live, not just by fixture: on the first real run it named botsmann,
datacat, petvity, printcraft, s-ink and surf-your-life by their genuine
defect (checked against each repo's origin/main before any of them were
fixed), and cleared to green as each was fixed and merged during this same
session.

check:test-nav-contract-audit.sh, the self-test that runs before the sweep,
caught a second real bug in the process: SKIP_FILE's `tabs?\.(tsx|jsx)$` was
unanchored, so it matched any file merely ENDING in "Tabs.tsx" as a
substring — evig's AnalyseTabs.tsx included — and skipped it silently. All
four SKIP_FILE alternatives now anchor to `(^|/)`, matching a whole basename
rather than a suffix. The anchor fix surfaced 7 more nav files across the
fleet that a prior sweep had silently excluded; re-run after fixing, the
fleet is still fully green — the files were skipped, not violating.

Two things a fresh reader would ask, answered in the script itself:

- Two directories are not two repos. fleetcrown/fleetcrown-scripts and
  hirnli/revamp-info are each one repo cloned twice; the loop dedupes by
  origin URL so a finding is not doubled or a merge missed on one clone.
- `set -e` traps: `cmd && continue` is fatal when cmd's grep does not match,
  and `git symbolic-ref -q` on a clone with no default-branch tracking is
  the same trap. Every such probe here is an explicit `if`, not a `&&`.

Baseline file (nav-contract.baseline) ships empty with the ratchet's own
convention: a repo with a genuine no-current-page nav (a single-page tool
whose nav is anchors) gets a line with a reason, decided in a PR, not by
silently going green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

* feat(ci): schedule the nav-contract audit — a script alone enforces nothing

nav-contract-audit.sh existed in the previous commit and nothing called it.
A check nothing runs is a suggestion, not a gate — the exact failure mode
SHARED.md already names for the accent-ink and duplication checks.

Mirrors hosted-supabase.yml's established pattern for this shape of audit
exactly: self-test before the sweep, shallow-clone the fleet with
--depth 1 --filter=blob:none (this repo has no package.json on purpose),
FLEET_READ_TOKEN for private repos with the gap stated rather than hidden,
weekly schedule plus workflow_dispatch, findings into the job summary where
a human actually looks.

Proven end-to-end against a real shallow clone, not just asserted: `gh repo
clone --depth 1 --filter=blob:none` sets refs/remotes/origin/HEAD correctly
(verified — some shallow-clone paths do not), and the audit script reads it
and runs clean against the result.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

* docs(shared): record the nav-contract gate landing, and the discovery gap

The nav contract section described a two-gate plan (rendered audit + a couple
of per-repo checks) as the working state. As of this session there is a
third gate that actually shipped and ran: nav-contract-audit.sh, weekly,
central, self-tested, found and fixed six real repos on its first sweep.
Recorded with the date and the six names, not just "it exists."

Also records a finding the sweep surfaced but should not silently fix:
s-ink, substrata, camille-boulangerie and wild-spirit are all outside
FLEET_SITES, the hand-maintained editorial list that drives the rendered
audit's site discovery. Three of the four are actually on orangecat.ch
subdomains and would match the discovery regex if linked — only s-ink is
genuinely off-pattern (sinktattoo.com). Adding entries to FLEET_SITES is a
product/content decision ("each site's own words," per its own doc comment),
not a mechanical nav fix, so it is written down here for a human rather than
edited as a side effect of this sweep.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

---------

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 12:59:19 +00:00
503f476efa feat(ci): staleness is measured, and the measurement is a ratchet (#10)
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>
2026-08-31 08:48:06 +00:00
8dde0f1db5 feat(ci): the UI audit can now see what nav FORGOT, not just what it wrote (#9)
* feat(ci): the UI audit can now see what nav FORGOT, not just what it wrote

The audit's two detectors both look for something someone put on the page: ink
below the contrast floor, rows that start at different x. An entire class of
navigation defect is invisible to that shape, because each instance is
something someone left out.

A fleet-wide nav audit across 20 repos found three, repeatedly:

  1. A current page no link announces. Every repo styles the active item;
     nine of them never set aria-current, and four more set it on every
     surface but one. The highlight exists only for people who can see it.
  2. Nav targets below 44px. That is this fleet's own floor, not the WCAG 2.2
     AA minimum of 24px — fleetcrown enforces it centrally, kivvi and
     wild-spirit state it explicitly — so the message says "out of step with
     the fleet", not "non-compliant".
  3. A label that looks like a control but is not: the orangecat sidebar
     shipped an <h3> beside a chevron-only button carrying the whole onClick.
     Visitors aimed at the word and nothing happened.

Rendered, not grepped, and that is the point. This fleet holds Next apps, CSS
modules, Tailwind, and one hand-rolled static generator with no framework at
all. No source-level lint spans that; the DOM does.

Each detector refuses to fire where the absence is CORRECT:

  - aria-current is only demanded when a link in that nav really does point at
    the page being rendered. A footer of outbound links has no current page to
    mark, and flagging it would fire on every site that has one.
  - A dead label is only claimed when the heading is outside any control AND a
    sibling control has no text of its own. That pairing is the bug; a heading
    next to a labelled button is not.
  - Nested controls are measured by their parent, so one small icon inside a
    large row is not reported as the row.

Small targets print one line per distinct SIZE rather than per element: a nav
of twelve identical 32px links is one decision, and twelve lines of it buries
everything else.

Seven new self-tests, both sides pinned as the existing ones are — 19/19 pass.
The failing side of each is the real bug from a real repo; the passing side is
the corrected markup.

Lands while the workflow still defaults to --warn-only, so the findings surface
in the job summary before anything fails on them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

* docs(shared): the navigation contract, and why nav markup stays per-app

Records the outcome of the 2026-08-29 fleet nav audit (20 repos, ~13,300 lines
of navigation, nothing shared between them).

Adds navigation chrome to "What must NOT be centralized", with the evidence
rather than the opinion: sitekit is the one shared renderer, it serves 2 of 20
repos, and it shipped ~28px targets and no focus style to BOTH consumers —
unfixable downstream, because a consumer cannot patch markup it does not own.
Its flat {path,label} model also cannot express solon's mega-menu or
reparaturbonus-zh's drawer, which is why every repo with real nav complexity
reinvented its own instead of adopting it.

Adds the six-rule contract that IS shareable, and says where each rule is
enforced — the rendered central audit for public pages, a repo-local check for
anything behind a login, because those cover disjoint surfaces and neither
substitutes for the other.

Records one reversal: the audit first recommended putting nav duplication on
the ratchet. Writing the "do not centralize" section is what showed the two
cannot both be right — the ratchet counts concerns that should converge on ONE
implementation, and every repo is SUPPOSED to have its own nav config, so the
number would score the correct outcome as duplication.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

---------

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 07:45:51 +00:00