Repository navigation
Add the Bills and Renewals check - #64
Open
HarrisonWard wants to merge 1 commit into
Open
HarrisonWard wants to merge 1 commit into
HarrisonWard wants to merge 1 commit into
Conversation
Private GET /api/health/upkeep for Uptime Kuma: domain renewal dates (public RDAP) and whether GitHub actually ran the last build (read-only fine-grained token). 503 when something is red, cached 6 hours, plain 404 without the UPKEEP_TOKEN bearer header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017y11pRAne97h322a6bhYgD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A private
GET /api/health/upkeeproute for Uptime Kuma that checks the things that quietly stop BandWagon when a bill or a renewal slips:APP_URLdomain plus any inWATCH_DOMAINS(public RDAP). Yellow inside 30 days, red inside 7. A failed lookup is yellow.GITHUB_BRANCH. When every job has no steps, it says GitHub didn't start the build, which is almost always a failed payment or the Actions spending limit.200 when all is well, 503 when something is red. Results cached 6 hours per instance. Code in
apps/web/src/lib/upkeep.ts, route inapps/web/src/app/api/health/upkeep/route.ts.Why
A failed GitHub payment on Oct 7 to 8, 2026 silently stopped builds and nothing said so. This makes that (and a lapsing domain) page the phone.
Setup
UPKEEP_TOKENto 32+ random characters (secret). Use a different value on staging.GITHUB_STATUS_TOKEN(secret).GITHUB_REPOandGITHUB_BRANCHdefault toharrisonwardtechnology/BandWagonandmain.WATCH_DOMAINS=flomogo.app(and any other domains to watch).https://bandwagon.club/api/health/upkeep, every 6 hours, retries 1, header{"Authorization": "Bearer <UPKEEP_TOKEN>"}, shared phone alert channel, not on the public status page.Docs:
docs/operations/UPTIME-KUMA-PLAYBOOK.md#bills-and-renewals-check,docs/COOLIFY.md. Variables added to the three Coolify compose files andconfig/env.schema.example.ts.Security Notes
Authorization: Bearer <UPKEEP_TOKEN>; the token must be at least 24 characters and is compared in constant time.Cache-Control: no-store.rdap.organdapi.github.com.GITHUB_REPOandGITHUB_BRANCHare validated before use.Tests Run
npm test: 334 pass, 0 fail (newtests/upkeep.test.ts: token 404, short token, domain inside a week, billing never started, real failure, bad repo name, network failure, 6 hour cache; all network mocked)npm run typecheck: clean🤖 Generated with Claude Code
https://claude.ai/code/session_017y11pRAne97h322a6bhYgD
Generated by Claude Code