Hardening pass, November 2026
What ships
A hardening pass over the app, the server and the project's own tooling, in small pull requests:
- the settings panel's self-hosting steps point at this repository's deployment guide;
- sign-in and ownership checks are reviewed on every server route and on the WebSocket;
- what the site and the README say matches what the code does (links, image names, model sizes, analytics, the pledge wording);
- CI runs every test suite, fails on type and lint errors, and deploys the site and publishes the images once per push;
- alerts reach the notification channels, guest sign-in works, and the frame retention window is enforced.
Spec or design
None: each item is a fix with a failing input, proved by a test in its pull request.
Plan
One pull request per item below, each with its test first.
Screens and pictures
Each pull request that changes what a person sees carries before and after pictures.
Docs to change
README.md, docs/QUICKSTART.md, docs/DEPLOYMENT.md, docs/DOCKER.md and docs/API.md, in the pull request that changes the behaviour they describe.
Tasks
- [x] Settings panel: self-hosting steps point at this repository's guide (#3)
- [x] Server routes: sign-in and ownership checks (#6)
- [x] WebSocket: sign-in, ownership and frame limits (#9, #14)
- [x] Sessions, retention and alert delivery (#11, #13, #14)
- [x] Guest sessions: the session reads use the stored column names, and a device id reuses a profile only with proof of that profile's session (#11, #14)
- [x] Monitoring profiles: an active profile per person, not one shared value on the built-in defaults (#11, #14)
- [x] Proxy trust: only the proxy's own address is trusted for the caller's address, so another container cannot evade the rate limits (#14)
- [x] Site and README statements match the code (#4)
- [x] CI: every suite runs, type and lint errors fail, one deploy and one publish per push (#5)
- [x] Deployment guide: a production Compose path that works as written (the right build stage, no missing Dockerfile), with the Docker, checkout and domain steps (#7)
- [x] Compose files: only the proxy publishes a port beyond localhost (Ollama, Redis and the API bind to 127.0.0.1), with a check in CI (#7)
- [x] Settings: a saved server address takes effect on the hosted app, and the model server's state is read through the SafeOS server (#12)
- [x] Camera: capture only while monitoring, a lost or paused camera is reported, a chosen camera is remembered, local mode uploads no frames, alerts survive a reload (#8)
- [ ] Monitor's socket messages follow the server's format (join a stream by id; frames carry the stream id and payload.imageData), so the hybrid and cloud modes reach the server's analysis
- [x] Browser alert cache: every producer's records are bounded (100 monitoring alerts, 500 from all producers; alerts saved before the upgrade are kept) and monitoring reads use a producer index instead of reading the whole store (#16)
- [x] Sessions: a saved session the server refused is removed before a new one is made; a server error or a timeout at the session check keeps the saved session; a failed profile save is reported; a session request that finishes after local data was cleared is ignored (#20)
- [x] master protected with the suite's checks
- [x] Export: include owned monitoring profiles and personal active choices using ownership, independent of profile ID format (#17)
Done when
Every box is ticked by a merged pull request, and safeos.sh and the published images serve the result.
- [ ] Build the arm64 image on a native arm64 runner instead of emulation.
Claims taken off the site and README in #4 because the honest fix is code:
- [ ] Persist monitor-page alerts to IndexedDB so they survive a reload and show in History.
- [ ] Raise an alert on the crying pattern the audio analyzer already computes, or remove the pattern.
- [ ] Wire the downloadable ViT scene classifier into a monitoring mode with a label map that matches its classes, or remove it and its 88.3 MB download.
- [ ] Make offline hold after first load: precache the app's scripts at build and store the COCO-SSD model same-origin or in IndexedDB.
- [ ] Ask for the microphone separately from the camera at setup, and run camera-only when it is refused or absent.
- [ ] Translate the pledge wording in the unused message files under apps/guardian-ui/src/i18n/messages, or remove them with the rest of the unreachable i18n code.
Found while making CI fail on lint, type and test errors (#5). No test is marked as a known failure: the one failing Jest test was stale and is fixed. ESLint found two unused names that mark unfinished behaviour; each keeps a disable comment that points here until the behaviour is built:
- [ ] Audio analyzer: the cry detector does not read
CRY_PATTERNS(src/lib/audio/analyzer.ts) - [ ] Audio analyzer:
detectSustainedSilence(thresholdMs)ignores its threshold (src/lib/audio/analyzer.ts)
- [ ] Run the web app's Playwright specs (apps/guardian-ui/e2e) in CI so they can fail a pull request; several assert screens no page renders, so they need updating first (raised on #5)