Commit Graph

348 Commits

Author SHA1 Message Date
Sven
0886b4b01e Merge remote-tracking branch 'origin/claude/fix-activitypub-og-image-CrCGI' 2026-03-28 19:52:53 +01:00
Claude
f19f7e1741 fix(ap): correct webfinger patch snippet to match current fork (318720c)
The OLD_SNIPPET had wrong indentation (8 spaces vs 6) and was missing the
method guard line added in the fork:
  if (req.method !== "GET" && req.method !== "HEAD") return next();

Without this fix the patch silently skips patching and webfinger continues
to return 302 → 401 on fediverse delivery.

https://claude.ai/code/session_0124D41vdLYE3DkJxhPqYthX
2026-03-28 18:51:16 +00:00
svemagie
7dab6d6ed8 Merge pull request #3 from svemagie/claude/fix-activitypub-og-image-CrCGI
fix(ap): wire og-image and webfinger-before-auth patches into postins…
2026-03-28 19:40:53 +01:00
Claude
7c404a19ed fix(ap): add og-image and webfinger patches dropped during conflict resolution
The Gitea conflict resolution kept main's prom-client/metrics-shim/microsub
changes but dropped our two new AP patch registrations. Re-add them to both
postinstall and serve.

https://claude.ai/code/session_0124D41vdLYE3DkJxhPqYthX
2026-03-28 18:35:29 +00:00
svemagie
bf9af6ff30 Merge branch 'main' into claude/fix-activitypub-og-image-CrCGI 2026-03-28 19:30:46 +01:00
Claude
ebf17341ee fix(ap): wire og-image and webfinger-before-auth patches into postinstall/serve
- Add scripts/patch-ap-og-image.mjs to both postinstall and serve so OG
  preview images are included in ActivityPub activities (flat URL slug
  extraction instead of date-based regex).
- Add scripts/patch-ap-webfinger-before-auth.mjs (new file) to both
  postinstall and serve. Extends contentNegotiationRoutes Fedify delegation
  to also forward /.well-known/* paths, ensuring webfinger is served by
  Fedify before indiekit auth middleware can issue a 302 redirect. Fixes
  401 Unauthorized errors from remote fediverse instances.

https://claude.ai/code/session_0124D41vdLYE3DkJxhPqYthX
2026-03-28 18:25:59 +00:00
Sven
fc77e72a97 chore: add prom-client to package-lock.json
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 16:12:51 +01:00
Sven
c9084f0586 feat: add Prometheus metrics shim for Indiekit process monitoring
Preloads metrics-shim.cjs via `node --require` into the Indiekit process
so heap, GC, event loop lag, CPU and handle metrics are exposed at
:9209/metrics for Prometheus scraping. Uses prom-client collectDefaultMetrics.

- Add metrics-shim.cjs (prom-client HTTP server, port 9209)
- Add prom-client ^15.1.3 to dependencies
- Wire --require ./metrics-shim.cjs into start.example.sh and npm serve script
- Grafana: NodeJS Application Dashboard (11159) at console.giersig.eu

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 16:06:21 +01:00
Sven
78f0b80dbd chore: update AP fork lockfile pin to 318720c (upstream timeline content synthesis) 2026-03-27 20:33:55 +01:00
svemagie
54d0e46ff8 Merge pull request #2 from svemagie/claude/fix-activitypub-og-image-CrCGI
Claude/fix activitypub og image cr cgi
2026-03-27 20:00:34 +01:00
svemagie
034e944c9d Merge branch 'main' into claude/fix-activitypub-og-image-CrCGI 2026-03-27 20:00:25 +01:00
Sven
e34decb59e docs: document inbox signature suppression and OAuth state fix 2026-03-27 16:55:54 +01:00
Sven
5d7789ead6 fix(oauth): update lockfile pin to b54146c (echo OAuth state parameter) 2026-03-27 16:47:57 +01:00
Sven
9126058df7 fix(docs): INTERNAL_FETCH_URL must point to Indiekit directly, not nginx
nginx HTTP/80 returns 301 → HTTPS; pf has no hairpin NAT for jail traffic,
so following the redirect causes UND_ERR_SOCKET on every internal POST.
Correct value: http://10.100.0.20:3000 (direct to node jail).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:53:11 +01:00
Sven
0cc5187990 fix(media-browser): fix mixed-content error causing 'Browse media' to fail
`getEndpointUrls()` resolved relative endpoint paths (e.g. `/media`) using
`getUrl(request)`, which returns `http://` because Express sees HTTP from nginx
without trust proxy. This produced `http://blog.giersig.eu/media` as the
endpoint attribute in the file-input component, causing Safari to block the
fetch as mixed content ('Load failed').

Fix: prefer `application.url` (the configured HTTPS base URL) over
`getUrl(request)` when resolving relative endpoint paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:29:02 +01:00
Sven
128ed58e57 chore: update AP fork lockfile pin to 9b6db98 (suppress inbox signature noise) 2026-03-27 10:15:38 +01:00
Sven
02f7db46e1 fix(media): fix image upload size limit and session token bug
- nginx: add client_max_body_size 20M to blog vhost (default 1MB was
  silently killing uploads, returning 413 as a JSON parse error in UI)
- patch: fix session.token → session.access_token in micropub action
  controller; caused Bearer undefined on internal /media fetch, giving
  500s for Micropub clients that upload files directly (OwnYourSwarm)
- npmrc: add sharp_from_source=true to survive future npm install on
  FreeBSD without breaking sharp's native bindings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:13:30 +01:00
Sven
88c988947b docs: document livefetch v6, poller direct-connect fix, nginx 444 root cause
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 09:57:31 +01:00
Sven
ea20d10501 chore: build sharp from source for FreeBSD compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 09:54:44 +01:00
Sven
8e7527ff7f fix(start): webmention poller connects directly to Indiekit, not nginx
nginx port 80 returns 444 (no response) for requests with an unrecognised
Host header. The poller's curl sends Host: 10.100.0.10 (the IP) which
doesn't match any server_name, causing the 180s readiness timeout and
"empty reply from server" on every poll.

Since livefetch v6 builds synthetic HTML from stored properties and no
longer fetches live pages, the poller no longer needs to go through nginx.
It now connects directly to Indiekit on INDIEKIT_BIND_HOST:PORT.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 09:52:24 +01:00
Sven
8464e2140c docs: document 2026-03-27 upstream merge and post-merge fixes 2026-03-27 09:49:18 +01:00
Sven
7cca6a605f chore: update AP fork lockfile pin to 69ae731 (fix rate-limit trust proxy error) 2026-03-27 09:43:27 +01:00
Sven
2670cfc9fa chore: update AP fork lockfile pin to 6f76ec4 (fix resolveAuthor import) 2026-03-27 09:40:12 +01:00
Sven
e4da0f99af chore: update AP fork lockfile pin to b595734 (fix missing tokenRequired imports) 2026-03-27 09:35:54 +01:00
Sven
ad58bc45db chore: update AP fork lockfile pin to 230bfd1 (upstream v3.9.x merge)
Fedify 2.1.0, 5 FEPs (Tombstone, Activity Intents, indexable, NodeInfo,
Collection Sync), security audit fixes, architecture refactor (syndicator.js,
batch-broadcast.js, init-indexes.js, CSS split). All fork patches retained:
DM support, pin/unpin, edit post, timeout guard, signed fetch, ap_timeline mirror.
2026-03-27 09:31:51 +01:00
Sven
77442ec837 chore: update AP fork lockfile pin to 42f8c2d (own posts in ap_timeline)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 20:46:14 +01:00
Sven
3b2925d764 docs: document linkify trailing punctuation fix (bd3a623)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:57:48 +01:00
Sven
b28443c844 chore: update AP fork lockfile pin to bd3a623 (linkify trailing punct fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:57:15 +01:00
Sven
e63734ee2a fix(start): kill node process on service stop to prevent orphaned port binding
Trap previously only killed the webmention poller, leaving the node process
orphaned on service stop. On restart, the new node instance would fail to bind
port 3000 (EADDRINUSE) causing 502s with clean logs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:12:56 +01:00
Sven
a7b48a2606 docs: document edit post implementation (e319c34)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:33:41 +01:00
Sven
0a973266fc chore: update AP fork lockfile pin to e319c34 (edit post)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:33:12 +01:00
Sven
359db32858 docs: document pin/unpin status implementation (b5ebf6a)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:17:07 +01:00
Sven
ec856c962d chore: update AP fork lockfile pin to b5ebf6a (pin/unpin status)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:16:34 +01:00
Sven
ba1dbc6ceb docs: document timezone-aware status lookup fix (2660a1a)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 10:54:16 +01:00
Sven
7b5d1ed2c6 chore: update AP fork lockfile pin to 2660a1a (timezone-aware status lookup)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 10:53:47 +01:00
Sven
36c7f33a34 feat(changelog): add chore and refactor commit categories
The patch now recognises chore: and refactor: commit prefixes as their
own categories instead of lumping them into "other".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:05:04 +01:00
Sven
bc73558641 docs: document upstream raw signed fetch fallback merge (b33932f)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 09:33:41 +01:00
Sven
42e06f31f8 chore: update AP fork lockfile pin to b33932f (raw signed fetch fallback)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 09:32:59 +01:00
Sven
989ae4cb5d chore: update AP fork lockfile pin to 01f6f81 (favourite + profile fixes)
package-lock.json was pinned to 7b838ea, meaning all fixes since
(favourite 404, resolveAuthor timeout, avatar cache, created_at
normalisation) were never installed on the server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 08:52:25 +01:00
Sven
25bcce2f1a docs: document resolveAuthor timeout fix for favourite/reblog (01f6f81)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 08:40:04 +01:00
Sven
78b9f77d96 docs: document favourite 404 fix and profile avatar/created_at fixes (a259c79, da89554)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 08:31:36 +01:00
Sven
5f388bc9d5 docs: document follower created_at fix and URL-type AP lookup (6c13eb8)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 07:31:23 +01:00
Sven
615dcd849d docs: document DM no-data and 404 follow-up fixes (4816033, 7b838ea)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:25:40 +01:00
Sven
61fbdcd7ae docs: document remote profile fix (lookupWithSecurity + timeouts)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:24:42 +01:00
Sven
728fa9d682 fix(deps): update activitypub fork (addTimelineItem wrong arg in DM path)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:04:03 +01:00
Sven
777b2cc306 fix(deps): update activitypub fork (DM no data — full status response)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:57:50 +01:00
Sven
2379a5e1d5 docs: document Mastodon API DM public post leak fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:48:43 +01:00
Sven
6678c67972 fix(deps): update activitypub fork (DM visibility=direct public post leak)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:45:28 +01:00
Sven
df4e4061a1 docs: document Mastodon client like/reblog fix and patch cleanup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:29:27 +01:00
Sven
ab1912b24b fix(deps): update activitypub fork (resolveAuthor collection.get fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:28:24 +01:00