Apply the fresh-install rule to remote printers and templates

Until v1 every install is a fresh one and any release may break
anything (owner, 2026-12-01). The remote-printers plan no longer offers
a new agent protocol version beside the old one for a release: main
speaks one version, main and its agents move to a new one together, and
an agent that offers another is refused with an error naming the
version main speaks. Its downgrade note goes.

The templates plan's trade-off, a later built-in module that takes a
template's name, becomes an ordinary CHANGELOG entry instead of a
Breaking one, and its downgrade note goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-12-01 23:06:27 -06:00
1 parent 2497157b36
commit 31a41c71de
2 files changed
+2 -4

No files matched your search

+1 -2
View File
@@ -25,7 +25,7 @@ For stage 1:
2. **The messages and their versioning.**
- Each WebSocket binary message holds one envelope: a msgp map with the message's type, as a short string, and its body. Bodies are structs that msgp encodes as maps with short field names (`msg:"k"`). Never tuples (`//msgp:tuple`), which cannot gain a field.
- Generated decoders skip map keys they do not know (findings, MSGP). So a field may be added in any release, and a reader of an older release ignores it. Renaming or removing a field, or changing what one means, takes a new protocol version.
- The protocol version is the WebSocket subprotocol. The agent offers `uberbringer-agent.1` in `Sec-WebSocket-Protocol`, and main accepts the versions it speaks. A later breaking change offers `.2` beside `.1` for at least one release. An agent whose offer main does not speak is refused before the upgrade (decision 7).
- The protocol version is the WebSocket subprotocol. The agent offers `uberbringer-agent.1` in `Sec-WebSocket-Protocol`, and main accepts the one version it speaks. Until v1 a change that needs a new version replaces the old one, so main and its agents move to it together (docs/plans/releases.md decision 19). An agent whose offer main does not speak is refused before the upgrade with an error that names the version main speaks (decision 7).
- `Hello` and `Welcome` carry each side's release version, for the logs. They also carry each side's capabilities as a list of names, so a feature can be added without a new version.
- The message types are under Architecture, MESSAGES.
- Trade-off: field names cost a few bytes per message; job bytes dominate.
@@ -231,7 +231,6 @@ COMPATIBILITY
- New: the route, the code `upgrade_required`, `/healthz`'s `agents` and a remote printer's `agent`. Job status can read `uncertain` during a run, for a remote delivery only (decision 17); its enum already has it from job-store stage 1c.
- What prints does not change: a remote printer gets the bytes a local one with the same table would. TestRenderCompat and TestPaperReceipts keep passing.
- Main and agent of different releases work together while they share a protocol version (decision 2); each logs the other's version at connect.
- A downgrade: an older binary refuses `[agents]` and `agent` as unknown keys, and has no `agent` command.
INVARIANTS
1. Nothing reaches a remote printer unless main rendered the whole receipt for it and the agent holds every byte of it, checked by length and SHA-256.
+1 -2
View File
@@ -34,7 +34,7 @@ For stage 1:
- So a script that can send a bearer token uses a template without a webhook, a token from `uberbringer token --modules <name>` limits it to that template, and the preview route is the dry-run over HTTP (decision 10). `uberbringer token` reads the config before it checks the names, which today it checks against the built-in modules only (internal/app/uberbringer/cli.go:156-161).
- Emoji are removed from the text fields of what a template returns (`text`, `title`, `footer`, `key`, `value`, list items and the card's fields), as on the notification path (design.md:134-138), rather than printed as `?`. `url`, `data` and `base64` are left as they are. The `note` module keeps printing them as `?`.
- `GET /api/v1/modules` lists every template's name and description to any token, those limited to other modules included. docs/security.md says so.
- Trade-off: the module list now depends on the config, and a later release whose new built-in module takes a template's name refuses that config at start, which is **Breaking** for it.
- Trade-off: the module list now depends on the config. A later release whose new built-in module takes a template's name refuses that config at start, and the CHANGELOG entry that adds the module says so.
5. **What a template sees.** A template sees a typed environment per input, a Go struct whose `expr` tags name the variables, as printers.md's `routing.Env` is. Architecture, THE ENVIRONMENTS, lists them.
- `json`: `body`, the decoded body; and `now`. Stage 4 adds a webhook's `hook`, `event`, `delivery` and `headers`, which are empty on a module route.
- `ntfy`: a message's fields, those `FromNtfy` uses (modules/ntfy.go:85-119), the subscription's name and `now`. `http`, `broadcast` and `copy` actions stay out, since their headers, bodies and values can hold secrets (ntfy/message.go:104-116).
@@ -220,7 +220,6 @@ WHAT SHIPS WHEN
COMPATIBILITY
- Nothing breaks. Every key, route and code is new, and a config without `[[templates]]`, `[[ntfy.rules]]` or `[webhooks]` behaves as today. The CHANGELOG lists each user-visible commit under Added.
- `GET /api/v1/modules` lists the templates with the built-in modules, sorted by name as today.
- A downgrade refuses the new sections as unknown keys. After stage 3 it keeps the ntfy state: an older binary ignores the new fields, and the messages a rule held are lost.
- What prints does not change: no block or card code changes, so TestRenderCompat and TestPaperReceipts keep passing.
INVARIANTS