Skip to content

feat(portal): the website can read what's new without a sign-in - #893

Merged
allisonmahmood merged 1 commit into
mainfrom
feat/890-whats-new-json
Oct 23, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
feat/890-whats-new-json

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What changed

patchyhq.com falls behind with almost every release, because the plain-English release notes behind the bell only reach signed-in people. Now anyone can read them: GET /whats-new.json serves the New and Improved changes of the releases the running server ships, so the website can render its own What's new page and a rollback serves the older list.

Closes #890

Look at

  • What is public. publicReleases in packages/portal/src/WhatsNewPages.ts keeps only New and Improved changes (an allowlist, so a kind added later stays private), copies just kind, title and detail, and drops through, PR numbers and behind-the-scenes lines. A release left with no public change is dropped, not kept with an empty list: the website shows what changed, and an empty day reads as nothing shipped. Today that leaves out releases 16, 9, 7, 5, 3, 2 and 1.

  • The route. It sits beside the already-public /whats-new/bell.js and is a constant response, built once from releases with no session read, so nothing in it can be anyone's. Cache-Control: public, max-age=300, no CORS. It can't collide with a company or a patch: handles can't contain a dot, and patch addresses need two segments.

    In production the load balancer adds its own stickiness cookie to every response, this one included. It routes a browser to a host and identifies no one; the website keeps the parsed JSON, not the whole response.

Signed out, against pnpm dev:

$ curl -s -D - -o body.json http://127.0.0.1:<port>/whats-new.json
HTTP/1.1 200 OK
cache-control: public, max-age=300
content-type: application/json
content-length: 9920
x-content-type-options: nosniff
content-security-policy: default-src 'none'; …

releases [15, 14, 13, 12, 11, 10, 8, 6, 4]
kinds    ['Improved', 'New']
keys     ['changes', 'date', 'id'] ['detail', 'kind', 'title']

HEAD answers the same headers. /whats-new itself still answers 401 signed out.

How it was verified

  • Two tests in packages/portal/src/WhatsNewPages.test.ts, red before the change (publicReleases is not a function, then the route 404), green after: the projection on a fixture with Fixed, behind-the-scenes and an all-Fixed release; and the route signed out, with its status, JSON type, cache header, no set-cookie, no access-control-allow-origin, and the shipped list as its body.
  • The route signed out on this worktree's dev instance, above.
  • pnpm verify on the head: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, tier2-smoke and browser passed. Two suites outside this change failed under machine load: Fleet.test.ts hit a workerd watchdog deadline with no guest time, and Tables.test.ts (PGlite) hit a hook timeout. Both passed when rerun alone (43/43), and CI's test jobs pass on this commit.

The glossary, docs/product.md and the release-writing rules in whatsNew.ts now say New and Improved changes are public, so the deploying agent writes them for anyone.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

A new, read-only route; nothing existing changes.

  • What does a revert leave behind? Nothing on our side: no schema, rows or infrastructure. The website loses the feed and, per its plan, keeps its last good copy.
  • Does the release before it still work with that? Yes. The route isn't there, which the website already tolerates.

Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).

GET /whats-new.json serves the shipped releases' New and Improved
changes as { releases: [{ id, date, changes: [{ kind, title, detail }] }] },
without PRs, through shas or behind-the-scenes lines, and drops a release
left with nothing to show. Public, cached for five minutes, no CORS.

Closes #890

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added area:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:s Under 100 changed lines labels Oct 22, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review by GPT-6.1-Sol (xhigh), round 1 on 0533bc6: nothing blocking.

Sol checked the five risks it was given. Each passed:

  • Leaks. The projection copies kind, title and detail explicitly and allowlists New/Improved. PRs, through, behind-the-scenes lines, fields added to Change/Release later and kinds added later all stay out. Releases left empty are dropped.
  • Session scope. Neither the handler nor the app middleware reads a viewer or sets a cookie. Request cookies and Authorization don't change the response.
  • Cache on errors. The global serving headers keep public, max-age=300 on this route. HEAD matches GET. Wrong methods and nearby fallbacks answer no-store.
  • Collisions. Handles can't contain a dot, and patch addresses need two segments. No overlap with the portal's routes, the API guard or the reserved mcp/oauth handles.
  • Surfaces. The product doc, glossary and release-writing rules are covered. docs/API.md (generated from /api/*), the CLI, migrations and the layout need nothing.

One non-blocking caveat, dismissed: in production the load balancer's stickiness (apps/infra/src/AppStack.ts:385) adds its own routing cookie to every response, this one included. A shared cache storing whole responses could replay that cookie. Reason for dismissing: the cookie only pins a browser to a host and identifies no one. The immutable SDK tarball is already served public with the same cookie. The website fetches this route server-side and keeps the parsed JSON. I've noted it in the PR description.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS

Checked 0533bc6ea283525c2731b0b3f7dfd54afcc19612 (base e4243ff54d2acbbc88b60eeb0cf9b82a26dc9d5d) on a fresh, throwaway team instance, by GPT-6.1-Sol (xhigh) in the Codex harness on T3 Code.

Done means

  • Unauthenticated feed: passed. Full-server GET /whats-new.json answered 200 with application/json, without a redirect, session cookie or credentials.
  • Only shipped New/Improved changes, exact shape: passed. Compared the response independently against this checkout's whatsNew.ts: 9 releases, 28 changes, preserving source order and wording. Release keys are exactly id, date, changes; change keys are exactly kind, title, detail. Fixed changes, PR numbers, through, behind-the-scenes lines and releases left empty are absent. The newest shipped release (16, all Fixed) is correctly omitted; public IDs are [15, 14, 13, 12, 11, 10, 8, 6, 4].
  • Caching and no CORS: passed. Cache-Control: public, max-age=300; no Access-Control-* headers, including with a foreign Origin. HEAD keeps GET's content type, cache policy and content length, with no body.
  • Served by this running commit: passed. The fresh instance ran the pinned checkout and its JSON matched that commit's shipped list. The response is built from the local release module; no remote changelog is involved.

Golden journeys and adjacent risks

  • Private What's new / sign-in door (team, Ben): passed. Signed out, /whats-new still answers 401 with its sign-in door and private, no-store. Persona sign-in returns to that page. Both Ben (member) and Ada (admin) receive the full private changelog, including Fixed and behind-the-scenes content. Opening it advances their seen marker; revisiting clears highlights; an older bell report cannot move the marker backward.
  • Public feed cannot personalize or mark changes seen: passed. Signed-out, valid admin/member sessions and invalid credentials all return byte-identical JSON with no Set-Cookie. Direct database checks confirmed that reading the public feed leaves each person's seen marker unchanged.
  • Routing/cache boundaries: passed. POST, PUT, DELETE and OPTIONS answer 404 with no-store and no CORS; /whats-new.jsonx remains a non-cacheable 404. The router's trailing-slash normalization returns the same public response. Full-server and serving suites also passed. Other golden journeys have no changed implementation path in this diff.
Local evidence
GET /whats-new.json signed out: 200
content-type: application/json
cache-control: public, max-age=300
content-length: 9920
x-content-type-options: nosniff
No Set-Cookie, Location or Access-Control-* headers

Shipped releases: [15, 14, 13, 12, 11, 10, 8, 6, 4]
Public changes: 28
Foreign Origin / invalid credentials / query string: identical response
HEAD: 200, matching headers, empty body
POST / PUT / DELETE / OPTIONS: 404, no-store, no CORS
Signed-out /whats-new: 401, private, no-store
Ada and Ben: public read leaves marker unchanged; private read marks seen
pnpm exec vitest run packages/portal/src/WhatsNewPages.test.ts packages/core/src/whatsNew.test.ts apps/server/src/Server.test.ts packages/serving/src/Pages.test.ts --maxWorkers=2
Test Files  4 passed (4)
     Tests  55 passed (55)

All 14 PR checks are successful on the pinned head, including the three Node test jobs, browser, live Clerk, both CLI jobs, tier 2, Postgres concurrency and rollback-rehearsal. CI run.

Rollback answers: match the diff. This adds a read-only route and documentation, with no migration, stored-data change or infrastructure change. Reverting removes the feed without leaving state the previous release cannot read; no one-way label is needed.

Not run

  • Production, its load balancer and the separate website consumer: outside this throwaway-local run; no request to production or cloud.patchyhq.com was made. The PR already records the load balancer's routing-cookie caveat. Website revalidation/fallback is outside this PR.
  • Full pnpm verify and live Clerk were not repeated locally; their head CI checks were inspected and pass. No required endpoint behavior was left unchecked.

The throwaway instance was torn down with pnpm dev down; its recorded supervisor, server and Postgres PIDs were confirmed stopped. The PR's code, branch, body and labels were left unchanged.

@allisonmahmood
allisonmahmood merged commit e57032a into main Oct 23, 2026
14 checks passed
@allisonmahmood
allisonmahmood deleted the feat/890-whats-new-json branch October 23, 2026 11:01
allisonmahmood added a commit that referenced this pull request Oct 23, 2026
## What changed

This PR adds release 17's What's new entry, written from `5dd94f3`. It
covers everything merged since release 16's `through` (`dd3f41f`), and
it sets the `patchy` release to `0.17.0` in
`packages/patchy/package.json` and `CURRENT_RELEASE`. With this release,
people's agents can use their company's patches through Patchy MCP
(#833).

| Change | PRs |
| --- | --- |
| New: Your AI agent can use your company's tools | #873, #878, #880,
#881, #882, #883, #884, #886, #887 |
| New: Admins choose whether agents can use the company's tools | #871 |
| Improved: Your machines shows your agents too (Revoke all machines is
now Disconnect everything) | #885, #879 |
| New: See what agents can do with a tool | #876 |
| New: The log says when an agent made a change | #888 |
| New: Your agent can make a tool ready for agents | #869, #870, #872,
#875, #896 |
| Behind the scenes: agents' calls have their own limits, and a server
only an agent uses rests a minute after its last call | #889, #892 |
| Behind the scenes: New and Improved changes are public, for
patchyhq.com | #893 |
| Behind the scenes: library updates | #899 |

Five merged PRs get no line:
- #874 is release 16's own entry.
- #894 is dev tooling: worker agent launchers and scenario data. Its one
CLI fix lets a `patchy` installed outside a tier 2 repo publish it. The
skills have agents use the repo's pinned `pnpm patchy` instead, so that
path is off the documented one.
- #900 is CI.
- #901 rewords an internal skill.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`.
- It names only Claude Code and Codex. Both have connected through real
consent against dev instances. Hosted clients (Claude.ai, ChatGPT) are
checked in production only (`docs/product.md` › Patchy MCP ›
Acceptance).
- Its labels are the pages' own: Agent access on Company, Your machines,
What agents can do, Disconnect everything, and "Jordan Lee via Claude".
- **Rollback safety, from the live commit `e4243ff` to `5dd94f3`.**
- No PR in the range is labelled `one-way`, and every PR answers both
Release impact questions with "Yes".
  - Migrations 0020–0025 are all additive:
    - three defaulted or nullable columns on `companies`;
- `agent_name` on the runtime log, with a widened `credential_kind`
check;
    - the agent connection tables, `agent_consents` and `change_keys`;
    - two columns on execution bindings.

The new tables reference `users` without a cascade, but no release
deletes users or companies. Release 16 reads the runtime log only for
credential kinds it knows, so rows from agents can't break it.
- `rollback-rehearsal` on #892 rehearsed the whole stack, since #892
adds the last migration and the rest of the stack sits below it:
`Exercised rollback paths passed: e4243ff → c8bede4 → e4243ff → c8bede4,
in 238s.` #896's run skipped, because it changes no migration or handler
descriptor.
- #883 turns on the load balancer's host header preservation, which the
Deploy workflow's app stack deploy applies. A rollback leaves it on.
That's harmless, because release 16's server never reads `Host`.
- A rollback takes `/mcp` and `/whats-new.json` away. Connected agents
get a 404 until this release returns, and then their connections work
again, unless one ended in between. Agent tools published in between
stay refused to pages, because #837 already shipped in release 16.

## How it was verified

- `pnpm check` on `2d528b1`: format, lint, typecheck and synth passed.
In the test step, 2,300 of 2,301 tests passed. The one failure was
`packages/sdk/src/install.test.ts` › "says how to reach patchy when the
prefix's bin is not on PATH", which timed out at 180 s while the shared
machine was loaded. Rerun alone, that file passes all 7 tests in 62 s.
The release's own tests pass too: `whatsNew.test.ts`, `schemas.test.ts`
and `WhatsNewPages.test.ts`.
- The live commit was pinned from `/healthz/deep`: `e4243ff`, release
16. The Deploy run updated last succeeded, and none is unfinished.
- Each PR in the range was read with `gh pr view`, including its Release
impact answers.

## Release impact

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required

This PR changes only the changelog text and the `patchy` version. As
with every release, a CLI installed before this deploy is told to
upgrade.

- **What does a revert leave behind?** Nothing. People whose seen marker
reached 17 would just see no new release.
- **Does the release before it still work with that?** Yes.

If this release misbehaves, roll back to
`e4243ff54d2acbbc88b60eeb0cf9b82a26dc9d5d` (release 16).

Prepared by Claude Opus 5.5 (xhigh) in Claude Code on 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:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The website can show what's new without a sign-in

1 participant