9 Commits
Author SHA1 Message Date
CatoandClaude 0b8e9246c6 feat(auth): every way in on AccountKit's own screens (#160)
Vita answers sign-in from AccountKit since today's switch (loki
accountkit-switch.yml). This moves the pages onto AccountKit's screens:
SignInForm, SignUpForm and the recovery form in de/en/fr, AccountPanel on
the profile. Password, passkey, a second factor; the email link and
recovery with mail; OrangeCat and the bitbaum sign-in when their env is set.

What stays Vita's: no delete button (medical records are kept ten years:
accountDeletion: false, and the panel leads to the erasure request); the
name on `users` (ownProfile); the per-account lockout, now a plugin on
AccountKit's sign-in; a new person's users row, profile and welcome
sequence; the role-aware landing. The runtime answers only with
AUTH_RUNTIME=accountkit and is unavailable elsewhere, so it never writes
accounts an import would refuse.

NextAuth, the bridge and Vita's own registration, forgot-, reset- and
change-password routes are gone; AccountKit is the only credential writer.
Production has no Google client and no Google links, so nobody loses a way in.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 22:44:00 +01:00
CatoandClaude Opus 5.5 2be962e8aa Stage AccountKit accounts beside NextAuth, runtime behind AUTH_RUNTIME (off) (#134)
* Stage AccountKit tables beside NextAuth and rehearse the account import

NextAuth owns users/accounts/sessions and 31 tables reference users.id,
so AccountKit's tables are added under the auth_ prefix and the shared
user id is users.id. The import (scripts/db/accountkit-import.sql) keeps
ids, addresses, verification and password hashes byte for byte, keeps
Google links as inert rows, and refuses drift, colliding addresses and a
live shared runtime. Its CLI always rolls back. NextAuth stays
authoritative; nothing reads the new tables yet.

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

* Serve Vita's sign-in from AccountKit behind AUTH_RUNTIME (off)

With AUTH_RUNTIME=accountkit, auth() answers today's session shape from
the shared session plus the users row on every request (role changes and
deletions take effect at once; env admins promoted as before). The pages
keep next-auth/react: /api/auth answers its session, csrf, providers,
signout and credentials calls from AccountKit and hands the rest to it.
Password sign-in keeps the per-account lockout; registration, forgot,
reset and change password go through AccountKit with the same answers
and link shape the pages expect. Unset, NextAuth answers as today.

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

* Depend on AccountKit 0.13.0 for prefixed account tables

Exempt @bitbaum/accountkit from the release-age gate by name, like the
fleet's other own packages, instead of per version.

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

* ci: browser smoke of the patient's way in, on NextAuth and on AccountKit

The shared-package gate holds any PR that changes @bitbaum/accountkit until
browser-smoke.yml passes on its head, and Vita had none. This one builds the
production server on PostgreSQL from the committed migrations and drives
Chromium through register, dashboard, sign out, a refused wrong password,
sign in and the recovery pages, plus every auth page at 390px. It runs on
NextAuth, then, after the real import, on AccountKit, where the person
registered under NextAuth signs in with their old password.

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

* ci: run the AccountKit leg only where the import is staged

The same workflow file can then ship on branches without the shared
runtime and merge cleanly beside this one.

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

* chore(deps): accountkit ^0.14.0, the version the canary runs

The fleet rollout gate admits a shared-package version only once the
canary (biaslens) has deployed it; biaslens is on 0.14.0, so 0.13.0 would
wait forever. 0.14.0 adds plugins and trusted origins, neither used here.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 12:54:01 +01:00
CatoandClaude Opus 5.5 e6f0c622d1 feat(auth): one password rule from @bitbaum/accountkit (non-empty, up to 128) (#129)
* feat(auth): one password rule from accountkit (non-empty, up to 128); drop local minimum and hint placeholders

* feat(auth): accountkit 0.9.1 — one new-password field with show button on register/reset/change; hashing from accountkit (no 72-byte cut, old hashes upgraded at sign-in)

* ci: browser smoke of the patient's way in

The shared-package gate holds any PR that changes @bitbaum/accountkit until
browser-smoke.yml passes on its head, and Vita had none. Same file as #134's,
so the two merge cleanly; its AccountKit leg runs only where the import is
staged.

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

* chore(deps): accountkit ^0.14.0, the version the canary runs

The rollout gate admits only versions the canary has deployed; 0.9.2
would wait forever.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 12:49:45 +01:00
GandClaude Opus 5 97d4734b02 ci: call the central auto-merge sweep instead of carrying a copy (#50)
auto-merge-sweep.sh was copied into 22 repos and drifted into EIGHT distinct
versions, 245 to 404 lines. Three of them independently grew different fixes for
real outages, and each fix reached only the repo that wrote it:

  evig, revampit   infra-failure detection + re-run. An Actions incident left
                   main "failure" with no failed job at all; 11 PRs stranded
                   for roughly 14 hours.
  fleetcrown       DEADLOCK naming — a red base with the repairing PR sitting in
                   the queue was indistinguishable from "nothing to merge".
  the other 19     neither.

Nothing could carry a fix across, so every repo waited to hit each outage
itself. This repo now calls the canonical sweep in maonakamoto/dotfiles, and the
local copy is deleted.

The canonical is the union of the three, built on the variant ten repos were
already running rather than on the longest one — the 404-line variant is missing
the step-summary reporting the 296-line one has, so "take the biggest file"
would have silently deleted working behaviour. The merge was 106 insertions and
zero deletions: nothing can be lost by adopting it.

The triggers stay in this file because they genuinely are per-repo: workflow_run
must name the CI workflow exactly, and that name differs across the fleet.

Two details that are silent when wrong, both found by piloting rather than
reasoning:

  rearm_workflows is SPACE-separated. The sweep word-splits it; a comma makes
  one bogus token, every dispatch fails, and the only symptom is that nothing
  deploys — while the sweep still exits 0 and reports a successful merge.

  permissions are declared on the CALLER as well. A called workflow's token is
  capped by what the caller grants, so relying on the callee's block alone can
  hand it a read-only token; the sweep would then merge nothing while exiting 0,
  which is indistinguishable from having nothing to merge.

Verified before this rollout: the canonical ran end to end in dotfiles' own CI,
and the reusable-workflow path ran end to end in the pilot repo (s-ink).

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 16:19:10 +00:00
G fe519d94cd fix(ci): declare the failing-job list before the branch that can skip it (#15) 2026-08-07 10:04:07 +00:00
G 20b3f44835 fix(ci): a red base must not trap the PR that repairs it (#14) 2026-08-07 09:36:59 +00:00
G b1d456e31f fix(ci): stop skipping conflicts, and keep branches current (#12) 2026-08-07 07:15:50 +00:00
GandClaude Opus 5 1c1ffc2f1c fix(ci): drain the merge queue oldest-first, not newest-first (#11)
`gh pr list` returns newest-first, and the sweep merges the first eligible PR
then stops. So the newest green PR wins every sweep, and an older one can wait
indefinitely.

Observed in maonakamoto/fleetcrown on 2026-08-06: two consecutive sweeps merged
the two newest PRs while three older green ones sat untouched and were never
even evaluated. With several agent sessions opening PRs continuously that is
starvation — and it starves the worst candidate, since the longest-waiting PR
is the one whose checks were proven against the most now-stale base.

PR numbers increase monotonically with creation, so sorting ascending is FIFO.
The ordering was never a decision, just whatever gh happened to return.

Fixed upstream first (fleetcrown #182) and verified in production there: the
sweep immediately after it landed correctly took the oldest open PR rather than
the newest. This is that one-line change, applied to the fleet.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 13:43:33 +00:00
G 10d8460b7f ci: green PRs merge and deploy themselves (#10)
* ci: add the auto-merge sweep policy

* ci: green PRs merge and deploy themselves

* ci: allow deploy to be dispatched so an automated merge still ships
2026-08-05 19:18:26 +02:00