Commit Graph
83 Commits
Author SHA1 Message Date
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 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
5dfdb1980f fix(ci): the hosted-Supabase test died on the runner instead of reporting (#5)
CI went red on main with exit 128 and no failure line — the suite stopped
mid-file, naming nothing.

Two causes, both mine. Sourcing the audit to get at its pure helpers also runs
its `set -euo pipefail` in the test's shell, so the first command that failed
took the whole suite with it. And the fixture repo committed with whatever git
identity happened to be lying around; a GitHub runner has none, so `git commit`
exits 128. Locally both were invisible: my identity is configured, so nothing
ever failed at that line.

A test suite whose job is to run commands that fail must not die on the first
one. Take -e back after sourcing, keep -u and pipefail, and give the fixture an
explicit identity so it does not care what the machine has.

Verified the way it actually breaks, not the way it passes:
HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null
reproduces exit 128 before the fix and 28/28 after.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:03:20 +00:00
822297e214 feat(ci): audit the fleet for the Supabase we retired (#4)
The fleet self-hosts Supabase on bitbaum. Two managed-cloud projects are dead —
orangecat's ohkueislstxomdjavyhs, retired 2026-06, and botsmann's
jkjmhtirxwhljpkcfxqe before it. The repos kept describing them in the present
tense.

botsmann's setup doc opened with "Completed Setup" for its dead project and
said to apply migrations by pasting SQL into a supabase.com dashboard. Two
scripts printed the same instruction, one handing out a psql string against
pooler.supabase.com, and the CLI's cache with the old project ref was committed
twice. Nobody pasted anything, its eleven migrations were never applied, and
/api/health served PGRST205 for months while every deploy went green. The docs
were not stale clutter; they were the outage. A wrong pointer to a real-looking
place is worse than no pointer: no pointer makes someone ask, a plausible one
makes them assume it was handled.

The first live sweep found one more of the same shape, which is the argument
for auditing rather than trusting the cleanup: printcraft's seed script
hardcoded the retired host AND omitted `db: { schema }`, so repointing it
naively at the box would have written one customer's rows into orangecat's
`public`. Deleted in bitbaum/printcraft#30.

Central, not a copy per repo — the rule this repo exists to keep. Three repos
use Supabase and thirty do not. botsmann additionally keeps a local
check:selfhost in its own verify, deliberately: it is the repo the outage
happened in, and blocking the commit beats finding it a week later.

Two judgements decide whether this is useful or merely loud, and both are
pinned by 28 tests. It allows supabase.com/docs, because the product
documentation is still correct for us, and your-project.supabase.co, because a
placeholder misleads nobody — a gate that fires on either gets muted. And
legitimate mentions, like a decommission runbook naming what it
decommissioned, live in the baseline WITH A REASON rather than widening the
pattern: a ratchet that may fall or hold, never rise.

Unlike verify-floor-audit.sh this reads local checkouts, because it is a
full-text sweep and GitHub code search returns nothing for these repos — even a
known-present token finds no hit. So the workflow shallow-clones the fleet and
runs the same script unchanged. When it sweeps nothing it says SKIPPED, loudly,
rather than printing a tick: a vacuous pass reads exactly like coverage, which
is the failure this audit exists to prevent.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 11:00:42 +02:00
GandClaude Opus 5 f6bf14ac36 chore: retire the maonakamoto handle (#2)
GH_OWNER defaulted to an owner that no longer exists (gh api users/maonakamoto
=> 404), so this audit enumerated nothing and would have reported an empty
fleet as a clean one.


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 08:32:21 +00:00
Mao NakamotoandClaude Opus 5 f1d5549a36 feat: the fleet's central automation, moved out of dotfiles
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
2026-08-28 10:10:21 +02:00