Skip to content

ci: weekly probe for Liftoff API host rotation - #16

Merged
DTTerastar merged 1 commit into
mainfrom
ci/api-host-probe
Apr 25, 2026
Merged

ci: weekly probe for Liftoff API host rotation#16
DTTerastar merged 1 commit into
mainfrom
ci/api-host-probe

Conversation

@DTTerastar

Copy link
Copy Markdown
Collaborator

Summary

Adds .github/workflows/api-host-probe.yml, a weekly job that catches Liftoff API host deprecations before users hit them.

  • Reads the current defaultAPIBase from internal/auth/auth.go.
  • Probes it with a bogus user.refreshToken request:
    • Live (real backend response, e.g. Session not found) → no-op.
    • Deprecated ("server is deprecated") → scans candidates: patch+1..3, minor+1.[0..3], minor+2.[0..1], major+1.0.0.
    • No response (DNS/TLS fail) → warning, no action.
  • On finding a live candidate: bumps the constant on auto/bump-api-host-vX-Y-Z, runs go build && go vet, opens a PR.
  • Idempotent: skips if an open PR already exists for that target version.
  • Schedule: Mondays 14:00 UTC (10am EDT / 9am EST). Also triggerable via Actions → Run workflow.

Why a workflow vs. a Claude routine

Pure scripted task — no judgment needed. GitHub Actions is free for this repo, has gh and git auth via GITHUB_TOKEN, and lives next to the code it patches.

Test plan

  • Trigger manually via workflow_dispatch on this branch — should print no-op: https://v2-12-3.api.getgymbros.com still live and exit 0.
  • After merge: confirm the scheduled run shows up in Actions → Probe Liftoff API host rotation.
  • (Eventually, when v2-12-3 retires) verify the auto-PR opens correctly.

Liftoff retires version-pinned API subdomains over time, breaking the
CLI's hardcoded default. This weekly job probes the current
defaultAPIBase, and if the backend returns "The server is deprecated.",
scans a candidate window (patch+1..3, minor+1, minor+2, major+1) for a
live host and opens a PR bumping the constant. No-op when the host is
still live. Manual trigger via workflow_dispatch.
@DTTerastar
DTTerastar merged commit 9371569 into main Apr 25, 2026
1 check passed
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