Skip to content

Recover deleted kiosks and allow updates during authentication failures - #35

Merged
mrinc merged 8 commits into
masterfrom
fix/kiosk-deletion-reset
Sep 25, 2026
Merged

mrinc merged 8 commits into
masterfrom
fix/kiosk-deletion-reset

Conversation

@bcbetterninja

@bcbetterninja bcbetterninja commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

A deleted or rejected kiosk key could leave a Linux kiosk displaying cached content indefinitely: deletion never sent the explicit reset signal expected by installed clients, and authenticated update checks could not download a repair.

This change adds two recovery paths:

  • Persist deleted key hashes atomically with deletion and return a verified bf_kiosk_deleted envelope on polling. Installed Linux clients independently confirm rejection through _check before resetting.
  • Persist update windows, the server's IANA timezone, app/OS channels, and version pins on Linux. Automatic updates evaluate the window locally; explicit admin pushes still bypass it. Failed/rejected/malformed authenticated checks fall back to public release selection. Healthy sessions keep authenticated downloads; failed download endpoints fall back to public routes without credentials. Rate limiting defers retries with jitter without consuming installation attempts. A separate worker checks public releases after two minutes without a valid heartbeat, independently of enrollment and bundle loading.

Public selection honors saved pins without falling through missing/yanked versions. A valid authenticated up-to-date response stays authoritative. Signature verification, compatibility selection, upgrade-only checks, rollback protections, OTA flags, demo restrictions, and existing failed-version limits remain. Pairing reset preserves the saved policy; bootstrap updates honor it and share the update-apply lock with recovery.

Deploy the server migration/change first, then the Linux client. The client needs one successful heartbeat to save its recovery policy. This does not retroactively recover keys deleted before the migration or install recovery code on an already-inaccessible old binary. New targeted admin pushes still need a working control connection; publishing a newer release on a saved, unpinned channel provides recovery during auth outages. See docs/update-recovery.md for details.

Validation: 146 server tests passed, 5 skipped; TypeScript no-emit check passed; 39 Rust core tests passed; 18 tests passed using a harness that compiles the production updater/recovery/rollback modules. HTTP tests exercise 401/503 fallback, saved pins, credential-free artifact downloads, hash rejection, valid up-to-date behavior, and policy invalidation. Rust parser checks passed for UI wiring. Full Linux UI compilation and live-device testing were unavailable because GTK/GStreamer/WebKit development libraries and the affected Pi are unavailable.

Review follow-up: normal fleet downloads retain their authenticated routes instead of sharing the public per-IP quota. Regression tests cover seven healthy downloads, recovery after rejected authentication, preserved OS Range headers, 429 cooldown, and retaining prior genuine failures when refunding a deferred OS attempt. Updater harness: 22 tests passed. The merge with master also preserves full-OS eligibility for all OS recovery and bootstrap paths.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 60cb355d-ed40-4588-8ff1-5d647b25c356


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bcbetterninja bcbetterninja changed the title Fix deleted kiosks retaining cached content Recover deleted kiosks and allow updates during authentication failures Sep 24, 2026
@bcbetterninja
bcbetterninja marked this pull request as ready for review September 24, 2026 20:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92410f72a3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread client/src/platform/linux/firmware.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2abbd87bc0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread client/src/platform/linux/os_update.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 908a342517

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread client/src/platform/linux/update_recovery.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e77750139a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread client/src/platform/linux/update_recovery.rs Outdated
@mrinc
mrinc merged commit 37c02b7 into master Sep 25, 2026
10 checks passed
@mrinc
mrinc deleted the fix/kiosk-deletion-reset branch September 25, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants