Dockerfile: ENV GOMEMLIMIT=1536MiB in the runtime stage, next to XDG_DATA_HOME. entrypoint.sh runs the daemon under runuser without --login, which preserves the environment, so no entrypoint change was needed.
README.md: a Memory section covering the budget, the required --memory=5g --memory-swap=5g container limit, how to override GOMEMLIMIT, what happens at each limit, and the DEBUG=routewatch System stats line.
I checked every sentence in the Memory section against the merged next tree: the SQLite 640 MiB pool cache and 1 GiB/1.5 GiB heap limits, the four 20,000-message queues and their drop-on-full behaviour, the batch-drop-on-error path, and the 60-second System stats debug line.
The authoritative gate is script/cibuild (the Docker build, make check with the pinned linter) run under the flock; the lint and test stages executed rather than cached. From a container started from the image without --memory (this host refuses that flag), the routewatch process (uid 1000) shows GOMEMLIMIT=1536MiB in its environment.
Judgement call: also added a GOMEMLIMIT row to the Configuration table so the override is documented in both places.
Model: opus-4-8
Closes https://git.eeqj.de/sneak/routewatch/issues/13 (U7 of the memory plan in https://git.eeqj.de/sneak/routewatch/issues/3).
Two changes; no code paths touched:
- `Dockerfile`: `ENV GOMEMLIMIT=1536MiB` in the runtime stage, next to `XDG_DATA_HOME`. `entrypoint.sh` runs the daemon under `runuser` without `--login`, which preserves the environment, so no entrypoint change was needed.
- `README.md`: a Memory section covering the budget, the required `--memory=5g --memory-swap=5g` container limit, how to override `GOMEMLIMIT`, what happens at each limit, and the `DEBUG=routewatch` System stats line.
I checked every sentence in the Memory section against the merged `next` tree: the SQLite 640 MiB pool cache and 1 GiB/1.5 GiB heap limits, the four 20,000-message queues and their drop-on-full behaviour, the batch-drop-on-error path, and the 60-second System stats debug line.
The authoritative gate is `script/cibuild` (the Docker build, `make check` with the pinned linter) run under the flock; the lint and test stages executed rather than cached. From a container started from the image without `--memory` (this host refuses that flag), the `routewatch` process (uid 1000) shows `GOMEMLIMIT=1536MiB` in its environment.
Judgement call: also added a `GOMEMLIMIT` row to the Configuration table so the override is documented in both places.
Model: opus-4-8
Add ENV GOMEMLIMIT=1536MiB to the runtime stage so the Go runtime keeps a
1.5 GiB soft heap limit. runuser preserves it the way it already does
XDG_DATA_HOME, so the routewatch process inherits it.
Add a Memory section to the README describing the budget (Go 1.5 GiB soft,
SQLite 640 MiB pool cache and 1.5 GiB hard heap, ~0.2 GiB other), the
required 5 GiB container limit, how to override GOMEMLIMIT, what happens at
each limit, and the DEBUG=routewatch System stats line. Every sentence
matches the behaviour already merged to next.
Model: opus-4-8
PASS — the Dockerfile sets ENV GOMEMLIMIT=1536MiB (confirmed present in the routewatch process environment of a container started from the image), and every sentence of the new README Memory section matches the merged next tree: the 640 MiB pool page cache (64 MiB × 10 connections), the 1 GiB soft / 1.5 GiB hard SQLite heap limits and their drop-a-batch-and-continue behaviour, the four 20,000-message queues that drop rather than block, the GOMEMLIMIT override, the --memory=5g --memory-swap=5g limit, and the DEBUG=routewatchSystem stats line every 60 s; the authoritative Docker gate is green with lint and tests executed fresh.
Model: opus-4-8
PASS — the `Dockerfile` sets `ENV GOMEMLIMIT=1536MiB` (confirmed present in the `routewatch` process environment of a container started from the image), and every sentence of the new README Memory section matches the merged `next` tree: the 640 MiB pool page cache (64 MiB × 10 connections), the 1 GiB soft / 1.5 GiB hard SQLite heap limits and their drop-a-batch-and-continue behaviour, the four 20,000-message queues that drop rather than block, the `GOMEMLIMIT` override, the `--memory=5g --memory-swap=5g` limit, and the `DEBUG=routewatch` `System stats` line every 60 s; the authoritative Docker gate is green with lint and tests executed fresh.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #13 (U7 of the memory plan in #3).
Two changes; no code paths touched:
Dockerfile:ENV GOMEMLIMIT=1536MiBin the runtime stage, next toXDG_DATA_HOME.entrypoint.shruns the daemon underrunuserwithout--login, which preserves the environment, so no entrypoint change was needed.README.md: a Memory section covering the budget, the required--memory=5g --memory-swap=5gcontainer limit, how to overrideGOMEMLIMIT, what happens at each limit, and theDEBUG=routewatchSystem stats line.I checked every sentence in the Memory section against the merged
nexttree: the SQLite 640 MiB pool cache and 1 GiB/1.5 GiB heap limits, the four 20,000-message queues and their drop-on-full behaviour, the batch-drop-on-error path, and the 60-second System stats debug line.The authoritative gate is
script/cibuild(the Docker build,make checkwith the pinned linter) run under the flock; the lint and test stages executed rather than cached. From a container started from the image without--memory(this host refuses that flag), theroutewatchprocess (uid 1000) showsGOMEMLIMIT=1536MiBin its environment.Judgement call: also added a
GOMEMLIMITrow to the Configuration table so the override is documented in both places.Model: opus-4-8
PASS — the
DockerfilesetsENV GOMEMLIMIT=1536MiB(confirmed present in theroutewatchprocess environment of a container started from the image), and every sentence of the new README Memory section matches the mergednexttree: the 640 MiB pool page cache (64 MiB × 10 connections), the 1 GiB soft / 1.5 GiB hard SQLite heap limits and their drop-a-batch-and-continue behaviour, the four 20,000-message queues that drop rather than block, theGOMEMLIMIToverride, the--memory=5g --memory-swap=5glimit, and theDEBUG=routewatchSystem statsline every 60 s; the authoritative Docker gate is green with lint and tests executed fresh.Model: opus-4-8