Repository navigation
feat(companies): no company can take the mcp or oauth handle - #863
Conversation
The Patchy MCP door answers at <instance>/mcp and its authorization server at <instance>/oauth/..., so neither may ever be a company's handle (docs/product.md, The door). Create-or-join now refuses both with the existing "is reserved" message. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review: GPT-6.1-Sol (xhigh), one round on 6365c62. No findings: nothing blocking, nothing non-blocking, no nits. What it checked:
Its only note was the post-deploy second check on #833, a release gate outside this PR. |
Acceptance: PASS with notesChecked Done means
Golden journeys
Evidence and risks checked Direct HTTP checks on the fresh head instance: CI is green on the checked head, including browser, live Clerk, packed CLI, tier 2, and Postgres concurrency suites. The PR head was unchanged immediately before posting. Rollback answers: match the diff. Only the reservation list and its test change. A revert reopens the names; it leaves no new schema, changed data shape, infrastructure, or wire/CLI contract that an earlier release could not read. No Surface audit: company creation and the shared Join validation apply. No mirrored API/CLI, dev-loop, glossary, migration, resource, HTML policy fixture, skill, or package-layout update is needed. Not run
Notes
|
…874) ## What changed Release 16's What's new entry, written from `dd3f41f`. It covers everything merged since release 15's `through` (`9e4b0df`), and sets the `patchy` release to `0.16.0` (`packages/patchy/package.json` and `CURRENT_RELEASE`). | Change | PRs | | --- | --- | | Fixed: Revoke all machines stops logins still on their way | #867 | | Behind the scenes: `mcp` and `oauth` kept off company addresses | #863 | | Behind the scenes: read-only actions and agent tools understood and enforced before anything writes them | #868 | | Behind the scenes: logs record how long a tool's server takes to start | #865 | #814 is release 15's own entry, so it's left out. #818 and #831 are docs (Patchy is live; the Patchy MCP spec) and #864 is dev tooling, so none of them gets a line. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. #867 is the only change a person could notice. The page's button is still labelled "Revoke all machines" (Disconnect everything is the spec's future name), so the entry uses that label. - **Rollback safety, from the live commit `d77baaf` to `dd3f41f`.** No PR in the range is labelled `one-way`, and every PR answers both Release impact questions with "Yes". - #867 is the only migration: `0019_credentials_ended` adds two nullable columns, `users.credentials_ended_at` and `device_logins.confirmed_at`. At `d77baaf`, every insert into `users` and `device_logins` lists its columns, and nothing reads either table with `SELECT *`. - `rollback-rehearsal` passed on #863, #865, #867 and #868. #868's run covered #867's migration already on main: `Exercised rollback paths passed: d77baaf → ffe9988 → d77baaf`. - A rollback would reopen what #867 closes: an approved login that hasn't finished could again get past Revoke all machines. It would also let new companies take the `mcp` and `oauth` addresses (#863). No release that writes read-only actions or agent tools has shipped, so going back past #868 leaves nothing behind. ## How it was verified - `vitest run packages/core/src/whatsNew.test.ts packages/api/src/schemas.test.ts`: 14 passed. - `pnpm typecheck`: 23 of 23 tasks pass. Prettier and eslint are clean on the changed files. - The live commit was pinned from `/healthz/deep` (`d77baaf`, release 15). The Deploy run updated last succeeded, and none is unfinished. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required The changelog text plus the `patchy` version bump. A CLI installed before this deploy is told to upgrade, as with every release. - **What does a revert leave behind?** Nothing. People whose seen marker reached 16 would just see no new release. - **Does the release before it still work with that?** Yes. If this release misbehaves, roll back to `d77baafcf10c7cdf28c71bd65ea1a0009aa99ced` (release 15). Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
Patchy MCP's door will answer at
<instance>/mcpand its authorization server at<instance>/oauth/…(The door). Until now a company could claim either name as its handle, and its addresses would then collide with those paths.mcpandoauthnow join the reserved handles, so create-or-join refuses them with the existing "is reserved" message.This ships alone, before the rest of #833's stack. That way, even a production rolled back to a release without the door keeps both handles free.
Part of #835, which stays open until the post-deploy second check is posted on #833.
Look at
No production company holds either handle. Read-only query of production's companies, 2026-10-22: no company holds either handle.
The two handles are refused.
packages/companies/src/Companies.test.ts› "keeps the MCP door's and its authorization server's paths off company handles". It fails onmainand passes here:How it was verified
vitest runfor@patchy/companies, with the new test red first and then green, as shown above.pnpm verifyon the head: 8 of its 9 suites passed. In the offlinetestsuite, one unrelated test timed out at 5 s while the shared machine's load average was about 40:PgliteCompanyDatabases› "meters retained local authority once and stops on disposal". It passed when rerun alone (3/3).Release impact
Two entries are added to an in-code list. There is no schema, API or CLI change, and no existing company holds either handle.
Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).