Repository navigation
A Bot's new Bot Social identity gets its look again (part of #182) - #377
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8d22ee2e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const painted = await call('update-bot', { id: 'a', color: 'deepseek', avatar: { shape: 'whale' } }) | ||
| assert.equal(painted.ok, true, painted.error?.message) | ||
| const server = mockServer() | ||
| server.tools.update_bot_profile = (a) => ({ bot_id: a.bot_id, avatar: a.avatar, color: a.color, avatar_kind: 'preset' }) |
There was a problem hiding this comment.
Pin the mocked response to the real server shape
The new update_bot_profile stub returns a Bot Social answer with no comment tying that shape to a server commit or read-only response. When the upstream answer evolves, this fixture can remain green against an unverified contract; the open mock-answer lesson requires checking the exact server shape and naming the Bot Social commit, so pin this fixture before relying on the regression test.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Done in 78aeaef: the stub now returns Bot Social's real answer (Birfy/bot-social 59ed07a, src/platform.ts updateBotProfile -> publicBot(bot, true) plus src/bot-look.ts lookOf), with that commit named in the comment. FlyBot only needs the call to succeed.
Part of #182 (a Bot looks different on each home). Not closing it: the own-home case in the self-test (B's own Chief drawn as a whale in the waiting dialog and a blob in details) still needs a live recheck.
Problem
syncBotLookremembered "look sent" per local Bot id (settings.lookSynced[bot.id] = fingerprint). A face-to-face join of a Bot with no person-grant registers a room-only Bot Social identity, and that identity is revoked after the Bot's last face room (releaseRoomOnlyIdentity). The next room registers a new identity with a newbot_id, butlookSyncedstill matched, so the new identity never got the colour and avatar. Other homes then read no look in face-roommembers[]and draw the handle-seeded default (orange cat vs blue whale).Change (
plugins/social/src/social.js)<member bot_id>|<look fingerprint>, so a new identity always gets the look.avatar: null, color: null) is still sent only to an identity that had one; an old record (look only, no identity) counts as the current identity's, so nothing is lost on upgrade. Old records send the look once more after the upgrade.docs/subsystems/social.md(A friend's Bot ignores the owner's chosen avatar: the same Bot looks different in each home (follow-up to #84) #137 paragraph) says so; changelog fragment.Tests
plugins/social/test/social.test.js:#182: a new Bot Social identity for the same Bot gets its look again: same identity sends nothing more; a newbot_idgetsupdate_bot_profilewith the whale and#4d6bfe. Fails on main (actual: 'm1').TZ=UTC ARCH_DOCS_BASE=upstream/main npm run verify(Node 24) green.No protocol change (same
update_bot_profilecall, optional fields). Risk tier T3 (plugins/social/src/*): needs a PASS and the maintainer's approval. No deploy.