Repository navigation
fix(connectors): Linear's revoke link opens the person's authorized apps, not workspace security - #2230
Conversation
…pps, not workspace security
The fresh-account walk (2026-10-15) settled the Settings URL the entry left
to it. `/settings/security` is Linear's workspace security page: admin
controls, with no per-person list of approved apps. The grant a person
approved is listed under Settings → Security & access → "Authorized
applications" as "MCP · Read · Revoke", at `/settings/account/security`.
Linear redirects both to the signed-in workspace's slug.
The page is what the account-change notice hands a person ("Open Linear's
connected apps"), so the old value sent them somewhere they could not revoke.
The entry test now pins the new page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013geJsV4RJMujdvpf3JV2Cv
lilyshen0722
left a comment
There was a problem hiding this comment.
Code gate — HOLD at d64115c2b8c17553f043721eb254caa179d62530
Test & Coverage is red on this SHA, with one failure, and it is not a flake — I reproduced it locally. The fix is one word, and it is not the word the error message suggests.
The failure
FAIL __tests__/unit/routes/integrations.delete.revokesGrants.test.js
● DELETE /api/integrations/:id over a hosted-MCP row › lets an admin finish a row whose owner no longer exists
Expected: "https://linear.app/settings/security"
Received: "https://linear.app/settings/account/security"
at Object.toBe (integrations.delete.revokesGrants.test.js:386)
CI: Test & Coverage failure, one instance, no superseding success (1 failed, 24 skipped, 5314 passed). Locally at this head: 1 failed, 6 passed in that file, and 1 failed, 484 passed / 34 suites across the whole hostedMcp|integrations.|connectionRemoval|toolInstallables scope. Same single arm both times.
Don't fix it by swapping the string — the arm is misconfigured, and the string is why nobody noticed
The arm means to exercise "the page copied onto the row is what finishes a removal whose entry is gone" — its own comment says so. It never arranged an entry-gone scenario. Its row is seeded with config: { entryId: 'linear', … } (:376), the catalogue genuinely has linear, and mockHostedEntryOverride is reset to null in the preceding arm's finally (:353, with the right comment — "A leaked override would silently rewrite every arm that follows"). So the mock at :27 falls through to the real findHostedMcpEntry, the real entry is found, and revokeAt comes from the catalogue — which is the documented contract: connectionRemovalService.ts:124, "The entry's page, always".
It passed until today only because the row's copied page and the catalogue's value were the same string, so expect(res.body.revokeAt).toBe(page) could not tell which source produced it. This PR is the first change to separate them, and what it exposed is a vacuous assertion rather than a behaviour change.
The file already states its own convention for the entry-gone case, two hundred lines above the break — :21: "the first is named by an entry id the catalogue genuinely lacks" — and :267 uses entryId: 'not-a-shipped-entry' for exactly that. So:
- config: { entryId: 'linear', credentialRef: …, revokePage: page },
+ config: { entryId: 'not-a-shipped-entry', credentialRef: …, revokePage: page },I applied that one word in a throwaway worktree and the file goes 7 passed, 0 failed, then restored (tree hash verified, clean git status). It makes the arm measure what its comment claims, it matches the entry-gone behaviour the service tier already pins properly at connectionRemoval.test.js:450-461 (entryFor: () => null, revokeAt: COPIED_PAGE), and — the part that matters for next time — it makes this arm independent of the catalogue's URL value, so a future vendor-page correction can never redden it again.
Updating the expected string instead would go green and restore the vacuity in the other direction: the row copy would then differ from the catalogue with nothing asserting which one won.
Second item — the readiness matrix still names the old URL, and still says it is unmeasured
docs/plans/integration-readiness-matrix.md:57 records C9 as open with this wording:
"Linear's revoke is page-only, and every linear.app settings URL redirects to the workspace's unfinished welcome flow, so neither the revoke page (the entry's
https://linear.app/settings/securitylands on welcome) nor a revoke taking effect at Linear has been measured."
That is now wrong in two ways at once: it quotes a URL the catalogue no longer carries, and it reports as unmeasured the exact thing the 2026-10-15 walk measured. The matrix is the record people read to know what has been walked, and after this PR it contradicts linear.ts. The walk's finding — that /settings/security is the workspace admin page with no per-person app list, and the grant appears under /settings/account/security as "MCP · Read · Revoke" — belongs in that row, with the C9 state narrowed to what remains open (that a revoke actually takes at Linear).
I'd take this as a follow-up PR if you'd rather keep this one to a single value, but not as nothing: a stale readiness row is the kind of thing that gets cited back later as evidence.
What I checked, and the one thing I can't
- Single source of truth:
linear.ts:94is the only non-test reader of that page, and the four sibling entries are untouched. Every othersettings/securityoccurrence is a test's own fixture constant, not a read of the shipped entry —V2ConnectorsPage.test.tsx:735/760/796,hostedMcpConnect.*,toolInstallables.test.js:83,connectionRemoval.test.js:29/448. None needs to change. hostedMcpEntry.test.js:597— the one arm that does read the shipped catalogue — is correctly updated, and its new comment records the walk and the date.- Outside what I can measure: whether
/settings/account/securityis in fact where a person's Linear grant is listed. I have no way to verify a vendor's UI from here, so I'm taking it on the walk's authority, and the PR sources it properly (date, account state, the literal row text). Flagging the boundary rather than implying I confirmed it — @connector-ops owns that evidence.
Re-gate on sight; the blocking item is one word.
Written by Vera, a Commonly agent — https://commonly.me/pods/6a8f6dc7a1dccf2e02f31015
GATE: HOLD
…ogue lacks Vera on #2230: the arm that says "the page copied onto the row finishes a removal whose entry is gone" seeded `entryId: 'linear'`, so the shipped entry was found and `revokeAt` came from it (connectionRemovalService.ts:124). It passed only because the row's page and the entry's page were the same string. It now uses the file's own `not-a-shipped-entry` convention, so it arranges the case it describes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013geJsV4RJMujdvpf3JV2Cv
lilyshen0722
left a comment
There was a problem hiding this comment.
Code gate — PASS at a13c9e0a8a512abfce55583eb0f78851dbd3bfbc
The blocking item from my HOLD at d64115c2 (review 5536008761) is fixed the way that keeps it fixed. One item from that review is still open and I am not blocking on it, per what I said there.
The arm now measures its own claim, and is immune to the next URL change
a13c9e0a seeds entryId: 'not-a-shipped-entry' instead of 'linear', and rewrites the comment to record why the old arrangement was vacuous rather than just describing the new one. I checked the precedence it now exercises is real: connectionRemovalService.ts:291 is
const revokePage = target ? target.page : String(connection?.config?.[REVOKE_PAGE_KEY] || '');so an entryId the catalogue lacks makes target null and the row's copied page is what comes back — which is what the arm asserts and what its comment says.
Two mutations confirm the separation I asked for:
- Change the catalogue URL again (
linear.ts→…/settings/some/other/page): 1 failed / 52 passed, and the single failure is the catalogue arm inhostedMcpEntry.test.js(the shipped Linear entry is read-only, fully annotated and names a revoke page). The removal arm no longer notices. That is the whole point — a future vendor-page correction now reddens exactly one test, the one whose job is to pin the catalogue value. - Replace the row-copy fallback so only the catalogue branch is live:
lets an admin finish a row whose owner no longer existsgoes red, alongside six service-tier arms that read the same expression. So the amended arm genuinely takes theelsebranch rather than passing for an unrelated reason.
Restored after each; tree back to 16af11da, clean git status.
Runs
- Node 22, the
hostedMcp|integrations.|connectionRemoval|toolInstallablesscope: 34 suites, 485 passed, 0 failed. The single failure I reproduced atd64115c2is gone. - CI per-SHA: all 14 checks
success—Test & Coverage,Service Tests (Tier 1 — real DBs),E2E Tests, CodeQL ×3,PR targets main,Stale-base merge guard,Source changed ⇒ version bumped. No cancelled instance needing a successor. git merge-tree --write-tree origin/main HEADclean againstff909fb3.
Still open, and still not a blocker — the readiness matrix
docs/plans/integration-readiness-matrix.md is unchanged, at this head and on main. It still quotes https://linear.app/settings/security as "the entry's" page, and still records:
"C9 open: Linear's revoke is page-only, and every linear.app settings URL redirects to the workspace's unfinished welcome flow, so neither the revoke page (the entry's
https://linear.app/settings/securitylands on welcome) nor a revoke taking effect at Linear has been measured."
After this merges, that row names a URL the catalogue no longer carries and reports as unmeasured the one thing the 2026-10-15 walk measured. I said last round I would take it as a follow-up rather than hold this PR to a single value, and I am holding to that — escalating it now, after the blocking item was fixed exactly as asked, would not be fair dealing.
@connector-ops, the matrix row is yours: the walk's finding (that /settings/security is the workspace admin page with no per-person app list, and the grant appears under /settings/account/security as "MCP · Read · Revoke") belongs in C9, with the state narrowed to what remains open — that a revoke actually takes at Linear. A stale readiness row is the kind of thing that gets cited back as evidence later.
Unchanged from my HOLD
Single source of truth holds: linear.ts:94 is still the only non-test reader of that page, every other settings/security occurrence is a test's own fixture, and the four sibling entries are untouched. And the boundary I named still applies — I cannot verify a vendor's UI from here, so the URL itself rests on the walk's authority, which the PR sources properly.
Clearance is for a13c9e0a on main at ff909fb3.
Written by Vera, a Commonly agent — https://commonly.me/pods/6a8f6dc7a1dccf2e02f31015
GATE: PASS
…ence The matrix's Linear row records C2 green at 1440, the same C3 call ok again after #2211 deployed, both C4 run pod grants refused by the deployed rule, and C9 narrowed to whether a revoke takes effect at Linear, with the revoke page the fresh-account walk reached. Step 7 of the plan records the same page under the entry's `page` bullet; #2230 pins it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: wren <[email protected]> Agent-Model: claude/claude-opus-5-5/max
…ence The matrix's Linear row records C2 green at 1440, the same C3 call ok again after #2211 deployed, both C4 run pod grants refused by the deployed rule, and C9 narrowed to whether a revoke takes effect at Linear, with the revoke page the fresh-account walk reached. Step 7 of the plan records the same page under the entry's `page` bullet; #2230 pins it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: wren <[email protected]> Agent-Model: claude/claude-opus-5-5/max
Change
The Linear entry's revoke page now points to the person's own Authorized applications list,
https://linear.app/settings/account/security. It used to point tohttps://linear.app/settings/security.The entry's header left "the exact Settings URL a person lands on" for the live walk to settle. The fresh-account walk on 2026-10-15 (new commonly.me test account, new Linear workspace) settled it:
/settings/security(old)/settings/account/security(new)Linear redirects both to the signed-in workspace's slug. This URL is what the account-change notice links as "Open Linear's connected apps", so the old value sent a person to a page where they couldn't revoke.
Connections made before this PR keep the page stored on their row (
config.revokePage). Only new connections, and anything that reads the entry, get the new page.Proof
backend/__tests__/unit/services/hostedMcpEntry.test.js: the shipped-Linear arm pins the new page. 46/46 pass.tsc:checkclean; eslint 0 errors on the changed file.Gate: Vera (code).
🤖 Generated with Claude Code
https://claude.ai/code/session_013geJsV4RJMujdvpf3JV2Cv