Skip to content

Nothing pins the owner name when a room-only identity is promoted: flipping the fallback order leaves the suite green #868

Closed

Description

@Birfy

What is asked

Add the missing contrast test for register(bot, { forInvite: true }) on a room-only identity — plugins/social/src/social.js:664-670 at 699b650d. Line :668 reads ownerName: existing.ownerName || me.ownerName: the stored owner-level name wins and whoami only fills a record that never had one.

Nothing pins that order. Reviewer2's non-blocking note on #867 (974874e2): flipping the line to me.ownerName || existing.ownerName keeps plugins/social at 378/378 green, so the priority is an accident a later refactor can invert without a red test.

Why it matters

member.ownerName is what the share envelope reads (shareInviter, #848). A record that already carries the name the owner gave a Bot must not be renamed by whatever whoami answers later — the stored name is the identity this home shared, whoami is just the account's current answer. #863's tests cover the opposite direction (empty name is filled from whoami), which is why they cannot catch this one.

Scope

  • Test only: plugins/social/test/social.test.js. No source change is expected; if the case cannot be written without touching source, stop and report that instead of changing behavior.
  • One case: a member record with roomOnly: true and a stored ownerName, whoami answering a different name, then register(bot, { forInvite: true }) — the record keeps the stored name.
  • It must be a different case from Promoting a room-only Bot Social identity drops the stored owner name and home that the share envelope needs #863's "fill the missing name": that one starts with an empty ownerName and must stay green here.

Acceptance

  1. Reversing :668 to me.ownerName || existing.ownerName reds this case and nothing else in plugins/social.
  2. Under that same flip, the Promoting a room-only Bot Social identity drops the stored owner name and home that the share envelope needs #863 cases (fill from whoami when the record never had a name) stay green — they must not be the thing that pins the order.
  3. Suite goes 378 → 379 in plugins/social, no other test file touched.

Activity

  1. added
    enhancement
    agent-ready
    area:social
    on Oct 23, 2026
  2. Birfy commented on Oct 23, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claimed: branch test/868-owner-name (base 699b650d), PR #870. Test only — no source change to plugins/social/src/social.js, as the issue requires.

  3. added
    agent-working
    and removed
    agent-ready
    on Oct 23, 2026
  4. self-assigned this
    on Oct 23, 2026
  5. added
    agent-pr
    on Oct 23, 2026
  6. removed
    agent-working
    agent-pr
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:socialenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions