Skip to content

POST /update and GET /update/status: hand off to the image updater or keep the git upgrade (rigforge#684 3/3) #701

Open

Description

@pithead-developer

What's the problem

No API call updates a rig and reports progress. POST /upgrade needs a git checkout and a coordinator tag, so it cannot update an appliance rig.

What it impacts

Appliance rigs, paired or standalone, and the Pithead v2.0.5 per-rig update.

How I found it

Split from #684 while grooming v1.20.0 on 2026-11-17. The 2026-11-16 comment on #684 shows that the status route and the appliance handoff need pithead rig-update and its verdict file, which exist only in pithead PR #4103.

How important is it

High for v1.20.0. Blocked on p2pool-starter-stack/pithead#4013 and on rigforge#684 1/3.

Acceptance criteria

  • POST /update {tag?, coordinator_version?}: the tag defaults to latest. With coordinator_version, any target above it is refused (semantic comparison). Equal or unsupported targets are refused with a reason. The tag must match a strict release-tag regex and resolve to the release host.
  • The call returns 202, and GET /update/status reports progress and the verdict without leaking tokens or paths. Behaviour across a reboot is defined: 202, the connection drops, and status is readable after boot.
  • On an appliance rig the call hands off to the image updater (pithead rig-update). On a standalone DIY install it keeps the git upgrade, through tor_socks5 if set.
  • Tests cover the handoff, the standalone path, refusals and every status value.

Possible solutions

The spool action consumed by the root oneshot that already does upgrades, reading the verdict file that pithead#4013 defines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedenhancementsize:M

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions