mirror of
https://github.com/bitbaum/fleet.git
synced 2026-12-04 01:07:26 +01:00
docs/chatkit
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4bc7b51534 |
docs(shared): chat — the standard every chat meets, and a ratchet on composers (#141)
13 chats in 10 repos (2026-09-25), none packaged, each re-learning or missing the same fixes — most often the mic. SHARED.md now names the reference (loki /loki, with its four known gaps), a nine-line checklist where every line cites the repo that already fixed it, and each chat's gaps. AGENTS.md points to it. shared-inventory gains chat-composer (baseline 5 repos / 6 files); a mutated baseline (6 -> 5) makes --check fail on it, so the guard can fail. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
cae2df179d |
chore(ratchet): raise health-route 12 → 13 and ai-provider-client 17 → 19, investigated (#73)
`shared-inventory.sh --check` has been red since the rises landed through repos the gate cannot reach. The first hypothesis — that the FleetCrown → Loki rename double-counted a repo — is wrong: GitHub renames in place, and the repo list holds `loki` alone (no `fleetcrown`). What actually rose, dated by first commit on each path: - health-route 12 → 13: substrata added app/api/health/route.ts on 2026-09-14 11:23 UTC (heidi's, 2026-09-10, was the 12th and already in the baseline). Its assertion is the research meter; per SHARED.md the health-route envelope is deliberately not extracted, so raised, not absorbed. - ai-provider-client 17 → 19: both files in heidi, after the 2026-09-11 baseline — lib/auth/provider.ts (an OIDC config) and lib/domain/model/providers.ts (a BYOK vendor allowlist that uses ai-kit, which heidi installs). Neither is a hand-rolled caller; the path pattern cannot tell an auth provider from an AI one. Raised knowingly and said so in SHARED.md rather than narrowing the pattern in the same PR. --check is green again: "duplication did not increase (inspected 44 repos)". Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
9f5e3bbd40 |
docs(shared): register listkit, and give list-query a ratchet row (#52)
Filtering, sorting, searching and paging were the concern this file did not track, and they are past the rule of three several times over. A survey of twelve repos on 2026-09-11 found twelve incompatible filter-state shapes with no two alike, ~34 hand-built URL builders, ~25 copies of toggle-a-value-in-a-set in two encodings, ~11 debounces at five delays, ~11 copies of Math.ceil(total / pageSize), and four of the seven repos that put a reader's text into a SQL LIKE doing it without escaping % or _. Two of the toggle copies are character-for-character identical in repos that share no code. One repo writes that three-line body eight times for eight facets plus eleven more for its flags. Four live bugs sit among the URL builders: a preset that rebuilt the params from scratch and wiped the reader's search, a date range that did not clear page and stranded them past the end, a builder that preserved three params by name so every later param had to be remembered in six template strings, and a debounced box using push rather than replace, so the back button walked through every spelling of the word. listkit ships the decisions and none of the markup. The registry row says so, and says why: nine token vocabularies and six chip treatments among those same repos, several different on purpose — a monochrome marketplace fork, a Bitcoin-orange rule, the one RTL-aware surface in the fleet. This file's own navigation section is the post-mortem of centralizing markup, and the answer it reaches is the one taken here. FleetCrown is the proving consumer as of today, because a package with zero adopters removes zero duplication. The adoption line names the next target by the same rule the others use: whichever repo's hand-rolled filter bar is touched next, with hirnli the richest — eight toggle copies, eleven flag toggles, and two live defects the package's own tests would have caught. The ratchet row is scoped to the HEADLESS half — hooks and lib files, never components. A row that counted filter components would score deliberate divergence as duplication, which is exactly the mistake documented above it. Baseline set in this commit: list-query 2 5. Claude-Session: https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
25de3dcc17 |
chore(inventory): auto-merge duplication is down to the canonical copy (#30)
automerge-script 5 5 → 1 1 The four repos still carrying their own auto-merge-sweep.sh now call the reusable workflow instead: datacat #253, petvity #81, hamstercheek #21, solon #154. What remains is fleet's own copy, which is the definition, not a duplicate. For scale: SHARED.md opens with this script as the worked example of writing a rule down and watching it fail — "22 repos, 8 distinct versions, 11,787 to 19,344 bytes; a fix landing in one reaches at most 9 of them". That is now one file in one repo, and every consumer picks up a fix the moment it merges here. The copies were 293-371 lines against this repo's 446, differing on 149-227 lines each. None of them looked broken, which is the whole difficulty: a sweep merges what it can and exits 0, so a copy missing a third of the canonical is indistinguishable from a working one until the missing third is what you needed. Concretely, three of the four listed deploy.yml in REARM_WORKFLOWS — dispatch once, no idea whether it landed — instead of using the deploy reconciler, which compares the base tip against the last successful deploy and retries. Without it a commit sits merged-but-not-live with CI green and nothing to signal it. What was deliberately NOT unified: hamstercheek keeps its hourly cron. It is private, Actions minutes are billed, and */10 would burn ~4,300 billed minutes a month against a 2,000 allowance to discover there are no PRs. The policy is what centralises; the triggers stay per-repo because that is where genuine per-repo truth lives — the CI workflow's exact name, the base branch, and the bill. Every other line of the baseline is unchanged, so this ratchets one number down and holds the rest. `--check` passes. Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
e96fcb5495 |
chore(ratchet): raise two counts on purpose, lock one win in (#26)
The weekly run was green on 2026-08-31 and red on 2026-09-07. Three changes, none of which could have been blocked where they happened: automerge-script 6 -> 5 a win — locked in so it cannot silently regress health-route 9 -> 11 raised knowingly slug-util 2 -> 3 raised knowingly **health-route.** The row claimed "identical shape in 8 repos; a 20-line contract". The shape is identical; the content is not. vitareba's health route asserts the app's own role can still read its own tables — written because a migration once created a table the app could not read — while orangecat's checks Supabase reachability. Extracting the envelope leaves every app still writing the only part that differs. Raised rather than absorbed. **slug-util.** Not one function copied three times: three functions that disagreed, two of them broken, found by reading them rather than counting them. evig declares eight locales and deleted seven — 'Café Genève' became 'caf-gen-ve', and a Russian or Japanese title produced the EMPTY string, which under a unique constraint means the second such record cannot save at all. hirnli transliterated a hand-written list missing ç, so 'Association Française' became 'association-fran-aise' in a directory of Swiss foundations. Both are fixed in place today (evig 32 tests, hirnli 26), which is why this PR raises the count instead of reducing it: the bug was worth fixing now, and consolidating into sitekit needs a publish plus a minimumReleaseAgeExclude entry in each consumer — a chain not worth delaying two live fixes for. Recorded in SHARED.md as the intended end state rather than left as an unexplained number. Also documents what this ratchet structurally cannot do: it runs here and measures 38 other repos, so it can name a rise and never block one. Both rises arrived through repos the gate cannot reach. A detector without an owner is the muting SHARED.md exists to prevent. Verified: `--check` exits 0 across 38 repos. Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
a7fb23c97f |
chore(inventory): message threads on the ratchet, and the count corrects the claim (#24)
Adds a `messaging-threads` concern to shared-inventory.sh, with a baseline
entry measured rather than asserted:
messaging-threads 2 repos 3 files orangecat(2) vitareba(1)
The intuition that prompted this was "many of our apps have messaging, treat it
like the other fleet-wide duplication". Measuring says otherwise: only two repos
carry thread logic at all. Recorded as such in SHARED.md, because a row that
overstates its own case is worth less than no row.
It still earns its place. The duplicate that existed was not merely a second
copy, it was wrong in three ways that are invisible below three participants —
read receipts reporting READ when any ONE recipient had caught up, a reader
counted outside their own visibility window, and an optimistic bubble sharing
no identity with its stored row, so realtime winning the race rendered the
message twice. threadkit (506 lines, already published, one adopter) made all
three unrepresentable; orangecat converted as the proving consumer.
`--check` still reports two rises, and they are DELIBERATELY not absorbed here:
✗ health-route: 9 → 11 files
✗ slug-util: 2 → 3 files
Both predate this change and neither is mine. Running --update would have
locked all three in under a messaging PR, which is precisely how an increase
stops being reviewed — the failure mode this ratchet exists to prevent. They
need their own look.
test-shared-inventory.sh: 7 passed, including that every baseline concern still
exists in the script.
Claude-Session: https://claude.ai/code/session_01G2LBioUzJP4oBL9LeH9qAe
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
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
|