docs: Bonfire guest local feed — outbox republish notes

Document why /@foss had posts while /feed/local was empty, and SQL to
publish outbox activities into Local users + public internet feeds.
This commit is contained in:
Hernâni Marques 2026-07-10 15:38:00 +02:00
parent 730389b97d
commit 8eca2c3a39
No known key found for this signature in database
4 changed files with 79 additions and 0 deletions

View file

@ -10,3 +10,5 @@
| FEDERATE (2026-07-10) | `2026/2026-07-10--bonfire-federate.md` | | FEDERATE (2026-07-10) | `2026/2026-07-10--bonfire-federate.md` |
Secrets: `koopa-admin-secrets/…/koopa-bonfire/{.env,users.env}`. Secrets: `koopa-admin-secrets/…/koopa-bonfire/{.env,users.env}`.
Public timelines: `public-feeds.md`.

View file

@ -0,0 +1,36 @@
# Bonfire public timelines (guest)
## Symptom
Profile `@foss` shows posts, but `/` and `/public` can look empty
(“Thats 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.

14
scripts/bonfire/README.md Normal file
View file

@ -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`.

View file

@ -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;