fix(ci): harden sponsor-monitor cron workflow against silent DNS failures - #86
Open
Sam-Aitech wants to merge 1 commit into
Open
fix(ci): harden sponsor-monitor cron workflow against silent DNS failures#86Sam-Aitech wants to merge 1 commit into
Sam-Aitech wants to merge 1 commit into
Conversation
…ures
Six consecutive daily runs (Jul 30-Aug 6) failed with curl exit code 6
(unresolved hostname) because a stale CRON_URL secret pointed at an
unreachable host, and Evaluate response was skipped since curl's
nonzero exit under `bash -e` short-circuited the job before the HTTP
status was ever checked. The failure was silent and undiagnosable from
the job logs alone.
Adds explicit validation before the trigger POST: secrets present,
CRON_URL is a bare https:// base URL (no path/query), DNS resolves,
and the authenticated read-only health endpoint returns 200. Decodes
curl transport-error exit codes into readable messages and restricts
the workflow token to permissions: {}.
|
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.



Summary
CRON_URLsecret pointed at an unreachable host;bash -emade theEvaluate responsestep get skipped entirely, so the failure was silent in the job summary.checkbyai.net) is healthy right now (/,/api/health→ 200,/api/ops/cron-ping/health→ 401 unauthenticated as expected), and theCRON_URLsecret has been updated tohttps://checkbyai.net. This PR is the workflow-hardening half of the fix so a bad secret fails loud next time instead of six days quiet.CRON_URLis a barehttps://base URL with no path/query, DNS resolves) and a pre-flight authenticated health check before the trigger POST. Both curl calls now decode transport-error exit codes into readable messages. Workflow token permissions restricted topermissions: {}.Test plan
js-yamlload)https://checkbyai.net, trailing-slash, path, non-https, and query-string casesworkflow_dispatchrun on this branch to confirm the hardened steps behave against real prod (202/409/423 all acceptable)