Record that every install is fresh until v1

The owner decided on 2026-12-01: "No active installs, don't concern
self with upgrade paths, we assume until v1 that every install is
new/fresh/breaking". The releases plan records it as decision 19 and
applies it:

- Until v1 any release may break callers, configs, installs and
  stores, and the CHANGELOG says so once at its top. Entries list what
  each version has, with no upgrade or migration steps and no Breaking
  heading.
- The release checklist tests fresh installs only: install.sh in Debian
  and Ubuntu containers, and the Docker image. The upgrade test, the
  0.1 config check and the open question about 0.1 hosts go.
- No data is migrated. jobstore's schema steps give way to one schema
  and its version, and a binary refuses a jobs.db of any other version,
  naming the file and saying to move it aside or remove it. v0.2.0
  gains that commit and one that rewrites the docs for fresh installs.

The job-store and printers plans now raise the schema version and
refuse an earlier store where they planned schema steps, and drop their
downgrade notes. Phase 2b's cancelled status goes under Changed.
design.md's Why no longer says 0.1 installs are deployed, its 0.1
compatibility bullet becomes the decision, and install.sh migrates
nothing.

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 515d5ae699
commit 2497157b36
4 files changed
+89 -83

No files matched your search

+7 -10
View File
@@ -1,6 +1,6 @@
# Plan: several printers, routed by Expr rules
Status: **planned; nothing is built.** The owner accepted every proposed default on 2026-12-01 (Decisions), and design.md's Planned next item 2 records them. By the owner's rule of 2026-12-01 that API inputs go in the JSON body (design.md, "Inputs go in the JSON body"), a request names its printer in its body, never in a query parameter (decision 7). This plan builds on docs/plans/job-store.md and does not redesign its store. Stages 1a to 3 need that plan's stage 1c: jobs with deliveries, the waiting list, `beforeWrite` and the memory store. None needs its durable store (job-store stage 1d). Where that has shipped, decision 5's restore rule applies to it, and stage 2a adds a schema step (decision 18). Each stage runs in its own session, briefed from its section:
Status: **planned; nothing is built.** The owner accepted every proposed default on 2026-12-01 (Decisions), and design.md's Planned next item 2 records them. By the owner's rule of 2026-12-01 that API inputs go in the JSON body (design.md, "Inputs go in the JSON body"), a request names its printer in its body, never in a query parameter (decision 7). This plan builds on docs/plans/job-store.md and does not redesign its store. Stages 1a to 3 need that plan's stage 1c: jobs with deliveries, the waiting list, `beforeWrite` and the memory store. None needs its durable store (job-store stage 1d). Where that has shipped, decision 5's restore rule applies to it, and stage 2a changes its schema (decision 18). Each stage runs in its own session, briefed from its section:
- stage 1a follows decisions 1-6, and stage 1b decisions 7-9;
- stage 2a follows decisions 10-19, stage 2b decision 20, and stage 2c decision 21;
- stage 3 follows decisions 22-26, after decision 23's paper check;
@@ -120,7 +120,7 @@ For stage 2a:
- Trade-off: a guard of our own around Expr's AST charges every predicate, though only the owner writes routing rules and they see no print content.
18. **Storing the decision.** A route is decided once, at `Submit`, and stored; a restore never runs the rules again. The job keeps its `route`: `by` (`rule`; `request` for a printer the request names; or `default`), the rule's name and the mode, and job status shows it. An anycast delivery keeps its ordered list and the printers that got a `sending` mark (stage 3).
- A restored anycast delivery's list is therefore not given again by the rules and the config: job-store's `jobs` row keeps no priority, tags or client, and the rules may have changed since. Evaluating stored facts again at restore would cost as many bytes, give another answer after a config change, and put topics on disk.
- With SQLite, `jobs` gains `route_by`, `route_rule` and `route_mode`, and `deliveries` gains `candidates` and `sent_to`, names joined by commas, which a name cannot hold. If job-store stage 1d has not shipped when stage 2a starts, these columns join its first schema; otherwise stage 2a adds one schema step to `user_version` 2.
- With SQLite, `jobs` gains `route_by`, `route_rule` and `route_mode`, and `deliveries` gains `candidates` and `sent_to`, names joined by commas, which a name cannot hold. Stage 2a adds them to the schema and raises its version. A store from an earlier version is refused, naming the file, and nothing is migrated (docs/plans/releases.md decision 19).
- Trade-off: five columns; a job keeps the route it was given after the rules change.
19. **Multicast and broadcast.**
- Capacity is checked on every target lane under the submit lock. The job is accepted when at least one target lane has room. A delivery whose lane is full is inserted already `failed`, with the error "printer's queue is full", in a synced commit as any failure is. It is logged at WARN by `job_id` and `printer`, and not sent to Sentry, since a full queue is a refusal, not a fault. `Submit` answers `queue_full` only when every target lane is full.
@@ -391,10 +391,7 @@ COMPATIBILITY
- `/healthz` keeps `status`, `printer` and its code; it gains `printers`. `queue.pending` becomes the total across printers.
- `queue.size` bounds each printer's queue, so a host with several printers can hold more jobs (decision 4).
- What prints does not change. TestRenderCompat and TestPaperReceipts keep passing; stage 4b changes bytes only for a model whose paper check sets a value.
- A downgrade: an older binary refuses `[printers.*]` and `[routing]` as unknown keys. With a durable store:
- Between job-store stage 1d and this plan's stage 2a, an older binary opens the store, and its single worker would take every waiting delivery, whatever its printer. The queue must drain first.
- From stage 2a's schema step to `user_version` 2, an older binary refuses to open the store, so a downgrade also moves the store aside, by the steps in docs/install.md and docs/docker.md.
- docs/install.md and the CHANGELOG say so.
- No release promises an upgrade or a downgrade until v1 (docs/plans/releases.md decision 19). An older binary refuses `[printers.*]` and `[routing]` as unknown keys, and from stage 2a a binary refuses a `jobs.db` of another schema version.
INVARIANTS
1. Nothing reaches a printer unless the whole receipt rendered for it, with its own profile and options. A failover to a printer with other options renders in full before it sends.
@@ -800,8 +797,8 @@ internal/pkg/printqueue
- store.go: `Record.Route`, and `Delivery.Candidates` and `Delivery.SentTo` for stage 3; the memory store keeps them. `Add` takes a delivery inserted `failed`, and then syncs.
- schema_test.go: the `by` and `mode` enums.
internal/pkg/jobstore, if job-store stage 1d has shipped
- A schema step to `user_version` 2 with the route and delivery columns (decision 18). Otherwise job-store stage 1d's schema takes them.
internal/pkg/jobstore
- The route and delivery columns in the schema, whose version goes up by one (decision 18). A store from an earlier version is refused, naming the file (docs/plans/releases.md decision 19).
internal/pkg/config
- config.go:
@@ -857,8 +854,8 @@ internal/pkg/printqueue
- A multicast job with one target lane full is accepted: that delivery is `failed`, "printer's queue is full", in a synced commit, and the others are queued. With every target lane full, `queue_full`.
- The route is stored and restored with the job, and a restore never calls the Router.
internal/pkg/jobstore, if it exists
- The new columns survive a close and a reopen; a database at `user_version` 1 steps to 2.
internal/pkg/jobstore
- The new columns survive a close and a reopen; a store from the previous version is refused, naming the file.
internal/app/uberbringer
- A bad rule fails the start and `config get`, naming the rule.