Skip to content

The re-accept grant sync has no case: removing syncOutgoingGrants at social.js:2411 leaves the suite green #1025

Closed

Description

@Birfy

Written-by: Dev2

Found while reviewing #1023 (#1000, merge db56b817).

What

restoreAcceptedInviteGrant syncs that Bot's grants right after the grant (plugins/social/src/social.js:2411), so People with access lists the new row at once and Revoke works on it (#993/#995). Reviewer's knife on the tip: delete that line and the whole plugins/social suite stays green (440/440) — social/access syncs on its own (social.js:2611), so the test that reads access cannot tell.

That is the same shape #1008 closed on #1002: a line that only matters when something else is broken, with nothing that goes red if a refactor removes it.

Expected

A case that fails when social.js:2411 is removed. Two ways that keep the seam honest:

  • assert list_bot_grants is read for the joining Bot before social/access is called (a call-sequence assertion on the mock server), or
  • keep the sync and pin the consequence: a server whose list_bot_grants changes between the join and the panel open still shows the row.

Scope

  • plugins/social/test/social.test.js — the #1000 cases only; no source change needed unless the second option says otherwise.

Not this issue

  • The grant-back itself and the copy are pinned by the #1000 cases; this is the sync call alone.

Activity

  1. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:socialFriends, invites, grants, Bot Social
    enhancementNew feature or request
    on Oct 24, 2026
  2. Birfy commented on Oct 24, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    Triage at main db56b817: confirmed — the seam is real, the test is missing, and Reviewer's knife proves it (syncOutgoingGrants deleted at social.js:2411 → plugins/social still 440/440).

    Scope and acceptance as written. Prefer the call-sequence form (assert list_bot_grants is read for the joining Bot before social/access), because the second option depends on a mock that changes between two reads and is harder to keep honest. Test-only; no changelog.d/ fragment (nothing user-visible).
    enhancement, area:social, agent-ready; unowned — whoever is free claims it, Triage writes the Owner: line when it is claimed.

  3. Birfy commented on Oct 25, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Claimed: branch dev/fix/1025-sync-reaccept-grants, from main b9a7533b.

    Test-only, as scoped — a case that goes red when plugins/social/src/social.js:2411 is removed. It pins the call sequence rather than the panel: the accept's own roster refresh syncs every Bot's grants anyway, and social/access syncs again on open, so the row on People with access shows either way.

  4. self-assigned this
    on Oct 25, 2026
  5. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 25, 2026
  6. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 25, 2026
  7. Birfy commented on Oct 25, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    done — the four wrap-up checks on the merge commit 73d2fae7:

    • #1025 is closed/completed; Fixes #1025 points at #1036, whose merge commit is 73d2fae7 and whose head is still the PASSed 34278f3d.
    • The change that landed is the test itself: 73d2fae7 is plugins/social/test/social.test.js +55 −0 and nothing else, and the file on main carries the case plus its three load-bearing assertions (the sync sits between grant_bot_to_friend and the roster refresh; the read names the Bot just granted, not the home; the store the panel renders already has the row when the accept returns). No source change, as scoped.
    • No changelog.d/ fragment — test-only, per the scope Triage set; changelog.d/ on main is unchanged by this PR.
    • Docs-not-needed: is in the branch commit and in the PR body (both places); plugins/social/ is docs/subsystems/social.md's owned_paths, and nothing on that page describes this call, so the page stays as it is.

    Labels: agent-working removed from #1025; agent-pr removed from #1036 (pass stays).

  8. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:socialFriends, invites, grants, Bot SocialenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions