Skip to content

feat: startup version check, on by default - #5

Open
catinspace-au wants to merge 4 commits into
mainfrom
feat/startup-version-check
Open

feat: startup version check, on by default#5
catinspace-au wants to merge 4 commits into
mainfrom
feat/startup-version-check

Conversation

@catinspace-au

@catinspace-au catinspace-au commented Aug 27, 2026

Copy link
Copy Markdown

Adds the startup version check to the Hub's core API service -- stdlib only,
no new dependencies, ON by default with an explicit opt-out.

How it behaves:

  • on by default, reporting to https://releases.hyperi.io/api/v1/check
  • VERSION_CHECK_ENABLED=false is the opt-out and always wins -- one debug
    line, nothing sent
  • fires in a daemon thread from the lifespan startup, so it can never block
    or fail the service; an unreachable endpoint (firewall, air-gap, closed
    port) costs 1 warning log line
  • payload is product/current_version/os/arch plus a platform-derived
    instance id (UUIDv5); VERSION_CHECK_SEND_INSTANCE_ID=false strips the id
  • the test suite opts itself out, so CI never phones home

Done when the service boots, checks once, and a deployment can turn it off
with one env var.

Stdlib-only (urllib + a daemon thread), no new dependencies. Off by
default and always disable-able: it runs only when VERSION_CHECK_ENABLED
and VERSION_CHECK_API_URL are both set, and any failure - unreachable
endpoint, firewall, bad response - costs one warning log line and
nothing else. The payload is product/version/os/arch plus a
platform-derived instance id (config override, else k8s cluster CA +
namespace, else app-scoped machine-id outside containers, else a
persisted file, else ephemeral); VERSION_CHECK_SEND_INSTANCE_ID=false
strips the id entirely. The UUIDv5 derivation is shared with the scalo
chassis so one host reports one id across HyperI products.

Seven new tests: disabled default spawns nothing, a mock server receives
the exact payload shape, the id strips on request, an explicit id wins,
resolution is stable, a closed port ends at the log line, and the
derivation fixture matches scalo's.
@catinspace-au catinspace-au changed the title feat: opt-in startup version check feat: startup version check, on by default Aug 27, 2026
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