Repository navigation
fix(serving): a kept public page reloads once its patch is company-only again - #1375
Conversation
Sol review
Otherwise, the cleanup ordering, rejected identity cache and caller guards look sound. Runtime returns null for every public version regardless of the reader's session, company or guest grant, so legitimate public readers do not enter a reload loop. The new test replays the kept HTML once against real Runtime and would fail without the branch. Browser and e2e suites were not run, as requested. |
|
Replies to the Sol review, in 1cad6a0:
These are comment and doc changes only, so the browser run on a4c9e24 still covers the behaviour. |
…ly again A browser could start a public shell it kept after the patch went back to company sharing. Its `me` then named the viewer, while every data call carried no principal and was refused `principal_changed`. The public shell now reloads the address when `me` names anyone, so the person gets the company page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ion is no longer public Co-Authored-By: Claude Opus 5.5 <[email protected]>
1cad6a0 to
c3b02d4
Compare
Acceptance: PASS with notesChecked Rebase check and reused evidence The diff is byte-identical to the previously accepted I inspected that intervening change. It changes first-party typography, font serving/startup validation and image/deploy packaging, with no change to the broker, Runtime admission, sharing/version lookup, shell HTML or shell stylesheet. The broker, shell renderer, shell stylesheet, Runtime, LoadedVersions and both requested specs are also byte-identical to the previously accepted head. The fresh run below built and started the rebased server, exercising the adjacent font startup dependency. I therefore reuse the earlier acceptance's independent probes and reasoning where explicitly identified below; they were not rerun. Done means There is no closing issue; the PR's What changed is the claim checked. Referenced #1373's refused-call rate limiting remains separate work.
Golden journeys
Fresh local evidence
Rollback answers: They match the diff: browser script, ADR and test only; no schema, persisted data shape, infrastructure or wire change. An older release remains compatible, so no Not run
Notes
|
…d once (#1376) ## What changed This adds release 41's What's new entry, written from `a25a9c5`. It covers everything merged since release 40's `through` (`08e1fd9`), and sets the `patchy` release to `0.41.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. It ships the UI overhaul together with #1204, the terms prompt, as one release, at Allison's word. | Change | PRs | | --- | --- | | Improved: Patchy has a new look | #1332, #1336, #1338, #1343, #1353, #1354, #1369, #1372 | | New: Accept updated terms once | #1204 | | Improved: Settings holds People, Integrations and Agent access | #1334, #1341 | | Improved: Home starts with what needs you | #1344, #1353 | | New: A blue dot marks patches you haven't opened | #1370 | | Improved: A patch's page has one header and tabs | #1345 | | Improved: Search lands on All patches | #1346, #1353 | | Improved: Inviting and deactivating people is clearer | #1349 | | Improved: Your agents shows what's connected | #1352 | | Improved: Integrations use plain words | #1347, #1351 | | Improved: Agents and integrations show their own logos | #1371 | | Improved: What's new goes by month | #1350 | | Fixed: ⌘⇧K works on your company's public patches | #1339 | | Fixed: Saving works after a patch stops being public | #1339, #1375 | | Behind the scenes: every page built from one set of parts, with a check | #1338, #1354 | | Behind the scenes: agents know a once-public page's refusals mean reload, and retries wait and stop | #1374 | | Patch changes: a kept public page reloads into the company page; check retries wait and stop | #1375, #1374 | #1337 is release 40's own entry. #1340 (routes split, plus the call summary Home and All patches show) and #1342 (the `dense` dev scenario) need no line of their own: the call summary is part of the Home and All patches changes, and the scenario is tooling. The overhaul makes no patch changes. Running patches keep their own styles, which #1332 pins, and the only SDK change is the wording of two error messages' admin addresses. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `d3d32da` (release 40) to this PR's merge:** - **#1334 is `one-way`.** Your agents and Settings moved to `/agents` and `/settings/…`. Old addresses redirect forward, but release 40 serves none of the new ones. This release's CLI hints, the `patchy` skill on `main`, and the API, MCP and publish hints all name the new addresses, so on release 40 they'd answer 404. - **#1372 needs the private font bucket**, and that's done. Its deploy step fetches the pinned Cabinet Grotesk file and checks it before recording anything. The bucket was created on 2026-11-10 and holds the pinned bytes. A rollback to a commit from before #1372 pins no font and builds as before. - **#1204** adds migration `0036_terms_acceptances`, an additive table that release 40 never reads. Release 40 doesn't prompt, and coming forward again asks only people who hadn't accepted. Not `one-way`. - **#1375** changes only the public shell's script, and #1374 is skill text. Release 40 renders its own shell and serves its own skills. - **#1370 and #1339** add rows to the existing `patch_opens` table (a guest's opens, and members' opens of public patches). Release 40 reads them like any other open. - **Everything else** is pages, styles, copy and docs: no migrations, and no API, `--json` or configuration changes. - **patchy-web #53**, the website line #1371's logos needed, is merged (771e6d9). **Rollback line:** Rolling back past #1334 would break every `/agents` and `/settings/…` link that this release's CLI, skill and hints hand out, because release 40 answers them with 404. Fix forward instead. ## How it was verified - **Tests:** the `packages/core` What's new test passes (5), the `packages/api` suites pass (64), and the three files are formatted. - **The range.** Each of the 22 overhaul PRs was: - reviewed by GPT 6.1 Sol at xhigh, with every finding fixed or declined in writing on the PR; - accepted on its final head by an agent that didn't write it; - merged green, by a merge train that rebuilt each PR's accepted tree on main's tip and checked that main's tree matched it after every merge. - **#1339, #1375, #1374 and #1204** were each Sol-reviewed and accepted, and merged on their own: #1339 before the train, the other three after it. #1204's acceptance was rerun on the new sign-in pages. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required The changelog entry and the release version only. - **What does a revert leave behind?** Nothing. CLIs installed from this release report `0.41.0` and are told to match the server, as at every release. - **Does the release before it still work with that?** Yes. Changes made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
Someone made a tier 1 patch public, switched it back to company 23 seconds later, and reopened it. Every save then failed with "Runtime request refused: principal_changed." Production served a public page as
public, max-age=60to members too, so for a minute their browser started its kept copy of the public page. The kept copy'smenamed them, because the patch was company again, so the page enabled its buttons. But a public shell binds no principal, so every data call was refused. On a public frame that refusal shows no notice, so the page simply looked broken.#1339, merged and not yet released, stops caching a member's public page, which closes the path production took. This PR is the backstop for any other copy a browser keeps, such as a page restored by a proxy or an older cached response. A public shell never hands its patch a viewer. If its first
menames someone, the patch is no longer public, so the shell reloads the address and the person gets the company page.Refs #1373 (refused calls count against no limit, which let that tab send about 60,000 of them in under an hour).
Look at
identify()inpackages/serving/src/broker.ts. A company shell pins the viewer fromme, as before. A public shell now treats a non-nullmeas a sign that it's stale: it releases the reply's bytes, stops the broker, removes the frame and reloads, and the patch's call fails as a lost request rather than resolving. Runtime answers a public version'smewith null and the broker cachesmeper document, so only a document that starts after the sharing change reaches this branch.What it leaves alone. A public tab that is already open when the patch goes back to company keeps #1339's contract. It keeps its page and draft, and the patch sees
principal_changed, asstream.spec.ts"a member's public patch that goes back to company refuses the patch, not the page…" still checks. I tried reloading on that refusal too and backed it out, because it would throw away a draft that #1339 keeps on purpose.How it was verified
New browser case in
tier1.spec.ts, "a kept public copy that starts after its patch went back to the company reloads as the company page". It serves a page the test kept from when the patch was public, after sharing goes back to company. On main's broker it fails: the page stays the public shell, and while diagnosing I saw the patch get the viewer frommeand its table calls refusedprincipal_changed. With this change it passes: the page reloads as the company shell,menames the viewer and a table call lists.The tier 1, stream, pinned-viewer, switcher and switcher-relay browser specs pass on the rebased head: 83 passed.
bun fmt --check, oxlint,pnpm typecheck:testsand the serving package'seffect-tsgo tscpass.The ADR-0010 public-shell paragraph says the shell never gives its patch a viewer.
Release impact
Breaking — requires action from anyone already running this
Not breaking — shell script change; the server and wire are unchanged
What does a revert leave behind? Nothing. Shells rendered by this release carry the new broker; after a revert, pages render the old one.
Does the release before it still work with that? Yes.
Written by Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code