Run Vega's LCARS clock using the standalone Token TV flake #308
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!308
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/vega-token-tv-lcars"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Vega serves real Codex, Gemini and Opencode Go usage to the physical clock with the approved LCARS face and continuous gauges. The application now comes from the standalone Token TV flake: nimmo/token-tv.nix#2. This MR keeps only the Vega adapter, package installation, pinned input, update-policy classification, fleet wiring check and documentation. The nixos-config addition is reduced from 853 to 191 lines; application patches, assets, packaging and generic service lifecycle are maintained externally.
The native service uses Vega's existing provider logins, binds to Nebula only, backs up /var/lib/token-tv and registers for failure monitoring. Missing clock configuration skips startup; malformed configuration reports a failure, with persistent failures bounded to three starts within five minutes. Stock SmallTV-Ultra is supported alongside SD Pro; existing album files are preserved and original album settings retained. The clock shows at most three provider rows, prioritising Codex, Gemini and Opencode Go before Claude and Grok.
Validation:
Vega canary evidence: the native service had a successful live canary at
d35d9c1. All three providers returned current readings, an automatic refresh completed, and the clock frame matched the render exactly. The user confirmed the physical display and completed persistent activation; their activation helper's no-op follow-up passed. The current package includes later tested provider-error/configuration/restart fixes that have not been live activated. No reboot test is claimed. Extraction does not activate anything or release Vega's rollout hold.token-tv.nix MR #2 is merged. This input follows that repository's main branch and is locked to 8c60c1801fb4280f2459e35a91889bb711e388af. Automated review 48 of current head
957ac09is Ready to merge with no blocking, important or advisory findings; review run1184 and CI test run1185 pass. The remaining Attic jobs are intentionally skipped for pull requests. The user authorized merging both changes after checks pass; activation and Vega's rollout hold remain unchanged.No one-shot setup scripts, real usage snapshots or authentication data are included.
Closes #266. Hardware/recovery follow-up: #267. Milestone: Vega Token TV Clock.
Automated code review
Reviewed commit:
d35d9c163dd6a141e8f93e9922f4319594892f8aVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The Token TV wiring is internally consistent at the Nix level:
modules/services/token-tv.nixfollows the established Vega/Nebula service pattern (nebula@mesh+sys-subsystem-net-devices-nebula.mesh.deviceordering,networking.firewall.interfaces."nebula.mesh".allowedTCPPorts,listenAddressdefaulting toconfig.nixosConfig.nebula.overlayIp,User = primaryUser/Group = "users"as inmodules/services/forgejo-runner.nix), it is opt-in and enabled only inhosts/vega/default.nix, the flake package and theai-runtimehome-package entry match, and theConditionPathExists+ExecConditionpair implements the README's 'missing config or clock address skips startup' behaviour. The two patch files are self-consistent with the README text aboutdevice_api = "ultra", the OpenCode Go key lookup, and the Antigravity/usagepath. One concrete defect is visible in the supplied patch text (the LCARS renderer's fixed three-colour palette and three-row geometry versus the widened five-provider account list), and one documented repository convention (Vega native services self-registering with the failure monitor) is not followed by the new module.Blocking findings
None.
Important findings
The new
token_tv/lcars.pyadded by this patch doescolors = ['#b6bfff', '#ec6c83', '#ffc3af']and thenfor i, row in enumerate(overview_rows(snapshot)): y = 34 + i * 65; color = colors[i], with no bound oni. The same patch widens the accepted provider set (if account.get("provider") not in ("claude", "codex", "grok", "agy", "opencode")insources.py,PROVIDERS = ('claude', 'codex', 'grok', 'agy', 'opencode')indisplay.py) and adds no account-count limit in the visible part ofload_config. The only supplied LCARS test,test_lcars_fits_clock_and_distinguishes_old_and_missing, builds a snapshot with a single account (snapshot(100, [('codex_a', ...)])). Vega's service is configured withdisplay_style = 'lcars'(the patchedcli.pydefaults and the README both select LCARS) andRestart = "on-failure".Impact: A fourth account in
~/.config/token-tv/config.jsonmakescolors[i]raise IndexError insiderender_lcars, so the Vega service crashes and restarts every 10 seconds instead of publishing a frame; the row geometry (y = 34 + i * 65, boxes toy + 61) also leaves the 240px face from the fourth row onward. This is a silent runtime failure on the host rather than a configuration error caught at eval or build time (doCheckonly exercises one account).Suggested fix: Bound the rendering: index the palette modulo its length (or derive a per-provider colour from
PROVIDER_INK/themes.py) and cap or paginate the rows drawn so the layout stays inside the 240px face; alternatively reject more than three accounts inload_configso the limit is explicit, and add a multi-account case to the LCARS test.Suggestions
hosts/vega/default.nixdocuments the repository convention: "Most native services register themselves from within their own modules via services.serviceFailureMonitor.services ... Only services that do not self-register are listed here", and its explicit list (paseo,forgejo-mcp,docker-paseo-relay,docker-paseo-webui,atticd,forgejo-runner-vega) does not containtoken-tv. Comparable Vega service modules do self-register, e.g.modules/services/kiwifs.nix:196,modules/services/navidrome-mcp.nix:124,modules/services/sabnzbd.nix:280. The newmodules/services/token-tv.nixcontains noservices.serviceFailureMonitor.servicesentry.Impact: A genuine start-up failure of
token-tv.service(for example the LCARS render error above, or an auth-expired provider raising afterdevice_urlis set) would be visible only in journalctl, not through the ntfy alerting that every other watched Vega native service gets.Suggested fix: If intended, add
services.serviceFailureMonitor.services = lib.mkAfter [ "token-tv" ];to the module (mirroringkiwifs.nix/navidrome-mcp.nix, ideally gated by amonitorFailuresoption) so the service follows the documented per-module registration convention; otherwise state deliberately why the clock dashboard is excluded.Tests and validation
Questions
from token_tv.lcars import render_lcarstothemes.pywhilelcars.pydoes a top-levelfrom token_tv.display import overview_rows, account_label, andtests/test_local_support.pyimportstoken_tv.displayfirst. Can you confirmtoken_tv.displaydoes not importtoken_tv.themesat module level in the pinned upstream source (not present in this checkout)? Otherwise that import order would hit a partially initialised module.claudeandgrok.token-tv.servicebe added to the failure-monitor list, or is it intentionally excluded because it is expected to be inert untildevice_urlis configured?Review limitations
token_tvsources are fetched byfetchFromGitHubat revafc60163...and are not present in the checkout, sooverview_rows,reading,face,exe,FILES,PhotoDisplay.requestand the module-level import graph ofdisplay.pycould not be inspected; findings about them rely only on the supplied patch text.flake-check, thedoCheckunittest run, and activation results are asserted only by the diff and README text, not observed here.packages/token-tv/assets/agy-pixel.png,packages/token-tv/assets/opencode-pixel.png) appear in the diff only as binary placeholders, so their content and their correspondence to the newweb_assets.pyentries could not be verified.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchReview metadata
Review follow-up in
e2e3189:token_tv/display.py:47definesoverview_rows()and returnsrows[:3]at line 61, sorender_lcars()never receives a fourth row. Added a regression case with all five providers and a second Codex account; it checks the actual overview selection, 240×240 JPEG size/upload limit, and identical rendering to the selected three-account overview. Additional accounts remain in the dashboard snapshot.token-tvwithlib.mkAfter, gated by a default-enablednixosConfig.tokenTv.monitorFailuresoption. Nix evaluation confirms one registration on Vega.display.pyhas no module-levelthemesimport.render_page()importsRENDERERSinside the function at line 245. The real package builds and imports successfully.Validation: all 70 package tests pass; nix flake check passes; the complete updated Vega system builds. The LCARS renderer source is byte-for-byte identical to the successful
d35d9c1canary. The canary covered the native running service, live provider readings, scheduled refresh and exact clock image delivery; the new monitoring registration has been build/evaluation-validated and awaits deployment with the reviewed change. No reboot test is claimed.Automated code review
Reviewed commit:
e2e318998b32d8c71b672f1f5dde6ed09e7a6d11Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Reviewed the Vega Token TV clock MR: the new
modules/services/token-tv.nixservice module, the locally patchedpackages/token-tvPython package (rev-pinned upstream pluslocal-providers-lcars.patchandsmalltv-ultra.patchand two PNG assets), the flake package entry, the Vega host enabling the service, README documentation, and the sharedmodules/profiles/ai-runtime.nixadditions. Cross-checked in the checkout: the flake'sservice-failure-monitor-coveragecheck (scripts/check-service-failure-monitor.nix) is satisfied because thetoken-tvunit carries adescriptionandserviceConfig; port 8787 collides with no other declarednebula.meshport; thenetworking.firewall.interfaces."nebula.mesh"idiom and thebindsTo/wants/afterNebula device-unit pattern matchmodules/services/kiwifs.nix;sops.secrets."opencode-go-api-key"is declared inmodules/profiles/ai-runtime.nix(owner = primary user, mode 0400), which the patched code reads at/run/secrets/opencode-go-api-key; thedevice_apikey added tosources.py load_configmatches thephoto_display(...)selection inlive.py; and the newtests/test_ultra.pyandtests/test_local_support.pyexpectations are self-consistent with the patch hunks (e.g.i_i=5&autoplay=0ordering,remaining_fraction0.71 → 29%). One concrete defect is reported: the unit'spathlist passes the llm-agents package store roots, not theirbindirectories, while the patched code resolves provider CLIs by bare-name PATH lookup.Blocking findings
None.
Important findings
The unit sets
path = [ clients.codex clients.antigravity-cli ];withclients = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; NixOS uses these entries verbatim as the service's PATH, so PATH becomes the two package store roots. This repository always resolves those same packages one level down:modules/profiles/ai-agents.nixuses${codexCli}/bin/codexand${antigravityCli}/bin/agy, andmodules/profiles/ai-runtime.nixuses${opencodePackage}/bin/opencode. The suppliedlocal-providers-lcars.patchresolves provider CLIs by PATH lookup at runtime:token_tv/cli.pyaddsreturn 'yes' if shutil.which('agy') else 'no',token_tv/sources.pyaddscmd = exe("agy"); if not shutil.which(cmd): raise SourceError("cli_unavailable")andreturn "active" if shutil.which(exe("agy")) else None, andtoken_tv/connect.pyaddsreturn [exe("agy")]/return [exe("opencode"), "providers"]. TheopencodeCLI is not listed inpathat all.Impact: With
PATHset to the store roots (which contain no executables directly), the bare-nameshutil.which('agy')availability check returns None, so the Gemini row would be reported as unsupported/cli_unavailableand the OpenCodeproviderscommand inconnect.pywould not resolve when the dashboard runs from the systemd unit — even though the same CLIs work from an interactive shell where the home-manager wrappers are on PATH. The failure is silent in the rendered frame (a missing/unknown row), so the failure monitor would not alert.Suggested fix: Expose the executable directories, e.g.
path = lib.makeBinPath [ clients.codex clients.antigravity-cli ];(or explicit${clients.codex}/bin/${clients.antigravity-cli}/binentries), and add theopencodepackage's bin directory ifconnect.py'sexe("opencode")path is exercised; then re-run the live canary through the service (not an interactive shell) and confirm the Gemini and OpenCode rows are populated.Suggestions
None.
Tests and validation
Questions
exe()andnormalize_*in the upstreamtoken_tvsources (not present in this checkout) resolving provider CLIs to absolute paths, or returning bare names resolved throughPATH? The answer determines how much of the reported PATH defect surfaces as a missing Gemini row versus a failed subprocess call./var/lib/token-tv(which holdsdisplay-original.json, the clock's saved album settings read bylive.py's--restore-displaypath) be added tonixosConfig.backup.dataPaths, asmodules/services/kiwifs.nixandmodules/services/jellyfin.nixdo for state-holding services, or is losing that restore record acceptable given the README's manual-restore wording?Review limitations
token_tvPython sources are not in the checkout; only the two supplied.patchhunks were reviewed, so the definitions ofexe(),overview_rows,reading,window,snapshot,face,PhotoDisplay.requestand the pre-existingASSETS/RENDERERSentries were not inspected. ThepostPatchcopy of the PNG assets intotoken_tv/assets/therefore could not be confirmed against an existing upstreamassetsdirectory.nix flake check, package test suite, canary, and activation results are taken from the MR text as untrusted evidence, and the exact NixOS expansion ofsystemd.services.<n>.pathwas not verified against nixpkgs in this environment./doUpload?dir=/image/,/setsemantics, rendered-frame match) cannot be verified from supplied material; only the mocked expectations intests/test_ultra.pywere read./var/lib/token-tv, or the user's~/.config/token-tv/config.json; thedevice_url/device_apivalues that drive the Ultra path are not in the repository.packages/token-tv/assets/agy-pixel.pngandopencode-pixel.pngwere not inspected for content or licensing, whilepackages/token-tv/default.nixdeclaresmeta.license = lib.licenses.mit.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchReview metadata
Assessment of review 39 and follow-up in
17c2d78:The PATH finding is a false positive. NixOS's
nixos/lib/systemd-lib.nixconstructs the service PATH with${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path};systemd.services.<name>.pathtakes package entries and is not passed verbatim. The live native canary'ssystemctl show token-tv.service -p Environmentconfirms both Codex and Antigravity/bindirectories in PATH. Follow-up/snapshotverification through that running native service shows CODEX, Gemini, and Opencode Go allok, with LCARS deliveryok. Replacing the package list with a string fromlib.makeBinPathwould misuse this NixOS option.The pinned upstream
exe(name)returnsshutil.which(name) or name. Codex and Antigravity therefore correctly resolve using the generated service PATH.opencode_payload()reads the existing credential and performs the usage HTTP request directly; the daemon never calls the interactiveconnect.pylogin helper, so OpenCode CLI is not a runtime requirement for the unit. Added explanatory comments beside the service package list.The question about protecting the original album restore record was appropriate: registered
/var/lib/token-tvinnixosConfig.backup.dataPaths, following existing service modules. The README documents the backup integration. Evaluation confirms the state path appears exactly once. Nix flake check and the complete updated Vega system build pass. Python code is unchanged and its previously validated 70 tests still apply. Backup and failure-monitor additions await deployment; the existing canary remains healthy.Automated code review
Reviewed commit:
17c2d782a4c0bbfd7d72977191c7f60b4b84b2a2Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The Vega Token TV module, the flake package, the two source patches, and the README additions follow the repository's established conventions: the module self-registers in services.serviceFailureMonitor (so hosts/vega/default.nix correctly adds only
enableand no duplicate monitor entry), thenebula@mesh.service/sys-subsystem-net-devices-nebula.mesh.deviceordering andnetworking.firewall.interfaces."nebula.mesh".allowedTCPPortsmatch modules/services/kiwifs.nix and modules/services/bookstack-mcp.nix,nixosConfig.backup.dataPaths = lib.mkAfter [ ... ]matches the pattern used by ytdl-sub, freshrss and navidrome,config.nixosConfig.nebula.overlayIpis a real option (modules/networking/nebula.nix:103) and vega setsnixosConfig.nebula.enable = true, and/run/secrets/opencode-go-api-keyis provisioned by modules/profiles/ai-runtime.nix (owner = primary user, mode 0400), which vega imports through profiles/ai-desktop.nix, so the unit'sUser = usercan read it.scripts/check-service-failure-monitor.nixownership assertion is satisfied because the unit carries a description and serviceConfig. One evidence-backed defect remains: the ExecCondition guard exits 1 for the documented 'clock address not yet configured' state, which systemd treats as a failed start (only exit 77 skips cleanly), so the default failure monitor alerts andRestart = on-failurere-loops instead of skipping quietly.Blocking findings
None.
Important findings
modules/services/token-tv.nix:97 comments
# Exit 1 skips startup without marking the service failed.and line 98 setsExecCondition = "${clockConfigured} ...", where the generated script (lines 15-20) ends withsys.exit(0 if settings.get("device_url") else 1). The same module registers the unit for alerting by default:services.serviceFailureMonitor.services = lib.mkIf cfg.monitorFailures (lib.mkAfter [ "token-tv" ])withmonitorFailuresdefaulting to true (line 22), and modules/services/service-failure-monitor.nix:41 turns every watched name intounitConfig.OnFailure = [ "ntfy-service-failure@%n.service" ]. The unit also setsRestart = "on-failure"(line 100). README.md adds the user-facing claim 'A missing config or clock address skips startup, so preparing the service before the clock arrives does not start polling or serving a dashboard.' Per systemd.service(5), a non-zero ExecCondition exit skips the rest of the startup but leaves the unit in the failed state; only the special exit code 77 skips without failure. The unit-levelConditionPathExists = cfg.configFile(line 82) does cover the missing-file case cleanly, so only thedevice_url-unset case is wrong.Impact: In the documented pre-arrival state (config file present,
device_urlunset),token-tv.servicegoes to failed rather than a clean skip: the ntfy failure alert fires,Restart = on-failurewithRestartSec = 10re-attempts and re-alerts repeatedly, andsystemctl/host health tooling (including the beszel 'failed services' checks referenced in AGENTS.md) reports a permanently failing service on Vega. This contradicts both the in-code comment and the README wording, and the PR evidence states no reboot/live test was performed, so it would first surface on Vega's next boot.Suggested fix: Use systemd's documented skip code for the unconfigured case, e.g. end the guard script with
sys.exit(0 if settings.get("device_url") else 77)(or exit 77 directly), and correct the comment at line 97 to say exit 77 skips startup without a failed state; keepConditionPathExistsfor the missing-file case. Alternatively gate the unit on a marker file so no ExecCondition exit path can fail.Suggestions
None.
Tests and validation
Questions
/var/lib/token-tvexist when backrest first plans a snapshot for Vega?nixosConfig.backup.dataPaths = lib.mkAfter [ "/var/lib/token-tv" ](line 63) is contributed whenevercfg.enableis set, but the directory is created only byStateDirectory = "token-tv"at unit start, andunitConfig.ConditionPathExists = cfg.configFile(line 82) prevents unit setup while the user config file is absent. If restic is handed a non-existent include path, the first backup run after this change could error or skip silently.exe("agy")andexe("opencode")(token_tv/connect.py hunk at +24, token_tv/sources.pyagy_payload), and the unit'spathlist (lines 86-89) supplies onlyclients.codexandclients.antigravity-cli. Isexea generic resolver rather than a provider-keyed mapping that the patch should have extended, and is the opencode CLI intentionally absent from the service PATH (the comment at line 84 says OpenCode usage uses the HTTP API only)?click6067-ship-it/token-tvat rev afc60163d17e76ba71f4a7a5184be6dd4fb6baf8 MIT-licensed? packages/token-tv/default.nix:44 assertslicense = lib.licenses.mit, but no upstream licence file is present in the supplied material.Review limitations
window,reading,overview_rows,face,sample.snapshot,exe,PhotoDisplay.request, the pyproject entry point behindlib.getExe package, andweb_assets.py'sROOT) could not be inspected, and the patch hunks carry no context lines so their line offsets could not be verified.nix flake check, the package'sdoCheckunittest suite (including the new tests/test_local_support.py and tests/test_ultra.py), the Vega build, and any canary/reboot statements are unverified.nixosConfig.nebula.overlayIp(README's10.10.0.2), the rendered/run/secrets/opencode-go-api-key, the existence of~/.config/token-tv/config.json, and Vega's systemd version behaviour for ExecCondition exit codes were not observed.rounded_rectangleradii derived from very small gauge widths, font condensing intext()) was not executed; only the assertions in the supplied test files were read.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchReview metadata
Assessed the review of
17c2d78against systemd's primary documentation, the installed package, and Vega.The Important ExecCondition finding is a false positive. systemd.service documents that exit codes 1 through 254 skip subsequent commands without marking the unit failed; 255 or abnormal termination fails it. Exit 77 is not uniquely special for ExecCondition. Source: https://github.com/systemd/systemd/blob/main/man/systemd.service.xml (ExecCondition section). On Vega's systemd 261.3 an isolated temporary user service with ExecCondition=false (exit 1), Restart=on-failure and RestartSec=1 logged “Skipped due to 'exec-condition'”; it was inactive with zero restarts. The temporary unit was unloaded and the production clock service was not altered. The guard remains exit 1, and its comment now specifies the documented range.
The backup-directory question is valid. Commit
7a75c78adds a tmpfiles directory rule with the same owner/group and 0700 permissions as StateDirectory, so /var/lib/token-tv exists even when missing configuration prevents service startup. Vega evaluation confirms the rule. nix flake check and the full Vega system build pass; existing upstream stdenv deprecation warnings are unrelated to this module.Other questions: the pinned package's sources.py defines exe(name) generically as shutil.which(name) or name. Its opencode_payload uses json_get against the usage HTTP endpoint; no OpenCode CLI is required in the daemon PATH. The installed distribution includes licenses/LICENSE containing the MIT License and upstream copyright, confirming the package metadata.
This follow-up changes directory setup and comments only. The previously tested renderer/package and 70 package tests are unchanged. The successful
d35d9c1live canary remains running; review follow-ups have not been activated. No merge, hold release, or reboot test was performed.Automated code review
Reviewed commit:
7a75c782442d4499d20689dde88bb4e24ca84884Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The Token TV package, Vega service wiring, flake package, and README additions follow the repository's established Nebula-bound native-service pattern (compare modules/services/kiwifs.nix): the bindsTo/after/wants triple on sys-subsystem-net-devices-nebula.mesh.device, networking.firewall.interfaces."nebula.mesh".allowedTCPPorts, the mkAfter backup dataPaths contribution, and self-registration in services.serviceFailureMonitor.services (token-tv is correctly absent from hosts/vega/default.nix:287, whose comment forbids duplicating per-module entries). The unit PATH entries clients.codex and clients.antigravity-cli match attribute names already used in modules/profiles/ai-agents.nix, which exposes bin/codex and bin/agy, matching the CLI names the patched sources look up (shutil.which('agy'), exe('agy')). The /run/secrets/opencode-go-api-key path the patched sources read is created by modules/profiles/ai-runtime.nix:232 with owner = primaryUser and mode 0400, so the service (User = primaryUser) can read it. README port/address claims (10.10.0.2:8787) match the module defaults and nebula.nix:10/26. Two issues remain: an undocumented, byte-identical duplicate
claudewrapper added to the shared ai-runtime profile, and a documented-behaviour gap around the three-row clock-face cap that the new regression test asserts. One smaller operational trap in the ExecCondition probe is worth closing.Blocking findings
None.
Important findings
claudecommand wrapper added to the shared AI-runtime profile (modules/profiles/ai-runtime.nix:40; high confidence)The diff adds
claudeForUser = pkgs.writeShellScriptBin "claude" ''set -euo pipefail; exec ${claudeCode}/bin/claude "$@"''(line 40) and appends it tohome-manager.users.${user}.home.packages(line 295). Its body is identical to the pre-existingclaudeCodeForUserwrapper at line 36. A repository-wide search forclaudeacross *.nix returns only these five lines in this file, and searches forclaudein README.md and docs/ return no matches, so no documentation records the alias;pkgs.claude-codeis not in any environment.systemPackages list, soclaudeis a genuinely new user-facing command rather than a shadow of an existing one. Nothing in the Token TV README paragraphs (README.md:174-199) mentions it. ai-runtime is imported by the AI-desktop profile, so this lands on every AI-client host, not only Vega.Impact: A new interactive command is installed on all AI-client hosts by a change set whose stated scope is the Token TV clock; it duplicates the existing
claude-codeentry point, so the two can drift apart in later edits, and the merged history gives no reason for the alias to exist.Suggested fix: Land the
claudealias separately with its own justification, or state the reason in the commit/README if it is intentional (e.g. an alias users actually type). If both names must stay, build the launcher body once (a single string variable) and pass it to twowriteShellScriptBincalls so the aliases cannot diverge.Suggestions
New regression test asserts a three-row clock-face cap that the README paragraph does not record (README.md:174; medium confidence)
packages/token-tv/local-providers-lcars.patchaddstest_lcars_keeps_five_providers_and_multiple_accounts_within_three_rows, which asserts[row['provider'] for row in overview_rows(data)] == providers[:3]for a six-account snapshot and that the six-account frame equals the three-account frame.packages/token-tv/lcars.py(new file) then indexes a fixed three-element palette over that result:colors = ['#b6bfff', '#ec6c83', '#ffc3af']...color = colors[i]. The new README paragraph lists supported providers but never states the cap; it appears only in the PR text.Impact: With more than three provider/account entries, rows are silently dropped from the physical clock face (they remain visible in the dashboard), and the three-element palette is the boundary that would raise IndexError if the upstream cap ever changed. Operators reading README.md have no indication that the clock shows at most three accounts.
Suggested fix: Add one sentence to the new README paragraph, e.g. 'The clock face shows at most three account rows in provider order; remaining accounts are visible only in the dashboard.' No source change is required.
ExecCondition probe silently skips startup on a malformed config file (modules/services/token-tv.nix:21; medium confidence)
The
clockConfiguredprobe (lines 15-22) doessettings = json.load(config_file)with no try/except and thensys.exit(0 if settings.get("device_url") else 1). An uncaught exception in that Python script exits 1, and the unit's own comment at line 99 states 'ExecCondition exit codes 1-254 skip startup without marking it failed'. So a hand-edited~/.config/token-tv/config.jsonwith a JSON syntax error produces the same silent skip as the intended 'no clock configured yet' case; because the unit never fails,services.serviceFailureMonitor.services(line 68) will not alert either. README.md:198 documents only the missing-config case.Impact: A typo in the mutable config silently prevents the dashboard and clock publisher from starting, with no failure alert and no journal message distinguishing it from the documented unconfigured state.
Suggested fix: Catch the parse error in the probe and report it, e.g. wrap
json.loadin try/except and print a message to stderr before exiting 1, or exit 255 for a malformed file so the unit reports a genuine failure and the failure monitor alerts, keeping exit 1 only for a valid config withoutdevice_url.Tests and validation
Questions
token_tv/assets/directory?packages/token-tv/default.nixpostPatch runscp ${./assets/agy-pixel.png} token_tv/assets/agy-pixel.pngwithout creating the target directory, so it would fail if upstream has no such directory; the upstream tree is not in this checkout.click6067-ship-it/token-tvsource MIT-licensed?packages/token-tv/default.nixdeclareslib.licenses.mitfor the locally patched fork, but the upstream licence is not in the supplied evidence.claudealias intended to be part of this merge request, or did it come from a different workstream? Nothing in the checked-out documentation explains it.Review limitations
nix flake check, build, or test run was performed; the review reads the checked-out sources and the supplied diff only. Reported passing checks and any live canary evidence are taken from the PR text as untrusted.overview_rows,window,reading,exe,FILES,render_page,token_tv/sampleand the rest oflive.py/cli.pyare visible only through patch context, so no defects were inferred in unchanged code.inputs.llm-agentsis an external flake, so the exact bin layout ofpackages.<system>.codexand.antigravity-cliwas inferred from the usages in modules/profiles/ai-agents.nix (${codexCli}/bin/codex,${antigravityCli}/bin/agy) rather than verified.systemctlevidence is available here; runtime behaviour of the physical clock (Ultra firmware responses, album settings, image re-selection) is described only by the supplied unit-test expectations.token_tv/themes.py(which addsfrom token_tv.lcars import render_lcars) andtoken_tv/lcars.py(which importstoken_tv.displayat module scope) could not be assessed because the import block oftoken_tv/display.pywas not supplied.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchReview metadata
Addressed review 41 in
8a433a2:claudewrapper and its home-package entry. It is not needed by the configured Codex, Gemini or Opencode Go providers; the existingclaude-codelauncher is retained. This avoids adding an unrelated interactive alias across AI-client hosts.Validation: all eight focused cases against the actual Nix-generated guard pass (configured, unconfigured, empty address, malformed JSON, array root, null root, invalid encoding, unreadable file).
nix flake checkand the complete Vega system build pass. The package and LCARS renderer are unchanged, so the previously passing 70 package tests and physical-clock canary remain applicable. Configuration follow-ups are not live-activated.Upstream questions were checked directly in the pinned fetched source: it already contains
token_tv/assets/, and its rootLICENSEis the MIT License with upstream copyright. The package successfully builds with the asset copies. No source/packaging correction is needed.Automated code review
Reviewed commit:
8a433a2002a4135a527acc7b2175f949ecd01e42Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The change adds a Vega-scoped native
token-tv.service(modules/services/token-tv.nix), registers the locally patched package in flake.nix:174 and in the shared ai-runtime profile (modules/profiles/ai-runtime.nix:34, :291), enables it only on Vega (hosts/vega/default.nix:54, :72), and documents the LCARS face, the Ultra transport, the three-row clock cap, failure monitoring and state backup in README.md. The Nix wiring matches the established Nebula-service pattern (kiwifs.nix / navidrome-mcp.nix use the samenebula@mesh.service+sys-subsystem-net-devices-nebula.mesh.deviceordering,bindsTo, andnetworking.firewall.interfaces."nebula.mesh".allowedTCPPorts; the backupmkAfterand tmpfiles pattern matches ytdl-sub/karakeep), port 8787 is not used elsewhere,inputs.llm-agents.packages.*.codexand.antigravity-cliexist (modules/profiles/ai-agents.nix:13, :28),/run/secrets/opencode-go-api-keyis created world-readable-to-the-user by ai-runtime.nix:228 (owner = user, mode 0400), and the watched unit name is owned by a real service definition, so scripts/check-service-failure-monitor.nix should still pass. The two patch files are internally consistent and correctly ordered (smalltv-ultra.patch's sources.py hunk takes thekey_fileline added by local-providers-lcars.patch as unchanged context), and the two asset copies match theweb_assets.pypaths. The upstream token_tv sources are not in the tree, so only patch hunks were readable. One operational hazard in the new unit and one cross-file ordering inconsistency are reported; everything else could not be verified from supplied evidence.Blocking findings
None.
Important findings
The ExecCondition guard exits 255 for unreadable, malformed, or non-object JSON (modules/services/token-tv.nix:26-28), and the comment at line 106 states that only exit codes 1-254 skip startup without a failure, so 255 is the deliberate failure path. The same unit then sets
Restart = "on-failure"(line 109) andRestartSec = 10(line 110), and line 74 registerstoken-tvinservices.serviceFailureMonitor.services, which addsunitConfig.OnFailure = [ "ntfy-service-failure@%n.service" ](modules/services/service-failure-monitor.nix:57). Nothing in the supplied change bounds that cycle, andcfg.configFileis a mutable, hand-edited file (~/.config/token-tv/config.json, default at line 54).Impact: One typo in the mutable config file makes the unit fail permanently: a journal error plus an ntfy failure alert roughly every 10 seconds (about 360 per hour) until someone edits the file, and the failure monitor's own OnFailure stub is re-triggered each cycle. README.md:202 describes this state as reporting 'a startup failure to the journal and failure monitor' (singular), which does not describe the resulting flood.
Suggested fix: Make the invalid-configuration path self-limiting while keeping it visible: raise
RestartSecfor this unit, addRestartPreventExitStatus = 255so the guard's exit code fails once without restarting, or split the two states (unreadable file = hard failure; malformed JSON = diagnostic plus skip). Confirm the chosen behaviour on Vega before activation.Suggestions
Clock row selection keeps the inherited provider order, so the two newly added providers are the ones cut off (packages/token-tv/local-providers-lcars.patch:54; medium confidence)
display.py appends the new providers to the end of the existing tuple (
+PROVIDERS = ('claude', 'codex', 'grok', 'agy', 'opencode'), patch line 54), and the new regression test asserts that with six accounts across all five providers the clock face resolves toproviders[:3], i.e. claude, codex, grok (patch line 368). The dashboard side of the same change uses the opposite priority:+const PROVIDERS = ['codex', 'agy', 'opencode', 'claude', 'grok'];(patch line 232). README.md:174 describes the clock as supporting 'Codex, Gemini via Antigravity's /usage, and OpenCode Go's usage endpoint'.Impact: On any account list that also contains claude and grok entries, the LCARS face renders claude/codex/grok and never shows Gemini or Opencode Go, while the web dashboard prioritises exactly those two. The two providers this PR adds support for are the ones most likely to be dropped from the physical clock.
Suggested fix: If the clock face should prioritise the supported providers, order the row selection in the same priority as
web/app.js(or expose the row order/limit as a configuration key alongsidedevice_api) rather than relying on the inheritedPROVIDERStuple order; otherwise state in README.md that the three rows follow the account-list order, so the wording is not read as a supported-provider guarantee.No committed flake check covers the new token-tv service wiring (flake.nix:174; medium confidence)
The tree contains no
scripts/check-token-tv*ortests/token-tv*artefact; the only committed token-tv material is the module, the package, the two patches and the two assets. flake.nix already carries this kind of guard for comparable service integrations (checks.x86_64-linux.redview-v2-production-config,checks.x86_64-linux.service-failure-monitor-coverage), and the existing monitor check only proves that a watched name is owned by a real unit (scripts/check-service-failure-monitor.nix:22-27), not thatnixosConfig.backup.dataPaths(modules/services/token-tv.nix:69) or themonitorFailuresregistration (line 74) are still present.Impact: A later edit that drops the backup data path or the failure-monitor registration would not be caught by
nix flake checkor by the Attic-cache CI workflow, even though the same wiring is deterministically gated for other services.Suggested fix: If the configuration assertions are worth keeping, commit them as a
scripts/check-token-tv-config.nixguard added tochecks.x86_64-linux.*beside the existing service guards; otherwise record in the issue that they were one-off evaluations and no durable gate is intended.Tests and validation
Questions
auth_file = root / "auth.json"with no assignment ofrootinside the supplied hunk, whereas the parallel cli.py insertion explicitly bindsroot = Path(home).expanduser()(patch lines 20-21). Please confirmrootis bound earlier in that enclosing function; no supplied test exercises that availability path (test_local_support.py imports onlyopencode_payloadandload_config).token-tv?lib.getExe packagein modules/services/token-tv.nix:108 and the README invocationnix run .#token-tv -- run ...both depend onmeta.mainProgram = "token-tv"(packages/token-tv/default.nix:48) resolving to a real bin entry.activate()hardcodestheme_list='0,0,1,0,0,0,0,0,0',sw_en=0,theme_interval=10, andtheme=3(packages/token-tv/smalltv-ultra.patch). The class docstring claims the API was 'verified against Ultra-V9.0.54's web UI', but no supplied evidence tiestheme=3to the LCARS face rather than to a firmware index. Can that mapping be cited, or should it be a configuration value?ProtectSystem = "full"(modules/services/token-tv.nix:114) together withStateDirectory = "token-tv"and noReadWritePaths, while other native services in this repo (e.g. modules/services/kiwifs.nix) declare them explicitly. Is there any code path in the upstream package that writes outside/var/lib/token-tvand outside$HOME?/run/secrets/opencode-go-api-key, contributed only by modules/profiles/ai-runtime.nix:228 (reached on Vega via profiles/ai-desktop.nix:12). Should the token-tv module assert that this secret is configured, or is the fallback toauth.jsonand theauth_requiredSourceError the intended behaviour for hosts that enable the service without the ai-runtime profile?Review limitations
overview_rows,window,reading,face,render_page,PhotoDisplay.request,exe,FILES, and the import headers of cli.py/sources.py/display.py - could not be inspected, so any defect inside them is out of scope.nix flake check, or Python test run was performed here; the canary, validation, and test results are taken from the untrusted review text and were not independently confirmed.web_assets.pyandpostPatch.web/app.js,token_tv/display.py, andtoken_tv/sources.pyhunks were read only as supplied diff fragments; surrounding unchanged code was not available, so cross-file consistency beyond the shown hunks was not verified.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchReview metadata
Review 42 assessed and addressed in
653ab7b:Validation: all 70 package tests pass on the rebuilt package; the new wiring gate builds; nix flake check and the complete Vega system build pass. The renderer itself is unchanged. The bounded failure behaviour was exercised with an isolated Vega user unit; the production canary remains at
d35d9c1and follow-up configuration/package changes await activation.Questions checked against the pinned source:
Automated code review
Reviewed commit:
653ab7b9dcfac39f3abb59d1e399a5558bf76f56Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Re-validated the initial review against the checked-out repository. The Nix side is consistent with the repository's established patterns: modules/services/token-tv.nix reproduces the exact nebula@mesh.service / sys-subsystem-net-devices-nebula.mesh.device after/wants/bindsTo triple used by services/kiwifs.nix, services/bookstack-mcp.nix and services/forgejo-mcp.nix, the same
networking.firewall.interfaces."nebula.mesh".allowedTCPPorts = [ cfg.port ]form, the samenixosConfig.backup.dataPaths = mkAfter [...]+ tmpfiles pairing used by kiwifs, the sameservices.serviceFailureMonitor.services = mkIf cfg.monitorFailures (mkAfter [...])self-registration, and the sameUser = primaryUser; Group = "users"pairing used by services/forgejo-runner.nix; port 8787 is not claimed by any other module (grep over the tree shows only this option and the README).inputs.llm-agents.packages.<system>.codexand.antigravity-cliexist in modules/profiles/ai-agents.nix, and${antigravityCli}/bin/agyconfirms the unit'spath = [clients.codex clients.antigravity-cli]supplies theagybinary the patched sources.py looks up; /run/secrets/opencode-go-api-key is provisioned by modules/profiles/ai-runtime.nix with owner = primary user, mode 0400, matching the unit's User. hosts/vega/default.nix and modules/profiles/ai-runtime.nix use the correct relative paths (../../packages/token-tv) and flake.nix follows the existing check-registration idiom. Of the two findings in the initial review, only the agy error-masking defect survives: it is demonstrable from the supplied patch text alone. The LCARS radius finding depends on Pillow behaviour that is not present in the checkout (no Pillow source, no vendored copy), so it is dropped as speculative and recorded as a limitation instead.Blocking findings
None.
Important findings
In the new agy_payload body (patch lines 121-135),
raise SourceError("auth_required")at line 130 sits inside thetry:opened at line 125, and the handler at lines 134-135 isexcept Exception:/raise SourceError("error"). A SourceError instance is an Exception, so the non-zero-returncode path is caught and re-raised as the genericerror. The sibling opencode_payload raisesSourceError("auth_required")at patch line 116 outside any try, so it propagates unchanged; agy_payload'scli_unavailableraise at line 124 is also outside the try. The two provider paths therefore report the same condition differently.Impact: An expired or missing Gemini login (the normal symptom of a non-zero
agyexit) reaches the dashboard and clock as an undifferentiated error instead of auth_required, so the Gemini row loses the actionable re-authenticate signal that the OpenCode Go path preserves. tests/test_local_support.py exercises only normalize_agy on fixture data, so no supplied test covers agy_payload's failure paths.Suggested fix: Keep the provider error out of the catch-all: add
except SourceError: raisebeforeexcept Exception:at patch line 134, or move the returncode check and json.loads into anelse:clause so only the subprocess call itself is guarded.Suggestions
None.
Tests and validation
Questions
from token_tv.device import FILES, PhotoDisplaytofrom token_tv.device import FILES, photo_display, but only two hunks of live.py are supplied. Can you confirm no remaining barePhotoDisplayname (for example in the restore branch immediately following the shownif args.restore_display:guard) survives in live.py, which would now be an unresolved name?@@ -256,0 +302,10 @@), the OpenCode branch testsauth_file = root / "auth.json", while opencode_payload resolves its fallback asPath(account.get("source_home", "~/.local/share/opencode")).expanduser() / "auth.json". Arerootand that expression the same directory, or can detection reportopencode-gowhile the payload path then raises auth_required?account_labelin token_tv/display.py returns the generic provider name for any alias that is neitherPROVIDERnorPROVIDER A/PROVIDER <suffix>, so a user-chosen custom alias is silently replaced. Is discarding custom aliases intended for both the clock face and the dashboard label?Review limitations
min(4, (right - 53) / 2)being clamped in unscaled units while box() rounds coordinates and radius separately at scale = 3) was dropped: whether Pillow'srounded_rectanglerejects a radius larger than half the smaller side cannot be established from the supplied material - no Pillow source exists in the checkout (onlypython3Packages.pillowis referenced in packages/token-tv/default.nix), and no supplied test renders a small non-zero bar. It remains an unverified risk, not a demonstrated defect.nix flake check, the Vega build, the package test suite, and the canary activations are taken from the pull-request text, not verified.theme=3,theme_list='0,0,1,0,0,0,0,0,0'), and the rendered frame were not observable.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchscripts/check-token-tv-config.nix: reviewed — included in a context-limited batchReview metadata
Review 43's Important finding is valid and fixed in
d4b568a. agy_payload now re-raises SourceError before the broad fallback handler, preserving auth_required. Added five regressions for successful JSON, nonzero CLI/auth failure, missing CLI, timeout and malformed output. The auth regression also exercises fetch_account and verifies both status and error_code are auth_required rather than generic error.Validation: all 75 package tests pass; nix flake check and the complete Vega system build pass. The display renderer and transport are unchanged. Production Vega remains on the successful
d35d9c1canary; this provider fix awaits deployment with the reviewed branch.Source-backed answers:
No change was made for the withdrawn speculative gauge-radius finding.
Automated code review
Reviewed commit:
d4b568a31b25e294a1743f3c76ac0f17e89c0ad4Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
I re-checked the initial review's only finding against the checked-out tree and could not sustain it.
nixosConfigis a namespace of individual options declared in modules/common/default-config.nix, andnixosConfig.tokenTvis declared only in modules/services/token-tv.nix, which only hosts/vega/default.nix imports (line 54) — but the guard's predicate uses the Nixoridiom (...tokenTv.enable or false), which catches the attribute-not-found error raised for electra/lena/lyra and yields false, so the filter reduces to ["vega"] and the assert holds. The rest of the change set matches established repository patterns: the unit mirrors modules/services/kiwifs.nix and modules/services/forgejo-mcp.nix (same nebula.mesh firewall scoping, nebula@mesh.service + sys-subsystem-net-devices-nebula.mesh.device ordering), the guard mirrors scripts/check-redview-v2-production.nix (extendModules + assert-then-runCommand wiring in flake.nix), the tmpfiles/backup-dataPaths/failure-monitor strings in scripts/check-token-tv-config.nix match the module text exactly, 8787 does not collide with Vega's other nebula.mesh ports (4533, 5432), and the OpenCode Go key the patched sources.py reads at /run/secrets/opencode-go-api-key is provisioned by modules/profiles/ai-runtime.nix:228 with owner = primaryUser, mode 0400 — readable by this service, which runs as that same user, and the unit already orders after sops-nix.service. The Python patches are self-consistent (device_api validation in sources.load_config matches live.py's photo_display dispatch; UltraPhotoDisplay.upload_path routes PhotoDisplay.upload to /doUpload?dir=/image/ as test_ultra.py expects; account_label's alias handling matches every case in test_local_support.py; the two new PNGs are copied by postPatch into the same paths web_assets.py registers, and pillow is declared as a build dependency for the new lcars renderer).Blocking findings
None.
Important findings
None.
Suggestions
The guard asserts StartLimitIntervalSec/StartLimitBurst, Restart, StateDirectory, ConditionPathExists, the listen address, and the firewall port, but nothing about unit.serviceConfig.ExecCondition or ExecStart, even though modules/services/token-tv.nix:110 documents the contract ('ExecCondition exit codes 1-254 skip startup without marking it failed') and README.md:196-207 documents the observable behaviour ('A missing config or clock address skips startup'; 'Unreadable, malformed, or non-object JSON configuration reports a startup failure to the journal and failure monitor'). The ExecCondition script in modules/services/token-tv.nix:14-25 encodes that split as exit 255 vs exit 1.
Impact: A later edit that drops the ExecCondition line, swaps the 255/1 exit codes, or changes the ExecStart argv would still pass
nix flake checkand the token-tv-config check while silently breaking the documented skip-vs-failure behaviour and the failure-monitor opt-in described in README.md.Suggested fix: Add asserts alongside the existing unit checks, e.g.
assert builtins.match '.*token-tv-clock-configured.*' unit.serviceConfig.ExecCondition != null;and an assert that ExecStart carries --config/--host/--port/--state-dir with the option values, so the guard covers the same contract README.md documents.Tests and validation
Questions
patchesandpostPatchactually built (doCheck = true runspython -B -m unittest discover -s tests)? The two .patch files carry context-free hunks with absolute line offsets, and postPatch copies intotoken_tv/assets/, both of which depend on the pinned upstream tree at rev afc60163, which was not supplied to me.Review limitations
nix flake check,just test, or any repository code, so the guard's evaluation is argued from Nix semantics (thee1 or e2operator catches the attribute-not-found error raised while evaluating e1) rather than observed output.exe,shutil,subprocess, andjson_get, or that token_tv/assets/ exists for postPatch to copy into.pathoption's expansion of clients.codex/clients.antigravity-cli into the unit PATH, and the availability of theagyandcodexCLIs non-interactively under HOME = the primary user's home are not present in the supplied material.Diff coverage
README.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchpackages/token-tv/assets/agy-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/assets/opencode-pixel.png: reviewed — included in a context-limited batchpackages/token-tv/default.nix: reviewed — included in a context-limited batchpackages/token-tv/local-providers-lcars.patch: reviewed — included in a context-limited batchpackages/token-tv/smalltv-ultra.patch: reviewed — included in a context-limited batchscripts/check-token-tv-config.nix: reviewed — included in a context-limited batchReview metadata
Review 44 is Ready to merge on current head
d4b568a, with no blocking or important findings. The authorized review/fix monitoring cycle is now stopped; no merge or rollout-hold release has been performed. CI test/build run1183 remains queued.Confirming the questions: the package patches and postPatch were built against the pinned upstream tree, and doCheck completed all75 tests successfully. The exact latest Vega system also built. ExecCondition255 failed in the isolated Vega test, and the bounded configuration stopped with failed/start-limit-hit after3 starts. The module registers this real unit with the configured OnFailure monitor; systemd's primary documentation specifies the exit255 failure semantics: https://github.com/systemd/systemd/blob/main/man/systemd.service.xml. These observations and the eight generated-guard input checks are separate from the permanent Nix wiring assertions. The additional command/guard assertion suggestion is advisory; no runtime correction is required by this review.
d4b568a31b957ac09bbeRun the LCARS Token TV clock service on Vegato Run Vega's LCARS clock using the standalone Token TV flakeExtracted the application and generic service into nimmo/token-tv.nix#2, which has passed CI and is now merged under the user's authorization. Current consumer head
957ac09imports its main branch at locked revision 8c60c18. The package derivation is identical to the previously reviewed implementation; full service-equivalence checks pass before/after extraction, including on the refreshed main base. Both standalone/fleet flake checks, 75 package tests, generated guard/module checks and the final full Vega build pass. Existing native canary evidence remains in the MR description; this did not activate new changes or release Vega's hold. The new input is classified for all AI-runtime hosts. Current-head review/CI must pass before the authorized consumer merge.Automated code review
Reviewed commit:
957ac09bbe925fc811efb02a11c9c4831b213720Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Checked the supplied diff against the checked-out tree. The wiring is internally consistent:
token-tvis added as a root input in flake.nix and to the}@inputs:argument set, soinputs.token-tvis in scope in bothmodules/profiles/ai-runtime.nix(which already destructuresinputs) andmodules/services/token-tv.nix;packages.x86_64-linux.token-tvandchecks.x86_64-linux.token-tv-configfollow the existing redview pattern. The auto-update group lists exactly the four registered hosts (electra, lena, vega, lyra), which matches reality: all four importmodules/profiles/ai-desktop.nix, which importsai-runtime.nix, which now installstokenTvintohome.packages; the README rule 'New root flake inputs must also be classified by real consumers in lib/auto-update-policy.nix' is satisfied.clients.codexandclients.antigravity-cliare real members of the pinnedinputs.llm-agents.packages.<system>set (same attributes are read inmodules/profiles/ai-agents.nixas.codexand.antigravity-cli). The firewall line, themkAfterbackup path, thelib.mkIf cfg.monitorFailures (lib.mkAfter [...])monitor entry, and thenebula@mesh.service/sys-subsystem-net-devices-nebula.mesh.device/sops-nix.serviceordering match the sibling Vega services (kiwifs.nix,bookstack-mcp.nix,navidrome-mcp.nix,trilium-web.nix) verbatim; port 8787 is not used elsewhere on the mesh, and vega's overlay IP is 10.10.0.2 as the README states. The initial review's only finding is incorrect:config.nixosConfig.tokenTvis neither declared nor defined on electra/lena/lyra (grep showsnixosConfig.tokenTvis declared solely inmodules/services/token-tv.nix, imported only byhosts/vega/default.nix), so the lookup raises an attribute-not-found error, which the Nixoroperator does catch, yieldingfalse; the guard is total andenabledHosts == [ "vega" ]is satisfiable. No defect demonstrable from the supplied evidence.Blocking findings
None.
Important findings
None.
Suggestions
None.
Tests and validation
Questions
None.
Review limitations
token-tvflake itself is not supplied:inputs.token-tv.nixosModules.default, itsservices.token-tvoption set (user,extraPackages,listenAddress,port,configFile), its package, and the ExecStart/ExecCondition, tmpfiles rule, StateDirectory and StartLimit* settings asserted inscripts/check-token-tv-config.nixoriginate upstream and could not be inspected, so those assertions were not verified against real option names or defaults.nix flake check, the newchecks.x86_64-linux.token-tv-config, and the Vega build were not evaluated, so no assertion failure or type mismatch in the new module/check could be ruled out by evaluation.device_url/device_apifirmware notes, journal/failure-monitor reporting, reset-failed recovery) are documentation only and were not exercised.Diff coverage
README.md: reviewed — included in a context-limited batchflake.lock: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchlib/auto-update-policy.nix: reviewed — included in a context-limited batchmodules/profiles/ai-runtime.nix: reviewed — included in a context-limited batchmodules/services/token-tv.nix: reviewed — included in a context-limited batchscripts/check-token-tv-config.nix: reviewed — included in a context-limited batchReview metadata