Record the owner's acceptance of the job-store plan

The owner accepted every proposed default of docs/plans/job-store.md on
2026-12-01. Its open questions become numbered decisions, without the
alternatives, and design.md's Planned next item 1 records them.
Decisions 7 and 21 keep the wording that the remote-printers plan had
already settled. Each stage now follows its decisions, and the
"(assumed)" marks on the plan's own defaults go.

The other plans cite job-store decisions in place of questions:
printers.md, remote-printers.md, templates.md and ntfy.md. Templates
decision 22 now follows job-store decision 10 rather than leaning on an
assumed default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-12-01 11:03:30 -06:00
1 parent a06c12a202
commit f302b76ef4
6 files changed
+181 -154

No files matched your search

+37 -3
View File
@@ -443,9 +443,43 @@ Formatters phase 5 is split into features of their own, each planned in
not yet written is described here until it is.
1. **Job store and print previews**: `docs/plans/job-store.md` (written;
its open questions await the owner). It includes cancelling a waiting
job, `Queue.Cancel`, so that an ntfy `message_delete` can cancel one,
and a job made of one delivery per printer.
the owner accepted every proposed default, 2026-12-01).
- Jobs survive a restart in SQLite, through `modernc.org/sqlite` and
`database/sql`, not GORM: WAL mode, one connection, exclusive
locking. `jobs.db` lives in `[state] dir`, which replaces
`ntfy.state_dir` and keeps the ntfy state files too; empty keeps the
queue in memory. modernc's exact `modernc.org/libc` is the one
exception to "latest stable", held by a gate check.
- A job has one delivery per printer, each with its own state. A
delivery's `sending` mark is synced before its first byte, and one
found in `sending` at start ends `uncertain`, a new terminal status,
never sent again. Failures, cancels and ntfy jobs are synced too; an
insert from the HTTP routes is not, so a power cut can lose it but
never print it twice. A store write that fails mid-run stops the
daemon.
- Queued jobs print in order after a restart, however old. The store
keeps the validated job as JSON, never rendered bytes or tokens;
statuses are kept by `queue.history`, content within
`queue.content_bytes` (64 MiB).
- ntfy and webhook jobs are checked against the last 512 source and
reference pairs of their source, so a replay after a crash never
prints twice. A digest gets a reference of its own, saved before it
is submitted.
- A job's status derives from its deliveries: once all have finished,
`uncertain` over `failed` over `done`.
- The Docker image keeps a store in `/var/lib/uberbringer`
(**Breaking** for a container that cannot write there). CI builds
the ARM targets.
- `GET /api/v1/jobs` lists the history and `DELETE /api/v1/jobs/{id}`
cancels a waiting job, for full tokens. An ntfy `message_delete`
cancels the waiting receipts of its notification (`Queue.Cancel`);
`message_clear` does not, and the subscriber filters priorities
itself.
- A PNG preview draws the paper one pixel per dot, box drawing from
the cell geometry and other glyphs from a bitmap font. Stored jobs
preview by ID.
- Epson's acknowledgement, ntfy state in the store and an age limit
wait for phase 5.
2. **Several printers**: `docs/plans/printers.md` (written; its open
questions await the owner).
- Printers are named TOML tables, with named groups.