Repository navigation
Description
Summary
After upgrading to 87c69408bc7f2e0911b90a2804b717a72b0e46fd, FlyBot instances that learn about a face room via list/poll (e.g. room joined through Bot Social MCP/API rather than FlyBot's own join UI) persist faceRooms[id].asBot / asBots as the literal string @. Polling then calls GET /v1/face-rooms/:id?as=@, which returns 404 face_room_not_found, and web.log fills with flybot-social: face-room get failed.
Environment
- FlyBot SHA:
87c69408bc7f2e0911b90a2804b717a72b0e46fd - Bot Social:
https://47-80-69-220.sslip.io(unchanged) - Instances:
/workspace/flybot-a:3080 (BoxA),/workspace/flybot-b:3081 (BoxB)
Repro
- Onboard two FlyBot homes (
@boxa.home,@boxb.home) with social plugin on latest main. - Join the same 6-digit face code via Bot Social MCP (
join_face_room) using each home's connector token — not via FlyBot UI join. - Let FlyBot's face-room poller run (it discovers the room via
list_face_rooms). - Inspect
~/.dsh/bot/flybot-social-settings.json→faceRooms.<id>.asBotis"@"andasBotsis["@"]. - Watch
web.log: repeatedFaceRoomError: That room is not available./code: 'face_room_not_found'.
Direct API check:
GET /v1/face-rooms/<id>?as=%40→ 404face_room_not_foundGET /v1/face-rooms/<id>?as=%40boxa.home→ 200GET /v1/face-rooms/<id>(noas) → 200
Root cause (code)
In @flybot/social/src/social.js:
const norm = handle => `@${String(handle ?? '').trim().replace(/^@+/, '')...}`norm('') / norm(undefined) returns "@" (truthy). rememberAsBot(meta, undefined) pushes that into asBots, so asBot becomes "@". pollOneFace then passes as: meta.asBot into faceNeed().get(...).
Also, when a room is first seen via list with meta === undefined, nothing seeds asBot from the list payload's my_bots[].handle.
Expected
- Empty handles must not become
"@". - Poller should omit
asor use a real handle frommy_bots/ membership. face_room_not_foundfor a still-listed room should drop or repair local meta instead of spamming every poll.
Actual
asBot: "@" persisted; dozens of face-room get failed lines per minute on both instances while the room itself is healthy.
Related
#117 (face-room UI join/messages) is fixed at API level on this SHA (owner_name present; second side sees members + room.started). This is a separate FlyBot client poll/meta bug.
Activity