Commit Graph
2 Commits
Author SHA1 Message Date
CatoandClaude Opus 5 5960621749 chore(ratchet): rate-limit 13 → 11, and stop counting a repo we could not read as progress (#84)
The 2026-09-15 cleanup campaign moved seven repos off hand-rolled rate
limiters. Verified on each repo's DEFAULT BRANCH, merged only:

  botsmann        #198 merged 08:24Z  2 limiter files → 1 (lib/middleware/rate-limit.ts deleted)
  evig            #488 merged 05:42Z  3 → 2 (src/lib/auth/rate-limiter.ts deleted)
  petvity          #95 merged 09:09Z  1 → 1 (hand-rolled body replaced by limitkit)
  surf-your-life   #70 merged 06:33Z  1 → 1 (same)
  truthseeker      #54 merged 06:46Z  1 → 1 (same)
  kivvi            #96 OPEN (draft, client)     — NOT counted
  aoz-housing     #242 OPEN (client)            — NOT counted

rate-limit 13 → 11 files. Only two files left because five adopters keep a
thin local module holding their own limit values and call limitkit from it —
the intended shape. The row was lowered by hand rather than by --update,
because --update would also have absorbed the logger rise below.

logger is LEFT RED at 6 while the fleet sits at 7, deliberately. The extra
file is datacat's backend/lib/logger.js, created the same day by datacat #271
("one logger") — a repo with no matching file now has exactly one, so a
consolidation scores as a rise. The offsetting fix exists and is unmerged:
kivvi #96 takes kivvi from two loggers to one, which returns the count to 6
on its own. Raising the baseline now would retire the only pressure on it.

The counting half was also lying. `gh api .../git/trees` was `|| continue`,
so any transient failure dropped a repo silently and that repo contributed
zero files — indistinguishable from a repo that deleted its duplicate. One
sweep over 43 repos dropped NINE and showed phantom falls in email-send
(7 → 4), health-route (13 → 11) and slug-util (4 → 3); none had happened.
Now it retries with backoff, names what it could not read, and refuses to
judge OR to write a baseline from an incomplete read — the same guard the
truncation case already had. Six new self-test cases pin both directions.

SHARED.md, next to the limitkit row:

  - install is `pnpm add limitkit@^0.2.0` (npm, verified 0.2.0), not the
    `github:` form: under pnpm 11 a git dep's `prepare` build is refused
    without an allowBuilds entry, so the package installs with no build
    output and the adopter's CI fails on an import resolving to nothing.
    heidi is still pinned to the github: form and will hit this next rebuild.
  - the security finding, because it recurred SEVEN for seven: every
    hand-rolled limiter keyed its bucket on the FIRST X-Forwarded-For hop.
    That hop is written by the caller, so a client sending a fresh value per
    request got a fresh bucket per request and was never limited — the
    limiter was decorative. The last hop is the one the trusted proxy
    appended; limitkit's clientIp() reads that. vitareba has no IP-derived
    limiter at all. botsmann's additionally FAILED OPEN on any database
    error, switching itself off under exactly the load it existed for.
  - adopter count from registers/packages.json, not by hand: eight
    (botsmann, evig, heidi, loki, orangecat, petvity, surf-your-life,
    truthseeker). The prose claiming orangecat unified "without limitkit" is
    now contradicted by its own package.json — corrected in place.

Also corrected: SHARED.md and README both claimed the ratchet "runs on every
PR here". It does not — a PR runs only the network-free self-test; --check
runs weekly. A gate described in the wrong place is a gate nobody checks.


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

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 04:18:49 -07:00
Mao NakamotoandClaude Opus 5 f1d5549a36 feat: the fleet's central automation, moved out of dotfiles
The audits, the golden CI templates, the shared-package registry and the
reusable auto-merge sweep now live in a repo whose only job is gating the
fleet. dotfiles goes back to being the environment — a repo holding a .bashrc
is the wrong place for machinery that 16 repos call as a reusable workflow,
and keeping them together made every fleet change look like an environment
change and vice versa (three sessions and the owner collided there in one
week).

Layout is unchanged (SHARED.md, scripts/{ci,fleet,audit}, templates/ci,
.github/workflows), so every script's relative paths still hold. The
reusable sweep now checks out bitbaum/fleet; dotfiles keeps a forwarding
shim so its 16 existing callers keep working unchanged.

All six test suites pass in the new location: shared-inventory 7,
verify-predicates 29, auto-merge-sweep 17, stranded-work 24, worktree-gc 9,
model-pin-audit 102.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna
2026-08-28 10:10:21 +02:00