mirror of
https://github.com/bitbaum/dotfiles.git
synced 2026-12-03 17:37:01 +01:00
docs/chatkit
45
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b10b19e7c8 |
chore(ci): drop the copy of find-false-needs.py — fleet owns it (#68)
scripts/ci/find-false-needs.py was a byte-for-byte copy (one docstring word apart) of fleet/scripts/ci/find-false-needs.py. Fleet is the SSOT for CI scripts — its templates/ci/README.md says one central script, not a copy per repo, and this file's own docstring says the same about itself. Nothing in this repo referenced the copy; the one pointer (a memory note) now names the fleet path. Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
71becc5253 |
chore: rename FleetCrown to Loki (#67)
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 11 files changed, 22 insertions(+), 22 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> |
||
|
|
5d5e857c79 |
Adopt fix-scans.sh from lifeops, and write down three rules earned today (#66)
* feat(scripts): adopt fix-scans.sh, and say that scripts/ exists Batch-repairs date and GPS metadata on scanned film frames: scanners stamp the scan time, not the shot time, so a 1994 roll sorts into last Tuesday in any photo app. Dry-run by default, --apply writes through exiftool. It came from bitbaum/lifeops, a repo created by an agent on 2026-08-13 that never went anywhere. The idea (personal non-code tasks made repo-shaped so FleetCrown can dispatch them) is worth keeping as an idea; a repo is not the place to keep an idea. This is the one file in it that does real work, and it is environment-shaped, so it belongs beside fleet-status.sh. The architecture block never mentioned scripts/ even though fleet-status.sh has lived there for months. A directory the file does not list is one the next person puts the wrong thing in. * docs(claude): three rules earned the hard way today Written after a session that created litter, then nearly deleted live code while cleaning it up. Each is a fact an agent cannot derive: - Clean up the experiment when the experiment is over. Six dogfood sites from 10-11 September were still live days later, two reading as real Zurich businesses that do not exist, on George's own domain. Includes the deletion ORDER: the FleetCrown project first, or box-prepare re-clones the site within two minutes. - Never create a GitHub repository on your own initiative. Agents commit under George's own identity, so an agent-made repo is indistinguishable from his. 27 of 48 repos had an agent-authored first commit, and he did not recognise several of them. - Answer "what do we have?" from a register, never a grep. ~/dev is a partial copy of the org. A grep for @bitbaum/<name> missed every consumer of packages that install under a bare name, and "nothing depends on these" nearly deleted bip-kit (8 adopters), limitkit (3) and threadkit (3). fleet/registers/*.json had the right answer the whole time. * docs(claude): three rules earned today, and the budget to hold them Each records an incident from 2026-09-12 and is a fact an agent cannot derive on its own: - Clean up the experiment when the experiment is over. Six dogfood sites from 10-11 September were still live days later, two reading as real Zurich businesses that do not exist, on George's own domain. Carries the deletion ORDER, because the FleetCrown project row is invisible from the box and box-prepare re-cloned three of the six within two minutes. - Never create a GitHub repository on your own initiative. Agents commit under George's own identity, so an agent-made repo is indistinguishable from his. 27 of 48 repos had an agent-authored first commit and he recognised few of them. - Answer "what do we have?" from a register, never a grep. A grep for @bitbaum/<name> missed every consumer of packages that install under a bare name; "nothing depends on these" nearly deleted bip-kit (8 adopters), limitkit (3) and threadkit (3). fleet/registers/*.json had the answer the whole time. The first draft of these ran 75 lines and the budget gate caught it, which is the gate working: they are 49 now. BUDGET rises 242 -> 291, set to the exact count so the ratchet keeps no slack, with the reason in the diff. |
||
|
|
14d917228f |
feat(scripts): show what every agent is working on (#62)
Eighteen sessions were running at once today across twelve projects, and none could see any of the others. CLAUDE.md already says to check the session registry before wide-blast-radius work, but that registry holds a one-line NAME per session — it says a session is called "orangecat username immutability investigation", not that it has shipped four PRs or hit something the session next door is about to hit. The cost is not hypothetical. Running this for the first time showed a datacat session had just committed "the gate was red on an unmodified main, twice over" — the same CI-gate class I had spent the afternoon diagnosing in hirnli, found independently, hours apart, by two agents who could not see each other. It coordinates nothing and holds no lock: worktrees already isolate files, and what actually collides is intent, which only a person reading the output can judge. Also documents the memory rule, because breaking it is silent. Memory loads from the SESSION'S CWD, so a session whose cwd is dotfiles but whose work is hirnli files its memories under dotfiles — where no hirnli agent will ever read them. That is exactly what happened to 23 of them; they have been moved. Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
dd23dad70a |
chore: retire the maonakamoto handle (#57)
The account was renamed to `catomean` and the repos then moved to the `bitbaum` org, so `maonakamoto` now names nothing: github.com/maonakamoto and maonakamoto.github.io both return 404, and @maonakamoto no longer resolves as a user. Three different targets, because these are not the same reference: repo links -> bitbaum/<repo> (the repos live in the org) the person -> catomean (profile links, @mentions, CODEOWNERS) pages site -> bitbaum.github.io Deliberately NOT changed: .mailmap keeps the old noreply address as an ALIAS. It is what maps historical commits onto the current identity; deleting it would silently unmap them. Only the canonical side moved to catomean. Files that explain the outage by naming the old account keep it, since the name is the content. Files: scripts/ci/find-false-needs.py Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
91802e9d93 |
chore: fleet automation moves to bitbaum/fleet; this repo is the environment again (#56)
A repo holding a .bashrc was the wrong place for the machinery gating thirty other repos: three sessions and the owner collided here in one week, and every fleet change looked like an environment change. The audits, templates, registry and sweep now live in bitbaum/fleet (layout unchanged, all six test suites green there, secrets set, CI green). Nothing breaks for callers: - auto-merge-sweep.yml stays as a FORWARDING SHIM — the 16 repos calling it as a reusable workflow keep working; the shim maps the historic ref 'master' to fleet's 'main' and holds no logic. - SHARED.md stays as a pointer, because a decade of docs and habits say to check it here. The registry is maintained only in fleet. - This repo's own auto-merge now calls fleet's sweep like every other repo. CI slims to what this repo now is: shell syntax plus an install.sh dangling-symlink check. CLAUDE.md and README describe the environment repo; the global standards' pointers now name fleet/SHARED.md and fleet/templates/ci. Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
7faf0d72cb | chore(ci): GitHub owner maonakamoto -> catomean | ||
|
|
3f648900a7 | chore(ci): GitHub owner maonakamoto -> catomean | ||
|
|
5f16bc040e |
chore(shared): record what the outage actually cost, and lock the ratchet (#49)
Adoption of `ai-kit` went 2 -> 5 — fleetcrown, aoz-housing, truthseeker,
botsmann and this repo. All of it as a side effect of repairing the outage
rather than as a migration project, which is the only way adoption has ever
moved here.
Three repos deliberately did NOT adopt, and the reason is the same in each:
kivvi, orangecat and evig already own model REGISTRIES carrying context windows,
tool and vision support, and per-token cost — none of which `ai-kit` models.
Installing it beside one of those adds a second source of model truth to a repo
whose problem was having two. They were repaired in place and left pointing at
the daily audit. Merging a registry into `ai-kit` is a real design question and
belongs to a human, not to an outage.
The `AI provider client` row is re-priced. The first count said five repos and
six pins; it was seven repos, and inside a repo the id was written down two to
FOUR times. Kivvi needed three PRs to remove one retired id — provider registry,
an app's inline fetch body, the fallback chain, and a client hook's
`FALLBACK_MODEL` — because each pass only found the copies the tooling could
see. That is the cost of duplication measured rather than argued.
The audit row now says what it learned about itself. Repairing seven repos with
it exposed nine faults in both directions, and the blind spots were not random —
they mirrored the shapes people write (`GROQ_MODELS = {` defeats `\bmodels?\b`,
`models: AIModel[] = [` defeats an array pattern, `modelId` is not `model`). It
also read ids out of comments, reporting a retired id in the very commit that
removed it. The note that matters for whoever touches it next: never trust its
first clean run after widening — re-run the live sweep and read every line,
because tightening the matcher to kill a false positive silently deleted a real
finding once already.
Also: `--update` locks in rate-limit 14 -> 13. A ratchet that only ever gets
checked never falls, and this one fell on somebody's work.
Version bumped to v0.4.0, which is breaking: form filling moved off the root
export to `ai-kit/forms`.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
c45719fa7f |
fix(ci): read model maps, and stop reporting things that were never pins (#48)
Repairing six repos today was a live test of this audit, and it failed in both
directions at once: it missed retired ids in shapes it could not parse, and
reported ids that were never pins. Six faults, each found by acting on the
previous report and looking at what it pointed to.
MISSED — ids the audit could not see
1. Model MAPS. The walker only opened on `[`, and two repos keep their ids in
object literals — on opposite sides of the colon. Hirnli:
`{ '8b': 'llama-3.1-8b-instant' }`, ids as values. OrangeCat:
`{ 'llama-3.3-70b-versatile': { contextWindow: ... } }`, ids as keys,
including `DEFAULT_GROQ_MODEL` — the baseline every free non-BYOK user gets.
Both registries were entirely retired and both read as clean.
2. `\bmodels?\b` does not match `GROQ_MODELS`. The underscore before it is a
word character, so there is no boundary there — and almost every map in this
fleet is named exactly that way. This was why (1) still found nothing after
the walker was taught about braces.
3. `modelId` is not `model`. Kivvi's fallback is
`const FALLBACK_MODEL: ModelSelection = { providerId: "groq", modelId: "..." }`
— singular, so no collection walker covers it, and the single-id pattern was
anchored on the bare word. Found only by re-running the live sweep after
fix (4) and noticing a real finding had disappeared.
REPORTED — things that were never pins
4. `for (const model of models) {` opened a region over an entire loop body,
so the request headers inside were read as ids and a `Content-Type:
application/json` was reported as a retired Groq model. The opener now
requires a declaration (`[:=]` right after the token) and a PLURAL token —
`function supportsReasoningEffort(model: string): boolean {` is a
declaration by the first rule alone, and its `startsWith("qwen/")` prefixes
were being reported too.
5. The audit was reading ids out of COMMENTS. A model list is exactly where
someone documents the id they just replaced, usually in backticks — so
Kivvi's `// replaces `meta-llama/llama-3.2-3b-instruct:free`, retired` was
reported as a live pin in the very commit that removed it. Comments are
stripped from a region before extraction. An audit reporting on prose rather
than code is the failure it exists to catch elsewhere.
6. Two misattributions, both "a true statement about the wrong vendor":
- `gpt-4o-mini` under an `openai:` key was called a retired OPENROUTER
model. It is not an OpenRouter id at all; there it would be
`openai/gpt-4o-mini`. Nearest-marker-above found OpenRouter's base URL in
the block before. A provider-keyed record now names its own rows via
`keyMarker`, anchored to a line starting with the key and a colon —
necessary, because bare `openai` appears inside `api.groq.com/openai/v1`.
- `OLLAMA_MODEL=llama3.2` was called a retired Groq model. Ollama is now a
listed non-queryable vendor, so its tags are attributed and reported
unchecked. What the operator pulled locally is not a question Groq can
answer.
Also: a size alias is not a model id. Reading maps turned Hirnli's
`{ '70b': ..., '8b': ... }` keys into findings — `70b` has a digit and no space,
so it looked like an id, and `8b` escaped only by being two characters long. A
vendor id always carries a separator: a slash, a hyphen or a dot. Nothing in
either live catalogue is a single unseparated word.
Net effect on the live sweep, across the same 34 repos:
before this session 12 retired, 5 repos, several of them wrong
after coverage (#47) 16 retired, and hirnli appeared for the first time
now 2 retired, both real, both in Kivvi
The intervening repairs account for most of the drop; this commit accounts for
the false ones. Every remaining line is a genuine retired id in a genuine call
path.
Self-test: 68 -> 102 checks, still no network, no key, no checkout. Every fixture
is the real code that fooled it — Hirnli's alias map, OrangeCat's registry and
provider record, Kivvi's typed array and fallback, the loop body, the comment.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
776afc3ff3 |
fix(ci): the audit was reporting a fraction and calling it a total (#47)
Kivvi has seven retired model ids. The audit reported two.
Understating a repo is worse than skipping one. A skipped repo is visibly
absent; an understated repo prints a number that reads like an answer, and the
five pins it left out were in `packages/ai` — Kivvi's actual provider chain.
Three independent causes, each found by chasing the previous one.
1. The AI word had to appear in the FILENAME. Kivvi keeps its provider clients
side by side:
packages/ai/src/providers/anthropic.ts ← scanned
packages/ai/src/providers/groq.ts ← never opened
packages/ai/src/providers/openrouter.ts ← never opened
packages/ai/src/providers/index.ts ← never opened
Two files in one directory, one seen and one not, decided entirely by which
vendor names someone had typed into a regex. A directory called `ai/` counted
for nothing. Path matching now looks at every segment below the source root,
and the vendor list is no longer four names long.
Matching is by TOKEN, never substring: `ai` is inside `mail`, `chain`,
`domain`, `detail` and `maintenance`, and substring matching would have
traded one blind spot for a flood that the file cap then drops real
candidates to make room for. Tested in both directions.
2. Opening the files was not enough — nothing came out of them. `extractPins`
matched `models` followed directly by `[`, and Kivvi writes
models: AIModel[] = [
where a TypeScript type annotation sits in between. The first `[` on that
line belongs to `AIModel[]` and closes immediately, so the pattern read an
empty array: a silent nothing, the worst output an audit can produce. The
same regex also capped the array at 400 characters, losing later entries of
any richly described list. Replaced with a bracket walker that has neither
limit and reports each id's own line — which also improves attribution, since
that is measured in lines from the pin.
3. The coverage ledger stopped being a caveat and became a finding: OrangeCat
opened 90 of 133 candidates with 4 likely-AI files dropped, FleetCrown 90 of
109 with 15 dropped. The two largest repos in the fleet, both partly blind.
Cap raised 90 -> 160, which clears both with headroom. The ledger stays, so
the next repo to outgrow it says so.
What the fleet actually looks like, before -> after: 12 retired pins -> 16, and
the composition changed more than the count. Newly visible:
- hirnli — 2 dead pins, a repo that had never appeared in a report at all
- orangecat:src/lib/ai/form-prefill-service.ts:23 — genuinely broken, and it
is the repo this audit cleared as a false positive earlier today. It was
right that the pricing-table string was not a pin, and wrong that the repo
was fine.
- kivvi packages/ai — 5 more, including a `google/gemini-2.0-flash-001` that
no previous run had seen
- evig src/lib/hirn/providers — 2 more
Every one of them was retired before this commit. None of them was new.
Self-test: 57 -> 76 checks, still no network, no key, no checkout. The fixtures
are the real paths and the real declaration, so this specific miss cannot come
back quietly.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
9591f022f8 |
fix(ci): the audit called a pricing table a retired model (#46)
OrangeCat has nothing wrong with it. It renders a tier comparison —
models: ['Claude 3.5 Sonnet', 'GPT-4o', 'Gemini 2.0 Flash']
— human-readable copy that never reaches an API. Every entry but one carries
a space and was filtered out; `GPT-4o` was not, so it slipped the shape filter,
landed nearest an OpenRouter marker, and got announced as a retired pin.
That is the one failure a daily gate cannot afford. Six repos really are broken
by dead pins right now, and a report that puts a healthy repo alongside them
teaches the reader to skim — taking the real six with it. This fleet already has
that scar: gates that fail red on good code are what trained `--no-verify`.
The rule is measured, not guessed. On 2026-08-26 Groq listed 14 model ids and
OpenRouter 416, and not one of those 430 contained a capital letter. So an id
with a capital cannot be a RETIRED id at those vendors — it was never one of
their ids at all. "Retired" is the wrong diagnosis, not just the wrong target.
Such an id is reported as `unattributed` — listed, not judged. Never dropped.
For `GPT-4o` that bucket is also literally right: it IS an OpenAI product name,
and OpenAI is a vendor this audit does not query.
The rule stays where the evidence is. Together AI really does serve ids with
capitals (`meta-llama/Llama-3.3-70B-Instruct-Turbo-Free` is in this fleet), so
it applies only to the two catalogues that were counted, and a test pins that.
Live sweep before: 12 retired across 6 repos. After: 11 across 5, with OrangeCat
correctly absent and every other finding unchanged.
Self-test: 36 checks, no network, no key, no checkout. The new block asserts
both halves — the label is not called retired, AND the genuinely retired pin
sitting in the same file is still judged. Suppressing a false positive is only
worth doing if the true positive beside it survives.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
7821247b24 |
refactor(ci): adopt ai-kit, the package ai-ration became (#45)
`ai-ration` is now `ai-kit`, because the name described one of its five modules and hid the rest — and the person deciding whether to install it could not tell what it did. That is an adoption cost paid at every install decision, and this is the package with ONE adopter whose absence took five repos down together on 2026-08-26. The audit here was its second adopter, so it moves first. `AI_RATION_FROM` still works and the old paths stay in the resolver list: a rename must not turn a working daily audit into a silent exit 2 on the first machine that has not caught up. Installed from GitHub rather than npm because ai-kit v0.3.0 is tagged, built and verified but not on the registry — the repo has no NPM_TOKEN, which needs an account nobody here holds. Switch to `npm i ai-kit` once it does. SHARED.md records WHY the merge stopped where it did: ai-kit absorbed ai-ration and re-exports ai-forms, because to an app "which model do we call", "AI chat" and "AI form fill" are one feature. threadkit and limitkit stay out — neither is about AI, and an app throttling its login form should not install a model catalogue to do it. Merge by what a consumer needs together, never by "these are all shared utilities". Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
16ff335e5f |
fix(ci): a sweep that sees fewer repos must say so (#44)
The daily run inspected 32 repos; the same script run locally inspected 34. The two missing were `go-to-market` and `lifeops` — private, and a workflow's default GITHUB_TOKEN is scoped to its own repo, so `gh repo list` returns only public ones. Neither carries a model pin today, so nothing was actually missed. The problem is the shape of the failure: a sweep that quietly sees fewer repos than it did yesterday reports a CLEANER fleet, not a smaller one, and that is the same false ✓ the self-test exists to prevent one layer down. It cannot know the true count, but it can notice that not one private repo came back — which means either there are none, or this token cannot see them. Both are worth a line. Set GH_TOKEN to a PAT with repo scope to cover them. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
01aec5eff7 |
feat(ci): ask the vendor, daily, whether our model ids still exist (#43)
AOZ reported "KI-Assistent nicht konfiguriert. Bitte GROQ_API_KEY setzen" on a
deployment whose key was valid. Groq had retired the whole llama-3.x family and
the pinned id answered 404. Production had been failing exactly as long as the
demo and nobody knew, because "not configured" is the only thing the app can
say.
Six pins across five repos were dead the same morning — botsmann, evig, kivvi,
orangecat, truthseeker — three of them serving live traffic. None of it was
visible from inside a repo: every gate was green, because the code is correct
and the vendor changed underneath it. No lint rule, type check or unit test can
see this, which is exactly the gap the central audits exist to cover.
So this asks the only authority that knows. One GET /models per vendor, ZERO
tokens, which is what makes it schedulable — and "somebody is supposed to
remember" is the mechanism that already failed for eight days in ai-ration's
own consumer.
It calls ai-ration's checkCatalog rather than growing a second vendor query
here; the package takes the chain as an argument, so it generalised to
arbitrary ids with no change. That makes dotfiles its second adopter, which is
the medicine this file prescribes to everyone else.
Three findings survive as tests because the first live runs produced them:
- xAI's `grok-3-mini` was filed under Groq — one letter apart, and xAI's URL
sat 6 lines from the pin while Groq's sat 18. Attribution now follows the
marker ABOVE the pin, since that is the branch that owns it, and vendors we
cannot query still own their ids so they report UNCHECKED instead of being
absorbed by the nearest vendor we can.
- fleetcrown's computed `${link.provider.id}/${link.model}` was reported
retired. An interpolated id is the absence of a pin.
- botsmann's pin lives in lib/constants.ts, which no AI-shaped filename
filter opens. Candidates are now two-tiered and ranked, and truncation is
REPORTED — a bounded sweep that stays quiet about what it skipped reads
exactly like one that found nothing.
An unreadable catalogue reports UNCHECKED, never GONE. Treating "I could not
look" as "nothing is there" would mark every pin retired and invent a
fleet-wide outage somebody then acts on.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
b03e5eca34 |
feat(fleet): reclaim the checkouts whose work already shipped (#42)
The fleet creates a git worktree per agent session and removes none of them. On 2026-08-26 there were 24, holding 5.2 GB, and every single one belonged to a PR that had already merged — 23 were byte-for-byte clean. That is a recurring manual sweep, so it becomes a script rather than something re-derived from scratch each time the disk gets tight. stranded-work.sh and this are the two halves of one question. That one asks "is any work trapped on this disk?"; this asks "is any checkout still here after its work shipped?" They turn on the same distinction, too: an upstream that is configured but no longer resolves means the branch was pushed and its remote branch deleted. Reading that backwards is what made stranded-work report 24 merged PRs as stranded yesterday. Because this one deletes checkouts, the entire design is the refusal list. A worktree is removable only if it was PUSHED, is CLEAN, is UNUSED, and GitHub says MERGED — and each of those is a case where removing it would have destroyed the only copy of something: no upstream the branch exists on exactly one disk any dirt a worktree is where the unfinished edit lives live session someone is working in it right now not MERGED CLOSED is abandoned, not gone; empty is gh failing, not consent The predicate is pure so all nine tests run without a repo, a network call or a session, including "no argument means dry-run" — if that ever inverts, the first person to run it bare loses every checkout. Verified on the real fleet: 23 removed, 5.2 GB freed, the four it refused being one never-pushed branch, one live session, one dirty tree, and one superseded local branch. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
0c2ce25508 |
fix(fleet): 24 of the 25 "stranded" locations were merged PRs (#40)
The guard shipped yesterday reported 25 stranded locations and 26 unpushed
commits, oldest 25 days. `gh pr list --state all` says MERGED for 24 of them.
Every single one.
The mechanism is the fleet's own happy path. An agent branches in a worktree,
pushes, opens a PR, it squash-merges, GitHub deletes the remote branch, and a
later `fetch --prune` drops the tracking ref. What survives is a local branch
whose `branch.<n>.merge` is still configured and no longer resolves.
`rev-parse @{u}` fails on that, so the old code took the same path as a branch
that was never pushed at all and fell through to origin/main — where the
pre-squash commit is unreachable by construction, because main received
different sha carrying the same content. The count could therefore never reach
zero. It was not a stale number; it was a permanent one.
Upstream GONE is the opposite fact from upstream ABSENT: it is proof the branch
DID leave the machine, which is precisely what puts it out of scope for a guard
whose stated job is finding work GitHub cannot see. So read the config with
for-each-ref and check whether the tracking ref resolves, instead of asking one
question that both states answer the same way.
Three tests pin it, including the must-still-fire half — never-pushed work and
work ahead of a live upstream both still count. Reverting the fix turns the
first of them red.
Fleet after: 6 locations, 1 unpushed commit.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
4c0e923789 |
feat(fleet): find work that is stranded, not work that is merely dirty (#39)
* chore(zellij): drop the hardcoded project-tab layout Every login ran `zellij -l projects`, which loaded a hand-maintained layout naming nine project tabs. That list is a copy of state that already lives in ~/dev, so it drifted: two of its nine tabs pointed at directories that no longer exist (openclaw, cockpit), and none pointed at the repos actually being worked on. Startup reliably produced tabs nobody wanted. The layout's only other content was a default_tab_template that is byte-for-byte zellij's compiled-in default (tab-bar / pane / status-bar, verified via `zellij setup --dump-layout default`). So the file contributed nothing but the stale list, and deleting it is the whole fix — a bare `zellij` yields one tab whose cwd is inherited from the launching terminal rather than hardcoded anywhere. Fixes the class, not the instance: there is no longer a project list to go stale. Open project tabs on demand instead. * feat(fleet): flag work that has aged, not work that is merely dirty This repo already had a fleet health check. It did not prevent the thing it looks like it prevents: on 2026-08-24 orangecat held 118 uncommitted files and fleetcrown 88, both untouched for ten days — a finished EntityType rename and a finished publishing workstream, each existing on exactly one disk. `git-health` had been reporting them accurately that entire time. The design error is worth naming, because it is easy to repeat: DIRTY IS NOT A DEFECT. Every tree is dirty while someone works in it, so a count that is equally true at minute five and at day ten carries no signal. It gets read as noise, and then it stops being read. Age is what separates work in progress from work that is going nowhere. So stranded-work.sh reports only what has aged past a threshold (default 3d) and prints NOTHING when the fleet is healthy. The silence is the mechanism, not manners: a check that speaks on every shell gets muted, and a muted check is an absent one. It covers both uncommitted files and commits that were made but never pushed — the second is how four of fleetcrown's commits hid, since a tree can be clean and still be holding everything back. It cannot run in CI: the work it looks for has never left the machine, so GitHub cannot see it by construction. It runs from .bashrc instead, printing the last scan from cache and refreshing in the background, so it never costs a prompt. `fleet-stranded` runs it on demand. The deciding half takes TSV on stdin and touches no git, no filesystem and no clock, so the tests drive the shipped rule rather than a restatement of it — the drift the existing ratchet test comments already worry about. Both failure modes are tested, because either one kills it: it must go red on aged work, and it must stay silent on a fresh tree. Writing the tests first paid immediately — the rename case failed, because the porcelain prefix was being stripped after the "old -> new" arrow was resolved, which ate three characters of every renamed path. orangecat's rename touched 18 deletions and a rename; the guard would have misread it. 17 tests, wired into CI. * chore: ignore per-session agent worktrees _claude_autoworktree_enter creates .claude/worktrees/<name> per session, so every concurrent session leaves a permanently-untracked directory behind. That is scratch, not source, and it makes `git status` read dirty forever — the noise that let 206 genuinely stranded files hide across this fleet for ten days. Scoped to worktrees/ rather than all of .claude/, so tracked settings and CLAUDE.md are unaffected. Matches what threadkit already does. * chore(git): ignore agent browser scratch globally, not in 18 repos `.playwright-mcp/` is written by the Playwright MCP server whenever an agent drives a browser. It had appeared in 9 repos and left 2 permanently dirty. The first fix was a .gitignore line in all 18 — 18 diffs, 18 reviews, and a 19th repo that gets missed next month. But no contributor without this setup ever sees the path, so it was never the project's business. One line in the global ignore covers every repo, including ones not created yet. Matters because a permanently dirty tree is the noise that lets genuinely stranded work hide — the thing scripts/fleet/stranded-work.sh exists to catch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(fleet): the stranded-work guard could not see worktrees Shipped this morning to find work that never leaves the machine. It scanned $FLEET_ROOT/*/ only — so it missed the place this fleet does most of its work. Every agent session runs in a `git worktree` under .claude/worktrees/, and those hold real branches. Measured tonight, hours after the guard went in: 26 unpushed commits across 25 locations, oldest 25 days ...while `fleet-stranded` reported two dirty files in dotfiles and nothing else. fleetcrown alone held 9 branches, none of them pushed to origin. The guard was not merely incomplete; it was certifying a fleet that had almost a month of work sitting on one disk. That is the failure mode named in this file's own header — a check that gets read as "all clear" when it means "I did not look there" — and I built it into the fix for it. A blind spot shaped like the dominant workflow is worse than no guard at all. Worktrees now report as `repo/worktree-dir` with their OWN branch, and the main checkout is not double-counted as one of its own worktrees. Three tests pin it, including that last one; all three go red with the scan removed. Found while auditing fleetcrown for code debt — the audit's biggest finding turned out to be in the auditor. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
620a7a77b5 |
chore(shared): raise health-route baseline 8->9 for surf-your-life (#38)
surf-your-life gained app/api/health/route.ts (maonakamoto/surf-your-life#25): the fleet deploy convention curls /api/health after every push and the app never had the route, so its deploy verification could not close. No shared health-route package exists yet to install instead — when it is extracted, this count falls back with the others. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
5b5661927a |
fix(ci): the UI audit measured labels where the page paints boxes (#36)
Three false-positive classes from the live fleet sweep, each pinned by fixtures on both sides (12/12 self-tests): - A bare wrapper anchor around a styled button measured the wrapper's never-painted ink — surf-your-life's 'Konto erstellen' read 1:1 against the button fill it never renders on. Wrappers whose label a nested action paints are skipped; the nested control is scanned in its own right. - Disabled controls are dim BECAUSE they are disabled; WCAG exempts inactive controls, so they no longer bury real findings (their enabled twins still report). - A row of padded buttons measured its glyph left, not its box edge: aoz-wohnen's flush hero CTA row read as a 16px ragged column. Rows whose leading element paints its own box are measured at the border edge. En route this exposed that the nested-group exemption compared line tops EXACTLY — two buttons one row apart by a 1px border read as a two-line group and were exempted wholesale; tops now compare with an 8px tolerance, and a genuinely offset button row is a fixture that must keep firing. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
8f0fc6dac0 |
chore(shared): lock in 9 -> 6 sweep copies, and withdraw a false extraction (#35)
The three conversions this locks in — fleetcrown, orangecat, sbb-lost-found —
were each verified to actually RUN the central sweep after merging, not merely
to have merged: fleetcrown and orangecat show the reusable job green with both
live sites healthy, and sbb's post-merge dispatch references
maonakamoto/dotfiles/.github/workflows/auto-merge-sweep.yml`@master` directly.
The first sbb run checked predated the merge and was still the old local copy —
which is exactly why 'the PR merged' is never the verification.
SHARED.md corrections in the same change:
auto-merge row 22 -> 6, with the six named and each one's reason. A
number with no story reads as neglect; these are held
back deliberately (canonical home; trees owned by other
sessions).
@ai-native-cms/core WITHDRAWN — measurement error, and worth recording
loudly: maonakamoto/revampit REDIRECTS to
maonakamoto/evig (renamed in the pivot), so the 'two
repos with byte-identical trees' were two clones of ONE
repo. Nothing to extract. Two directories are not two
repos; check git remote -v before reporting cross-repo
duplication.
rate limiting marked as the next extraction (14 files, zero app
coupling, four inside orangecat alone).
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
20f48eed54 |
test(ci): port orangecat's sweep coverage before its copy is deleted (#34)
orangecat is the last repo converting to the central sweep, and — like evig —
it turned out to be one of only two repos that ever wrote tests for it. Its
suite covered four things the canonical suite did not:
- deferring while the base run is still in progress (without re-running it,
which would CANCEL an in-flight run)
- waiting when the newest base CI run belongs to an older commit — merging on
that green would batch unverified commits, the exact thing one-car-per-sweep
exists to prevent
- THE RED-BASE CARVE-OUT, the most dangerous logic in the script: a PR green
on every job the base fails may merge onto the red base, because its checks
ran on the merge result. Three cases: full coverage merges, no coverage is
refused, PARTIAL coverage is refused (covering some failing jobs is
covering none — the uncovered one still lands broken).
- a green base merging normally without ever consulting the carve-out
Ported here BEFORE the orangecat conversion deletes its copies, so no assertion
is ever lost between the two commits.
The harness grew optional per-case fixtures (base run status/headSha, the PR
list payload, the pr-view answer, the red-jobs list), each RESET on every call
so one case's fixture cannot leak into the next.
Mutation-proven: disabling the uncovered-jobs refusal turns exactly the two
refusal cases red while the merge case and the other fourteen stay green.
17 cases total, all green.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
5bf16cb34c |
fix(ci): a failed fetch is not a finding — the audit now withholds what it cannot see (#33)
Two defects in the auditor itself, both found by turning its own discipline back on it: 1. Every remote read was `gh api ... 2>/dev/null`, and the empty string a failure yields was read as a FACT. One sweep produced four wrong verdicts: vitareba and aoz-housing (live Next.js apps) vanished as "not a JS repo"; ai-forms and fleetcrown were accused of never running `verify` when their ci.yml does exactly that. Fetches now return three states — fetched / genuinely absent (404) / could not look — and every caller withholds its verdict on the third instead of charging the repo. A 404 is an answer and is not retried; neither is an exhausted rate limit (seconds of backoff cannot outlive an hour-long window). Transient failures retry with backoff. 2. `⊗ UNCALLED` string-matched `npm run verify`, but the property that matters is weaker: every gate `verify` composes runs in CI, unsoftened. aoz-housing satisfies it by fanning the gates into parallel jobs — the rule was asking a conforming repo to serialize the fleet-slowest pipeline to please a regex. Decomposed wiring now reports as informational `≡ DECOMPOSED`; botsmann's shape (hand-copy with --if-present on every step) is still caught. The transport lives in verify-predicates.sh so tests can stub `gh`: 29 cases cover both rules in both directions and all three fetch states, and a mutation run (collapse `return 1` into `return 2`) turns exactly the two relevant cases red. Post-fix sweep: 23 repos inspected, 0 below floor, 3 fetch failures withheld instead of reported as findings. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
2f9b26c22e |
fix(ci): the UI audit called correct markup broken, twice (#32)
Two false-positive classes, both found by checking findings against the actual pages instead of trusting the count. 1. A nested GROUP is entitled to its own indent. datacat renders a card title, a description, an icon checklist, then a CTA back at the card edge — and the CTA returning to the base indent made the "does the column return?" test fire. A list between two peer lines is structure. Only peer LINES have to share a column. Measured VERTICALLY on purpose: a first attempt exempted any child with several children, which swallowed a row of chips — two spans side by side on ONE line — and blinded the audit to the exact fleetcrown stack it was written for. The self-test caught that immediately, which is the entire reason it pins the positive case too. 2. Centered, right-aligned and justified text starts at a different x per line BY DESIGN. Judging them for a "missing hanging indent" reported every centered paragraph in the fleet — petvity's two findings and datacat's were all `text-align: center`, i.e. working exactly as intended. Net: the alignment half of the sweep drops to almost nothing, which is the honest answer. The ragged-stack bug was real, and it was fleetcrown's; it was not a fleet-wide epidemic, and reporting one as though it were would have cost someone a day proving it was not. Also registers both central audits in SHARED.md, so the next person looking for a fleet-wide checker finds them before writing a third. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
b2f3817b6d |
feat(ci): absorb the deploy reconciler, unblocking the last two repos (#31)
fleetcrown and orangecat were the only repos excluded from the auto-merge
rollout, because their variants carried something the canonical did not: a
reconciler that actually SHIPS the base branch. Converting them without it would
have let merges land and never deploy — the exact failure the reconciler exists
to prevent.
Deployment is a RECONCILER, not a chain. A push made with GITHUB_TOKEN emits no
workflow_run event, and — one level deeper than anyone expects — neither does a
run that GITHUB_TOKEN itself dispatched, so nothing downstream ever wakes on an
automated merge. Observed on fleetcrown 2026-08-05: three PRs merged, main
green, ZERO Deploy runs created. Invisible, because CI itself ran and went green.
So instead of trusting a trigger, compare desired state (the base's tip) against
actual state (the last successful deploy) and close the gap. Self-healing by
construction: a deploy that never fired, or fired and failed, is retried by the
next sweep instead of leaving a commit merged-but-not-live.
OFF BY DEFAULT. DEPLOY_WORKFLOW is empty unless a repo sets it, so the twelve
repos already on the canonical behave exactly as they do today. Adopting a
reconciler must never start firing deploys in repos that never asked for one.
THE GREEN GUARD IS THE WHOLE DIFFICULTY, and it is not in the original. The
variant this came from EXITED on a red base, so reaching the reconciler there
proved the tip was green. This script deliberately does NOT exit on red — it
lets a PR that repairs the base through — so the same lines pasted here would
ship a tip whose CI is failing. Same code, different surrounding control flow,
opposite meaning. Hence `-z "${base_red_jobs}"`.
Five new tests, and the red-base one is mutation-proven: removing that single
condition turns it red and leaves the other ten green, so the guard is
load-bearing rather than decoration. The others pin that the reconciler is inert
when unset, ships a drifted green tip, does NOT re-deploy a tip already live
(otherwise it would redeploy the same commit every ten minutes, forever), and
does not stack a dispatch on top of one already in flight.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
3e65abd76c |
chore(shared): lock in 22 -> 9 copies of the auto-merge sweep (#30)
The ratchet reported the decrease; this locks it in so it cannot silently
regress. Thirteen repos now call the canonical sweep as a reusable workflow
instead of carrying their own copy, and all thirteen were verified to actually
RUN it — job 'sweep / sweep' green in each, not merely 'the PR merged'. That
distinction matters here more than anywhere: a sweep that fails to start looks
exactly like a sweep with nothing to do.
The nine remaining are deliberate, not leftovers:
dotfiles the canonical home — it runs the script directly
fleetcrown, orangecat their variants carry an inline DEPLOY RECONCILER the
canonical does not have yet. Converting them would let
merges land and never deploy, so they wait for that
feature to be absorbed.
ai-forms, datacat, skipped by the rollout because their working trees were
petvity, sbb-lost- dirty; another session may own them. Committing over
found, solon someone else's work to make a number go down is not a
trade worth making.
Everything else in the baseline is unchanged, which is the point: the ratchet
only ever moves one way, and a decrease has to be claimed deliberately.
|
||
|
|
cee72319ac |
ci: narrow the no-test-files rule — its first live finding was a false positive (#26)
* ci: raise the bar from "the gate runs" to "the gate can go red"
The floor asks whether a gate RUNS. That question stopped discriminating once
22 of 25 repos passed it, and it was never the interesting one: a single day of
remediation turned up FIVE ways a gate can run, report success, and defend
nothing.
result discarded evig continue-on-error on the unit-test job:
7,769 tests ran every PR, answer thrown away
never executed sbb-lost-found `next lint` hit an interactive wizard; the
four services had no eslint config at all
scope collapsed sbb-lost-found `eslint src/**/*.ts` through sh, where ** is
just * — every index.ts went unlinted
nothing to run sbb-lost-found `test: jest` in four packages, ZERO test
files in the whole repo
wrong rung datacat `test` is playwright: needs a browser and a
server, so it is an upgrade, not the floor
Every one of them passes "does the repo have a `test` script?".
WHAT THIS COMMIT ENFORCES
The fourth shape was the one still un-automated. I flagged it when I fixed
sbb-lost-found by hand and said so rather than pretending otherwise; the
never-twice rule forbids a third manual pass, so it is a check now: a `test`
script with no test files on the branch is reported as test(no-test-files),
alongside the existing test(e2e-only).
It is deliberately hard to accuse someone falsely with it. The path pattern is
generous (__tests__, test/, tests/, spec/, e2e/, cypress/, *.test.*, *.spec.*,
*_test.*), and a truncated git tree is reported as UNKNOWN rather than zero —
because "I could not enumerate it" is not "there is nothing there", which is the
exact bug the previous commit removed from this script.
Calibrated against repos whose answer I already knew, in both directions:
evig 582 · datacat 7 · threadkit 5 · sbb-lost-found 2 · design-tokens 2
prime-tower 0
It finds no NEW violations today, because sbb-lost-found — the case it was built
from — is already fixed. That is the point: it is a ratchet against the shape
coming back, not a fresh accusation.
WHAT THIS COMMIT ASKS OF PEOPLE
Rung 4 in templates/ci/README.md: for each gate, you must be able to NAME the
change that makes it fail. If you cannot, it is decoration, and decoration is
worse than nothing because it produces a check mark.
The demonstration is mutation, not argument — break it on purpose, confirm red,
restore. The worked example is the tenant SSOT in sbb-lost-found, which decides
whose trademark renders: three invariants, three deliberate breaks, three reds.
"We have 45 tests" is not evidence; that is.
The same rule binds any rule you write: a check proven only on the case that
should fire says nothing about what it lets through. The discarded-gate check
was verified against evig's ci.yml (must fire), orangecat's cd.yml (must stay
silent — legitimate best-effort fallback), and the repaired evig file.
AND WHERE THE BAR GOES NEXT, ON EVIDENCE
Named explicitly rather than left as "be more careful". The floor has never
caught the failures that actually cost something here, all of which shipped past
a green suite: `json(user)` returning passwordHash and a PIN hash — twice, the
second time one nesting level deeper, which is why a grep cannot close it and an
exhaustive allow-list can; identity read from the request body instead of the
session, letting one member vote as another; a query missing its tenant filter,
correct at one org and wrong at two, in a production that had exactly one.
One shape: the gate asserts what the code DOES, never what it must NEVER do.
Rung 5 is gating the closed side.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* ci: narrow the no-test-files rule — its first live finding was a false positive
Shipped a rule saying "a test script with no test files can only ever fail", ran
it against the fleet, and it immediately accused ivy-portal. The accusation was
wrong.
ivy-portal's `test` is `node scripts/smoke.mjs`: a zero-dependency script that
spawns the real server, polls until it serves a 200, SIGKILLs it and exits with
the true code — its author even documented why a deferred timer would let the
process exit 0 and swallow the failure. It has no test FILES because it carries
its own assertions. My premise was true of `jest` pointed at nothing
(sbb-lost-found, four packages, zero files) and false here.
So the rule now fires only when a file-DISCOVERING runner has nothing to
discover — jest, vitest, mocha, ava, playwright, cypress, bun test,
node --test — and is renamed test(runner-no-files) to say what it actually
means. A bespoke script is not the defect shape.
Proven in both directions, including the case that forced the narrowing:
jest + 0 files FIRES sbb-lost-found's old shape
vitest + 0 files FIRES
node scripts/smoke.mjs + 0 files silent ivy-portal
node --test + 5 files silent threadkit
jest + 582 files silent evig
playwright + 7 files silent datacat
npm run smoke + 0 files silent
node build/latest.mjs + 0 files silent 'latest' must not read as --test
The README now carries the lesson rather than just the rule: a new rule's first
finding deserves MORE suspicion than its hundredth, because it is the one you
have no calibration for.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
b5eca684d0 |
test(ci): the sweep gets tests — rescued from the repo losing its copy (#27)
evig was the ONLY repo in the fleet with tests for auto-merge-sweep.sh, and centralising its copy of the script would have deleted them. That is the worst possible trade: consolidating the code while throwing away the only evidence it behaves. The tests are as much a shared asset as the script, so they moved here with it — ported from Jest to bash, since this repo has no JS toolchain. They execute the REAL script against a fake gh on PATH, so they test shipped control flow rather than a description of it. A stubbed re-implementation of the guard would pass happily while the real script deadlocked, which is exactly what happened on 2026-08-07: an Actions incident left main 'failure' with no failed job, and the sweep refused every merge for ~14h while exiting 0 and looking healthy. Six cases, covering both directions — it must re-run a cancelled or infra-failed base run, and must NOT re-run a genuine failure (retrying a real failure is how a broken base gets merged onto anyway), must stop at the attempt cap, and must still reach the PR loop when the base is green. A guard that never lets anything through is an outage with better manners. PROVEN TO GO RED: mutation-tested by disabling the re-run in a throwaway copy — the two cases that depend on it failed, the other four held. A suite that has only ever passed is indistinguishable from one that asserts nothing, which is the exact failure this repo's other checks exist to prevent. One bug found in the porting, worth naming because it is silent: `grep -c` PRINTS 0 and also EXITS 1 when there is no match, so the obvious `|| echo 0` appends a second zero and every numeric comparison dies with 'integer expected'. |
||
|
|
6a4074a87b |
ci: raise the bar from "the gate runs" to "the gate can go red" (#25)
The floor asks whether a gate RUNS. That question stopped discriminating once
22 of 25 repos passed it, and it was never the interesting one: a single day of
remediation turned up FIVE ways a gate can run, report success, and defend
nothing.
result discarded evig continue-on-error on the unit-test job:
7,769 tests ran every PR, answer thrown away
never executed sbb-lost-found `next lint` hit an interactive wizard; the
four services had no eslint config at all
scope collapsed sbb-lost-found `eslint src/**/*.ts` through sh, where ** is
just * — every index.ts went unlinted
nothing to run sbb-lost-found `test: jest` in four packages, ZERO test
files in the whole repo
wrong rung datacat `test` is playwright: needs a browser and a
server, so it is an upgrade, not the floor
Every one of them passes "does the repo have a `test` script?".
WHAT THIS COMMIT ENFORCES
The fourth shape was the one still un-automated. I flagged it when I fixed
sbb-lost-found by hand and said so rather than pretending otherwise; the
never-twice rule forbids a third manual pass, so it is a check now: a `test`
script with no test files on the branch is reported as test(no-test-files),
alongside the existing test(e2e-only).
It is deliberately hard to accuse someone falsely with it. The path pattern is
generous (__tests__, test/, tests/, spec/, e2e/, cypress/, *.test.*, *.spec.*,
*_test.*), and a truncated git tree is reported as UNKNOWN rather than zero —
because "I could not enumerate it" is not "there is nothing there", which is the
exact bug the previous commit removed from this script.
Calibrated against repos whose answer I already knew, in both directions:
evig 582 · datacat 7 · threadkit 5 · sbb-lost-found 2 · design-tokens 2
prime-tower 0
It finds no NEW violations today, because sbb-lost-found — the case it was built
from — is already fixed. That is the point: it is a ratchet against the shape
coming back, not a fresh accusation.
WHAT THIS COMMIT ASKS OF PEOPLE
Rung 4 in templates/ci/README.md: for each gate, you must be able to NAME the
change that makes it fail. If you cannot, it is decoration, and decoration is
worse than nothing because it produces a check mark.
The demonstration is mutation, not argument — break it on purpose, confirm red,
restore. The worked example is the tenant SSOT in sbb-lost-found, which decides
whose trademark renders: three invariants, three deliberate breaks, three reds.
"We have 45 tests" is not evidence; that is.
The same rule binds any rule you write: a check proven only on the case that
should fire says nothing about what it lets through. The discarded-gate check
was verified against evig's ci.yml (must fire), orangecat's cd.yml (must stay
silent — legitimate best-effort fallback), and the repaired evig file.
AND WHERE THE BAR GOES NEXT, ON EVIDENCE
Named explicitly rather than left as "be more careful". The floor has never
caught the failures that actually cost something here, all of which shipped past
a green suite: `json(user)` returning passwordHash and a PIN hash — twice, the
second time one nesting level deeper, which is why a grep cannot close it and an
exhaustive allow-list can; identity read from the request body instead of the
session, letting one member vote as another; a query missing its tenant filter,
correct at one org and wrong at two, in a production that had exactly one.
One shape: the gate asserts what the code DOES, never what it must NEVER do.
Rung 5 is gating the closed side.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
67fef1f076 |
ci: stop reporting "I could not look" as "it is not there" (#23)
The audit told the fleet that openclaw had no typecheck, no lint and no test. All three were false, and the repo is comfortably ABOVE the floor: verify -> node scripts/verify.mjs -> `pnpm check` then `pnpm test` check.mjs has an explicit `typecheck` stage (tsgo:prod) and a `lint` stage, plus ~20 policy guards. Two blind spots produced that, and the second is the serious one. 1. `tsgo` — the TypeScript-Go compiler — was not in the typecheck tool list, so a repo that typechecks with nothing else read as having no typecheck at all. Added. 2. When `verify` hands off to a script file, this audit cannot see the gates — and it cannot see their ABSENCE either. It was reporting the second as established fact. That is the same failure mode the fleet has been bitten by before: absence of evidence rendered as evidence of absence. There is now a `? OPAQUE` column: reported so it stays visible, never counted as a violation, because no violation was demonstrated. Same class, different disguise: printcraft's verify is `npm --prefix app run verify`, which leaves this package.json entirely. The audit could not follow it and concluded verify skipped ALL THREE gates. It skips none — they live in app/package.json. One level of sub-package delegation (`--prefix DIR` and `cd DIR && npm run X`) is now followed by fetching that manifest, which turns a confident wrong answer into the right one. printcraft moves FIXABLE -> AT FLOOR, and the FIXABLE column is now empty. Forks are no longer audited at all. openclaw is a fork of openclaw/openclaw and was generating two findings, BOTH artefacts of measuring someone else's repo with this fleet's ruler: "no typecheck" (it uses tsgo) and "CI never runs verify" (its CI runs the gates on a remote testbox, just not through the `verify` alias). A fleet-shaped `verify` added there would also conflict on every upstream sync. Forks are LISTED with the reason rather than dropped — a silently unaudited repo is precisely what this script exists to prevent. Exactly one repo is affected today. Net effect on the numbers: the three columns that accuse a repo of something now contain only claims the audit can actually support. AT FLOOR 21 -> 22 (printcraft was never below it) FIXABLE 1 -> 0 (its only entry was a false positive) REAL WORK 4 -> 3 (openclaw was never one) The three that remain — threadkit (no lint), prime-tower (no test), datacat (test is e2e-only) — were checked by hand and are real. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
66cfcd7048 |
feat(ci): one canonical auto-merge sweep, callable instead of copyable (#21)
auto-merge-sweep.sh was copied into 22 repos and drifted into EIGHT distinct
versions, 245 to 404 lines. Three of them independently grew different fixes for
real outages, and each fix reached only the repo that wrote it:
evig, revampit infra-failure detection + re-run. An Actions incident left
main `failure` with no failed job at all (one cancelled, the
rest green); it stranded 11 PRs for ~14 hours.
fleetcrown DEADLOCK naming — a red base with the repairing PR sitting in
the queue was indistinguishable from "nothing to merge".
the other 19 neither.
That is the whole argument for central code: the second repo to hit an Actions
incident had already been given the answer by the first, and never received it.
This is also the script that decides what ships, so the drift is not cosmetic.
WHAT THIS SHIPS
scripts/ci/auto-merge-sweep.sh the union of the three
.github/workflows/auto-merge-sweep.yml reusable (workflow_call), so a repo
adopts ~10 lines instead of ~400
"TAKE THE BIGGEST FILE" IS NOT A MERGE STRATEGY, and I nearly shipped that. The
first attempt replaced this file with the 404-line variant, which looked like a
superset and is not: it is missing the GITHUB_STEP_SUMMARY reporting, the
stale-PR warning and the conflict warning that the 296-line version has. Ten
repos run that version. Picking by size would have silently deleted working
behaviour from all of them.
So the base here is the variant those ten repos already run, with the two
outage fixes spliced in. The diff is 106 insertions and ZERO deletions — no
repo can lose anything by adopting it, and 20 repos gain fixes written for
outages they have not hit yet.
Every repo-specific value is already an env var (GH_REPO, BASE_BRANCH,
CI_WORKFLOW, REARM_WORKFLOWS, MAX_RUN_ATTEMPTS), so there is nothing left to
fork over. The reusable workflow checks out THIS repo rather than the caller —
the sweep talks to the caller entirely through the API, so a repo's own contents
can never influence how its PRs get merged.
Verified: `bash -n`, YAML parses, and the merged script was run end to end
against a live repo with nothing to merge (maonakamoto/ai-ration) — it parsed
its config, resolved the base, listed PRs and exited 0.
NOT DONE HERE, deliberately: the other 21 repos still carry their copies. This
PR changes only this repo's sweep, additively. Rollout is mechanical once this
is proven in place, and doing 22 repos' merge automation in one step is how you
find out your merge automation is broken in 22 repos at once.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
fbfd6686a7 |
feat(shared): a registry, a generated inventory, and a duplication ratchet (#20)
The fleet does not have a knowledge problem about duplication. It has an enforcement problem, and there is evidence for exactly that: orangecat/docs/architecture/adr/ADR-0002-rate-limiting-unification.md, dated 2026-01-18, is still Status: Proposed. It names TWO rate limiters. There are now FOUR — the duplication grew AFTER the decision to unify was written down. templates/ci/README.md says "deliberately ONE central script, not a copy per repo". auto-merge-sweep.sh exists in 22 repos in 8 distinct versions, spanning 11,787 to 19,344 bytes. A fix landed in one reaches at most 9 of them. This is the script that decides what ships. Both were documented. Documenting is what failed. So this ships three things, none of which is a document that can rot unnoticed: 1. SHARED.md — the registry. What exists (ai-forms, ai-ration), what is worth extracting next with counts, and — stated as explicitly as the rest — what must NOT be centralized: auth, DB schemas, and chat/form MARKUP. "Share everything" is its own failure mode; each app has to keep looking like itself, which is why ai-forms is headless and ai-ration ships no HTTP client. 2. shared-inventory.sh — the measurement, generated rather than maintained. Reads each repo's REMOTE default branch via the trees API, because local checkouts drift and have already produced a redundant PR and a nearly-dropped gate in this fleet. 3. The ratchet. `--check` fails when any count RISES. Nobody has to fix 87 duplicated files today; the only requirement is to stop adding. A count that falls gets locked in with `--update`, and raising the baseline stays allowed — it just has to happen in a PR where someone sees it, rather than by accident. Two decisions that keep the number trustworthy, both learned the hard way today: FORKS ARE EXCLUDED. `openclaw` is a fork of openclaw/openclaw — 1.5 GB of upstream. Counting it contributed 46 provider files, 7 loggers and 7 date utils that nobody here wrote and nobody here can unify. A metric dominated by somebody else's codebase measures nothing and gets ignored. A TRUNCATED TREE REFUSES TO JUDGE. The trees API truncates on huge repos, and an undercount would read as progress. --check exits 2 rather than certify a decrease that did not happen. The ratchet's deciding half is pure text and is tested against fixtures with no network (7 cases, wired into this repo's CI): it must go red on a rise and on a new unmeasured concern, and must stay quiet on a hold, a decrease, and a concern removed from the script. A ratchet that silently passes while duplication rises would certify the thing it exists to stop. The global CLAUDE.md now points at SHARED.md, so the check happens before the code is written rather than in review afterwards. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
e27771b2bf |
feat(ci): audit the two UI defects only a rendered page can show (#19)
Both were reported by the operator in plain language, after every gate in
the repo was green: "i dont see it" (a link at 3.13:1 that was the only
route to a feedback report's screenshots) and "this area looks bad. not
aligned" (four stacked rows starting at three different x, 369/383/385,
with a wrapped line snapping back to 369).
Neither is visible to a unit test, a type check or a lint rule, because
nothing is wrong until the page is painted. So: one central auditor that
renders every fleet site, same doctrine as verify-floor-audit.sh — never
a check copied into each repo, because a copied check drifts.
1. INVISIBLE ACTIONS — interactive labels below their WCAG AA floor.
2. RAGGED STACKS — sibling rows at different x, and wrapped lines that
do not align with the line above. Both come from one habit: an icon
placed INLINE at the head of a line, shoving that line sideways by
its own width and leaving a wrapped paragraph no hanging indent.
The site list is DISCOVERED from fleetcrown's public footer, which is the
fleet's own SSOT for "sites we run". A new site is audited the day it is
linked; a retired one stops being audited. Nobody edits a list.
Three measurement traps this had to get past, each of which produces a
confident wrong answer rather than an error:
- A single canvas paint composites a translucent colour against whatever
is already there, turning the chips' oklch(1 0 0 / 0.04) overlay into
SOLID WHITE and inventing failures on readable text. Colours are
resolved to straight RGBA by painting twice and solving for alpha, then
every translucent layer down to the first opaque ancestor is
composited.
- getBoundingClientRect().left includes padding, so an element given
padding-left to align it reads as unmoved. Positions come from a Range
over the text node — which also yields one rect per rendered line, and
that is how a missing hanging indent becomes measurable at all.
- An aria-hidden marker is explicitly NOT content, so it must not define
where content starts. Without skipping those subtrees the audit
measures the bullet instead of the label, every row reads the same x,
and the misalignment the bullet CAUSES becomes invisible.
The first draft reported 88 defects across 14 sites and most of the
alignment ones were correct markup: a heading followed by consistently
indented items. A rule that fires on everything is as useless as one that
fires on nothing and costs more, because someone has to read it. The
signature of an ACCIDENTAL indent is a RETURN — the column goes out and
comes back (369 → 383 → 369) — where deliberate structure goes out and
stays (197 → 210 → 210). Plus a 4px floor, below which it is glyph
metrics, not layout. That took it to 50 real findings across 13 sites.
test-ui-defect-audit.mjs pins BOTH sides on inline fixtures: the real
fleetcrown bug is still caught, the fixed version is silent, deliberate
indentation is not flagged, and translucent chips are not called white.
The workflow runs it BEFORE the sweep — a detector that has quietly
stopped detecting reports a clean fleet, which is an absent check that
produces a ✓.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
772e51cc41 |
refactor(ci): one fleet audit, not two — fold the wiring rules into it (#18)
#16 added check-verify-contract.sh without noticing that verify-floor-audit.sh already existed and already swept the fleet weekly. Shipping a second fleet conformance checker is the exact duplication this repo's own README warns about ("deliberately ONE central script"), so the new rules move into the existing audit and the duplicate is deleted. The two were not redundant, which is why the rules survive the merge. The audit asked what `verify` CONTAINS; the new rules ask whether anything RUNS it: ⊗ UNCALLED the repo defines `verify` and no workflow invokes it ⊙ SOFTENED the invocation carries --if-present, or `verify` disarms itself botsmann is the case that proves they are different questions. Its `verify` was perfect — format:check + lint + test + build — so the content audit correctly reported it AT FLOOR while its CI hand-copied the same four steps with --if-present on each. The rules live in verify-predicates.sh rather than inline so they are testable at all: the audit is remote-only by design, and a rule that can only be exercised by a live API call is a rule nobody re-tests after editing its regex. test-verify-predicates.sh (14 cases, run by this repo's CI) proves each rule bites AND that conforming shapes are not flagged — a checker that cries wolf gets ignored, which is the same end state as no checker. AUDIT REMOTES, NEVER LOCAL CHECKOUTS. The deleted script swept working trees under ~/dev, and that design was wrong in a way that cost real work: two of its four findings had already been fixed on the repos' default branches and only looked broken because the local clones were stale. It produced one redundant PR (botsmann#134, closed — botsmann#133 had already landed the same fix) and one that would have silently dropped `&& npm run check:tenant`, added to sbb-lost-found's verify after that checkout was taken. The default branch is the only ground truth about what actually defends a repo. Run live against all 26 repos: reports 14 below the floor, including three UNCALLED (aoz-housing, ai-ration, openclaw) that no previous check could see. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
631816e32f |
feat(audit): a response scanner, because code scanners cannot see RSC payloads (#17)
fleetcrown#309 added a static gate that reads route handlers and fails if a
whole users row reaches a response. Its own header states the limit: it cannot
see RSC flight payloads, where a server component handing a row to a client
component serializes it into the HTML identically, with no route handler
involved.
This closes that half by reading what actually crossed the wire. No schema, ORM
or framework knowledge required.
It earned its place on first use. Across the fleet it found
GET /api/admin/patients in vitareba returning every patient's bcrypt digest —
a CROSS-account disclosure the code-level sweep had missed, because the route
uses db.query.users.findMany() with no projection and the grep for `json(user)`
shapes does not match `json({ success, data })`. Fixed in vitareba#41.
Severity reflects what a finding lets an attacker do, not how it is spelled:
CRITICAL for a live bearer credential (OAuth access/refresh token), HIGH for a
digest, MEDIUM for a long value under a secret-ish key that is often legitimate.
The self-test is not decoration: every case is a shape observed in the fleet or
one that must stay silent, including the two that must NOT fire (null hashes,
public share tokens). A scanner nobody has watched fail is a scanner that
reports clean because it matches nothing.
Its fixtures are ASSEMBLED from parts rather than written as literals. This file
is a corpus of fake credentials and tripped the repo's own gitleaks hook; the
alternative was a .gitleaksignore entry that would also have covered a real
secret dropped in here later. Splitting keeps the gate strict.
The README records the two traps that cost real time when getting a session:
.env values may be single-quoted (systemd strips them, `tr -d '"'` does not —
compare against /proc/PID/environ, not the file), and the app-specific jwt
claims must match or the guards reject a perfectly signed token. Limits are
stated rather than implied: key-name matching misses a credential stored under
an unknown name, such as aoz-wohnen's plaintext login `code`.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
9822958df6 |
feat(ci): enforce the verify contract, instead of only stating it (#16)
templates/ci/README.md has said it for a while: "verified" is defined ONCE, in
package.json `verify`, and CI runs it verbatim. Nothing checked that. The last
fleet audit checked whether repos DECLARED a verify script and found 21 of 21
did — which reads like success and is not, because a repo can declare a perfect
`verify` that CI never calls, or call it in a way that cannot go red.
Running the contract end to end across ~/dev found four real violations:
botsmann CI hand-copied verify's four steps AND put `--if-present` on
each, so renaming a script would have turned its gate into a
silent pass
surf-your-life CI linted with `--max-warnings 0` while the `lint` script did
not — `verify` on a laptop was WEAKER than the gate that
blocks the merge
sbb-lost-found `verify` softened itself from the inside with `--if-present`
ai-ration no CI at all
check-verify-contract.sh asserts all five links: `verify` exists, CI invokes it,
no `--if-present` on that invocation, no `continue-on-error` on that step, and no
`|| true` inside `verify` itself.
It is deliberately narrow. It does NOT flag `|| true` elsewhere in CI: that is
usually legitimate (cleanup, optional copies, jq parses with a fallback) and
flagging it produced nine false alarms out of nine here. A checker that cries
wolf gets ignored, which is the same failure mode it exists to prevent. The
first version also rejected `pnpm verify` — pnpm's idiomatic implicit-run — and
reported a conforming repo as broken; fixed, and now covered by a test.
The checker ships with negative tests wired into this repo's CI. Seven prove each
rule bites against a violating fixture; four prove conforming shapes are NOT
flagged. This is the point: the checker's first clean run said "all 21 repos
conform", and a gate that has never gone red is indistinguishable from one that
cannot.
The fixtures are plain directories containing an empty `.git` dir rather than
real repos — the checker only tests for `-d .git`, and running git inside a
throwaway tree has already destroyed a repository in this fleet once.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
bf5eda0fc6 |
ci: a test script that drives a browser is not the floor (#15)
The audit listed datacat under FIXABLE — "has the script but verify skips:
test" — implying a one-line change. Acting on that advice would have been a
regression.
datacat's `test` is `npx playwright test`. It needs browsers and a running
server, so adding it to `verify` would break the two things `verify` exists to
guarantee:
- templates/ci/README.md's hermeticity rule: the floor's four gates need no
secrets, no live database, no network, because "a gate that goes red for
want of a secret trains you to ignore red";
- "green verify locally => green CI", which stops being true the moment the
bundle needs infra the developer does not have running.
Per that same README, e2e is an UPGRADE rung, not the floor. So the honest
classification is real work — write a unit suite — not a verify edit.
The audit was answering "does a script named `test` exist?" when the floor asks
"does a HERMETIC test suite exist?". Those diverge exactly when a repo has e2e
and nothing else, which is the case worth catching, since that repo looks the
most compliant and is the least covered.
A `test` script now counts only if it is not e2e-only: it is reclassified when
it invokes playwright/cypress/puppeteer/webdriver AND no unit runner
(vitest/jest/mocha/node --test/bun test/ava). A repo with both still counts —
the common `jest && playwright` bundle is a superset of the floor, not a miss.
Wording follows: "no script for" -> "no hermetic script for", since in this case
a script does exist and saying otherwise would be the same kind of imprecision
this commit is removing.
Verified against the live fleet, and the run confirms four things at once:
- datacat moved FIXABLE -> "no hermetic script for: test(e2e-only)"
- sbb-lost-found is now the ONLY genuinely one-line fix left
- evig appears in AT FLOOR (13), reflecting evig#306
- DISCARDED reports (none) — the gate closed in evig#306 is gone, so the
check reports zero rather than latching on a stale hit
Also surfaced a repo the previous run had never seen (ai-ration, 25 inspected
vs 24), which is the weekly cron doing its job.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
84a78fd87e |
ci: flag the gate CI runs and throws away (#14)
* ci: audit the verify floor the templates already promised
templates/ci/README.md has defined "verified" since it was written: one
script, identical everywhere, verify = lint && typecheck && test, called
verbatim by CI. Nothing checked it, so it drifted. Running the audit for
the first time: of 24 JS repos, 12 are at the floor and 12 are not.
The split that matters is between two kinds of "not":
FIXABLE (3) the repo has the script, verify just skips it — one line
sbb-lost-found (lint, test), datacat (test), evig (test)
REAL WORK (9) no such script exists; ai-forms has no lint, truthseeker
and reparaturbonus-zh have no tests at all, ivy-portal and
printcraft neither typecheck nor test, design-tokens and
prime-tower have no verify script
Adding a no-op "test" script would satisfy a naive floor, so the audit
refuses to conflate the two: a gate that does not exist is reported as
work, not as a lint error.
Deliberately ONE central script rather than a copy per repo.
auto-merge-sweep.sh was copied into 17 repos and now has at least 5 live
variants, so a fix landed in one reaches none of the others. Reading the
fleet remotely cannot drift.
Detection notes, all three learned by getting them wrong first:
- a gate counts if verify CALLS a script named for it. That is what lets
kivvi's "turbo lint" and datacat's "cd frontend && npm run lint" count
without this script having to see through them; matching only tool
names flagged 24 of 24 repos as failing.
- it also counts if verify runs the tool inline, since fleetcrown calls
tsc --noEmit directly and orangecat's script is spelled type-check.
- repos are read on their OWN default branch: ?ref=main 404s on a master
repo, and that means wrong ref, not missing file.
A fourth, found by the audit reporting every repo as broken: under set -u,
"local cmd=$1 out=$cmd" reads cmd before the same statement assigns it, so
the expansion helper aborted and returned empty — which reads as "no gate
found". Each local now gets its own line.
Scope, stated because it is easy to over-read: this audits the CONTRACT,
not whether each gate works. sbb-lost-found's lint script exists and has
never run — next lint prompts interactively against its flat config.
Runs weekly into the job summary. GITHUB_TOKEN reaches the 31 public
repos; the 3 private ones need a FLEET_READ_TOKEN secret to be included.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* ci: flag the gate CI runs and throws away
The verify-floor audit shipped last week with an honest caveat: it checks the
CONTRACT (does `verify` name all three gates), not whether a gate is EFFECTIVE.
Remediating the first repo on its fixable list walked straight into the hole.
evig's `verify` omitted `test`, exactly as the audit reported. But evig's CI
also had a "Run Tests" job that ran the full 7,769-test suite on every PR and
discarded the result with `continue-on-error: true` — added as "non-blocking
while suite matures" and never flipped back. So the repo had TWO green signals,
neither of which was reading the tests. The 2026-07-28 token sweep broke 25
assertions in 15 suites and three weeks of PRs sailed past them.
A discarded gate is worse than an absent one. An absent gate is visibly absent
and shows up in this audit's "needs real work" column. A discarded gate burns
six minutes of CI and produces a ✓.
So the audit now flags any step that runs a floor gate (lint / typecheck / test
/ verify, or the tools themselves) under `continue-on-error: true`, in a new
DISCARDED column that counts toward the violation total.
Deliberately narrow. `continue-on-error` is legitimate on a best-effort step
with a real fallback — orangecat's cd.yml downloads the CI artifact that way
and builds from source if it is missing, which is correct and must not be
flagged. Restricting the match to floor gates is what separates the two.
Tested in BOTH directions, because a rule proven only on the case that should
fire says nothing about what it lets through:
- evig ci.yml on main -> flags `npm run test` (expected hit)
- orangecat cd.yml -> silent (expected miss)
- evig ci.yml as repaired -> silent (expected miss)
Known blind spot, stated rather than papered over: the scan is scoped to step
blocks, so a JOB-level `continue-on-error` is not correlated with the gate it
silences. Doing that properly needs a real YAML parser, not awk.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
89421d78dd |
chore(ci): add find-false-needs.py — audit jobs that wait without consuming (#13)
`needs:` expresses three things that look identical in YAML: value flow
("I consume what that job produced"), a failure gate ("do not run me if it
failed"), and plain ordering ("I would prefer to run after it"). Only the first
two earn their cost. The third is billed at the full duration of the
predecessor, on the critical path, on every push, forever.
This week that cost was measured and removed twice:
aoz-housing #55 822s -> 446s e2e waited on build; it serves its own app
evig #303/#304 709s -> 417s e2e + two prod smokes waited on quality
The evig number is why this script exists rather than a note. #303 removed one
false `needs:` and predicted ~373s; it delivered 634s, because `quality ->
inventory-smoke` had been hiding BEHIND the bottleneck it cleared and was
promoted to critical path the instant it went. One pass is never enough — the
critical path moves, so the audit has to be re-runnable, not remembered.
Central auditor, reading every repo remotely — same reasoning as
verify-floor-audit.sh next door: the auto-merge sweep was copied into 17 repos
and now has 5 live variants, so a fix in one reaches none of the others.
REPORT, NOT VERDICT, and the docstring is emphatic about it. The fleet sweep
returns 26 hits and roughly four fifths are deliberate failure gates that must
stay — `authorize_actor` before live-secret tests, `validate_*_approval` before
publishing, fleetcrown's `ship` after `check`. A tool that called those
violations would be a security regression generator. It flags the absence of
value flow; the judgment about the failure gate stays with the reader.
Validated against controls before being trusted: the pre-#303 evig workflow
(finds exactly the 3 known jobs) and the post-fix one (finds 0). The first
version of this sweep was awk and silently missed evig — a repo already
confirmed by hand — so a negative control is not optional here.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
a587cccee5 |
ci: audit the verify floor the templates already promised (#12)
templates/ci/README.md has defined "verified" since it was written: one
script, identical everywhere, verify = lint && typecheck && test, called
verbatim by CI. Nothing checked it, so it drifted. Running the audit for
the first time: of 24 JS repos, 12 are at the floor and 12 are not.
The split that matters is between two kinds of "not":
FIXABLE (3) the repo has the script, verify just skips it — one line
sbb-lost-found (lint, test), datacat (test), evig (test)
REAL WORK (9) no such script exists; ai-forms has no lint, truthseeker
and reparaturbonus-zh have no tests at all, ivy-portal and
printcraft neither typecheck nor test, design-tokens and
prime-tower have no verify script
Adding a no-op "test" script would satisfy a naive floor, so the audit
refuses to conflate the two: a gate that does not exist is reported as
work, not as a lint error.
Deliberately ONE central script rather than a copy per repo.
auto-merge-sweep.sh was copied into 17 repos and now has at least 5 live
variants, so a fix landed in one reaches none of the others. Reading the
fleet remotely cannot drift.
Detection notes, all three learned by getting them wrong first:
- a gate counts if verify CALLS a script named for it. That is what lets
kivvi's "turbo lint" and datacat's "cd frontend && npm run lint" count
without this script having to see through them; matching only tool
names flagged 24 of 24 repos as failing.
- it also counts if verify runs the tool inline, since fleetcrown calls
tsc --noEmit directly and orangecat's script is spelled type-check.
- repos are read on their OWN default branch: ?ref=main 404s on a master
repo, and that means wrong ref, not missing file.
A fourth, found by the audit reporting every repo as broken: under set -u,
"local cmd=$1 out=$cmd" reads cmd before the same statement assigns it, so
the expansion helper aborted and returned empty — which reads as "no gate
found". Each local now gets its own line.
Scope, stated because it is easy to over-read: this audits the CONTRACT,
not whether each gate works. sbb-lost-found's lint script exists and has
never run — next lint prompts interactively against its flat config.
Runs weekly into the job summary. GITHUB_TOKEN reaches the 31 public
repos; the 3 private ones need a FLEET_READ_TOKEN secret to be included.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
7d1c990704 | fix(ci): declare the failing-job list before the branch that can skip it (#9) | ||
|
|
57b01347ad | fix(ci): a red base must not trap the PR that repairs it (#8) | ||
|
|
0dd8143957 | fix(ci): stop skipping conflicts, and keep branches current (#7) | ||
|
|
36c924f547 |
fix(ci): drain the merge queue oldest-first, not newest-first (#5)
`gh pr list` returns newest-first, and the sweep merges the first eligible PR then stops. So the newest green PR wins every sweep, and an older one can wait indefinitely. Observed in maonakamoto/fleetcrown on 2026-08-06: two consecutive sweeps merged the two newest PRs while three older green ones sat untouched and were never even evaluated. With several agent sessions opening PRs continuously that is starvation — and it starves the worst candidate, since the longest-waiting PR is the one whose checks were proven against the most now-stale base. PR numbers increase monotonically with creation, so sorting ascending is FIFO. The ordering was never a decision, just whatever gh happened to return. Fixed upstream first (fleetcrown #182) and verified in production there: the sweep immediately after it landed correctly took the oldest open PR rather than the newest. This is that one-line change, applied to the fleet. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
26492e606d |
ci: green PRs merge and deploy themselves (#4)
* ci: add the auto-merge sweep policy * ci: green PRs merge and deploy themselves |