21 Commits
Author SHA1 Message Date
Catoandbitbaum-fleet d944eaf3aa chore: add the fleet package template files this repo is missing (release-notify-tagged.yml) (#55)
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>
2026-11-14 10:19:11 +01:00
CatoandClaude 5f39ada053 ci(publish): the current Publish workflow, which can make a package's first npm release (#52)
@bitbaum/threadkit is a new npm name; npm trusts a publisher only for an
existing package, so the first version is published with the org token and
tokenless publishing is linked afterwards. The old copy here was OIDC-only and
failed on the merge of the rename (run 42220558994).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-06 13:53:59 +01:00
Cato 70ffefca62 fix(release): apply verified build-output staging contract (#46) 2026-10-29 01:33:42 +01:00
Catoandbitbaum-fleet bfb969cb5b chore: add the fleet package template files this repo is missing (git-release.yml, release-notify.yml, release.yml, AGENTS.md, CLAUDE.md) (#42)
* chore: add the fleet package template files this repo is missing (git-release.yml, release-notify.yml, release.yml, AGENTS.md, CLAUDE.md)

Files from bitbaum/fleet `templates/package` that this repository does not have yet:

- `.github/workflows/git-release.yml`
- `.github/workflows/release-notify.yml`
- `.github/workflows/release.yml`
- `AGENTS.md`
- `CLAUDE.md`

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.

* chore: current release.yml template, prettier-stable under this repo's config

---------

Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
2026-10-28 02:30:17 +01:00
CatoandClaude Fable 5.1 7ccc759bb1 chore: rename FleetCrown to Loki (#35)
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
1 file changed, 1 insertion(+), 1 deletion(-).
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>
2026-09-13 16:33:19 -07:00
CatoandClaude Fable 5.1 8508451596 ci(publish): make publishing idempotent so a second run is green, not E403 (#33)
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>
2026-09-10 18:05:23 -07:00
CatoandClaude Opus 5 31099dcab8 ci(auto-merge): correct the reason this repo passes a PAT (#32)
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>
2026-09-07 15:55:02 +00:00
CatoandClaude Opus 5 e59f7a2383 ci(auto-merge): hand the sweep a PAT so workflow PRs stop stalling (#31)
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>
2026-09-07 15:09:24 +00:00
90672b2759 chore(ci): add workflow_dispatch so the sweep can re-arm CI on main (#28)
A GITHUB_TOKEN merge fires no push workflows, and without a
workflow_dispatch trigger the auto-merge sweep's re-arm cannot start CI
either — PR #27 merged green but left main's tip with no CI run.


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-05 08:10:25 -07:00
6b9cef3e25 chore(ci): test on Node 24, the fleet toolchain (#27)
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-05 14:41:13 +00:00
6ac2b19818 chore(ci): adopt the fleet auto-merge sweep — green PRs merge themselves (#26)
This repo had no auto-merge workflow; green PRs waited for a human.
Thin caller of bitbaum/fleet auto-merge-sweep.yml, same as ai-forms.


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-04 09:37:48 -07:00
4ee72a7013 chore: pnpm — the fleet has one package manager (#24)
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:05:28 -07:00
65a56148f2 chore(deps): currency sweep — eslint 10, @types/node 26, CI actions v7 (#22)
Bumps (devDependencies):
- eslint ^9.39.5 -> ^10.9.1
- @eslint/js ^9.39.5 -> ^10.0.1
- @types/node ^22.10.2 -> ^26.4.0
- typescript-eslint ^8.67.0 -> ^8.68.0

CI workflows (ci.yml, publish.yml):
- actions/checkout v4 -> v7
- actions/setup-node v4 -> v7

Full verify (format, lint, typecheck, build, 31 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-08-31 10:52:23 +02:00
GandClaude Fable 5 b53fbf0e15 chore(ci): drop token-health — there is no token left to watch (#10)
Publishing is trusted publishing (OIDC) since #9; the NPM_TOKEN secret is
being deleted. Without this, the weekly probe would fail on the missing
secret and open a false "releases are blocked" issue.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 01:32:22 +02:00
GandClaude Fable 5 047dc691e2 chore(release): 0.1.1 — reconcile releases, publish via trusted publishing (#9)
Ports ai-forms' publish reconciler: merging a version bump to main is the
whole release. The workflow (on push, hourly, or by hand) asks the registry
whether package.json's version exists and publishes it if not — idempotent,
and immune to the tag-pushed-by-GITHUB_TOKEN trigger gap.

Auth is OIDC via the package's Trusted Publisher (this repo + publish.yml),
so no npm token exists to leak or expire. The bump to 0.1.1 makes the merge
itself prove the tokenless path live.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 01:25:50 +02:00
GandClaude Opus 5 743c8f62dd ci: make the release a reconciler, not a trigger (#8)
Mirrors ai-forms#17, where this was not theoretical: that repo's merge to main
started no publish run, because auto-merge merges with GITHUB_TOKEN and a push
with that token starts no workflow. The identical change fired here only
because I merged this repo's PR by hand with a user token.

threadkit has no auto-merge today, which is exactly why the schedule belongs
here now — rather than being added after auto-merge arrives and a release
quietly goes missing.

The question the workflow asks — "is package.json's version on the registry?" —
is idempotent, so asking it hourly costs one `npm view` when there is nothing to
do and repairs a missed release when there is.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 20:19:13 +02:00
GandClaude Opus 5 a6687547b6 ci: release without anyone running a release (#7)
Mirrors ai-forms#16 so both libraries release identically.

Cutting a release meant `npm version && git push --tags` by hand. Now merging a
version bump to main ships the package: the workflow asks the registry whether
package.json's version already exists and publishes it if not.

That check rather than a tag trigger, because a tag pushed by GITHUB_TOKEN does
not start another workflow — "push a tag, let publish.yml notice" silently never
runs — and because asking npm what is published is idempotent, so a re-run or a
hand-pushed tag cannot double-publish. The tag is created after a successful
publish, so it never claims a release that did not happen.

NPM_TOKEN expires 2026-11-14. token-health.yml probes `npm whoami` weekly and
opens a single issue when it fails, with the fix in it — rather than letting a
release three months from now be the thing that discovers the expiry, reported
as a 403 that reads like a permissions problem.

Verified: both files parse, and the registry check answers correctly against the
real registry for threadkit@0.1.0 (already published → skip).

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 18:26:35 +02:00
af0837032d ci: OIDC cannot do the first publish — keep a token for it (#6)
Same fix as ai-forms, before hitting the same failure. Trusted publishing
is configured per package on npmjs.com and cannot be configured for a
package that has never been published, so the token-free workflow fails
on the first release with E404 on the PUT.

Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 16:49:13 +02:00
GandClaude Opus 5 351612d16c ci: publish via OIDC, so no npm token has to exist (#3)
The publish workflow added yesterday needed an NPM_TOKEN secret. Trusted
publishing removes that requirement entirely: the workflow exchanges a
short-lived, workflow-scoped OIDC credential with npm at publish time, so
nothing long-lived is stored and there is no secret to leak or rotate.

Two things this workflow would have failed on, from the npm docs:

- Node 22 bundles npm 10.x, but trusted publishing requires npm >= 11.5.1.
  Node 24 ships npm 11, so the runtime is bumped rather than adding a
  separate npm upgrade step.
- `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` passed an empty string with no
  secret set. The documented OIDC example sets no token at all — the
  `id-token: write` permission already present is what does the work.

Provenance stops needing the flag: npm generates attestations automatically
for a public package published from a public repo via OIDC.

Matches the identical change in ai-forms, so the two libraries keep releasing
the same way.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 15:59:57 +02:00
GandClaude Opus 5 c62d5bfa83 ci: publish on a version tag, with provenance (#1)
threadkit has a CI workflow but no way to ship. The package is publish-ready —
name unclaimed on npm, `files: ["dist"]`, README and LICENSE both in the
tarball, 27 files, builds clean — so the only thing standing between it and a
release was a manual `npm publish` from someone's laptop.

This is the same workflow ai-forms already carries, so the two libraries
release identically rather than each growing its own procedure:

- triggered by a `v*` tag, so every published artifact traces to a commit
- `id-token: write` for npm provenance — the registry can prove the tarball
  was built by this workflow from this commit, not uploaded from a laptop
- runs `npm run verify` first: never publish something that would not pass CI
- refuses to publish when the tag and package.json version disagree, instead
  of silently shipping the wrong number

Verified locally with the workflow's exact steps: `npm ci --ignore-scripts`
then `npm run verify` — 31 tests pass.

Needs the NPM_TOKEN repo secret once; after that a release is `npm version`
plus a tag push.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 15:06:36 +02:00
Mao NakamotoandClaude Opus 5 82723a5183 test: prove the invariants, and consume the tarball the way npm does
Each invariant was verified to fail when broken: forcing the visibility
window open fails 4 targeted tests, and swapping the per-participant read
mark for a shared one fails exactly the test that names that bug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 13:17:01 +02:00