Commit Graph
12 Commits
Author SHA1 Message Date
CatoandClaude 6c7016af7c feat(ci): no repo loads fonts from Google; content sites get browser evidence (#452)
Google Fonts audit (scripts/ci/google-fonts-audit.sh, daily in
google-fonts.yml, tested in CI): every repo's shared branch is swept for
an import of next/font/google or a fonts.googleapis.com /
fonts.gstatic.com URL in code. Comments, tests, markdown, vendoring tools
and fonts/faces.json are not judged. google-fonts.baseline lists what is
left, with where each move to @bitbaum/design-tokens stands; it may fall
or hold, never rise. One central check instead of a test copied into
every app (kivvi and vitareba each wrote their own).

Static browser smoke (.github/workflows/static-browser-smoke.yml +
scripts/test/static-browser-smoke.mjs): a content site with no accounts
or database calls it from its browser-smoke.yml, the workflow the
package rollout gate requires of a consumer. It builds, serves the
production build, draws each path at 320/390/1280px, fails on an error
status or any Google Fonts request, warns on overflow and keeps the
screenshots. Playwright is installed pinned in the runner, not in the
site's lockfile.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 23:13:55 +01:00
CatoandClaude b0e18574f8 test(auth): the shared journey's sign-in issuer publishes its providers (#448)
AccountKit 0.24 (accountkit#64) names on the shared sign-in's button exactly
the providers the service publishes at <issuer>/api/providers, and hides the
button while that list is empty. The journey's fixture issuer published
nothing, so on 0.24 the button was hidden and the oidc scenario waited for the
old fixed label "Continue with Google, GitHub or Facebook" until it timed out:
BiasLens's canary PR for 0.24.1 failed there (biaslens#173).

The fixture now publishes Google and GitHub. The expected label comes from the
consumer's own signinButtonLabel, or its withSignin before 0.24, and the page
is loaded again until the list read in the background has arrived. Run locally
against BiasLens on 0.24.1: the oidc scenario passes.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 22:23:03 +01:00
CatoandClaude Opus 5.5 3c4ad8ab90 test(auth): the shared journey proves the OrangeCat and shared sign-in buttons (#428)
* test(auth): the shared journey proves the OrangeCat and shared sign-in buttons

The shared account journey covered password, recovery, passkeys, the second
factor and the sign-in link, but no OIDC leg (auth-parity 2026-10-30, finding
12). An app could lose "Continue with OrangeCat" or the shared sign-in
(the Morulia button) and every journey stayed green.

A new `oidc` scenario, run by shared-auth-journey.yml after the others:

- starts the app with ORANGECAT_OAUTH_* and SIGNIN_* pointing at two test
  issuers served by the journey itself (discovery and an authorize endpoint
  that only records the arrival; no token is issued);
- asserts both buttons on the sign-in and sign-up pages, with the app's own
  localised labels;
- clicks each one and asserts that the browser reaches that button's own
  issuer with its client id, a code flow, PKCE S256 and a callback on this
  app.

Every product on the shared journey (biaslens, causius, diplodoctor, heidi,
solon) runs it unchanged. Checked locally against a biaslens production build
and Postgres: oidc and recovery pass.

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

* style: format the oidc scenario

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-11-01 21:39:15 +01:00
Cato d43b6bb61b test(auth): follow AccountKit single-field password reset (#329) 2026-10-28 10:49:49 +01:00
Cato 18ad6f39b1 fix(test): authenticate product browser through its actual sign-in route (#250) 2026-10-26 18:34:29 +00:00
Cato fd6693a4aa feat(rollout): verify distinct chat layouts in authenticated app canaries (#249) 2026-10-26 18:23:13 +00:00
Catoandfleet-reconciler 1b00b16379 feat(template): include current shared ChatKit adapter (#198)
* Include shared chatkit in new app starters

* Format shared chat starter component

* chore(deps): raise shared package floors to published versions

Opened by bitbaum/fleet .github/workflows/internal-currency.yml.

The fleet's own packages ship features in MINORS, so
version-currency.mjs — which judges by major — reports nothing while
consumers drift. This is the instrument that sees it, and it opens
the fix rather than reporting it.

If this PR is red, that is the useful outcome: it names a repo that
cannot take the new version, which nothing else in the fleet would
have told us.

* test(template): select an available Chromium runtime

* style(template): format ChatKit release policy

---------

Co-authored-by: fleet-reconciler <fleet@bitbaum.invalid>
2026-10-26 06:45:24 +01:00
Cato 9350549481 test(auth): require passkey and cross-method second-factor journeys (#211)
* test(auth): exercise shared passkey and second-factor account journeys

* fix(rollouts): block the reproduced AccountKit 0.6.2 MFA regression
2026-10-26 01:07:04 +01:00
Cato 4c954952a8 fix(auth): resolve browser from consumer Playwright package (#204) 2026-10-25 15:41:41 +01:00
Cato 619e4a8042 test(auth): verify real consumer account journeys (#201) 2026-10-25 10:08:40 +01:00
CatoandClaude Opus 5.5 31de29870b fix(scripts): grep -q is never the reader of a pipe under pipefail (#140)
* fix(scripts): grep -q is never the reader of a pipe under pipefail

`echo "$x" | grep -q PAT` under `set -o pipefail` can report "not found"
for text that IS there: grep -q exits on its first match and closes the
pipe, the writer takes SIGPIPE (141), and pipefail makes the pipeline
status 141, so an `if` takes the else branch on a successful match.

It is not confined to payloads past the ~4KB pipe buffer. Measured in
loki (loki#874) on a real 1,158-byte output, 3,000 calls: 2/3000 false
misses for a phrase near the top, 0/3000 via a here-string. Rare per
call; a suite makes hundreds. loki's retire-site suite went red on
exactly those phrases twice this week.

48 copies in 14 scripts here, rewritten to `grep -q PAT <<<"$x"`,
including:
- auto-merge-sweep.sh: the required-check coverage test. A false miss
  marks a green job "uncovered".
- gc-merged-worktrees.sh: `in_use`. A false miss reads a live session's
  worktree as unused. The pushed / clean / MERGED guards still stand, so
  it cannot lose work, but it can remove a directory from under a live
  session.
- cicd-hygiene, nav-contract, org-drift, verify-floor audits and
  verify-predicates: false passes and false findings.

Checked: all 14 files pass `bash -n`; every file is a 1:1 line swap (48
lines); the 8 line-continuation sites keep the here-string before the
trailing backslash; fleet's 30 CI test scripts pass before and after
(30/30 -> 30/30); workflows still parse.

Gate: scripts/ci/test-no-grep-q-in-a-pipe.sh, wired into ci.yml. Scans
scripts/ and templates/, self-tests its detector both ways, and was
proven by restoring the original auto-merge-sweep.sh line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* fix(ci): main was red on a ratchet that fell, and a sweep test lied

Two failures on fleet main that were blocking every PR, including this
one. Neither was caused by the grep -q rewrite: main (7ed94a2, the base
of this branch) failed CI on the same step for the same reason.

1. org-drift ratchet fell. `org-drift-audit.sh --check` failed on main
   since c43464d with "baseline entries with no matching violation - the
   ratchet fell: bitbaum/README.md". Good news: someone fixed that drift.
   Nobody lowered the baseline, so main stayed red and the auto-merge
   sweep refused everything. Line removed; --check now passes (44 repos
   swept, 3 known violations, no new contradictions).

2. test-auto-merge-sweep.sh lied. Its verdict `[ "$FAIL" -eq 0 ]` sat at
   line 400 of 473, with ~70 lines of tests appended after it. A bash
   script exits with its LAST command's status, so the verdict was
   discarded: the suite exited 0 while printing "27 passed, 1 failed",
   and its later tests were not even counted. Verdict moved to the end;
   the suite now counts 38.

   The hidden failure was real and was mine: test 13 asserted the sweep
   always "waits for CI to catch up" when the newest base run is for an
   older commit. The deadlock fix changed that - it waits only while a
   run is in flight, and otherwise dispatches CI. Test 13 now asserts
   both cases (13a waits and dispatches nothing; 13b dispatches and does
   not merge). `rearms()` moved above its first use.

Proven by mutation: an injected late failure now fails the suite;
reverting the sweep to always-wait fails 13b; making it never wait fails
13a.

Gate: scripts/ci/test-verdict-is-last.sh, wired into ci.yml, requires
every suite's verdict to be its file's last command. Proven by restoring
the old mid-file verdict. All 34 fleet CI commands are now green, and
none exits 0 while reporting a failure.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 11:58:34 -07:00
CatoandClaude Opus 5 f114ea0259 fix(auto-merge): the sweep waited forever for CI that could never run (#123)
The green-base guard asks "is there a CI run for the base tip?". For an
automated merge the answer is permanently no: a push made with GITHUB_TOKEN
emits no workflow events, so every merge this script performs lands on the base
and produces NO CI run. `pick_base_run` then falls through to its last resort —
the newest run of all, belonging to some older commit — the sha comparison
fails, and the sweep exits 0.

The re-arm at the bottom of this file is exactly the cure, and it is
unreachable: it is gated on `merged_any`, and nothing can merge while the guard
holds. The block sits upstream of its own remedy. The guard's own comment
predicted this ("with no CI run ever produced by an automated merge, the very
next sweep would block forever") and the re-arm was placed where it cannot
answer it.

Measured on bitbaum/loki 2026-09-22: base CI history stopped on 09-13, every
sweep since exited in ~7 seconds reporting success, and FOUR non-draft green
PRs sat unmerged for up to fifteen days — the oldest opened 09-07. A human
eventually noticed and merged one by hand. A stall that exits 0 is
indistinguishable from "nothing to merge"; this is the fourth time that shape
has cost this fleet real time, after evig (11 PRs, 14h), aoz-begleitung and
ai-kit (9 days each).

The fix does NOT relax the guard. Merging onto an unverified base stays
refused. It supplies the missing evidence instead: when the tip has no run and
none is in flight, dispatch CI for it so the next sweep has a real verdict.
Self-healing, and it fails safe — a red result is then handled by the red-base
path rather than hidden by this branch.

The "genuinely catching up" case is preserved exactly: if any run is still
in flight, it waits as before and dispatches nothing. Dispatching there is what
caused the concurrency-cancellation storm on loki 2026-09-10.

This logic had no test — fleet CI covered it with `bash -n` alone, which is how
a permanent deadlock shipped. scripts/test/auto-merge-sweep-no-base-ci.sh now
drives the real script against a stubbed gh (which it was already written to
tolerate) across all three paths, and is wired into CI. Mutation-tested:
restoring the unconditional exit fails it.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 00:31:49 -07:00