mirror of
https://github.com/bitbaum/dotfiles.git
synced 2026-12-05 03:58:12 +01:00
de768dea629ebef79ca528bc2f3bcdce824a4b7d
26
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |