From af2d4b8a0f00b703218bc68b63f1bf48a34ede07 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Sat, 28 Mar 2026 23:25:03 +0100 Subject: [PATCH] docs: document startup-gate usage in CLAUDE.md --- CLAUDE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 08da7a9..26d2361 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -589,6 +589,15 @@ On restart, `refollow:pending` entries are reset to `import` to prevent stale cl } ``` +## Startup Gate + +This plugin uses `@rmdes/indiekit-startup-gate` to defer background tasks until the host signals readiness (after Eleventy build completes). This prevents resource contention during the build. + +**Deferred:** `startBatchRefollow()`, `scheduleCleanup()`, `loadBlockedServersToRedis()`, `scheduleKeyRefresh()`, timeline backfill, `startInboxProcessor()` +**Immediate:** Routes, federation context, inbox HTTP handlers, `runSeparateMentionsMigration()` + +See workspace CLAUDE.md for the full startup-gate pattern. Any new background tasks added to this plugin MUST be wrapped in `waitForReady()`. Inbox routes MUST remain immediate — they receive inbound federation traffic regardless of build state. + ## Publishing Workflow 1. Edit code in this repo