Repository navigation
feat(guests): share a private tier 1 patch with someone at another company - #1108
Conversation
Sol reviewReviewed
No blocker or should-fix findings. Spec: no findings within PR 1's scope.
Validation: 253 repository tests passed, plus three additional isolated boundary probes covering old versions, deactivation, retirement/disablement, public-data refusal, revoked/deactivated open streams, and retained/restored grant rows. No tracked files changed or commits pushed. The red rollback-rehearsal job stopped because a pending deploy made the live revision uncertain; it did not reach migration execution. Verdict: PASS with notes. |
…mpany A company can now grant one patch to a person who already has a Patchy account at another company. They open its current version as themselves in the patch's company, never its admin, and read and write its own tables and files as a colleague does. Revoking ends the grant but keeps its record, and sharing again restores it. Going public and retiring keep grants; reclamation removes them. - patch_guest_grants (0031) and the GuestGrants domain: grant, soft revoke, a patch's guests, a guest's shares, and the one eligibility function with its typed Reason. - Runtime's call and stream doors gain the guest case through the GrantedGuests port; a guest's recheck follows the current version. - RuntimeMe and the worker viewer carry guest only when true. - The serving door admits a granted guest to the current version. - The portal log, patchy logs and a connection's recent calls name guests. Co-authored-by: Srikar Voleti <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The revoke, host and names queries decode into named Schema.Class rows declared above their service tags, as the SQL guide asks. Co-authored-by: Srikar Voleti <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
f7d7e04 to
75b60f9
Compare
Acceptance: PASS with notesChecked Done means
Golden journeys
Evidence Rollback answers: match the diff. Migration Not run
Notes
|
## What changed This adds release 31's What's new entry, written from `5888411`. It covers everything merged since release 30's `through` (`e3d50f0`). It also sets the `patchy` release to `0.31.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: share a patch with someone at another company from Share… in its menu. They open it as themselves, find it under Shared with you, can be picked wherever the patch asks for a person, and on a server-code patch reach only what its builder opened to guests. The company-or-internet choice moved into the same dialog, and agents can share too | #1108, #1110, #1113, #1114 | | New: People has a Guests tab, with each guest's patches, and admins can remove a guest from all of them at once | #1115 | | New: admins can block guests from a connection, and owners see why on the patch's card | #1112 | #1118 is release 30's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. The four PRs that make sharing work are one change, since nobody can share before Share… exists. - **Rollback safety, from the live commit `54438fa` (release 30) to `5888411`:** the same six PRs. #1108, #1110, #1112 and #1113 are labelled `one-way`, and their answers agree: - #1108 adds `patch_guest_grants` (migration `0031`). Release 30 starts with it but ignores grants, so every guest loses access. - #1110 adds the `guest: true` handler mark to tier 2 descriptors. Release 30's schema refuses it, so it can't load tier 2 versions published with it. - #1112 adds `block_guests` (`0032`), and #1113 adds a directory trigger (`0033`). Release 30 runs with both but would ignore admins' blocks and resolve guests picked in member columns as nobody. - #1114 and #1115 add no migration or descriptor field. **Rollback line:** Rolling back past #1110 would leave tier 2 versions published with handlers marked for guests unloadable, because release 30's descriptor schema refuses `guest: true`, and past #1108 would cut every guest off; fix forward instead. ## How it was verified - **Tests.** `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts` pass (21 tests), and prettier passes on the changed files. - **The range.** Each of the six PRs was reviewed by GPT 6.1 Sol with every finding resolved, and got a fresh acceptance PASS with notes at its rebased head. Each landed with all 12 required checks green, `rollback-rehearsal` included, and its squash tree matched the accepted head. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `54438fa` (release 30). 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 Text and version numbers only. The `0.31.0` bump tells CLIs and patch repos installed before this deploy to upgrade, as every release does. - **What does a revert leave behind?** Nothing. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
A private patch could only be opened by its own company. Now a company can grant one patch to someone who already has a Patchy account at another company. That guest opens the patch's current version as themselves, inside the patch's company, never as its admin, and reads and writes the patch's own tables and files as a colleague does. Revoking ends the grant but keeps its record, and sharing again restores it. Going public and retiring keep grants; permanent reclamation removes them.
This is the first of six stacked PRs. There is no way to share yet: the share dialog and CLI arrive later in the stack, so the tests grant through the domain service.
Closes #1077
Look at
GrantedGuests.viewerOfinpackages/runtime/src/GrantedGuests.tsis the only place someone from another company becomes a viewer, as{ user, company: <patch's company>, admin: false, guest: true }.RuntimeProduction) and the live-query door (StreamAdmission) both use it, andreauthorize/recheckask it again.admitsGuests, so admission never reloads the patch. A non-member costs one indexed grant lookup.GuestGrants.unavailable(patch, version)returns a typedReason:Retired,DeletedorTier { tier }. Today only tier 1 is eligible; tier 2 arrives with its handler gate.admitsGuestsadds "current version". The serving door and the loaded version both use it.RuntimeMeand the workerviewergainguestas an optionaltrue. Members'me()and the worker payload are unchanged byte for byte, and older stored bundles never see the key.Metype gainsguest?: true.patchy logsand a connection's recent calls now resolve actors throughUsers.names(ids).How it was verified
me()withguest: true,admin: falseand the host company. They insert into and list the patch's own table.access_denied. After being shared again, they're back with their row.servedfor the new version, notaccess_denied.pnpm check: format, lint, typecheck and synth pass.packages/patchyCLI stub-server suites andpackages/execution(LocalTaskProvider,Supervisor). The CLI andLocalTaskProviderfailures are a strayGET /reaching local stub servers from the dev machine, and a rerun failed a different set.origin/maincheckout fails the sameSupervisortest and a CLI stub test on this machine. CI is the judge here.pnpm verify: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, install and tier2-smoke pass.testfailed 14 CLI stub-server tests andLocalTaskProvider, all on the same strayGET /.browserstopped at its first failure, a stray/on the test's foreign-origin server; a rerun ofpnpm test:browserpassed all 74.Release impact
Tick exactly one.
The change is additive: one new table, and a wire key only guests carry. Members see no difference.
patch_guest_grantstable, any grants written, and migration0031in the ledger.Built by Claude Opus 5.5 in Claude Code (T3 Code), rebuilding Srikar Voleti's original guest stack (#1082–#1103).
Co-authored-by: Srikar Voleti [email protected]