fix: request issue, agent tool, and page OAuth scopes - #119
Conversation
There was a problem hiding this comment.
Changes requested: The new default scope request depends on a production OAuth client allowlist update that the PR says is still outstanding.
Warning
Changes requested · head 157b18a · 1 finding: 1 major
| Severity | Finding | Where |
|---|---|---|
| major | F1 Update the production OAuth client allowlist before requesting these scopes | src/auth/oauth.ts:41 |
Full review
F1 (major, high confidence): The PR states that the production “Polylane CLI” OAuth client does not yet allow these seven scopes, but both browser and device login now request them unconditionally. Until the allowlist is updated, a fresh login may fail with invalid_scope or receive a token that still cannot list issues. Confirm the production allowlist change and a fresh-login polylane issue list replay before shipping.
|
Plan runner — U1 waiting for a person ⏸️ Waiting for a person after 1 review round: #119 — every finding of review round 1 is human-gated, a receipt only a person can produce: F1 (major) — Update the production OAuth client allowlist before requesting these scopes. The unit stays live; no unanswered fix round was opened. Severity addressed: minor and above (set by org). The next reply in this unit thread or authorized pull request comment becomes the fix round's answer; review then runs again. |
|
F1 is addressed. I updated and read back the production "Polylane CLI" OAuth client: it now allows all seven scopes added by this PR, and its allowlist exactly matches the PR's 64-scope login request. The current client API rejected nine retired I built this exact PR head with the production client in an isolated local profile, completed a fresh production device login, confirmed the token includes |
157b18a to
92cc667
Compare
Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
92cc667 to
b92d2a3
Compare
There was a problem hiding this comment.
LGTM: The seven scopes are requested by both login flows, and the production allowlist and fresh device-login issue-list replay address F1.
Note
Approved · head b92d2a3 · no findings
Full review
F1 is resolved by the documented production allowlist update and fresh device-login issue-list replay. No remaining findings at b92d2a3.
Summary
Request the seven issue, agent tool, and page scopes exposed by current CLI commands during browser and device OAuth login.
Root cause
The CLI's static login scope list was not updated when these permission families were added in July. The production "Polylane CLI" OAuth client also omitted them. A fresh login on CLI 0.2.28 or 0.2.45 therefore cannot grant
issues:read, even to a workspace admin.GET /v1/scopeslists available scopes, not a token's grants.The reported MCP API key is a separate credential. Its key ID and grant history still need validation before customer handoff.
Verification
npm run typecheck,npm run lint,npm run test(537 passing),npm run build, andgit diff --checkpassed locally on this two-file change. CI runs Node 20/22/24 on the rebased head.oauth_client_db0e300c0001s66dhw481fxnwas updated and read back: all seven new scopes are allowed. The nine retiredwikis,automations, andskillsscopes were removed because the current client API rejects them. Every scope in this PR's login request is allowed by the live client.issues:read, andpolylane issue list --limit 1succeeded against production. An existing CLI session also refreshed successfully after the client update. The temporary test tokens were revoked.Release follow-through
After human merge, cut and verify the new CLI release and installer. Then confirm a fresh login and issue listing with the released build, inspect the customer's MCP API key grants or have them replace an old installer key, and only then send the customer handoff.