Skip to content

fix(api): let an owner's phone read the version check without Face ID - #2027

Open
frahlg wants to merge 1 commit into
masterfrom
version-check-no-step-up
Open

frahlg wants to merge 1 commit into
masterfrom
version-check-no-step-up

Conversation

@frahlg

@frahlg frahlg commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Problem

A tester (xorath, 16 Nov 2026) asked to update the box from the phone, and Fredrik agreed it should be one button. The box's own page has had Update FTW since October; neither app has it.

GET /api/version/check is registered at the Configure tier with a ceremony. Through the app's passthrough, the phone gets E_NEEDS_STEP_UP just for asking whether a newer Core exists. It would need Face ID every time Settings opens.

Change

  • GET /api/version/check is marked NoStepUp. It stays Configure, so an owner is still required, and a viewer cannot make the box ask GitHub with ?force=1.
  • POST /api/version/update and the other version writes keep the ceremony.
  • The passthrough section of docs/protocol.md now names the routes that skip the ceremony. It said only "the charging schedule today", but FTW Cloud's grant and statistics already skipped it as well.
  • Changeset: patch.

Docker and Home Assistant are unchanged. Deps.SelfUpdate is nil there, so every /api/version/* still answers 503 self-update disabled. Only a native install started by ftw-launcher (which sets FTW_NATIVE_SLOT_ROOT) updates itself. The app shows the button only on a native box.

Evidence

  • TestVersionCheckSkipsTheCeremonyButTheUpdateDoesNot: the route table marks the check (with and without ?force=1) Configure and NoStepUp. The six version writes stay Configure with the ceremony, and the status route stays Read.
  • Three tests drive a real app session through the passthrough:
    • TestAnOwnerReadsTheVersionCheckWithoutACeremony: the owner's read reaches the handler, which answers 503 on a box without a native updater.
    • TestTheUpdateStillNeedsTheCeremony: the update still answers E_NEEDS_STEP_UP.
    • TestAViewerCannotReadTheVersionCheck: a viewer gets E_SCOPE_DENIED.
  • With the mark taken out, the route test and the owner test both fail.
  • make verify passes locally.

Paired PR

The iPhone app's Version row and Update FTW button are in srcfl/ftw-app#198. On a box without this change, the app asks for Face ID before it reads the check, so today's boxes can still update from the phone.

Still owed: the web client's working copy of the protocol, ftw-webapp/docs/protocol.md, has the same "the charging schedule today" sentence. It should change when the web client gets its own Version row.

Not merged. Fredrik decides.

🤖 Generated with Claude Code

GET /api/version/check is registered at the Configure tier, so reading it
through the app's passthrough asked for a passkey ceremony. The iPhone app
is about to show the running version, a newer one and its notes in
Settings, and Face ID is the wrong cost for a question.

Mark the GET NoStepUp. It stays Configure, so an owner is still required
and a viewer cannot make the box ask GitHub with ?force=1. Installing
(POST /api/version/update) and every other version write keep the
ceremony. Tests cover the route table and the passthrough: the owner's
read reaches the handler, the update still answers E_NEEDS_STEP_UP and a
viewer is refused. The passthrough section of docs/protocol.md now names
the routes that skip the ceremony.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:32:09.781051Z 8e1204f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant