-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add read-only Actions queue health evidence #1150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
ec7c832
feat: add read-only actions queue health evidence
seonghobae 5950d6f
fix(queue-health): retry transient PR identity reads
seonghobae f92f08e
fix: use cross-repository queue health credentials
seonghobae 3196c2d
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 3f7c33b
Merge protected main into queue health evidence
seonghobae 47bb2bc
fix(actions): bound queue run response size
seonghobae 8b914ef
fix(actions): bound queue collector failure modes
seonghobae a6ac262
fix(queue-health): isolate repository collection errors
seonghobae 94e41c6
docs(queue-health): cite evidence boundaries
seonghobae 7bbd133
docs(ci): complete fixture constructor coverage
seonghobae 4467d5a
docs(tests): complete queue health test docstrings
seonghobae af65a69
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] 8fcb9b1
Merge current main into actions queue health
seonghobae 2df6b86
fix(queue-health): accept collector snapshot identities
seonghobae 77557e9
fix(ci): reject incomplete paginated queue evidence
seonghobae 31dde70
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] 2d857f6
fix(queue-health): count duplicate lanes by run
seonghobae 6469a76
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] db2c4c0
Merge branch 'main' into codex/pr1142-current-main-successor
seonghobae 92c419b
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] efa7788
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] 2fb5c2e
Merge remote-tracking branch 'origin/main' into codex/pr1142-current-…
claude a6be225
fix(actions-queue-health): fix pull_request_target identity, waiting …
claude 5830553
Merge origin/main and harden queue health collection
seonghobae e005330
fix(actions-queue-health): snapshot active runs atomically
seonghobae b050db5
fix(actions-queue-health): stabilize bounded active snapshots
seonghobae 0988f42
fix(actions-queue-health): cap active sweep requests
seonghobae 1c4d3f5
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] d95dc3f
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] dbd1428
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] b6d5858
Merge branch 'main' into codex/pr1142-current-main-successor
opencode-agent[bot] 55f151a
test(orchestrator): align free-pool policy with current credential co…
seonghobae 4af941f
merge(main): restack queue-health evidence on current control plane
seonghobae 8080387
test(queue-health): reproduce snapshot identity races
seonghobae 02a1ad9
test(queue-health): require least-privilege scheduler token
seonghobae 61cbf58
refactor(queue-health): isolate reviewed collector core
seonghobae d08617b
fix(queue-health): drop unused pull request permission
seonghobae 42a855a
fix(queue-health): bind reports to stable pull and workflow identity
seonghobae 2f57e71
docs(queue-health): document stable identity evidence
seonghobae 5018822
test(queue-health): require ConceptWeave canary
seonghobae b49c51b
feat(queue-health): include ConceptWeave canary
seonghobae fd81689
test(queue-health): require ELUNVERA canary
seonghobae 9154ddb
feat(queue-health): include ELUNVERA canary
seonghobae c842ee7
test(ci): cover zero-job startup failures
seonghobae 39d2f51
fix(ci): observe pre-job startup failures
seonghobae 0738d77
test(ci): bound startup-failure history
seonghobae 5e66f34
fix(ci): bound startup-failure diagnostics
seonghobae b0f1222
test(ci): retain old current-head startup failures
seonghobae 7981728
fix(ci): retain exact-head startup failures
seonghobae af72a26
test(queue-health): classify cancelled pre-runner evidence
seonghobae 79e0758
fix(queue-health): retain cancelled pre-runner evidence
seonghobae ebc4c80
docs(queue-health): record pre-runner cancellation evidence
seonghobae 1cee249
chore(queue-health): reconcile protected main without force
seonghobae b4f95bc
test(queue-health): cover target cancellations and skipped jobs
seonghobae 5a4950b
fix(queue-health): retain target cancellations by linked head
seonghobae b0b9aed
docs(queue-health): record target cancellation identity boundary
seonghobae b99839b
test(queue-health): reject unsupported startup-failure status query
seonghobae f567b11
fix(queue-health): use supported target cancellation filter
seonghobae 00c1a78
docs(queue-health): doctor supported workflow-run status filters
seonghobae d3a1138
test(queue-health): extend PR identity boundary through evidence reads
seonghobae 7683d22
fix(queue-health): revalidate PR identity after evidence reads
seonghobae a30548d
docs(queue-health): extend identity trace through terminal evidence
seonghobae 9a187a0
fix(queue-health): observe fast-mlsirm admission failures
seonghobae 5031e0b
test(queue-health): require post-evidence identity retry
seonghobae 36639d0
fix(queue-health): retry post-evidence identity reads
seonghobae 7d80a06
chore(queue-health): reconcile with protected Noema repair
seonghobae bbacf9e
chore(queue-health): reconcile with protected main 8c085835
seonghobae a9b73ed
Merge remote-tracking branch 'origin/main' into codex/pr1150-current-…
seonghobae e6622a4
fix(queue-health): align terminal evidence contracts
seonghobae c5d59c1
test(queue-health): reject duplicate paginated evidence
seonghobae dcb857a
test(queue-health): preserve unavailable step evidence
seonghobae e01e033
fix(queue-health): validate paginated and step evidence
seonghobae 889b095
fix(queue-health): require explicit zero-step evidence
seonghobae de676cb
test(queue-health): require initial identity bracket
seonghobae 7c4e42d
fix(queue-health): retry identity before run collection
seonghobae a0b05c0
chore(queue-health): reconcile current protected main
seonghobae 4c0f81b
chore(queue-health): reconcile protected main 2026-09-14
seonghobae fbcf718
Merge protected main into queue-health owner #1150
seonghobae 42bb922
Merge protected main into queue-health owner #1150
seonghobae 6f9f2b4
chore(central-ci): reconcile queue-health owner with protected main
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: GitHub Actions queue health | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "7 * * * *" | ||
|
|
||
| concurrency: | ||
| group: github-actions-queue-health | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| collect: | ||
| name: Collect exact-head queue evidence | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
| steps: | ||
| - name: Harden the runner (Audit all outbound calls) | ||
| uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout trusted queue-health source | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Collect read-only repository and runner evidence | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PR_REVIEW_MERGE_TOKEN || secrets.OPENCODE_APPROVE_TOKEN }} | ||
| run: | | ||
| if [ -z "${GH_TOKEN:-}" ]; then | ||
| echo "::error::PR_REVIEW_MERGE_TOKEN or OPENCODE_APPROVE_TOKEN is required for cross-repository queue reads." | ||
| exit 1 | ||
| fi | ||
| echo "::add-mask::$GH_TOKEN" | ||
| python3 scripts/ci/actions_queue_health.py \ | ||
| --allowlist config/actions_queue_health_repositories.json \ | ||
| --output-json "$RUNNER_TEMP/actions-queue-health.json" \ | ||
| --output-html "$RUNNER_TEMP/actions-queue-health.html" | ||
|
|
||
| - name: Upload queue-health evidence | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: github-actions-queue-health-${{ github.run_id }} | ||
| path: | | ||
| ${{ runner.temp }}/actions-queue-health.json | ||
| ${{ runner.temp }}/actions-queue-health.html | ||
| if-no-files-found: error | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "repositories": [ | ||
| "ContextualWisdomLab/.github", | ||
| "ContextualWisdomLab/TEPP", | ||
| "ContextualWisdomLab/contextual-orchestrator", | ||
| "ContextualWisdomLab/naruon" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # GitHub Actions queue-health evidence | ||
|
|
||
| The scheduled `actions-queue-health.yml` workflow reads a fixed allowlist of | ||
| CWL repositories once per hour and publishes a JSON report plus a keyboard- | ||
| readable HTML report as an artifact. The collector uses only `gh api` reads | ||
| through the configured cross-repository `PR_REVIEW_MERGE_TOKEN` or | ||
| `OPENCODE_APPROVE_TOKEN`; it fails visibly when neither credential is present. | ||
| It does not cancel runs, mutate branches, dispatch workflows, or alter merge | ||
| gates, and it never relies on the central repository's scoped `GITHUB_TOKEN` | ||
| for sibling-repository reads. | ||
|
|
||
| The report schema is `actions.queue_health.v1`. Each observed run records its | ||
| repository, pull-request number, head SHA, event, run attempt, concurrency | ||
| group (or an explicit unavailable marker), queue age, job state, and runner | ||
| assignment. A run is `current_head` only when its linked open pull request and | ||
| head SHA match. Stale linked runs are `obsolete`; runs without a pull-request | ||
| link are `unlinked`. Queued evidence remains incomplete even when a report is | ||
| successfully produced. | ||
|
|
||
| Queued runs use run-level evidence because GitHub has not assigned their jobs; | ||
| only current-head `in_progress` runs make the additional jobs API read needed | ||
| to inspect a concrete runner assignment. | ||
|
|
||
| List endpoints use GitHub CLI pagination with at most 20 pages. Pull-request | ||
| and job lists use pages of 100 records; workflow-run lists use pages of 50 so a | ||
| large Actions queue does not require one oversized response. An incomplete, | ||
| malformed, or larger response is recorded as repository-scoped incomplete | ||
| evidence and the collector continues with the remaining allowlisted | ||
| repositories; it never silently claims that the visible page is the whole | ||
| queue. The JSON and HTML reports expose each collection error explicitly. | ||
|
|
||
| Every external `gh api` read has a 30-second subprocess timeout, and the | ||
| collector job has a 30-minute execution ceiling. A timeout is typed as | ||
| incomplete queue evidence rather than success. A pull-request response missing | ||
| head or base identity gets one typed retry after a one-second delay; a second | ||
| incomplete response remains an explicit repository error. Repository names | ||
| reject `.` and `..` path segments. Offline snapshots also reject duplicate | ||
| repository entries before counting runs so repeated input cannot inflate the | ||
| reported queue. | ||
|
|
||
| The default queue-age SLO is 900 seconds. A current-head job that remains | ||
| unassigned beyond that limit produces a warning and an explicit manual action | ||
| to inspect runner capacity, billing, runner-group policy, environment | ||
| approval, and concurrency saturation. The workflow intentionally remains | ||
| read-only and fail-closed when GitHub API or runner evidence is unavailable. | ||
| Paged API reads are not atomic; changing totals are retained only when the | ||
| collected records cover the largest observed total, and the report remains | ||
| explicitly an observation rather than a merge decision. | ||
|
|
||
| The allowlist is deliberately explicit in | ||
| `config/actions_queue_health_repositories.json`; adding a repository requires | ||
| review of its governance and data boundary. This first slice does not claim | ||
| that a queued run is obsolete or safe to cancel. | ||
|
|
||
| ## References | ||
|
|
||
| GitHub. (n.d.). *REST API endpoints for workflow runs*. Retrieved August 20, | ||
| 2026, from https://docs.github.com/en/rest/actions/workflow-runs | ||
|
|
||
| Internet Engineering Task Force. (2022). *HTTP semantics* (RFC 9110). | ||
| https://www.rfc-editor.org/rfc/rfc9110 | ||
|
|
||
| OWASP Foundation. (n.d.). *Path traversal*. Retrieved August 20, 2026, from | ||
| https://owasp.org/www-community/attacks/Path_Traversal |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.