The headset app asks for a check (cached releases under 10 minutes old count) each time it opens; every check
then installs a newer Frametanium release without asking unless something else is installing
("self_update": false turns it off). Its version now comes from a VERSION file in the bundle, so its own row
is right however it was installed (deploy.sh included), and Update all does Frametanium last so the restart
can't cut off another install. After an update the list says to reopen the app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3G4bF9bag9rHEh1Anvngi
2.4 KiB
Frametanium: notes for Claude sessions
See README.md for what it does. Service: manager.py (stdlib Python, runs on the Frame). Headset app: app/app.c.
Rules (from the 2026-10-20 review)
- Auth: every
/api/*request needs a secret, loopback included. Headset app sendsX-Frametanium-Key(app_keyfrom~/.config/frametanium/config.json), the page sendsX-Key(thepassword). Both are generated byensure_secrets(). Never add a loopback/no-password bypass, never accept secrets in the query string, and keephost_ok()(Host allow-list + Origin check). Any auth change must change app.c and page.html together, and old headset apps must still get a readable "#" notice in TSV replies. - Self-update:
check()(every few hours, on each headset-app launch via/api/refresh?launch=1, and on request) installs a newer Frametanium release by itself (self_updatein config.json, default on). Its installed version is the bundle'sVERSIONfile (tools/bundle.sh; CI passesVERSION=$GITHUB_REF_NAME), not installed.json.update_allmust keep Frametanium last (its install.sh restarts the service 3 s later). A bad release spreads to every Frame on its own now: test before tagging. - Write settings files only with
save_json(unique temp + fsync;private=Truefor config.json) and do read-modify-writes underfiles_lock. - Test locally: run manager.py with
HOME=<scratch>and a config.json with another port; build app.c natively (gcc $(sdl2-config --cflags) app/app.c $(sdl2-config --libs)) and screenshot withSDL_VIDEODRIVER=dummy PM_SCREENSHOT=out.bmp PM_SCREEN=list. - Don't push, tag, release or deploy without the user's OK.
Review fixes still to do (report: /data/cogent/reviews/2026-10-20/review-frametanium.md)
Done 2026-10-21: settings-file robustness (code-review 10, 11; security LOW 13), auth (security HIGH 1, 2, LOW 10, 12).
Left, in this order: security MEDIUM 3 (Discover installs run install.sh without a confirm step), 4 (no integrity
check: verify the GitHub asset digest; plan was an ed25519 signature for Frametanium's own updates, verified with
openssl pkeyutl -rawin), 6 (tar symlink traversal, .tar.zst via GNU tar), 5 (workflow: SDL2 hash, pin
actions by SHA), 7 (AppImage executed to unpack: prefer unsquashfs -o <ELF end>), LOW 8/9/11/14; then code-review
bugs 1, 3, 5-9 and 12-16 (2 and 4 were fixed with the self-update on 2026-10-21).