Skip to content

Refuse any schema change at one page protocol, instead of comparing what each side accepts - #6238

Merged
max-sixty merged 1 commit into
mainfrom
protocol-guidance
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
protocol-guidance

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The build's protocol check now refuses any schema change at one page protocol, apart from annotations and new skippable kinds, instead of comparing field by field whether every Leaf at the number would still accept the other's values. build/browser/protocol.mjs drops from 338 to 93 lines and its test from 299 to 137 (−402 net across the change).

To weigh: an added optional event field now needs a bump, and an added record field moves the record's since, which makes records the other Leaf version wrote read as absent until both run the same Leaf. Over the comparator's history (20 Oct–16 Nov) that would have been one more bump (comment gaining a field) and nine more since moves, seven of them delivery. The number stays a hand-moved integer, not a schema digest, since Leaf orders protocols: it refuses a newer Leaf's page and renews an older one.

AGENTS.md and layer-registry.md now say the build forces a bump for any event schema change and that a hand bump is for a logged value given a new meaning. Max took this up as a follow-on to #6215. protocol.test.mjs, pnpm run check:tools, pnpm run check:browser and pre-commit pass; three Sonnet runs of the reworded rule on nine bump questions answered as intended.

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

…hat each side accepts

The build's protocol check compared each event record and state.Record
schema with the baseline field by field, in both directions, and let a
change through where every Leaf at the number would still accept the
other's values. It now refuses any change beyond annotations at the same
protocol (or, for a record, the same `since`), and a new kind not
declared `skippable`, as before. protocol.mjs drops from 338 to 93 lines
and its test from 299 to 137.

What changes for an author: adding an optional field to an event record
now needs a bump, and adding a field to a record now moves its `since`.
Over the comparator's history (20 Oct to 16 Nov), that is one event change
(`comment` gaining a field) and nine record changes, seven of them
`delivery`, that passed without a move. A record whose `since` moves reads
as absent to a Leaf at its old format until both sides run the same Leaf.

The number stays a hand-moved integer rather than a digest of the schemas,
because Leaf orders protocols: it refuses a page a newer Leaf initialized
and renews an older one.

AGENTS.md now says the build forces a bump for any change to a logged
event's schema, and that a hand bump is for a logged value given a new
meaning. layer-registry.md and state.py drop the field-level compatibility
they described. Three Sonnet runs of the new AGENTS.md text on nine bump
questions answered all as intended, one run with a contradictory
headline on the `since` case.
@max-sixty
max-sixty merged commit a3d6448 into main Nov 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the protocol-guidance branch November 17, 2026 03:28
max-sixty added a commit that referenced this pull request Nov 17, 2026
Brings in #6234 (grouped declarations; an `lf-options` asks with no attribute;
`selected` and `required`), #6238, #6244, #6232 and #6214.

- Each named group stays, with main's attributes inside it: no `choose`, `selected`
  for `chosen`, `required` for `needed`, swept over the branch's own converted
  examples, fixtures, evals and tests.
- `lf-ask` stays deleted, and with it `state.encloses`, which only `lf-ask`
  declared: dropped from the declaration schema, `$keys` and the generated types.
- Main's `author.instructions` and examples carry the branch's text: the named group
  in place of `lf-ask` for `lf-options`, `lf-option`, `lf-draft`, `lf-tally`,
  `lf-deck` and `lf-playground`.
- The kernel marks take main's `paint.flow`, which the earlier merge had dropped, so a
  tab set written `flow="page"` is painted as one again.
- `PAGE` keeps main's settled `PAGE_GROUP` inside the branch's named groups.
- Main's fixtures whose option groups now ask stand in named groups where they were
  bare on a page.
max-sixty added a commit that referenced this pull request Nov 17, 2026
Main moved `$events.protocol` to 47 (#6216), and #6238 made the build refuse
any schema change at one number, so this branch's `held` pickup phase and
`agent-turns` role take the protocol to 48: the kernel registry,
`agent-turns`' `since`, and the baseline rebuilt from main's at 47.
Conflicts: the protocol line, the pickup row of `events.md`'s table, and a
test's stand-in for `thread.checked_text`, which now passes main's new
options through.
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