Files
loki/scripts
CatoandClaude Opus 5.5 4d8fb06f40 Release a shared package from Loki, watch it roll out, pause a bad release everywhere (#1186)
* feat(packages): release a shared package from Loki, watch it roll out, pause a bad release everywhere

Release. /packages/[slug] gains "Unreleased": the commits on the package
repo's default branch since its highest version tag (count + first lines,
marked breaking / new / fix), the next version from conventional commits
(feat → minor, ! or BREAKING CHANGE → major; under 1.0 breaking → minor
and a feature → patch, the same breaking rule as dependabot.ts and the
fleet sweep), and "Release vX.Y.Z", which dispatches the repo's own
release.yml (bitbaum/fleet templates/package) with that exact version. It
refuses — with the way forward — when release.yml is missing (links the
fleet's template-sync PR or the sync itself), main's checks are red,
running or absent, a release is already running, there is no version tag,
or the suggestion moved since the page was read. Nothing about a release
is stored; the panel reads tags, compare and workflow runs from GitHub
behind ReleaseGithub (release-github.ts), so it is tested with a fake.

Owner. Whoever owns the Loki project whose repo is the package repo; with
no such project, an account whose GitHub token can push to it. GitHub's
push permission must agree either way (release-access.ts).

Rollout. Per recent version, every project using the package lands in one
bucket: on it, update ready / waiting on tests / held / paused / failing,
behind with no update, newer, unknown — derived from project_packages and
package_update_requests. "Red in N projects — their tests fail on vX.Y.Z"
with links.

Pause. package_release_pauses (migration 0101, additive: one new table) is
the one stored decision. The update sync now takes pauses: decideEnforcement
gains `paused` / `decidedBeforePause` — a paused update is held in every
project whatever its setting and never merged (an approval is kept for
after), a person who takes the pause hold off is left alone, a stand-aside
from before the pause does not exempt it, and resume removes only holds
nothing else wants. Pause/resume applies at once through the same sync
path. Cards, update lines and the package page say "Paused by the package
owner".

Routes: GET/POST /api/packages/[slug]/release, POST /api/packages/[slug]/pause
— signed-in owner only, rate-limited, zod bodies, jsonOk/jsonError.

Migration is numbered 0101: 0100 is taken by 0100_kit_plan, which lands
first; until that rebase, migration-journal-coverage.ts sees the gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf

* style(packages): format with the repo's locked prettier

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-14 04:08:00 -07:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00