Commit graph catcrafts.net/tools
Author SHA1 Message Date
e0d3181840
bank: the hourly pull asks nostrod, and holds no bunq key
tools/pull-and-ship-credits.sh ran this repo's own bunq client
(`catcrafts-server --pull-credits`) with the API key from .env: a key
that can initiate payments, where every program run in the checkout
could read it. It now asks nostrod (Nostro) for the account's
transactions over the system bus and turns the answer into the same
credit lines. nostrod lets a program look without a password and lets
nothing pay without one, so the pull holds no credential at all.

- Each run ships the last 90 days (CREDITS_DAYS), the longest window an
  order can wait in, in place of an accumulating local copy fed by a
  reader that only ever saw the newest 50 payments.
- --dry-run prints what would be shipped and ships nothing.
- deploy/README.md: how the pull works now, the polkit rule a timer
  needs to look without a login session, and what the old reader is
  still kept for (tools/register-bunq-webhook.sh, until `nostro
  callbacks` of Nostro 1.1.0 has been seen to list the shop's webhook).

Checked on 2026-11-21 against the production account, through nostrod:
a dry run gave, for each of the 24 incoming payments the old client had
written, a line byte-identical to the old client's. A real run, with
the ship to the server, has not been made, and the timer is installed
nowhere yet.

No C++ changes: the two edits to sources are to comments.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 14:21:48 +01:00
25805a093a removed fp6 from shop
All checks were successful
Deploy / build-deploy (push) Successful in 9m28s
2026-09-05 18:38:39 +02:00
413740af2e text change
All checks were successful
Deploy / build-deploy (push) Successful in 3m48s
2026-08-21 04:52:25 +02:00
aaa7a8ce99 bank tranfer fix
All checks were successful
Deploy / build-deploy (push) Successful in 3m11s
2026-08-20 23:33:50 +02:00
df91762271 Replaced mollie
All checks were successful
Deploy / build-deploy (push) Successful in 3m47s
2026-08-20 20:15:47 +02:00
5d3a3adb86 crypto test fix
All checks were successful
Deploy / build-deploy (push) Successful in 3m40s
2026-08-20 01:49:15 +02:00
47d302a9a4 crypto fix
All checks were successful
Deploy / build-deploy (push) Successful in 2m26s
2026-08-20 00:09:08 +02:00
2a4e2c1c85 crypto fix
All checks were successful
Deploy / build-deploy (push) Successful in 2m32s
2026-08-19 23:55:01 +02:00
ed61fb5ca5 fp6+
All checks were successful
Deploy / build-deploy (push) Successful in 3m6s
2026-08-19 17:19:51 +02:00
faf881fa0c added missing icons
All checks were successful
Deploy / build-deploy (push) Successful in 3m0s
2026-08-18 21:21:41 +02:00
c31797bd9a retire the bunq integration
All checks were successful
Deploy / build-deploy (push) Successful in 3m32s
The webhook is deregistered at bunq and the callback endpoint, its parser,
default-deny classifier, dedup ledger and signature check are removed; the
code is in git history if a bank feed ever comes back. /financials keeps
reading the hand-maintained aggregates file, and sales + shop donations
stay live from the order ledger.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 11:43:09 +02:00
abbd616b40 donation item, shop soft open
All checks were successful
Deploy / build-deploy (push) Successful in 4m11s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 11:04:03 +02:00
749f525f83 tests and eurc
All checks were successful
Deploy / build-deploy (push) Successful in 4m19s
2026-08-15 00:54:05 +02:00
33c68c2f44 financial page with bank data
All checks were successful
Deploy / build-deploy (push) Successful in 1m48s
2026-08-14 04:14:13 +02:00
e68d2c245c finacial page
All checks were successful
Deploy / build-deploy (push) Successful in 2m20s
2026-08-14 02:50:58 +02:00
70668af8f5 coingate
All checks were successful
Deploy / build-deploy (push) Successful in 3m10s
2026-08-13 23:34:19 +02:00
38688a68f5 CI fix
All checks were successful
Deploy / build-deploy (push) Successful in 6m20s
2026-08-10 01:51:39 +02:00
6841623e23 posts and avif
Some checks failed
Deploy / build-deploy (push) Failing after 5m49s
2026-08-10 01:37:26 +02:00
2fa6e70af1 order confirmation
All checks were successful
Deploy / build-deploy (push) Successful in 6m14s
2026-08-09 00:14:09 +02:00
a625176c7d media: H.264 fallback beside every AV1, and the post links the H.264
All checks were successful
Deploy / build-deploy (push) Successful in 7m30s
The AV1-only publish lasted four hours in the wild: the first viewer on
mobile Safari got "bad media error" from the raw file, because a post's
link is fetched raw — Lemmy apps and browsers play that exact URL, with
no <source> negotiation in front of it. The previous commit's note
("--raw ... if that audience matters") had it backwards: the audience
that cannot play AV1 is not a per-post judgement call, it is whoever
happens to open the thread on an iPhone.

So publish-media.sh now emits two encodings and points the post at the
compatible one:

  * Every video transcode also produces <hash>.h264.mp4 (x264 crf 23,
    same denoise, same frames), uploaded beside the AV1 under the AV1's
    hash — the poster's sibling-naming trick, reused, so fetch-media.sh
    finds it by name with nothing to look up.
  * The printed URL to paste into the post is the H.264 one. pict-rs
    can thumbnail it too, so instance thumbnails come back as a bonus.

fetch-media.sh adopting an own-origin .h264.mp4 URL swaps the AV1 back
in as the page's primary when it is on the mount, and records the H.264
as `fallback` in posts.json. The renderer turns a non-empty fallback
into a <source> pair: the AV1 first with an explicit codecs parameter —
both files are video/mp4, so the parameter is the only thing that lets
a non-AV1 browser skip to the file it can play — and the H.264 second.
Browsers with AV1 keep downloading the small file; Safari before 17
gets one that plays instead of an element that will not.

e2e gains the matching conditional gate: a page offering an av01
<source> must offer an .h264.mp4 one, so an AV1 video can never again
ship without its fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 03:14:51 +02:00
c1b0c29af6 media: publish to our own origin instead of mirroring a file host
All checks were successful
Deploy / build-deploy (push) Successful in 7m34s
A 167 MB screen recording uploaded to catbox.moe hit fetch-media.sh's 64 MB
MAX_BYTES, so curl refused it, the entry kept its third-party URL, and e2e
failed "/posts media origin" on a file we had on disk the whole time. Raising
the cap would have papered over it: the mirror step still depends on someone
else's server being up, fast, and still holding the file.

Invert it. tools/publish-media.sh uploads a recording to the media mount under
its content hash BEFORE the post exists and prints the URL to post, and
fetch-media.sh adopts an own-origin URL by rewriting it to /media/<hash> with no
request at all — no size cap, no third party in the build.

Also here, because publishing exposed them:

  * Rotation. Phones record 1920x1080 and attach a display matrix rather than
    rotating pixels, so an untouched file reports landscape while playing
    portrait and width/height reserve exactly the wrong box. publish-media.sh
    bakes rotation into the frames; fetch-media.sh swaps the dimensions on a
    quarter-turn matrix for anything mirrored straight from a phone.
  * Posters. pict-rs will not thumbnail AV1, so a self-hosted video usually
    arrives with no poster. publish-media.sh uploads <hash>.poster.webp beside
    the video and fetch-media.sh falls back to it — a real thumbnail still wins.
  * The workflow comment claiming a file on the mount is never downloaded again
    was wrong: the name is the hash of the bytes, so third-party media is
    re-fetched every build and only the write is skipped.

Transcoding to AV1 is what makes self-hosting cheap: that clip was 78 s of a
dark room at 17 Mbps, and denoise + AV1 gives the same picture in 15 MB. Note
<video> carries a single src with no fallback, so AV1 excludes Safari < 17;
--raw skips the transcode when that matters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 01:16:17 +02:00
fca089c20d SEO
Some checks failed
Deploy / build-deploy (push) Failing after 7m0s
2026-08-06 23:42:25 +02:00
b49042a626 new logo
All checks were successful
Deploy / build-deploy (push) Successful in 5m32s
2026-08-05 23:52:40 +02:00
cc02023625 about page
All checks were successful
Deploy / build-deploy (push) Successful in 4m46s
2026-08-05 07:05:00 +02:00
728e48fc4f posts fix
Some checks failed
Deploy / build-deploy (push) Failing after 3m26s
2026-08-05 06:17:00 +02:00
934c94cb5c rewrite
Some checks failed
Deploy / build-deploy (push) Failing after 4m56s
2026-08-05 04:18:37 +02:00