Skip to content

Implementation status (v0.2) ​

What exists for each requirement in spec 01, and how far it has been verified.

Verification levels: tested = covered by automated tests that run in checks.yml (go test, npm run check) · parsed = the Yocto metadata parses and its dependency graph resolves (bitbake -g), but no image has been built or booted yet · – = not started.

All three targets build in CI, and the development VM boots, pairs with castmill.net and plays content. On real hardware nothing is verified yet: the Intel installer and GPU acceleration, A/B updates on the Raspberry Pi 5 and display power control wait for a test on a device.

Security ​

IDStatusWhereVerified
SEC-001Read-only ext4 rootfs (read-only-rootfs). dm-verity not yet (kernel options enabled; needs an initramfs or UKI that sets up verity). The spec asks for erofs/squashfs; ext4 is used until verity lands.castmill-os-image.bbparsed
SEC-002RAUC verity bundles signed with X.509. Dev keys outside the repo; the device keyring comes from CASTMILL_KEYS_DIR.castmill-os-bundle.bb, rauc-conf.bbappend, scripts/gen-dev-keys.shparsed
SEC-003– (Phase 2: Secure Boot + UKI; Pi signed boot)
SEC-004nftables: drop all inbound except established/related, ICMP errors, IPv6 ND, DHCPv6. SSH only on dev images.castmill.nft, castmill-devparsed
SEC-005Revised by ADR-0008: devices use Castmill's device token from pincode pairing (no per-device certificates or mTLS). Device ID: random, kept on /data, new after a factory reset.Castmill device app, agent/internal/agenttested (ID)
SEC-006– (key on /data, 0600, agent user; TPM in Phase 2)
SEC-007– (Phase 2)
SEC-008Agent downloads and installs updates automatically; activation per maintenance window or security policy.agent/internal/updatertested
SEC-009SPDX SBOM (create-spdx, OE-core default) uploaded by build.yml. CVE report not yet: Wrynose replaced cve-check with sbom-cve-check, still to be wired into CI.castmill.confparsed
SEC-010player and agent users with fixed UIDs; systemd sandboxing on every Castmill service; polkit limits the agent to rebooting and restarting the session/players; D-Bus policy limits the agent to RAUC's installer interface. Electron: contextIsolation, sandbox, no Node.js in renderers, navigation allowlist, permissions denied by default.castmill-base, unit files, player/appparsed / tested (player policy)

Reliability ​

IDStatusWhereVerified
REL-001GRUB boot counting (3 attempts) + castmill-health mark-bad → fallback; a rolled-back version is not retried.castmill-grub.cfg.in, agent/internal/health, agent/internal/updatertested (logic) / parsed (boot)
REL-002Trial boot detection; commit only when units, /data, outputs, frames on every connected output and backend (or external network outage) all pass within 10 min. A network outage never causes a rollback.agent/internal/healthtested
REL-003RuntimeWatchdogSec=30s; watchdog drivers in the kernel config; the VM gets an emulated i6300esb. Agent (WatchdogSec=60) and session (Weston systemd-notify) are watched by systemd.system.conf, castmill.cfg, run-vm.shparsed
REL-004Frame heartbeat → reload → restart player; Restart=always; player crash loop → session restart; session crash loop → reboot.agent/internal/agent (frame watchdog), unit filespartly tested
REL-005Updates write only the inactive slot; activate-installed=false so a power cut can't activate an update early; atomic writes (fsync + rename) for all agent state.system.conf (RAUC), config.WriteFileAtomictested (logic)
REL-006Volatile logs + 16 MB persistent journal on /data; zram swap; noatime, commit=30.castmill-baseparsed
REL-007A factory-reset file on the boot partition: /data is recreated at boot. Factory reset from Castmill needs Castmill support (the agent's reset flag is ready).castmill-data-setup, agent/internal/systemparsed
REL-008Agent reconnects with back-off; NetworkManager retries forever; clock from the HTTPS Date header when NTP is blocked; activation postponed until time is trusted; DRM hotplug starts/stops players.agent, castmill-outputs, udev rulepartly tested

Updates ​

IDStatusWhereVerified
UPD-001RAUC A/B (ext4 slots): GRUB with boot counting on UEFI targets; on the Raspberry Pi 5 the firmware's tryboot with one boot partition per slot (ADR-0009).rauc-conf.bbappend, wks files, castmill-trybootparsed; Pi backend tested (scripts/test-tryboot.sh), not yet on a Pi
UPD-002Installation streams into the inactive slot in the background; the player keeps running.updatertested (logic)
UPD-003Maintenance windows (per day, crossing midnight, device time zone), "apply now", 24 h security policy.agent/internal/maintenancetested
UPD-004 / 005Planned in the Castmill backend (ADR-0005, ADR-0008); until then castmill-agent update on the device.Castmill integration–
UPD-006HTTP streaming with mTLS and adaptive updates (block-hash-index).bundle recipe, agentparsed

Display and media ​

IDStatusWhereVerified
MED-001Weston kiosk-shell on KMS/DRM, Electron as a native Wayland client.castmill-session, weston_%.bbappendparsed
MED-002 / 003 / 004Intel: Mesa iris for GPU rendering (CSS, WebGL, compositing) and the Intel media driver (iHD, from meta-intel) for VA-API video decoding; Chromium flags per platform. Each player reports hardware or software rendering and the formats it decodes in hardware (castmill-agent status, journal). Benchmark matrix pending.mesa.bbappend, kas/x86-64.yml, castmill-player recipe, player/app/gpu.jstested (report); not yet on Intel hardware
MED-005One player process per output, pinned by app ID; per-output mode, rotation and scale from Castmill.agent/internal/session, castmill-player@.servicetested (config generation)
MED-006Castmill's device schedule: the device app blanks the screen; the agent puts the display in standby over HDMI-CEC or DDC/CI and wakes it. Saved on /data, applied offline, accepted by the health check while displays are in standby.agent/internal/display, agent/internal/agent/display.go, player/app/bridge.jstested (schedule, encoding, VM without CEC/DDC); CEC and DDC/CI not yet on real displays
MED-007Device info (OS, Electron, Chromium versions) goes to Castmill through the bridge. Hardware details (CPU, memory, GPU, graphics acceleration, hardware-decoded formats, display mode) go to Castmill through getHardwareInfo (shown in the device details with a Castmill version that has them) and to castmill-agent status.player/app/bridge.jstested

Device management ​

IDStatusWhereVerified
MGT-001Through Castmill's device app and dashboard: restart app, reboot device (bridge → agent), refresh, clear cache, telemetry. Screenshots and log upload don't exist in Castmill yet.player/app/bridge.js, agenttested (bridge)
MGT-002– (Phase 2)
MGT-003The agent is a separate service; the frame watchdog reloads and restarts a hung player. Remote access while the player is down needs Castmill support.agenttested
MGT-004CPU usage and load, memory, /data usage, temperatures, network type, IP and Wi-Fi signal, uptime, in Castmill's TelemetryData format. Pi throttling, storage wear and dropped frames aren't in that format yet.agent/internal/telemetrytested

Installation and provisioning ​

IDStatusWhereVerified
PRV-001x86 USB installer stick: automatic disk choice with countdown, menu, progress, castmill.conf copy, power off. Secure Boot enrollment and boot-order setting not yet.castmill-os-installer.bb, castmill-installershellcheck; not yet run on a PC
PRV-002Pi image as wic.zst + bmap (flashable with bmaptool; Imager JSON later).kas/rpi5.ymlparsed
PRV-003Castmill's pincode and QR code on screen (Castmill device app). Zero-touch bulk enrollment with an organization token needs Castmill support.Castmill device app–
PRV-004–
PRV-005castmill.conf: Wi-Fi, proxy (+ CA), NTP, time zone; moved into /data and deleted from the boot partition. USB sticks need an automounter (not yet). Proxy CA isn't imported into Chromium yet.agent/internal/provisiontested

Development ​

IDStatusVerified
DEV-001 / 002scripts/run-vm.sh (2 outputs, watchdog); pairing with castmill.net or a local Castmill backend; castmill-agent update for update and rollback tests.booted on an Apple Silicon Mac (QEMU): pairing, playback, telemetry
DEV-003build.yml builds all targets and uploads images and bundles; release.yml publishes them on a version tag.runs on every push
DEV-004kas/dev.yml → castmill-dev (SSH firewall rule), backend override allowed only there, red "DEVELOPMENT IMAGE" badge on screen.parsed

Licensing ​

IDStatusWhereVerified
LIC-001REUSE.toml + LICENSES/; reuse lint passes. Not yet in CI (checks.yml job to add).REUSE.tomltested (locally)
LIC-002– (INCOMPATIBLE_LICENSE not set yet; impact to check in Phase 0)
LIC-003– (release pipeline)

Known gaps and decisions to make ​

  • License checksums for Go modules: licensing is decided (ADR-0007); the agent recipe still needs per-module LIC_FILES_CHKSUM entries for its Go dependencies.
  • Backend: devices load Castmill's device app from https://castmill.net. CastmillOSMachine (native integration) needs the Castmill change to be deployed; without it devices pair and play as plain web players. The backend CA isn't pinned (system roots).
  • Device location: devices register without one (getLocation returns nothing). The plan is to set it in the Castmill dashboard, which already stores loc_lat and loc_long. GPS for moving screens comes later (Castmill integration).
  • OS updates from Castmill: release registry, desired version, rollouts and status in the Castmill backend (follow-up to ADR-0008).
  • Fallback screen when the player can't start: the status page is part of the player process; a native fallback (spec 07) is still to do.
  • Electron app ID on Wayland: verify app.setDesktopName → app ID with Weston kiosk-shell on the first boot (ADR-0004).
  • dm-verity, erofs, Secure Boot, TPM, encrypted /data: Phase 1–2.

Documentation licensed under CC BY 4.0. Code under MIT and Apache-2.0.