Skip to content

Face-room poll: empty handle norms to "@", GET as=@ 404 spam in web.log #122

Closed

Description

@Birfy

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

  1. Onboard two FlyBot homes (@boxa.home, @boxb.home) with social plugin on latest main.
  2. 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.
  3. Let FlyBot's face-room poller run (it discovers the room via list_face_rooms).
  4. Inspect ~/.dsh/bot/flybot-social-settings.json → faceRooms.<id>.asBot is "@" and asBots is ["@"].
  5. Watch web.log: repeated FaceRoomError: That room is not available. / code: 'face_room_not_found'.

Direct API check:

  • GET /v1/face-rooms/<id>?as=%40 → 404 face_room_not_found
  • GET /v1/face-rooms/<id>?as=%40boxa.home → 200
  • GET /v1/face-rooms/<id> (no as) → 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 as or use a real handle from my_bots / membership.
  • face_room_not_found for 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions