furtka/tests
Daniel Maksymilian Syrnicki 22c2245ac4 fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json
updater:
- /opt/furtka/current is swapped via rename() instead of unlink+symlink,
  so a power cut can't leave the box without a current version
- OSError after the flip (disk full writing the Caddyfile) now rolls back
  too; rollback restores the previous Caddyfile and reloads caddy +
  daemon-reload
- the health check keeps polling on read timeouts / RemoteDisconnected
  instead of escaping and skipping the rollback
- run_update writes an 'error' stage for any failure (download, sha,
  disk full); the settings page shows it instead of spinning on
  'Downloading…'

auth:
- users.json that exists but is empty/corrupt/unreadable raises instead of
  reading as 'no admin yet' — before, a truncated file made /login an open
  create-admin form for the whole LAN. /login answers 503 with SSH recovery
  steps instead
- save_users fsyncs before the rename
- first-run admin creation is serialised (threaded server)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wq1hzUp4ZmCKHDuLKCnu73
2026-09-28 13:11:42 +02:00
..
test_api.py fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json 2026-09-28 13:11:42 +02:00
test_app.py fix(installer): safer disk picker, single install at a time, surface silent archinstall failures 2026-09-28 12:53:24 +02:00
test_auth.py fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json 2026-09-28 13:11:42 +02:00
test_catalog.py fix(catalog): retry the boot-time sync and record failures as an error stage 2026-08-25 16:38:06 +02:00
test_cli.py fix(cli): fire on_install hooks on named CLI installs 2026-06-28 13:03:33 +02:00
test_deps.py chore: ruff format 2026-05-11 20:10:04 +02:00
test_diskprep.py fix(installer): release the target disk before archinstall partitions it 2026-08-25 15:18:39 +02:00
test_dockerops.py chore: ruff format 2026-05-11 20:10:04 +02:00
test_drives.py fix(installer): safer disk picker, single install at a time, surface silent archinstall failures 2026-09-28 12:53:24 +02:00
test_https.py fix(https): make HTTPS opt-in to stop the BAD_SIGNATURE trap on fresh installs 2026-04-21 19:30:04 +02:00
test_install_runner.py chore: ruff format 2026-05-11 20:10:04 +02:00
test_installer.py fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server 2026-09-28 13:04:09 +02:00
test_manifest.py feat(apps): app-to-app dependencies with install + start hooks 2026-05-11 19:39:10 +02:00
test_passwd.py fix: unbreak upgrade path + install-lock race 2026-04-21 17:03:28 +02:00
test_reconciler.py fix(deps): give on_start hooks the consumer's stored credentials 2026-05-28 23:45:42 +02:00
test_scanner.py feat(furtka): resource-manager skeleton — manifest, scanner, CLI 2026-04-15 09:59:41 +02:00
test_sources.py feat(catalog): on-box apps catalog synced independently of core version 2026-04-20 14:16:02 +02:00
test_updater.py fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json 2026-09-28 13:11:42 +02:00
test_webinstaller_assets.py fix(catalog): retry the boot-time sync and record failures as an error stage 2026-08-25 16:38:06 +02:00