Repository navigation
feat(bots): third-party bot installs, message buttons, and bot SDK fixes - #370
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Oct 31, 2026 in 57s
Confidence 8/10 · No issues found
🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 3 defects.
1 note · tests covered · 3 defects fixed in earlier rounds
Follow-up fixes on the bot-install PR: a malformed user id no longer voids the whole lookup, message events carry no author once that user is deleted, and a signed-out visitor gets a sign-in button instead of a dead retry. The changes read clean. The McpQueryError issues whose frames point at page/registry.ts are not addressed — that diff only registers the new route.
Before merge
- Migration · Check it is safe on production data and with the code still deployed ·
packages/db/migrations/directory/0002_bot_install_oauth/migration.sql
Still open from earlier reviews
- 🔵 Note · F4 · READY frame's
botId/botUserIdare plain strings, not branded ids ·packages/domain/src/bot-gateway.ts:190
Fixed since the last review
- ✅
F5 · Deleted-author branch inauthorOfis not tested
Production impact
Open errors in the changed files (2)
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/mcp/errors/McpQueryError (6 issues) | maple-chat | 1.3k | apps/web-foldkit/src/page/registry.ts |
| @maple/mcp/errors/McpQueryError (4 issues) | maple-ai | 349 | apps/web-foldkit/src/page/registry.ts |
After this merges, Maple checks whether they stop.
Telemetry this change adds and removes (9)
- ➕ span name
ApiV1.redeemBotInstall·apps/backend/src/routes/api-v1/bots.http.ts:77 - ➕ span name
ApiV1.createThread·apps/backend/src/routes/api-v1/bots.http.ts:130 - ➕ span name
ApiV1.listOrganizationUsers·apps/backend/src/routes/api-v1/bots.http.ts:152 - ➕ span name
ChannelObject.messageThread·apps/backend/src/worker/objects/channel/api-messages.ts:89 - ➕ attribute
botGateway.interaction·apps/backend/src/worker/objects/effects/bot-gateway-effects.ts:88 - ➕ span name
OrgObject.mintInstallGrant·apps/backend/src/worker/objects/org/bot-install-grants.ts:37 - ➕ span name
OrgObject.redeemBotInstallGrant·apps/backend/src/worker/objects/org/bot-install-grants.ts:73 - ➕ attribute
bot.id·apps/backend/src/worker/objects/org/bot-install-grants.ts:109 - ➕ span name
OrgObject.botUsers·apps/backend/src/worker/objects/org/bot-install-grants.ts:125
What was checked
UserIdcarriesisUUID()(packages/schema/src/ids.ts:43), sonot-a-uuidis dropped per id and the users test fails if the whole-array decode returns- The deleted-author test can fail:
messageEventEnvelopeomitsauthorwhen it is undefined (bot-gateway-service.ts:41) andauthorOffiltersdeletedAt registry.tsonly addsBotInstall.page, so none of theMcpQueryErrorissues from it are addressed
ee1f670 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading