Start generated ActivityPub queue worker #205
Labels
No labels
activitypub
admin
api
architecture
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
content
database
deployment
design
dev-env
diagnostics
docs
documentation
email
enhancement
feature
federation
feed
health
homepage
implementation
integration
logging
mastodon
media
navigation
npm-packages
openapi
opengraph
packages
passkeys
preview
priority:high
priority:low
priority:medium
production
proof
proxy
public-routes
public-ui
release
safety
slug-api
slug-auth
slug-core
slug-federation
slug-media
slug-template
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit#205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Generated Slugkit sites configure Fedify with
manuallyStartQueue: truebut do not start the ActivityPub queue worker during runtime startup. Incoming signed inbox activities such as MastodonFollowrequests can be accepted into the queue but never processed, leaving local follower state empty and preventing expectedAcceptdelivery.This was confirmed and fixed first in the generated
slugkit.comsite.Verified slugkit.com findings
evcraddock/slugkit-com:0.1.1.ACTIVITYPUB_ENABLED=false; ActivityPub discovery still worked, but the app did not process follows into local state.evcraddock/slugkit-com:0.1.2withACTIVITYPUB_ENABLED=true, Mastodon follow verification succeeded./users/slug/inbox,ActivityPub Follow accepted and follower saved,ActivityPub Follow Accept queued.@evcraddock@mastodon.online.https://slugkit.com/users/slug/followersreturnedtotalItems: 1.https://slugkit.com/feedrenderedFollowers 1.Steps to reproduce
Expected behavior
Followactivities are processed by the generated site.Acceptresponse.Actual behavior
0.Implementation notes from slugkit.com
Acceptqueueing.Followis processed into a follower row and queues anAccept.ACTIVITYPUB_ENABLED=true.Acceptance criteria
Followprocessing through the generated app/runtime path, including follower persistence andAcceptqueueing.ACTIVITYPUB_ENABLED=true./users/<actor>/followersand the feed/profile follower count.Synced from todu comment by @todu on 2026-06-26T18:42:28.932Z
Context from slugkit.com investigation
This came from slugkit.com task
task-becaf72b(“Troubleshoot pending Mastodon follow”). The generated site is deployed in k3s namespaceslugkit-com, podslugkit-com-6ffff6d654-n8mvs, imageevcraddock/slugkit-com:0.1.1.Observed production config from
kubectl -n slugkit-com get deploy slugkit-com -o yaml:ACTIVITYPUB_ENABLED=falseACTIVITYPUB_PUBLIC_ORIGIN=https://slugkit.comDATABASE_PATH=/app/data/slugkit.sqliteImportant behavior: even with
ACTIVITYPUB_ENABLED=false, ActivityPub discovery still appears reachable from outside: WebFinger and actor document resolve, and the actor advertises inbox/followers URLs. The current runtime config validation only usesenabledfor startup validation;registerActivityPubRoutes()still registers federation routes regardless. A template fix should decide whether this is intended. If disabled should mean no federation, discovery/inbox should likely not be exposed. If discovery is intentionally allowed while disabled, the semantics should be documented and inbox handling/logging should make that obvious.Hypothesis needing implementation/regression coverage:
src/federation/routes.tscreates Fedify withmanuallyStartQueue: true, and incoming inbox activities are enqueued by Fedify. The generated runtime currently creates the app insrc/index.tsbut does not startfederation.startQueue(...). If true, a MastodonFollowcan be accepted/enqueued at the HTTP layer but never processed byhandleActivityPubFollow(), so no row is written tofollowersand noAcceptis delivered.Relevant existing code paths in generated site:
src/app.tsregisters ActivityPub routes viaregisterActivityPubRoutes().src/federation/routes.tscallscreateFederation({ manuallyStartQueue: true, queue: ... })and registers inbox listeners forFollow,Undo,Accept,Reject,Create,Like, andAnnounce.src/federation/follow.tsalready auto-accepts valid signedFollowactivities targeting the local actor by callingupsertActivityPubFollower()andcontext.sendActivity(new Accept(...)).src/followers/followers.tspersists follower rows and powers the followers collection.Logs checked from
kubectl -n slugkit-com logs slugkit-com-6ffff6d654-n8mvs --since=48h --tail=300showed startup/auth/API logs but no ActivityPub/federation/inbox logs. A search foractivitypub|inbox|follow|followers|fedify|error|warn|POST|/users/slug|/inboxreturned no matches. The app currently lacks useful federation request/handler logging, so production cannot confirm whether Mastodon POSTs reached the app without ingress/proxy logs.Suggested implementation direction:
src/index.tsor app startup code, using the same default queue instance passed to route registration.Followthrough the generated/federation runtime path is processed, persists a follower, and queues/sendsAccept.Acceptdelivery/queueing.ACTIVITYPUB_ENABLED=falsebehavior: either do not expose discovery/inbox routes when disabled, or explicitly document that disabled only skips production startup validation/delivery behavior.Synced from todu comment by @todu on 2026-06-26T19:30:09.881Z
slugkit.com verification update
The hypothesis in this task is now confirmed by the
slugkit.comproduction test.Working generated-site patch was deployed in
slugkit.comimageevcraddock/slugkit-com:0.1.2withACTIVITYPUB_ENABLED=true.Confirmed behavior after retrying the Mastodon follow:
/users/slug/inbox.@evcraddock@mastodon.online.Accept.https://slugkit.com/users/slug/followersreturnedtotalItems: 1.https://slugkit.com/feedrenderedFollowers 1.The slugkit template should now port the slugkit.com changes into
template/siterather than re-investigating the root cause.Synced from todu comment by @todu on 2026-06-26T20:30:30.794Z
PR review: approved
PR: #206
Summary
Reviewed the PR against the task acceptance criteria. The change starts the generated ActivityPub queue worker when
ACTIVITYPUB_ENABLED=true, keeps route enqueueing and worker processing on the same queue, adds route/follow diagnostics, documents the production federation requirement, and adds regression coverage for queued signedFollowhandling through the generated app/runtime path.Acceptance criteria
Followprocessing, follower persistence, andAcceptqueueing — met.ACTIVITYPUB_ENABLED=trueis required for production federation — met.Blocking issues: 0
Warnings: 0
Verdict: approved. CI is green.
Synced from todu comment by @todu on 2026-06-26T20:32:29.365Z
Closing summary
PR #206 was reviewed, CI passed, and the PR was merged into
main.Acceptance criteria were satisfied:
ACTIVITYPUB_ENABLED=true.Followis processed through the generated app/runtime path, persists a follower, and queues anAccept..env.exampleclarify that production federation requiresACTIVITYPUB_ENABLED=true.Local
mainwas fast-forwarded after merge and the feature branch was cleaned up.