6 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 6a3be90d97 chore(ci): one check per change — remove the merge sweep, check on PRs only (#336)
Removes the fleet auto-merge sweep caller (and wake chain where present);
checks run on pull requests only, not again after merging; a deploy that
waited for CI on main now deploys on push. The forge merge check
(forge/verify) verifies each PR on its merge result and merges it.

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 05:13:43 +01:00
Cato f1fd5a812a ci: actions/checkout 7, actions/cache 6, pnpm/action-setup 6 (#295)
The three Dependabot bumps (#176, #177, #178) in one change. Each was green
on its own run; checkout 7 is what fleet's workflows already use.

Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD
2026-11-10 15:07:51 +01:00
Cato 453c4325fc perf(ci): deploy Heidi after CI completes (#100) 2026-09-23 13:54:24 -07:00
CatoandClaude Opus 5 2d2357ebe0 fix(middleware): a rewrite behind Caddy dialled TLS at an http socket (#55)
* fix(middleware): a rewrite behind Caddy dialled TLS at an http socket

Production 500'd for every signed-in visitor on the locale root. Signed-out
visitors were fine, which is why it shipped.

    Failed to proxy https://localhost:4025/de/portal
    EPROTO ... tls_validate_record_header: wrong version number

`request.nextUrl.clone()` inherits the EXTERNAL protocol behind the reverse
proxy, so the cloned URL reads `https://localhost:4025/...` while the app
itself listens on plain http at that port. Next does not recognise that origin
as its own, treats the rewrite as an external proxy target, and opens a TLS
connection to an http socket.

Nothing in the test suite could have caught it, and that is the part worth
recording rather than the one-line cause. The DECISION was extracted into a
pure, tested function precisely so it could be covered — and it was, including
the self-rewrite loop — but the decision was never wrong. The MECHANISM was,
and the mechanism only misbehaves with a real reverse proxy in front of it.
Neither CI nor `pnpm start` has one, and the branch only ran when a session
cookie was present, so a production build exercised in a browser was green too.

The rewrite goes. "Show a different page at the same address" is still the
right idea — it is a decision for the PAGE to make, where no URL is
reconstructed and no protocol is guessed. `lib/i18n/landing.ts` goes with it
rather than sitting unwired, which is the same defect as a health check nobody
calls.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FzYBD3sZroCAYeRgTYrpfT

* test(deploy): smoke the live site, signed in and signed out

A green deploy is not a working site, and this outage proved it in the most
expensive way available: 339 tests, lint, typecheck and a production build
exercised in a browser, all green, while the locale root returned 500 to every
signed-in visitor.

The thing that would have caught it takes one second:

    curl -H "Cookie: __Secure-authjs.session-token=x" /de   → 500

A cookie being PRESENT is enough. That is the whole trick, because the code
paths this class of bug lives in — routing, rewrites, redirects — branch on
the cookie long before anyone validates it.

So `scripts/smoke.sh` requests every page a visitor can reach by name, twice,
once each way round, and runs as a job after the deploy. A release that cannot
serve its own home page now turns the Deploy run red instead of waiting to be
noticed.

What the cookie does NOT prove, stated in the script so nobody mistakes it for
more than it is: it is not a real session. `auth()` rejects it and the page
renders signed-out. It exercises "is a session cookie present", not "is this
person authenticated". A genuinely authenticated end-to-end test needs a test
account and a real login flow, and is worth doing separately.

Also checks that `/` stays a 307 and not a 308 — caching the locale
negotiation as permanent would pin every later visitor to whoever asked first —
and reads `/api/health`'s schema verdict rather than its status code, since a
deploy that cannot use its own tables still answers 200 by design.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FzYBD3sZroCAYeRgTYrpfT

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 05:56:14 -07:00
CatoandClaude Fable 5.1 845ae0e87b 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
9 files changed, 12 insertions(+), 12 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>
2026-09-13 16:27:20 -07:00
Cato 678bc15b1f feat: scaffold Heidi 2026-09-10 20:45:39 +02:00