Skip to content

fix: add auth + cleanup to synthetic uptime check (issue 8.9 / #163) - #181

Open
Appsoft1000 wants to merge 1 commit into
determined-001:mainfrom
Appsoft1000:fix/uptime-check-auth-163
Open

fix: add auth + cleanup to synthetic uptime check (issue 8.9 / #163)#181
Appsoft1000 wants to merge 1 commit into
determined-001:mainfrom
Appsoft1000:fix/uptime-check-auth-163

Conversation

@Appsoft1000

Copy link
Copy Markdown

The synthetic create-link check in scripts/uptime-check.mjs POSTs to
/links with no auth header. Since seller auth landed in 6.x, POST
/links requires a bearer token, so the check has been returning 401 —
a permanent false negative sitting next to two real checks.

Changes:

  • Read UPTIME_API_KEY from env and send as Bearer token in the
    synthetic link check.
  • After creating a link, cancel it via POST /links/:id/cancel so
    synthetic rows no longer accumulate in the database.
  • Improve the error message when UPTIME_API_KEY is missing (clear
    guidance instead of a cryptic 401).
  • Inject UPTIME_API_KEY from repo secrets in the GitHub Actions
    workflow.
  • Add a prominent "Last regenerated" timestamp to docs/STATUS.md so
    a stale page reads as stale instead of green.
  • Extract testable check functions into scripts/lib/uptime-check.ts.
  • Add scripts/uptime-check.test.ts: 11 unit tests against a mocked
    API covering auth, error handling, cleanup, and timeout.
  • docs/STATUS.md updated to show its staleness.

Closes #163

…ined-001#163)

The synthetic create-link check in scripts/uptime-check.mjs POSTs to
/links with no auth header. Since seller auth landed in 6.x, POST
/links requires a bearer token, so the check has been returning 401 —
a permanent false negative sitting next to two real checks.

Changes:
- Read UPTIME_API_KEY from env and send as Bearer token in the
  synthetic link check.
- After creating a link, cancel it via POST /links/:id/cancel so
  synthetic rows no longer accumulate in the database.
- Improve the error message when UPTIME_API_KEY is missing (clear
  guidance instead of a cryptic 401).
- Inject UPTIME_API_KEY from repo secrets in the GitHub Actions
  workflow.
- Add a prominent "Last regenerated" timestamp to docs/STATUS.md so
  a stale page reads as stale instead of green.
- Extract testable check functions into scripts/lib/uptime-check.ts.
- Add scripts/uptime-check.test.ts: 11 unit tests against a mocked
  API covering auth, error handling, cleanup, and timeout.
- docs/STATUS.md updated to show its staleness.

Closes determined-001#163

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Appsoft1000 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Aycode01 is attempting to deploy a commit to the determined's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

8.9 - The synthetic create-link check has 401'd since seller auth landed

2 participants