Do not offer a guest a provider link the controller refuses
Pre-flight for the upstream PR we-promise/sure#3656, which answers the upstream issue we-promise/sure#3655.
Same branch, same commit — the upstream PR is opened from this branch (up/member-connectable-guest-links), so there is no cherry-pick and no divergence to reconcile. This one is the fork-side gate: its CI, Gatekeeper and CodeRabbit history is the review evidence that is invisible from upstream.
The defect
The method selector shows a provider's link on Current.user&.admin? || config[:member_connectable] (_method_selector.html.erb:25), while ConnectorAuthorizable#require_connector_create! admits the request only on member_connectable? && Current.user&.member? (:32).
role is an enum of guest/member/admin/super_admin, so a guest satisfies the view and fails the controller: offered the link, refused on submit. A control that fails when used reads as a broken product rather than a permission the user does not have.
The view's comment directly above the line already states the intended rule — "a member may only connect providers whose credential is scoped to the single connection they authenticate" — so the guard is catching up with the sentence above it, not changing policy.
Reachable, checked rather than assumed
AccountableResource puts no role gate on new, so a guest can open /<accountable>/new?step=method_select and see the row.
The test
One user, one family, one variable: the role changes between the two requests and nothing else does, so a difference can only be the role. A member must be offered the link; the same user as a guest must not be.
Watched failing against the current guard: expected 0 links, found 1.
Scope
One line in the view and one test. No change to ConnectorAuthorizable, ProviderItemOwnable, or which providers are member-connectable — the controller's rule is taken as correct and the view is brought to it.
Provenance
Found by CodeRabbit on #191, where it appeared only because that PR's GitHub diff is computed against a stale base and therefore included upstream code the branch does not touch. Verified against upstream/main independently before being raised.
Which gates can actually run here
This PR is based on mirror/upstream-main, not on fork main, because the upstream PR is opened from the same branch and the diff has to be the upstream diff. CodeRabbit does not review a PR whose base is not the repository's default branch, so the CodeRabbit half of the fork-side gate cannot run on this one and its absence is not an outstanding request. The Gatekeeper review and CI do run and are the evidence here; the review request that matters for CodeRabbit is the upstream PR's own.
Verification
886 tests across the accountable controllers and the provider suites, 0 failures; erb_lint and rubocop clean.