5 Commits
Author SHA1 Message Date
bc221819eb chore: pnpm — the fleet has one package manager (#13)
Convert from npm to pnpm (fleet standard, STACK.md):
- packageManager pin pnpm@11.25.0 (corepack SSOT)
- pnpm-lock.yaml via `pnpm import` from package-lock.json (resolutions
  preserved), then package-lock.json deleted
- CI + publish workflows: pnpm/action-setup@v6, cache: pnpm,
  `pnpm install --frozen-lockfile`, `pnpm run verify`
- package.json scripts and contributor docs use pnpm; consumer install
  lines stay npm — consumers choose their own package manager
- npm publish invocation unchanged (works from a pnpm-managed tree)

Clean-room proven: rm -rf node_modules && pnpm install --frozen-lockfile
&& tests green.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-03 08:01:40 -07:00
8d3791e76d chore(deps): currency sweep — eslint 10, @types/node 26, CI node 24, actions v7 (#11)
Exact bumps:
- eslint ^9.39.5 -> ^10.9.1
- @eslint/js ^9.39.5 -> ^10.0.1
- typescript-eslint ^8.67.0 -> ^8.68.0 (eslint 10 peer support)
- globals ^15.15.0 -> ^16.5.0
- @types/node ^22.10.2 -> ^26.4.0
- CI node-version 20 -> 24 (library, not box-deployed)
- actions/checkout, setup-node already @v7 (no change needed)

npm run verify green (format, lint, typecheck, build, 16/16 tests).


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 10:48:46 +02:00
GandClaude Opus 5 be1c3ba037 docs(ci): the sweep lives in bitbaum/fleet, not dotfiles (#1)
The `uses:` line is already correct. What was stale is the prose next to
it, which told the reader the policy lives in bitbaum/dotfiles and to go
change it THERE. That file no longer exists in dotfiles — the sweep moved
to bitbaum/fleet on 2026-08-28, because a repo holding someone's .bashrc
is not where a fleet's deploy policy belongs.

A comment that misroutes a fix is worse than a missing one: it sends the
next person to edit a repo where the change would reach nobody, which is
the precise failure the shared sweep exists to prevent.

Files: .github/workflows/ci.yml


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

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 14:02:29 +02:00
Mao Nakamoto cb5cf21f93 chore(ci): GitHub owner maonakamoto -> catomean 2026-08-27 19:11:26 +02:00
Mao NakamotoandClaude Opus 5 9010598cab feat: limitkit — rate limiting as a decision, extracted from twelve copies
Twelve near-identical rate limiters existed across nine repos of this fleet.
orangecat alone carried four, and its ADR-0002 to unify them sat "Proposed" for
seven months while the count doubled — the measured proof that writing a plan
down is not the same as extracting the code.

What actually varied between the twelve was ONE thing: where the counts live
(eleven in process memory, one in Upstash). Everything else — window
arithmetic, refusal shape, headers, client-IP extraction — was the same idea
written twelve slightly different ways, with independently re-invented bugs.
So the algorithm is fixed and the store is the seam:

  slidingWindow / fixedWindow  pure over store + clock. Both shapes shipped in
                               the fleet, and they refuse differently; the
                               choice is now named at the call site instead of
                               implied by whichever file got copied.
  Store / MemoryStore          two methods. The default is BOUNDED (LRU past
                               maxKeys): one replaced implementation kept a
                               bare Map keyed by stranger IPs with no eviction
                               — a slow memory leak fed by the public
                               internet, now impossible by construction.
  toHeaders / clientIp         the HTTP edges everyone also rewrote. Standard
                               X-RateLimit-* trio, Retry-After on refusals
                               only — exactly what orangecat's ADR specified.

Two decisions worth naming:

  A REFUSAL COUNTS NOTHING. Several replaced implementations let refused
  requests extend the window, so a scripted attacker hammering a key locked
  the legitimate user behind the same NAT out indefinitely. Here a hammered
  key recovers the moment the attacker stops; there is a test for exactly
  this shape.

  retryAfterSeconds IS DERIVED, never fabricated — computed from when the
  oldest counted hit ages out. "Try again shortly" on a window that opens in
  an hour is the same lie ai-ration's 429 classifier exists to prevent, one
  layer down.

Deliberately not included, per SHARED.md's extraction rules: no HTTP client,
no middleware, no framework types, no distributed store (the seam is two
methods; your Redis is your ops posture), and NO LIMIT VALUES — how many
attempts a login route allows is app semantics, asserted locally.

Every function takes `now` as an argument, so all of it is testable without
sleeping — which is why this package has 14 tests and the twelve files it
replaces, collectively, had almost none. Tests import the package BY NAME, so
the exports map is exercised on every run, not at the first consumer's
install.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 15:55:38 +02:00