Skip to content

docs(skills): a once-public page's refusals mean reload, and retries wait and stop - #1374

Merged
allisonmahmood merged 4 commits into
mainfrom
fix/skill-public-refusals
Nov 10, 2026
Merged

allisonmahmood merged 4 commits into
mainfrom
fix/skill-public-refusals

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

What changed

An agent building a patch read principal_changed as a broken patch. It had made the page public and then switched it back to company. The skills said the shell shows a notice for principal_changed and session_expired. But a page opened while its patch was public gets them with no notice once the patch is company-only again, and only a reload fixes it. The page's code also retried its failed save straight away, with no wait and no end.

Both skills now say what those refusals mean on a once-public page. The project loop skill also says a retry loop waits before each try and stops on a refusal that comes back the same.

Refs #1373 (refused calls count against no limit).

Look at

  • packages/sdk/skills/patchy-loop/SKILL.md: the access-loss bullet, and one sentence on retries in the limits paragraph.
  • skills/patchy/SKILL.md: the runtime notices paragraph, which agents read when a page shows them a refusal. skills-lock.json carries its new hash.

How it was verified

  • The patchy entry in skills-lock.json matches sha256sum skills/patchy/SKILL.md, the check skillLock.test.ts makes. The other entries are unchanged.
  • bun fmt --check passes on all three files.
  • The behaviour the text describes is covered by stream.spec.ts. An open public tab whose patch goes back to company gets principal_changed with no notice and keeps its draft. The companion PR covers a kept copy that starts later: it reloads as the company page.

Release impact

  • Breaking — requires action from anyone already running this

  • Not breaking — skill text only

  • What does a revert leave behind? Nothing. Patch repos that refreshed in between keep the newer text until their next refresh.

  • 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

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area size:s Under 100 changed lines labels Nov 10, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Sol review

  • packages/sdk/skills/patchy-loop/SKILL.md:298 and skills/patchy/SKILL.md:595 — should-fix: The once-public case is broader than the two notice-free refusals described. An admitted signed-in member gets principal_changed on data calls; a signed-out reader gets session_expired; a signed-in reader without access gets access_denied before the principal check, and the broker shows a notice after its me recheck (RuntimeProduction.ts:47–66, Runtime.ts:630–665, broker.ts:294–329). Reload admits an authorized signed-in viewer, but otherwise returns the sign-in/access door (Pages.ts:276–292). The test at stream.spec.ts:476–494 covers the member case only. Fix: Qualify the codes by reader access and say reload rechecks admission, with sign-in/access restoration required where applicable.

  • packages/sdk/skills/patchy-loop/SKILL.md:301 — should-fix: “Stops on a refusal that comes back the same” also covers repeated transient busy/rate-limit responses, conflicting with the capacity/backoff guidance in patchy-server/SKILL.md:200–202,309–310,347 and the Pidgeon in-progress retry guidance in patchy-pidgeon/SKILL.md:62. An unchanged refusal code does not establish that retry cannot succeed. Fix: Stop on refusals requiring an identity, access, scope or input change; give safe transient retries a bounded backoff that respects retryAfter.

The global skill's SHA-256 matches the patchy lock entry (93026aa86ed77c606f27d469e8ad96f8a4e6cdd389f44e43d0801a41517276d6); no other lock entry changed. No separate wording/duplication findings.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Both Sol findings fixed in 438f2a9:

  • The once-public sentences now say which reader gets which code: principal_changed when signed in, session_expired when signed out. A signed-out reader's reload goes through sign-in first. Outsiders get access_denied with its notice, which the existing text already covers (failure() in broker.ts still checks me and shows the notice on public frames).
  • The retry sentence now says retries back off, honour retryAfter and stop after a few tries, and only access loss and not_available_on_public end them at once. A repeated busy stays retryable.

skills-lock.json carries the new hash.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance notes addressed in 1d00667, now rebased on main (e8851ea):

  • The project skill says principal_changed comes to a member or guest and session_expired to a signed-out reader, and that a reload checks access again, as any company link does. It no longer promises the company page.
  • The global skill says a once-public page can get those refusals with no notice, and that a whole-page reload checks access again. An outsider or deactivated member gets access_denied with its notice, which the next sentence covers.
  • The rest is rewrapping. skills-lock.json matches the new hash.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

The browser failure on 1d00667 is a flake, now #1377: a shell dialog-focus case that this Markdown-only diff can't reach, and that passed on main at e8851ea. I'm rerunning the failed and cancelled jobs.

allisonmahmood and others added 4 commits November 10, 2026 22:25
…wait and stop

The skills said the shell shows a notice for `principal_changed` and
`session_expired`. A page opened while its patch was public gets them with
no notice once the patch is company-only again, so the agent that built it
read them as a broken patch. The project loop skill also says a retry loop
waits and stops on a refusal that repeats.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 30321192d4be2827593221664de30232059509f9 (base 0bad5f316dd828a22af16427fba5d359d493a7df) on fresh offline Runtime/Pages fixtures with disposable migrated Postgres and a public-shell source walkthrough, by GPT-6.1-sol in the Codex harness, running in T3 Code. I did not write this change. The checkout was fetched, detached at this head and installed; its tracked tree is clean.

Rebase check and reused evidence

  • Confirmed byte-for-byte equality of git diff e8851ea9264bb86a630a317333d98ed0f036af11 1d00667b6ef05e9b6ef154f5b57613dc6db83ff1 and git diff origin/main...HEAD, excluding skills-lock.json. Both patch texts have SHA-256 a2ee3c91f9a121018cde8124952ec0cd5545a8d5ae0fb25e576d3f9718dbe619. Both skill files' final bytes are identical to the earlier accepted head. The final lock file is also unchanged from that head, and only its patchy entry differs from current main.
  • The only file differences between the earlier accepted head and this head are fix(serving): a kept public page reloads once its patch is company-only again #1375's broker, ADR-0010 and kept-copy browser test. Runtime admission, page admission, skill text and retry contracts are unchanged. I therefore reuse the earlier acceptance's five-reader HTTP matrix, guest-revocation evidence and retry reasoning where identified below; those independent probes were not rerun.

Done means

The PR references #1373 without closing it. Its skill-text claims are the scope; rate limiting refused calls remains separate work.

  • Once-public refusal and reload guidance: passed. Reused earlier HTTP evidence: an old public document's data call gets 409 principal_changed for an active member or admitted guest, 401 session_expired when signed out, and 403 access_denied for an outsider or deactivated member. Fresh address/version admission is respectively company shell, sign-in door, 404 or 403; revoking the guest also denies access. Neither skill promises that reload grants access. The fresh selected Runtime/Pages tests below support the same admission boundaries.
  • Still true with fix(serving): a kept public page reloads once its patch is company-only again #1375 on main: passed by source inspection, reusing the unchanged admission reasoning. An established public document has already cached a null identity through identity ??= in broker.ts:535. Unsharing does not refetch that identity; subsequent data calls retain the null principal. failure():302 still delivers principal_changed/session_expired without an identity notice on public frames, leaving their drafts and routing intact. Denied readers still get the access notice after its fresh me recheck. This is the open-page case described by the skills and stream.spec.ts:476.
  • A kept copy starting later: passed by source inspection. If its first me now returns a viewer, fix(serving): a kept public page reloads once its patch is company-only again #1375 releases the reply, stops the broker, removes the frame and reloads the address before exposing that viewer to patch code. It does not settle into the established page's refusal path. tier1.spec.ts:764 covers that distinction; I read it but did not run browser tests. The skills' open-public-page wording remains accurate, with the startup qualification below.
  • Bounded retries and write safety: passed as a policy walkthrough. Reused the earlier reasoning against the unchanged runtime and neighboring skills: transient busy/rate-limit responses can retry with bounded backoff and retryAfter; access loss and not_available_on_public end retries immediately. The adjacent unknown_outcome rule still forbids automatic mutation replay. The selected retry-safety test passed freshly. No claim is made that this text implements fix(runtime): refused calls count against no limit, so a page's retry loop repeats them without bound #1373's missing limit or proves fresh-agent behavior.
  • Mirrored sources and lock: passed freshly. The global skill's SHA-256 and lock both equal 5af32694e1cb30e50fdde66590439e156a53c2766a06e2060a52f9a1bdf7c5e4; skillLock.test.ts, formatting and git diff --check passed. The applicable mirrored surfaces are the two canonical skill sources and global skill lock. No API/wire, CLI command, dev-loop, vocabulary, migration, company-database caller, served-page implementation, lifecycle or package-layout contract changes in this PR.

Golden journeys

  • Share/unshare and publish/open a page: passed for admission/refusal guidance, using the fresh selected HTTP/render checks, the earlier five-reader matrix and the broker walkthrough above. Browser interactions were not rerun.
  • Sign in / regain access: passed for the checked admission and recovery contracts. The earlier outsider/deactivated-reader reasoning still applies; reload alone restores no permission.
  • Use a tool live: passed for refusal/retry guidance at the runtime/source boundary. Multi-viewer execution was not rerun. Machine login, discovery, tier 2 handler execution and invitation flows have no changed instructions or implementation here.

Rollback answers: Match the diff. Reverting leaves only copies of newer skill text in already-refreshed repos until their next refresh. It introduces no schema, data shape, infrastructure or runtime contract; an older release remains compatible and no one-way label is needed. This head's CI rollback-rehearsal check passed.

Fresh evidence

pnpm exec vitest run packages/patchy/src/skillLock.test.ts packages/runtime/src/RuntimeApi.test.ts packages/serving/src/Pages.test.ts packages/serving/src/render.test.ts --maxWorkers=1 -t 'keeps the global skill|runtime HTTP admission|unsafe capability timeouts|switches both URL shapes|confirms nothing across companies|records a guest|shell notice|renderShellNotice|scripted public shell anonymous|member.s switcher on a public shell'
Test Files  4 passed (4)
     Tests  17 passed | 63 skipped (80)

pnpm exec bun fmt --check packages/sdk/skills/patchy-loop/SKILL.md skills/patchy/SKILL.md skills-lock.json
All matched files use Prettier code style!

git diff --check origin/main...HEAD
# passed

Test teardown completed; no persistent dev instance was started. No PR code, branch, body or labels were edited, and nothing was merged.

Not run

  • pnpm verify, packed e2e and local browser suites: omitted on this shared machine as requested. Browser cases above are source evidence, not a fresh browser result.
  • Earlier independent five-reader/guest-revocation probes, local live Clerk journeys and a fresh-builder A/B trial: not rerun. Prior evidence is reused after checking the unchanged text and relevant admission code.
  • Full CI completion: gh pr checks 1374 reported no failed checks at the latest read. Lint, dependency review, rollback rehearsal, release tarball, server image and tier 2 smoke passed; browser, Node/Bun tests, Clerk, CLI smoke, Postgres concurrency and install jobs were still pending/in progress. This verdict does not assert merge readiness.

Notes

@allisonmahmood
allisonmahmood merged commit 805e9c9 into main Nov 10, 2026
26 checks passed
@allisonmahmood
allisonmahmood deleted the fix/skill-public-refusals branch November 10, 2026 21:41
allisonmahmood added a commit that referenced this pull request Nov 10, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant