Skip to content

feat: let a schema introduce a definition, not just change one - #33

Merged
geodro merged 1 commit into
mainfrom
feat/introduce-at-a-schema
Sep 20, 2026
Merged

geodro merged 1 commit into
mainfrom
feat/introduce-at-a-schema

Conversation

@geodro

@geodro geodro commented Sep 20, 2026

Copy link
Copy Markdown
Member

A schema could say that a key was new and render it away for an older binary, but not that a whole definition was. So a preset whose entire point is something that shipped in a later release had nowhere to be held back: publish it and every install sees it a day later, installs it, and finds it does nothing.

Spamassassin is the case. It publishes no port by design, has no dashboard, and the thing that gives it a purpose is mailpit's discover_first wiring, which lives in the binary and is not released. On 1.35 it installs and then sits there, with nothing on screen to explain why.

A schema now lists what it introduces. Such a definition is published to that schema's tree and to no lower one, so a binary reading an older schema neither lists it in the catalogue nor can fetch its file, and the preset simply does not exist for it. That is the version gate, expressed alongside the key changes rather than as a field on the definition, and it needs nothing new in the binary: an absent file and an absent index entry are already what a binary does the right thing with.

The renderer gains checks of its own, run in CI ahead of the render. They build a throwaway store in a temp dir and read the published trees back, so they describe what a binary would fetch rather than how the renderer is written. The introduced case fails against the previous renderer, which is how I know it is testing something.

Nothing changes in the published trees here: introduces is empty, and the render is byte for byte what main already carries. #23 is what puts spamassassin behind it.

A schema could say a key was new and render it away for an older binary, but not that a whole definition was. So a preset whose point is something that shipped in a later release had no way to be held back: publish it and every install a day later can see it, install it, and find it does nothing.

A schema now lists what it introduces. Such a definition is published to that schema's tree and no lower one, so a binary reading an older schema neither lists it in the catalogue nor can fetch its file. That is the version gate, expressed where the rest of the schema differences already live rather than as a field on the definition.

The renderer gains checks of its own, run in CI before the render: the introduced case, a key downgrade, and the guarded drop that reads the document as authored.
@geodro
geodro requested a review from a team as a code owner September 20, 2026 19:15
@geodro
geodro merged commit 97d9c90 into main Sep 20, 2026
2 checks passed
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.

1 participant