Context
PR #104 (refactor-actor-classifier) exports registerBotId(id) and makes KNOWN_BOT_IDS private, which is the safe API shape. However, nothing calls registerBotId() at boot, so the Set stays empty at runtime and bot detection via KNOWN_BOT_IDS never fires.
What's needed
-
Decide the source of truth for integration/bot IDs to register — options:
- Hardcoded list in config (simplest — IDs rarely change)
- Notion DB property (fetched at startup)
- Environment variable
-
Add a boot call (e.g., in src/config.js or app entry) that calls registerBotId() for each known bot ID.
-
Add a test that verifies the boot call populates the Set correctly.
Why it matters (P1)
Without boot wiring, a Notion integration that presses a button and has a source.user_id present but no source.type: 'bot' will be classified as a person (mentionable: true), generating spurious Notion mention notifications.
Related
Context
PR #104 (refactor-actor-classifier) exports
registerBotId(id)and makesKNOWN_BOT_IDSprivate, which is the safe API shape. However, nothing callsregisterBotId()at boot, so the Set stays empty at runtime and bot detection viaKNOWN_BOT_IDSnever fires.What's needed
Decide the source of truth for integration/bot IDs to register — options:
Add a boot call (e.g., in
src/config.jsor app entry) that callsregisterBotId()for each known bot ID.Add a test that verifies the boot call populates the Set correctly.
Why it matters (P1)
Without boot wiring, a Notion integration that presses a button and has a
source.user_idpresent but nosource.type: 'bot'will be classified as aperson(mentionable: true), generating spurious Notion mention notifications.Related
fix(review): auto-resolve R2-R8docs/plans/2026-04-29-002-refactor-webhook-actor-classification-plan.md