Skip to content

test: the read-only suite never mounts FaceRoomOverview, and liveRoom() has no origin — the assertion would be green from birth #2229

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: b3005a0494b34f838a96d4ac9cc6f5ba
Branch: dev/1-overview-readonly-test-gap
Base: 9863992
At: 2026-11-02T23:33:48Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead
Credit: gap found while triaging P-443; lines re-read by Lead on live main.
Kind: test gap (an assertion that cannot fail)
Source: live main 986399246ff8c26bd418978785ce1199dbd239ca, read 2026-11-03T00:0xZ.

Dedupe (searched before opening)

Open issues for FaceRoomOverview: only #2228 (the defect this gap is about). false green: none about this file. social-readonly in the body: #2228, #2219 (closed, the read-only shell work) and #1748 (open, unrelated: remote-bots menu waits for a per-Bot grant). No issue covers the test gap.

The gap

plugins/social/test/social-readonly.test.js:117 (#2219: a read-only window draws no Bot Social write control) mounts two things: the FriendsBots section (:121-124) and FaceRoomCard (:128-129). It never mounts FaceRoomOverview, which is the component that draws the room view's own head row — the one #2228 is about.

The fixture makes that worse. liveRoom() (:113-115) is

{ roomId: 'r1', faceRoomId: 'frm1', status: 'open', members: [...], face: { roomId: 'frm1' } }

and FaceRoomOverview starts with if (room?.origin !== 'face-to-face') return null (plugins/social/client.js:2789). Handing today's liveRoom() to the overview renders nothing, so a "no write control" assertion written against it would be green from birth — exactly the failure mode the suite already warns about elsewhere.

FaceRoomCard does not read origin (it reads readOnlyReason(roster) at client.js:1980), so adding origin: 'face-to-face' to the shared fixture cannot change the existing card assertions.

Expected (red first on unfixed main, before #2228 merges)

  • liveRoom() carries origin: 'face-to-face' so the overview actually renders.
  • A new test mounts FaceRoomOverview with a read-only roster ({ bots: [], byId: {}, readOnly: LOCK }, the file's own readOnlyRoster() at :91) and asserts zero write tags: today it must fail listing 5 (face-leave, face-auto-send, face-auto-bot, face-invite, face-invite-mint) and 2 buttons (Leave, Create link). The failure output goes into the PR body as the red-first evidence.
  • The same mount with a writable roster still draws those 5 tags and 2 buttons — the positive control that proves the assertion is not vacuous.
  • A guard that cannot go green by emptiness: the read-only tree must still contain the status chip (assert the tree is non-empty and carries the room's status text), so a future null return fails the test instead of passing it.
  • Existing tests in the file keep passing unchanged; flybotTags (:72 helper, currently used at :126/:130) stays the way tags are collected.

Sequence

This test is red until #2228 lands, so the PR stays a draft and merges only after #2228. That ordering is the point: capture the failure on the unfixed main now, so the fix cannot be born together with a green assertion.

Scope

plugins/social/test/social-readonly.test.js only. No production file changes; if the new test needs a helper, keep it in that file. changelog.d/ entry not needed for a tests-only change unless the repository requires one for test-only PRs (check changelog.d/README.md); docs/subsystems/ needs no change.

Tier: tests-only → T1 by the path table, so the PR stays a draft until FlyBot Test posts its independent advisory PASS (and, above, until #2228 merges).

Activity

  1. HugoXK commented on Nov 3, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: b3005a0494b34f838a96d4ac9cc6f5ba
    Reason: superseded by #2233 merged tests
    At: 2026-11-03T00:30:55Z

  2. HugoXK commented on Nov 3, 2026

    @HugoXK
    ContributorAuthor

    Closing as superseded — the gap this issue describes is now covered by merged tests, so a separate PR would duplicate them.

    What this issue asked for: the read-only suite never mounted FaceRoomOverview (the component carrying the room view's own head row), and liveRoom() carried no origin, so any "no write control" assertion written against the overview would have been green from birth.

    What closed it: #2233 merged as 74503d8e4f816de89004a660bc1667228652aeee (merged_at 2026-11-03T00:30:19Z) adds three tests to plugins/social/test/social-readonly.test.js that do exactly both things:

    • overviewRoom() (:232-237) is a fixture with origin: 'face-to-face' and a live face block, and the helper overview() (:239-242) mounts FaceRoomOverview itself — no longer FaceRoomCard standing in for it;
    • #2228: a read-only window draws no room-overview write control (:244-257) asserts zero face-leave / face-auto-send / face-auto-bot / face-invite / face-invite-mint tags and no Leave / Create link buttons, plus the status chip still drawn;
    • #2228: a writable window keeps the three room-overview controls (:259-269) is the counter-proof, and #2228: a read-only waiting room keeps its code, drops Leave and Enter chat (:271-282) covers the second shape.

    Red-first evidence: with plugins/social/client.js rolled back to the 98639924 blob and these tests kept, plugins/social/test/social-readonly.test.js reads 8 tests / 6 pass / 2 fail (not ok 6, not ok 8) — the two read-only tests, and only those, go red. On the merged tip the same file is 8/8.

    Remaining: none that this issue named; the fixed behaviour is guarded by the tests above. If a later suite re-introduces a stand-in fixture instead of mounting the overview, that is a new issue, not this one.

    Claim b3005a0494b34f838a96d4ac9cc6f5ba released.

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