feat(ci): sweep every default branch we own, file one issue - #89
Merged
Conversation
Three repositories showed `Release and PyPI Publish - failing` at the top of a PUBLIC repository page for five months and nobody acted. The signal was never hidden; it was ignored. A fourth per-repository badge would repeat that. Separately, no cross-repository detector exists. Four repositories carry a `release-health` workflow (openadapt-flow, openadapt-capture, openadapt-desktop, OpenAdapt) but each `.github/release-health.json` hardcodes a single `"repository"` and asks a different question: is releasable work unpublished? None reads another repository's Actions API. `bin/oa-green` in the workspace asks exactly the right question and is a local script nothing runs on a schedule, so it only helps whoever remembers to run it. This adds one daily job here, because this repository already owns `repos.yml` and already files and updates one issue on a cron in published-version-claims.yml. One run a day, one issue, one place to look. Classification is ported from bin/oa-green, not re-derived: `cancelled`, `timed_out`, `startup_failure` and "still running" are not green; a red newest run is interrogated (deleted / disabled / no longer push-gated -> retired, frozen history, never reported as a failure); a green run on an older head SHA is a note. Two corrections to oa-green, both from evidence: - Retirement only excuses a failure that PREDATES it. oa-green documents this limit itself. openadapt-grounding, openadapt-retrieval and openadapt-viewer failed a push-triggered release at 2026-07-28T00:04Z and were switched to workflow_dispatch at 02:22Z; trusting the current trigger alone would call all three permanently stale and would also miss the next dispatched failure. - An in-flight run gets a grace period. oa-green is a point-in-time check, so any in-flight run correctly fails it. A daily cron alerting on every in-flight run would flap for a reason that is not a defect. Repository list is the live organisation listing, not repos.yml: repos.yml is the docs-site registry and deliberately omits internal tooling, so roughly 20 repositories we own -- including this one -- are absent from it. Archived repositories are excluded (frozen history) and forks are excluded (a red branch on an upstream we forked is not ours to fix). No new secret. A public repository's Actions API is readable unauthenticated, so the default repository-scoped token covers all 26 public repositories. The 8 private ones return 404 and are listed as "not readable", never as failures; an optional OA_SWEEP_TOKEN with actions:read covers them if it is ever set. Cost: standard library only, no dependency install, ~72 seconds and ~160 API reads a day against a 1000/hour budget. This repository is public, so the Actions minutes are free. Verified against the live organisation today: 34 repositories swept, one genuinely not green (openadapt-wright `Deploy Worker`).
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.
The finding, verified against
origin/mainand the live organisation todayIt held, and it is worse than stated.
openadapt-grounding,openadapt-retrievalandopenadapt-viewerall hadRelease and PyPI Publishfailing onmainfrom 2026-02-18. All three failed again on a push at 2026-07-28T00:04Z — five months later. All three were switched toworkflow_dispatch-only at 2026-07-28T02:22Z, roughly two hours before this branch was written.The cross-repository gap is real too. Four repositories carry a
release-healthworkflow —openadapt-flow,openadapt-capture,openadapt-desktop,OpenAdapt— and each.github/release-health.jsonhardcodes exactly one repository ("repository": "OpenAdaptAI/openadapt-flow"and siblings). They ask a different question: is releasable work unpublished? None of them reads another repository's Actions API, and none asks whether a default branch is green.bin/oa-greenasks exactly the right question and is a local script that nothing runs on a schedule.No existing general mechanism was found to extend.
What this adds
One scheduled job, here, because this repository already owns
repos.ymland already files and updates one issue on a daily cron inpublished-version-claims.yml.scripts/sweep_default_branch_ci.py— standard library only, no dependency install..github/workflows/default-branch-sweep.yml—cron: '11 7 * * *', offset from the 06:41 version-claims job.tests/test_sweep_default_branch_ci.py— 21 tests that prove the classifier fires on the real incidents and stays quiet on the noise.Classification is ported from
bin/oa-green, not re-derived.cancelled,timed_out,startup_failureand "still running" are not green. A red newest run is interrogated before it is believed: deleted, disabled, or no longerpush/pull_request-triggered means retired, which is frozen history and is never reported as a failure. A green run on a head SHA that is not current is a note.Two corrections to
oa-green, both from evidenceoa-greendocuments this limit itself: "switching a workflow toworkflow_dispatchquiets this tool about it". The three release repositories above are exactly that case. A red run that started after the commit that retired the workflow ran under the current configuration and is live. Costs one extra read, only for a workflow that is already red.oa-greenis a point-in-time check a human runs before acting, so any in-flight run correctly fails it. A daily cron alerting on every in-flight run would flap for a reason that is not a defect.Two smaller rules keep the report readable: a
dynamic/workflow path is GitHub's own synthesised workflow (Dependabot, CodeQL default setup) so the file questions do not apply to it, and a stale green run is only worth reporting for a workflow that is actually push-gated — a nightly workflow is supposed to have last run on an older commit. Without that second rule the report today carried 35 meaningless lines.Design choices
Repository list: the live organisation listing, not
repos.yml.repos.ymlis the docs-site registry — 13 entries that deliberately omit internal tooling "so a product evaluator sees the product, not the toolshed". It is correct for its purpose and wrong for this one: it omits roughly 20 repositories we own, including this one. Archived repositories are excluded (frozen history, unrepairable) and forks are excluded —AGENTS.mdis explicit that a red branch on an upstream we forked is not our business.One issue, updated in place. Reopened if closed, closed with a comment when everything is green. No "all green" post.
Permissions: no new secret. A public repository's Actions API is readable with no authentication at all, so the default repository-scoped
GITHUB_TOKENcovers all 26 public repositories. The 8 private ones return 404 to it and are listed as "not readable", never as failures. An optionalOA_SWEEP_TOKENwithactions:readcovers them if it is ever set; the job works without it.Cost. Standard library, no
uv sync, no lockfile, no cache. Measured today: 72 seconds and 159 API reads for 34 repositories, against a 1000/hour budget. Every list call sets an explicitper_page; the only pagination loop is the organisation listing. This repository is public, so the Actions minutes are free.Proof it works — real run against the live organisation, 2026-07-28
That one is real:
Deploy Workerfailed 9 for 9 from 2026-03-02 to 2026-03-19 becauseFLY_API_TOKENdoes not exist, it is stillpush-gated onmain, and no green run exists. It is path-filtered, so nothing has triggered it since.The collapsed "green, with notes" section correctly records the three release workflows as
not-push-gatedwith the retirement timestamp, so if the next dispatched release fails, this job reports it.