STRIPE_SECRET_KEY and the seven other STRIPE_* vars appear zero times outside
src/ and zero times in .env.example, so isStripeReady() could only ever return
false. Three API routes, a checkout route, a tier grid and a "Manage
subscription" button were all gated on it and permanently unreachable.
Confirmed empty in production before touching the schema:
select count(*) filter (where stripe_customer_id is not null),
count(*) filter (where stripe_subscription_id is not null),
count(*) from users;
→ 0 | 0 | 7
So this removes no data and, more to the point, changes nothing a user sees:
every code path already fell through to the branch below it.
WHAT STAYS. Plans are real and untouched. They are granted through the
OrangeCat/Bitcoin rail (/api/orangecat/entitlement -> recordOcBillingGrant),
with the expiry cron reverting a lapsed pass to free. The pricing CTA cascade
loses only its unreachable middle step: free -> TBA -> [stripe] -> BTC ->
start-free.
WHAT WAS ACTIVELY WRONG. Because isStripeReady() was false, the one part of
Billing that DID render was a notice telling the reader to "add
STRIPE_SECRET_KEY and price IDs" — an environment variable shown to a person
who does not deploy the app and could not act on it. That is the same mistake
NotificationsPill's comment already calls out. Billing now states the plan and
links to /pricing.
Removed: lib/stripe.ts, api/stripe/{checkout,portal,webhook}, api/checkout/
[plan], getUserByStripeCustomerId, two user columns (migration 0063), two
entries from the user-client-view redaction lists, the api/stripe/webhook entry
in proxy.ts's public matcher, the stripe npm dependency, and the smoke/auth
probes for routes that no longer exist.
BillingSettings drops "use client" — with the handlers gone it holds no state,
no effect and no search-param read.
Two mentions deliberately KEPT because they are not the rail: the placeholder
prose describing what a user might build ("Simple dashboard, automated
reminders, Stripe payments…") and the demo project's stack string.
pnpm run verify green. 28 files, 519 deletions.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* chore: add a formatter, matching the style this repo already writes
singleQuote=false was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.
Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* style: format with prettier (1062 files)
Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore: teach git blame to skip the reformat
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(lint): reattach two guards the reformat detached
Both effects were one-liners, so a trailing eslint-disable-line covered the
setState call:
useEffect(() => { setSelected(new Set()); }, [q.length]); // eslint-disable-line ...
prettier expanded the block. The comment stayed on the closing line while the
call moved above it, so the guard protected nothing and the rule its author had
deliberately silenced failed the build.
This is the second shape of the same defect — hirnli had the eslint-disable-NEXT-line
variant. Both come from the same fact: an eslint directive binds to a line
number, so reformatting can silently unbind it, which makes 'mechanical, no
behaviour change' false for any bulk reformat.
* chore(desktop): bump the runner version the reformat requires
desktop-release-drift enforces that anything built into Fleet Runner which
differs from the last released tag must carry a version ahead of that tag —
main read 0.8.15 and fleet-runner-v0.8.15 already shipped.
A whole-repo reformat changes bytes under desktop/, so the gate fires. The
alternative was adding desktop/ to .prettierignore, which would buy a quiet PR
by carving a permanent hole in the formatter's coverage — the precise shape of
silent drift this test was written to catch. Bumping is what the rule asks for
and costs one patch release whose only content is whitespace.
* chore: merge main and re-format
A whole-repo reformat conflicts with any concurrent commit, and a conflicting PR
runs no checks at all while reporting nothing. Conflicts resolved to main,
which is correct because this branch changes formatting and nothing else.
* chore: leave desktop/ out of this reformat
desktop-release-drift is right to refuse this. Everything under desktop/ is
built into Fleet Runner, so changing it means shipping: bump the version AND add
a FLEET_RUNNER_RELEASES entry, whose stated audience is 'person who installed
Fleet Runner and wants to know what changed'. For a whitespace-only build the
honest answer is 'nothing', so that release should not exist — and I should not
write release notes claiming otherwise.
I had bumped to 0.8.16 to get the gate green. That was the wrong direction:
publishing a build to three OS runners to keep a formatting PR quiet. Reverted.
desktop/ is excluded in .prettierignore with the reasoning recorded there, to be
formatted alongside the next real runner change, where the bump and the notes are
true anyway.
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Supersedes #205, which bumped the dependency and left the signer uncompilable
(sign() returns bytes in v3, so .recovery and .toCompactRawBytes() are gone).
This key signs FleetCrown's Solon votes. A wrong signature there is not a
degraded feature — it is a vote that cannot be counted and an audit trail that
cannot be re-verified, so a typecheck-clean migration is not evidence of
anything. The existing vector was noble verifying noble: a change moving the
wire format on both sides passes it while invalidating every signature Solon
has already recorded.
So the test got a foreign witness FIRST, written and passing against v2 before
the bump — OpenSSL via node:crypto verifying the pinned signature, plus a
pinned public key anchored to Solon's address by hash160+base58 (no EC math, so
it holds independent of any library), the preimage rebuilt in the test, and a
negative control proving the witness can fail. A vector added after a migration
is fitted to the new output, not a guard against it.
Migration deltas: hmac moves from etc.hmacSha256Sync (varargs) to hashes.*
(single message) and throws at sign time if unset; keys are bytes, not hex;
format "recovered" returns recovery || r || s. prehash:false is load-bearing —
the digest is already double-SHA256 and letting v3 hash again signs the wrong
value while still producing a structurally valid signature. Confirmed the guard
bites by flipping it: the vector fails.
Signature bytes are unchanged, and OpenSSL agrees.
Gates: tsc 0, lint 0 errors, check:design ok, test:unit 78/78, test:home
150/150, deploy-ref-gate 7/7, check:desktop ok.
Co-authored-by: t <t@t.t>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
/api/solon/events shipped in #199 but was never added to the proxy matcher
exclusion, so NextAuth answered every Solon POST with 401 before the HMAC
check could run — the doorbell was unreachable in prod. Caught by a signed
replay probe (an unsigned probe also 401s, which masked it as a pass).
Adds api/solon/ to the exclusion and pins the class in the solon-message
script test: every self-authenticating receiver (HMAC/Stripe-Signature)
must appear in the matcher exclusion, or the suite fails.
Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
FC1 of the Solon v1 plan (Solon spine live at solon.orangecat.ch; OrangeCat's
decision edge in oc#657). FleetCrown becomes a governance participant with
its own key and its own crypto:
- src/lib/integrations/solon-message.ts: Bitcoin signed-message signing for
exactly one key (LOKI_SOLON_PRIVKEY) + the canonical Solon vote message.
Pinned to Solon's signer by a fixed vector — RFC6979 is deterministic, so
the unit test asserts byte-identical signatures; drift breaks CI, not
Loki's votes.
- scripts/solon/cast-vote.ts: operator-run vote cast (fetch nothing, sign
locally, POST; the key never leaves the environment). A future autonomous
path stays behind the approval queue — no auto-approve, ever — and reuses
this as its executed step.
- src/app/api/solon/events: HMAC doorbell receiver mirroring the
/api/orangecat/events shape (env-gated 503, timing-safe verify via the new
solon-webhook.ts, zod-parsed, unknown-but-authentic events acknowledged).
v1 records decision.finalized to debug-logs and nothing more: FleetCrown
has no Solon-governed artifact yet, and when one lands the receiver grows
the fetch-and-re-verify shape OrangeCat's decision-verify implements.
- RESERVED_ACTION_PROPOSE_SOLON_CHANGE constant: the name is stable now;
nothing dispatches it in v1.
Unit test (auto-discovered scripts/test/solon-message.ts): address
derivation, canonical message, exact signature vector, webhook verification
accept/reject matrix. verify exit 0.
Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>