From 8eca2c3a39e12aed1d4417742cae069981ba56e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A2ni=20Marques?= Date: Fri, 10 Jul 2026 15:38:00 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20Bonfire=20guest=20local=20feed=20?= =?UTF-8?q?=E2=80=94=20outbox=20republish=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document why /@foss had posts while /feed/local was empty, and SQL to publish outbox activities into Local users + public internet feeds. --- configs/bonfire/README.md | 2 ++ configs/bonfire/public-feeds.md | 36 ++++++++++++++++++++ scripts/bonfire/README.md | 14 ++++++++ scripts/bonfire/publish-outbox-to-public.sql | 27 +++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 configs/bonfire/public-feeds.md create mode 100644 scripts/bonfire/README.md create mode 100644 scripts/bonfire/publish-outbox-to-public.sql diff --git a/configs/bonfire/README.md b/configs/bonfire/README.md index 61b8b3d..3950f7d 100644 --- a/configs/bonfire/README.md +++ b/configs/bonfire/README.md @@ -10,3 +10,5 @@ | FEDERATE (2026-07-10) | `2026/2026-07-10--bonfire-federate.md` | Secrets: `koopa-admin-secrets/…/koopa-bonfire/{.env,users.env}`. + +Public timelines: `public-feeds.md`. diff --git a/configs/bonfire/public-feeds.md b/configs/bonfire/public-feeds.md new file mode 100644 index 0000000..138802c --- /dev/null +++ b/configs/bonfire/public-feeds.md @@ -0,0 +1,36 @@ +# Bonfire public timelines (guest) + +## Symptom + +Profile `@foss` shows posts, but `/` and `/public` can look empty +(“That’s all for the last 30 days…”). **Local feed** should list instance posts. + +## Root cause (2026-07-10) + +Posts were only in the author **outbox** feed, not in: + +| Feed | Pointer UUID | +|------|----------------| +| Local users | `797632fc-029e-06f0-1031-410d73a5558e` | +| Anyone on the internet | `0aab414c-eb0a-ac1d-8c81-ef0d74ec55da` | + +Outbox feed (example foss): `019f487a-df20-4ed0-a334-40ec3eac23e7`. + +## Fix applied + +SQL: copy all `bonfire_data_social_feed_publish` rows from the user outbox +into the two public feeds (see `scripts/bonfire/publish-outbox-to-public.sql`). + +## Verify + +```bash +curl -sS http://127.0.0.1:9021/feed/local | grep -c gitbot +# or open https://bonfire.hacktivism.ch/feed/local +# profile: https://bonfire.hacktivism.ch/@foss +``` + +Note: Guest **Front page** (`/`) may still emphasise Spotlight (empty until pins). +Prefer **Local** (`/feed/local`) for the public instance timeline. + +`FEDERATE=true` in env; UI may still show “Federation disabled” if app +`activity_pub` instance `federating` was false until runtime refresh. diff --git a/scripts/bonfire/README.md b/scripts/bonfire/README.md new file mode 100644 index 0000000..8bee038 --- /dev/null +++ b/scripts/bonfire/README.md @@ -0,0 +1,14 @@ +# Bonfire host helpers + +Live: `/home/hernani/koopa-bonfire/`. + +| File | Role | +|------|------| +| `publish-outbox-to-public.sql` | Copy outbox activities into Local users + Anyone on the internet feeds | + +```bash +podman exec -i koopa-bonfire-db psql -U postgres -d bonfire_db \ + < scripts/bonfire/publish-outbox-to-public.sql +``` + +See `configs/bonfire/public-feeds.md`. diff --git a/scripts/bonfire/publish-outbox-to-public.sql b/scripts/bonfire/publish-outbox-to-public.sql new file mode 100644 index 0000000..e94842a --- /dev/null +++ b/scripts/bonfire/publish-outbox-to-public.sql @@ -0,0 +1,27 @@ +-- Republish activities from a user outbox feed into guest-visible public feeds. +-- Default outbox = foss (adjust OUTBOX_FEED if needed). +-- Run: +-- podman exec -i koopa-bonfire-db psql -U postgres -d bonfire_db < publish-outbox-to-public.sql + +\set OUTBOX_FEED '019f487a-df20-4ed0-a334-40ec3eac23e7' +\set FEED_INTERNET '0aab414c-eb0a-ac1d-8c81-ef0d74ec55da' +\set FEED_LOCAL_USERS '797632fc-029e-06f0-1031-410d73a5558e' + +INSERT INTO bonfire_data_social_feed_publish (id, feed_id) +SELECT fp.id, :'FEED_INTERNET'::uuid +FROM bonfire_data_social_feed_publish fp +WHERE fp.feed_id = :'OUTBOX_FEED'::uuid +ON CONFLICT DO NOTHING; + +INSERT INTO bonfire_data_social_feed_publish (id, feed_id) +SELECT fp.id, :'FEED_LOCAL_USERS'::uuid +FROM bonfire_data_social_feed_publish fp +WHERE fp.feed_id = :'OUTBOX_FEED'::uuid +ON CONFLICT DO NOTHING; + +SELECT n.name, count(*) +FROM bonfire_data_social_feed_publish fp +LEFT JOIN bonfire_data_social_named n ON n.id = fp.feed_id +GROUP BY 1 +ORDER BY 2 DESC +LIMIT 15;