modernc.org/sqlite is C transpiled to Go against one version of
modernc.org/libc, and its go.mod names that version exactly: v1.80.1
for v1.64.0, while libc's latest is v1.82.14. A newer libc breaks the
driver without a compile error, and a routine go get -u would move it.
The owner accepted holding libc there as the one exception to taking
each dependency at its latest stable release; it moves only with the
driver.
tools/libcpin compares the libc that go list -m selects with the one
go mod graph shows the selected modernc.org/sqlite requiring, and fails
with the go get that restores it. It runs as go run ./tools/libcpin,
so it works from PowerShell and in CI alike. test.yml and make check
run it after go mod tidy -diff, CLAUDE.md lists it in the gate and
records the exception beside the dependency rule, and design.md records
it under the stack choices.
Moving libc to v1.82.14 with go get made the check fail as it should;
the change was not kept.
Part of stage 1d of docs/plans/job-store.md (decision 13).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jobs are to survive a restart in a SQLite database, jobs.db in the
state directory, through modernc.org/sqlite v1.64.0 (SQLite 3.54.1),
the latest release, which is pure Go and builds with CGO_ENABLED=0.
It requires modernc.org/libc at exactly v1.80.1, older than libc's
latest; the owner accepted that pin as the one exception to taking
dependencies at their latest stable release, and CLAUDE.md and
design.md record it here. The other modules it brings are mathutil,
memory, go-humanize, go-strftime and bigfft, at the versions it asks
for; bigfft has no tagged release.
The new package internal/pkg/jobstore opens the database in this order:
- It creates the file 0600 if it is missing, since SQLite gives its
log the database's mode. An existing file is never opened outside
SQLite, since closing any descriptor of it would drop the locks the
process holds.
- The connection runs its pragmas, in this order: exclusive locking
before the first read, so the log's index stays in memory and no
-shm file is made; auto_vacuum NONE; WAL; synchronous NORMAL;
temporary tables in memory; a 4 MiB journal_size_limit;
secure_delete FAST. A connector runs them, since the driver's own
_pragma list sorts them by name and would set the locking mode only
after the first read, leaving a mapped -shm file on every open but
the first.
- PRAGMA quick_check reads every page, so a damaged file fails at
start rather than when a statement meets the page mid-run.
- A user_version newer than the binary's is refused, naming both.
- Each schema step runs in one synced transaction that also sets
user_version. Version 1 creates jobs, deliveries, content and refs.
- It writes once, so a store that cannot be written fails at start and
the file stays locked; a second Open of the directory, from any
process, fails at once with SQLITE_BUSY.
Every error from Open names the file. The URI escapes the path, so a
directory with a space, "#", "?" or "%" in its name works. The store
syncs with fdatasync where the platform has it, as on Linux.
The lock test runs the second Open in a child process, the test binary
run again, so the lock tested is the file system's. A test reopens the
store three times and finds no -shm file and exclusive locking each
time. Nothing uses the store yet.
Part of stage 1d of docs/plans/job-store.md (decisions 1, 3 and 13).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Releases ship linux/arm (ARMv6 and ARMv7) and linux/arm64 binaries built
without cgo, but until now nothing compiled those targets before a tag
was pushed. The job store's SQLite driver is Go transpiled from C, with
code of its own for each architecture, so a build that works on amd64
can fail for ARM.
test.yml and make check now build the daemon for linux/arm with GOARM=6
and for linux/arm64, with CGO_ENABLED=0, and discard the binaries. The
ARMv6 build stands for ARMv7 as well. CLAUDE.md lists the two builds in
the gate, run from Git Bash, since PowerShell cannot set variables for
one command.
Part of stage 1d of docs/plans/job-store.md (decision 15).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README had grown to 658 lines. It is now a short overview: what
Überbringer is, a quick start, a table of the docs and the licence.
Each topic it held has a document of its own:
- docs/install.md: install.sh, what it leaves behind, and upgrading.
- docs/docker.md: the image behind a reverse proxy, the env file,
health checks, and the ntfy state volume and token file.
- docs/configuration.md: loading, environment variables, a table of
every key in every section, and what is logged. The list of log
messages becomes a summary of what is logged and reported.
- docs/security.md: the API secret, issuing tokens and their scopes,
the header-file recipe that keeps tokens off command lines (moved
from docs/api.md), the reverse proxy, image URLs, and what is never
logged.
- docs/ntfy.md: the ntfy subscriptions, securing the topics and the
printer's token, with the token scripts unchanged.
- docs/cli.md: the command line.
- docs/development.md: running from source, the Go version, make
targets, the gate, generated files, the layout, CI and releases.
CLAUDE.md names the new docs: a config key is now documented in
docs/configuration.md, and the layout and Go version in
docs/development.md. docs/api.md, design.md and the job-store plan
point to the docs that now hold what they referred to in the README.
The release archives also carry the docs on running the daemon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>