Skip to content

Leave a served-state protocol change to the author's judgment of its readers - #3397

Merged
max-sixty merged 2 commits into
mainfrom
protocol-bump-criteria
Oct 21, 2026
Merged

max-sixty merged 2 commits into
mainfrom
protocol-bump-criteria

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The protocol check refused every served-state change that loosened its schema, such as a dropped field, a field made nullable or a raised maximum, whether or not any vendored runtime reads the field. Bump 15 (#3364) removed Activity.reply and ReplyEvidence fields that no runtime reads, and broke no page. Making the approval obligation's prompt.target nullable would force another bump, though obligationPlace (runtime/obligations/place.js) reads the target only for a widget's obligation.

protocolBreaks now returns refused and served:

  • Refused, as before: what a page sends, the event records every Leaf at the number writes into a log and reads back (compared both ways), $events.ownership, and every state.Record and the draft. The browser's append door or a reading Leaf fails on each such change, so the build throws until the change keeps what it took or $events.protocol moves.
  • Served: a change to the served state, its $defs or the x-state verb, which only the page's runtime reads. The build names it and throws until the author either bumps (a runtime vendored at the number reads the field and would mishandle it) or runs pnpm run build:browser --accept-served.

layer-registry.md, "Page protocol", states the criterion and how to check readers: in the runtime and packages, now and at every commit since the number was set (git log -S), naming the readers in the commit.

Of the 14 bumps since 2026-10-11, 11 renamed or removed a served field an older runtime read, so they stay bumps under this rule. The rate of bumps comes from churn in the served shape rather than from loose criteria. Deriving the read set from TypeScript was tried and rejected: only 7 of 244 runtime files are @ts-check strict, and renaming obligation fields in contract.d.ts and running tsc flagged place.js:35 but missed place.js:30 and view.js:573.

Behavior change: a served-state loosening no longer fails the build once the author accepts it. build/browser/protocol.test.mjs asserts each case lands in refused or served.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 20, 2026 14:13
…readers

The protocol check refused every served-state change that loosened its
schema, whether or not any vendored runtime reads the field. Bump 15
(#3364) removed `Activity.reply` and `ReplyEvidence` fields that no
runtime reads, and broke no page. Making the approval obligation's
`prompt.target` nullable would force another bump, though
`obligationPlace` reads the target only for a widget's obligation.

`protocolBreaks` now returns `refused` and `served`. What a page sends,
the event records every Leaf at the number writes into a log and reads
back, and every `state.Record` stay refused, since the browser door or a
reading Leaf fails on each such change. A change to the served state or
the x-state verb, which only the page's runtime reads, is named for the
author. The author bumps when a runtime vendored at the number reads the
field and would mishandle the change, and otherwise runs
`pnpm run build:browser --accept-served`. `layer-registry.md`, "Page
protocol", states the criterion and how to check readers across every
commit since the bump.

Behavior change: a served-state loosening, such as a nullable field or a
dropped field, no longer fails the build once the author accepts it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit d0b1e01 into main Oct 21, 2026
3 checks passed
@max-sixty
max-sixty deleted the protocol-bump-criteria branch October 21, 2026 00:26
max-sixty added a commit that referenced this pull request Oct 21, 2026
A version's sign-off obligation now serves `prompt.target: null`. It
named `lf-approve`, the id of the classic chrome's Approve button, which
#3100 deleted, so every served approval pointed at an element no page
has. The approval asks about the version as a whole, and the chrome that
presents it brings the user to it (page-status.js,
`registerApprovalPresentation`). module-reading.md now says what an
approval's target is.

The served state's `prompt.target` becomes nullable, which the protocol
check names as a served-state change (#3397). It is accepted at protocol
16 without a bump. Readers checked, now and since be98116 set protocol
16 (`git log -S prompt.target` finds no reader added or removed in that
range): obligations/place.js `obligationPlace` reads the target only for
a widget's obligation, and obligations/view.js reads it only inside the
destination `obligationPlace` returns, which is null for an approval.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants