Repository navigation
appview: stop resolving #identity events from the relay firehose - #263
Conversation
@atproto/sync resolves the DID document (and verifies the handle) over the network for every #identity event on the relay. The AppView discards those events, so the lookups are pure cost. The cause logging from #262 showed the 2026-11-30 error flood was exactly this: AbortError (3s PLC timeout) for ordinary bsky.social repos, dozens per second, alongside a heap OOM every ~2.5h. #account and #sync stay enabled; they parse without network and keep the relay liveness timestamp fresh. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
🚅 Deployed to the cocore-pr-263 environment in co/core
4 services not affected by this PR
|
🛠️ Provider build (macOS arm64) — menu-bar app + CLIBuilt from 🔌 Pre-wired to this PR's stack — the app defaults to ⬇️ cocore-mac-arm64-pr263-e90d2c0.tar.gz (GitHub artifact — requires being signed in to this repo. The zip contains the tar -xzf cocore-mac-arm64*.tar.gz && cd cocore-mac-arm64
./install.sh # installs cocore.app to /Applications + the CLI, launches the tray
CLI only? It's wired to this PR's stack too: ./bin/cocore agent pair --console https://client-cocore-pr-263.up.railway.app
./bin/cocore agent serve --advisor wss://advisor-cocore-pr-263.up.railway.app/v1/agent |
Why
Follow-up to #262. With the cause logged, the AppView error flood from 2026-11-30 reads:
Every line is a timed-out lookup, and the repos are ordinary
bsky.socialaccounts with no cocore records. In@atproto/sync0.2.2,parseIdentityresolves the DID document and verifies the handle over the network for every#identityevent on the relay. Non-matching commits return before key resolution, and#account/#syncparse without network, so identity events are the only path that does this for non-cocore repos.The AppView's
handleEventignores identity events, so those lookups are pure cost. A bulk identity wave upstream turned them into dozens of timeouts per second, coinciding with the heap OOM going from weekly to every ~2.5h.What
excludeIdentity: trueon the@atproto/syncFirehose.#accountand#syncare deliberately left on: filtered commits never reachhandleEvent, so those two event types are what keeplastEventAt(relay liveness) fresh.Not established
That this stops the heap growth. It removes the lookup flood; the slow weekly leak predates it and may be separate. Heap needs watching after deploy.
Testing
oxfmt --check,tsc -p . --noEmitinpackages/appview— cleanvitest run src/indexer/relay-firehose.test.ts— 6 passedbetter-sqlite3native module was not built for the local Node), so CI is the check for those🤖 Generated with Claude Code