Files from bitbaum/fleet `templates/package` that this repository does not have yet:
- `.github/workflows/release-notify-tagged.yml`
Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.
Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
Files from bitbaum/fleet `templates/package` that this repository does not have yet:
- `.github/workflows/release-notify.yml`
Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.
Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
Files from bitbaum/fleet `templates/package` that this repository does not have yet:
- `.github/workflows/git-release.yml`
- `.github/workflows/release.yml`
Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.
Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
auto-merge.yml has always re-armed publish.yml after a merge
(rearm_workflows: "ci.yml publish.yml"), but publish.yml only listened for
tag pushes, so every one of those dispatches was dropped and a merged
version sat unpublished until someone with tag rights pushed a tag. 1.21.0
sat merged for three days that way.
- publish.yml accepts workflow_dispatch, and refuses one from anything but
main.
- The tag-matches-version check runs only for a tag push; a dispatch has
no tag to match.
- Permissions are unchanged (contents: read, id-token: write). A dispatched
release is traced to its commit by npm provenance.
- The existing registry check makes every other merge a green no-op.
README: releasing is merging — raise the version in the PR.
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu
Co-authored-by: Claude <noreply@anthropic.com>
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
9 files changed, 15 insertions(+), 15 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>
One merge starts Publish twice — the PAT-made push and the auto-merge
sweep's workflow_dispatch re-arm, seconds apart. Both ask the registry
before either publishes, both build, and the loser gets E403 "cannot
publish over previously published versions" (bip-kit 0.2.6, 0.2.7 on
2026-09-11). A red run that means nothing is wrong teaches everyone to
ignore the workflow.
- concurrency group "publish", never cancelled: the second run waits,
then sees the version on the registry and skips
- registry check writes a green step summary ("already published —
nothing to do") and gates install/verify/publish
- npm publish failure is re-checked against the registry: if the
version is there, that is the goal state, not an error
OIDC trusted publishing, verify-before-publish, tag checks and the
re-arm list are unchanged.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The comment added a few hours ago says GITHUB_TOKEN cannot merge a PR that
touches .github/workflows. That is contradicted by this fleet's own history:
github-actions[bot] merged datacat#253 and ai-kit#42 today, and both change a
workflow file. I asserted it from the reusable workflow's docstring without
checking, then found the counter-evidence while looking for something else.
Two stalled PRs were offered as proof and neither survives either. ai-kit#11
opened 2026-08-29 and this repo's sweep was not added until 2026-09-04, so for
most of that PR's life nothing was sweeping at all. aoz-housing#122 is still
unexplained — I merged it before diagnosing it, which destroyed the evidence.
The THROUGHPUT reason is unaffected and is why the line stays. A dispatch made
with GITHUB_TOKEN triggers no workflows — the same rule the deploy reconciler
exists for — so after a merge the re-armed CI run's completion fires no
workflow_run and nothing wakes the sweep for the next PR. It waits for the
cron, which GitHub throttles: fleetcrown's sweeps land 50-65 minutes apart
against a */10 schedule. A PAT-created dispatch does emit workflow_run.
The wrong claim is recorded in the file rather than quietly deleted, so the
next reader does not re-derive it from the same docstring I did.
No behaviour change: an undefined secret still resolves to empty and the
reusable workflow still falls back to github.token.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
GITHUB_TOKEN cannot merge a PR that touches .github/workflows. The sweep tries,
the merge API refuses, it logs "leaving for the next sweep", and repeats — while
still exiting 0. So the failure is invisible: every run reports success and the
PR simply never merges.
That is not hypothetical. ai-kit #11 (bump actions/checkout) sat green, CLEAN
and MERGEABLE for nine days; aoz-housing #122 (bump actions/upload-artifact)
for nine more. Both had to be merged by hand today. Every Dependabot
`github_actions` bump in the fleet is in this class, permanently.
A PAT fixes a second thing that costs more: THROUGHPUT. A dispatch made with
GITHUB_TOKEN emits no workflow_run, so after each merge nothing wakes the sweep
to take the next PR — it waits for the cron, and GitHub throttles scheduled
workflows to roughly hourly regardless of what the cron says. Observed in
fleetcrown: sweeps ~50-65 minutes apart against a */10 schedule. A PAT-created
dispatch does emit workflow_run, so the queue drains at CI speed instead.
The reusable workflow has always supported this — GH_TOKEN is
`secrets.token || github.token`. This just passes it.
SAFE BEFORE THE SECRET EXISTS: an undefined secret resolves to empty, and the
fallback picks github.token. So this changes nothing until FLEET_PAT is created
as an organisation secret, and needs no second pass afterwards.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Merging #32 gave this package an HTTP client but published nothing: the
version stayed at 0.6.2, so no consumer could reach it. This releases it.
It also closes the gap that a shared engine makes dangerous. Every check in
this repo was hermetic — `test/` drives an injected fetch, `check-catalog`
asks whether ids still EXIST — so all of them could be green while the
package could not complete one real turn. That was survivable while two repos
imported it. It stops being survivable when one engine sits behind every app,
because then its bugs arrive everywhere simultaneously.
scripts/smoke.mjs makes a real generation against the live free tier. It
earned its place on first run, finding two things no hermetic test could:
- `maxTokens: 16` made groq/openai/gpt-oss-20b return 200 with EMPTY
content. The chain leads with REASONING models, which spend the budget
thinking before emitting a visible token — so a small budget makes a
healthy model indistinguishable from a dead one, walks the entire chain,
and reports every link broken. Documented on CompleteOptions.maxTokens
where a consumer will actually hit it, and the smoke now asks for 256.
- A single-quoted value in a .env inlines its QUOTES into the key, and
OpenRouter answers that with "Missing Authentication header" — which
reads as a missing key rather than a malformed one.
Scheduled, never a PR gate: it calls other people's servers, so as a required
check it would redden pull requests for a vendor's 500 and train everyone to
ignore red. The `|| status=$?` in the workflow is load-bearing — Actions runs
steps under `bash -e`, so a bare failing command aborts before its exit code
can be read, and the "no keys" branch would be unreachable.
Both scheduled jobs refuse to pass while blind: a probe that looked at nothing
has told us nothing, and green would be a lie.
Verified: catalog check run live — all 7 default pins present at their vendor,
confirmed both locally and in Actions ("7 id(s) confirmed present"). Smoke run
live — groq/openai/gpt-oss-120b answered "blue" in 878ms. verify green:
format + lint + typecheck + build + 91 tests.
Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
ai-kit's modules are each correct and each written against a real outage.
Almost none of it reached the apps that were failing. Measured 2026-09-05:
ai-kit (ships decisions) imported by 2 repos
ai-forms (ships a working handler) installed by 5 repos
hand-rolled LLM clients still in service 8, ~1400-1700 lines each
Not a quality gap, a shape gap. The stated rule — "every app has its own
calling conventions, replacing them is a rewrite rather than an adoption" —
described the duplication accurately and then protected it. The conventions
differed because nothing offered to own them. Of those 8 clients, 2 tell the
three kinds of 429 apart; the other 6 treat a spent daily budget as a busy
minute, which limits.ts has warned against since 2026-08-14 from inside a
module they do not import.
complete() owns the fetch, and makes the three judgements every hand-rolled
client here got wrong:
- an HTTP 200 with empty content is a FAILURE, not a success. Two models in
the default chain do this; a res.ok check hands "" to the user, reports
success, and keeps health green through a total outage.
- a DAILY 429 condemns the whole vendor. The budget is org-wide, so the
remaining links there are already dead — skip them instead of buying a
dead round trip each.
- a SIZE 429 ends the walk. The next model down has a smaller ceiling
(12000 TPM vs 6000), so demoting is strictly worse.
tryChain stays for callers with an unusual request to make.
Also: scripts/check-catalog.mjs has said since it was written that it is
"cheap enough to run on a schedule, which is the only kind of check that
catches rot without someone remembering". Nothing ran it, and the rot came
anyway — 2026-08-25, four of nine pins retired, both Groq models, eight days
of silent FleetCrown downtime. It now runs daily. The script exits 0 when it
could not check (right for an offline dev run, wrong for a scheduled probe),
so the workflow fails when zero ids were verified rather than passing blind.
All three walk behaviours proven by mutation against dist/: each disabled
individually, each caught by exactly the test that names it, then restored.
verify green: format + lint + typecheck + build + 91 tests.
NOTE: bitbaum/ai-kit has no Actions secrets, so the new workflow will fail
on its first scheduled run until GROQ_API_KEY / OPENROUTER_API_KEY are set.
That failure is the intended signal, not a regression.
Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
npmjs.com now trusts this repo+workflow directly (trusted publisher
configured 2026-09-05), so the NPM_TOKEN skip-dance goes away: a version
tag publishes unconditionally via the OIDC exchange npm >= 11.5 does
itself. Node 22 -> 24 because node 22 bundles npm 10, which cannot do
the exchange.
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>
* chore: add a formatter, matching the style this repo already writes
singleQuote=false was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.
Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* style: format with prettier (27 files)
Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore: teach git blame to skip the reformat
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(ci): ignore dist-cjs, which only exists on the runner
format:check passed locally and failed in CI on six files under dist-cjs/. The
ignore list covered 'dist' but not its siblings, and CI builds before verify —
so those files exist on the runner and never locally. A clean local check is no
evidence when a build precedes the gate.
Widened to dist-* so dist-esm and friends cannot repeat this.
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
23 of 30 repos in the fleet had none. The symptom looks like neglect and
is not: aoz-housing had 100 commits in August, features landing daily, and
was still on Next 14 / React 18 / Tailwind 3 — because nothing ever OPENED
the upgrade PR. Version drift here is the absence of a mechanism.
npm directory: /. Minor and patch grouped so the sweep spends one
cycle on them; majors stay separate because they deserve reading.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This repo has no NPM_TOKEN, so the v0.3.0 tag built, verified, produced a
correct 27.7 kB tarball — and then failed on ENEEDAUTH. Left alone, every future
version tag does the same forever.
That is the expensive kind of red: an X that means "nothing is wrong, a secret
is absent". People learn to scroll past those, and the next thing they scroll
past is a real one. This fleet already has that scar written down.
So an absent token now SKIPS and says so in the job summary, including the
GitHub install line that does work. Everything that proves the release is real
still runs first — tag/version match, lint, typecheck, build, tests. Only the
push to the registry is conditional.
Add NPM_TOKEN and re-run the workflow and it publishes, with no change here.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The owner of this fleet read the name `ai-ration` and could not tell what the
package did. That is not a cosmetic complaint. An unreadable name is a cost paid
at every install decision, and this package had exactly ONE adopter while five
repos that skipped it — botsmann, evig, kivvi, orangecat, truthseeker — were all
taken down together on 2026-08-26 by a retired model id, which is precisely the
failure `chain` and `catalog` exist to prevent. "Ration" named one of five
modules and hid the other four.
Renamed, and widened to match how an app actually thinks about this. Adding an
AI feature looks like one decision and is really four — which model, is it still
there, what do the 429s mean, who gets the free tier — plus filling forms. Get
any one wrong and it fails identically from outside: the assistant is broken.
AOZ is the proof: it adopted the form half, hand-rolled the rest because that
was a second decision nobody made, and then reported "KI-Assistent nicht
konfiguriert" on a deployment whose key was valid.
So `ai-forms` is re-exported from the root and from ./forms, ./react and
./server. It is NOT absorbed: it works, four apps run it, and it is genuinely
useful outside this fleet. Swallowing it would break four repos to satisfy a
filing system. React stays on its own subpath as an optional peer so importing
ai-kit on a server never pulls in a UI library.
threadkit and limitkit are deliberately NOT merged. Neither has anything to do
with AI — an app throttling its login form should not install a model catalogue
to do it.
Four new tests cover the merge itself, because the merge IS the feature: without
them a broken re-export quietly turns this back into ai-ration under a friendlier
name and nothing else here would notice.
BREAKING CHANGE: the package is now `ai-kit`. Import from 'ai-kit'.
The GitHub repo is renamed; existing `github:maonakamoto/ai-ration` installs
continue to resolve through GitHub's redirect.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The repo shipped with a `verify` script and no workflow, so nothing ran it on
push or PR. The fleet's conformance checker caught it on its first sweep, which
is a fair result for a package published an hour earlier and a reminder that the
gap is never 'no gate' — it is a gate nobody wired up.
`npm test` here also exercises the package's `exports` map, because the tests
import it BY NAME rather than reaching into dist/. A broken exports or files list
therefore fails here rather than at the first consumer's install.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>