Skip to content

feat: add read-only Actions queue health evidence - #1150

Draft
seonghobae wants to merge 76 commits into
mainfrom
codex/pr1142-current-main-successor
Draft

feat: add read-only Actions queue health evidence#1150
seonghobae wants to merge 76 commits into
mainfrom
codex/pr1142-current-main-successor

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Current-main successor for #1142. This is the canonical read-only Actions queue-health owner lane; it does not cancel/rerun observed workflows, mutate leaf branches, synthesize success, weaken required checks, or merge repositories under observation.

Current protected-base reconciliation — 2026-09-03

Protected .github/main is exact 8c085835fbf77de2321b72fa6b8dd946227e523e. The queue-health lane was reconciled non-destructively onto that protected tip rather than transferring predecessor evidence.

Current exact head is bbacf9e81ae954eb8365fbfe1856d8698a768a4a. It has queue-health predecessor 7d80a06c3a48f6411a17aa41e48b1f7064c5e36a and protected main@8c085835fbf77de2321b72fa6b8dd946227e523e as parents. The writer ref advanced with force=false; the effective queue-health implementation/config/docs/tests remain preserved and the branch is no longer behind protected main. No destructive rebase or source-copy workaround was used.

Every predecessor-head check/review is historical after this movement.

Fresh exact-head control-plane evidence

Exact bbacf9e8... runs for Noema token-lifetime, Secret Scan, Semgrep, CodeQL PR, Python Security, Scorecard, Security Scan, SBOM and OSV have materialized but remain non-passing. Security Scan run 33655230050 exposes four exact-head ubuntu-24.04 jobs (dependency-review, trivy-fs, osv-scan, scorecard) with steps: [], runner_id=0 and no runner identity: this is the pre-checkout acquisition class.

A fresh leaf canary independently reproduces both classes after the central reconciliation. fast-mlsirm#1519@0939b77608ec55d0d765da59c3e7d1926b98d365 has required CodeQL PR run 33655884568 terminating startup_failure with zero jobs, while Security Scan 33655882631 materializes four exact-head ubuntu-24.04 jobs with no runner identity or steps. Existing fast-mlsirm#1729@7faa16037a3e8697e640bfbac780709ee5297d1f shows the same distinction. Exact evidence is also recorded on owner issue #712.

Owner-side incident contract

Independent ContextualWisdomLab repositories reproduce distinct organization Actions admission states before source execution:

  • an exact-current required workflow can terminate startup_failure with zero jobs;
  • a workflow can materialize jobs that remain pre-checkout with runner_id=0, no runner name and no steps;
  • a job can be cancelled after materialization but before runner assignment/checkout.

The collector keeps those states distinct and fail closed. Ordinary head-bound evidence uses bounded supported workflow-run queries and local classification. pull_request_target cancellation candidates are accepted only after linked current-open-PR number/head identity is proven. PR identity is re-read after terminal/job evidence; transient incomplete reads receive the bounded retry added by RED 5031e0bcb498add8d5833e7ebc0f8400a1835e4f / GREEN predecessor 36639d090fd24c894e06fe39d01bac2dcfa0c4a4, while persistent incompleteness or identity drift remains a hard evidence failure.

ContextualWisdomLab/fast-mlsirm remains in the explicit bounded read-only repository allowlist. Leaf repositories must not answer this incident with no-op commits, runner-selector churn, gate weakening, or predecessor-success promotion.

RED / GREEN closure criterion

RED is either (a) an exact-current required workflow terminating startup_failure before any job exists, or (b) an exact-current materialized required job with no runner assignment, checkout SHA, or steps. GREEN requires the unchanged exact owner/leaf heads to obtain actual runner assignment, checkout identity, and terminal required workflow conclusions under the current ruleset, while queue-health classification continues to distinguish the pre-job and pre-checkout cases fail closed.

Landing boundary

Merge only on this unchanged exact head when every applicable live protected check is terminal success, all valid review threads/findings are resolved, and the live review policy is satisfied. Queued, pending, cancelled, startup_failure and predecessor results are incomplete evidence. No self-approval, bypass, force update or administrative success synthesis is authorized.

2026-09-07 evidence-integrity repair

Exact repair head 7c4e42daa275e71c908605ad77790b01cad12bfe repairs three fail-closed evidence defects without weakening any leaf gate:

  • paginated responses require stable positive record identities and reject duplicates across pages;
  • missing/null job steps remain unavailable, malformed step payloads fail closed, and pre-runner cancellation requires affirmative zero-step evidence;
  • a transiently incomplete initial PR-identity read must become complete before active-run collection starts.

Remote RED commits: c5d59c12e9f2b3424acadd055e8f21b71fcacd0b, dcb857ace02f7f82ed2b48369d6535428b31e358, de676cb38b6d3da68a0af660e631a29188ed7675. Remote GREEN commits: e01e03399be44329b8f366db46998a0562ec2a5a, 889b095c590e224e9b0e7187b1ed8428740bdf76, 7c4e42daa275e71c908605ad77790b01cad12bfe.

Current exact head a0b05c087ece89c989c2a2ede065f7f85dcaf4b4 is a non-force two-parent reconciliation of the complete repair head and protected main@c9052e607e5f3cc76e73207e7786b21500721b79; the compared path sets do not overlap. Reconciled-tree verification: 72 queue-health tests passed; full repository suite 3,047 passed, 1 skipped, 21 subtests passed; touched production modules report 100% docstring coverage; compile and diff checks passed. Fresh GitHub exact-head checks and qualifying independent review remain mandatory before ordinary merge.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ae1f3de-5a46-45ff-b947-18ee3b0e41fb

📝 Walkthrough

Walkthrough

시간별 GitHub Actions 큐 상태 수집 기능을 추가했습니다. 허용 저장소의 실행과 작업을 읽기 전용으로 조회하고, 실행 상태와 queue-age SLO를 분류합니다. 결과를 JSON·HTML 아티팩트로 저장하며, 워크플로 계약과 처리 경로를 테스트합니다.

Changes

Actions Queue Health

Layer / File(s) Summary
입력 계약 및 GitHub API 수집 기반
scripts/ci/actions_queue_health.py, tests/test_actions_queue_health.py
저장소, 타임스탬프, API 응답을 검증합니다. gh api를 읽기 전용으로 호출하고 PR, 작업, workflow run 데이터를 정규화합니다.
허용 저장소 스냅샷 수집
config/actions_queue_health_repositories.json, scripts/ci/actions_queue_health.py, CHANGELOG.md, tests/test_actions_queue_health.py
4개 허용 저장소에서 PR과 queued/in-progress 실행을 수집합니다. 현재 head 실행의 작업을 조회하고, 불완전한 PR 식별 응답은 한 번 재시도합니다.
실행 분류 및 보고서 출력
scripts/ci/actions_queue_health.py, tests/test_actions_queue_health.py
실행을 current-head, obsolete, unlinked로 분류합니다. runner 할당, queue-age SLO, 중복 lane, 차단 사유를 JSON·HTML 보고서에 기록합니다.
워크플로 연결 및 운영 계약 검증
.github/workflows/actions-queue-health.yml, scripts/ci/actions_queue_health.py, tests/test_actions_queue_health.py, tests/test_actions_queue_health_contract.py, docs/doctoring/actions-queue-health.md, CHANGELOG.md, scripts/ci/organization_commercial_readiness_loop.py
시간별 읽기 전용 워크플로가 토큰, allowlist, 스크립트, JSON·HTML 아티팩트를 연결합니다. CLI 오류와 SLO 경고, 워크플로 권한, 고정 액션 버전, 운영 제한을 검증하고 문서화합니다. GitHubClient.__init__ 설명과 모듈 진입점 동작도 갱신합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 47bb2

The new scheduled read-only queue-health collector can remain stuck on an unresponsive GitHub API call and occupy the workflow for up to its platform limit, delaying later runs; bounded API and job timeouts should be added before merge, with several smaller validation and robustness follow-ups remaining.

Sequence Diagram(s)

sequenceDiagram
  participant Scheduler as GitHub Actions scheduler
  participant Workflow as actions-queue-health.yml
  participant Script as actions_queue_health.py
  participant GitHub as GitHub API
  participant Artifact as Actions artifacts

  Scheduler->>Workflow: 매시간 collect 작업 실행
  Workflow->>Script: allowlist와 토큰으로 수집 시작
  Script->>GitHub: 저장소·PR·실행·작업 읽기 요청
  GitHub-->>Script: 큐 및 runner 상태 반환
  Script-->>Workflow: JSON·HTML 보고서 생성
  Workflow->>Artifact: 실행별 보고서 업로드
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 읽기 전용 GitHub Actions 큐 상태 증거를 추가하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pr1142-current-main-successor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-main successor for #1142: head 36006cda56f2400f09d30f467a308e74cb42f289 is based on main bbedc1a51ec1a2421f129955c629b3cd0507a4ec. Fresh local evidence: queue-health tests 40 passed; interrogate 100%; compileall, actionlint, and diff-check pass. Project #1 item added; protected current-head checks and review-thread requirements remain authoritative.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review request for PR #1150:

  • Exact head: 36006cda56f2400f09d30f467a308e74cb42f289.
  • Adds a read-only, explicitly allowlisted Actions queue-health report for .github, TEPP, naruon, and contextual-orchestrator, with exact-head classification, bounded pagination, runner assignment/SLO evidence, deterministic JSON, and accessible HTML.
  • Cross-repository reads use the configured read credential and the workflow has no cancellation, dispatch, merge, or write permissions.
  • Local evidence: queue-health and commercial-readiness tests 54 passed; actionlint .github/workflows/actions-queue-health.yml, Ruff, compileall, and diff-check passed.

Please provide a fresh independent review for this exact head. Protected current-head checks and qualifying approval remain required before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head verification for c3697b63 against live main@c47bee59: Actions queue-health focused tests passed (40 passed); compileall, CLI help, actionlint, and diff checks passed. The read-only credential/config boundary remains intact; review this exact head only.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head c3697b63 against main@c47bee59. Inspect read-only Actions queue-health evidence, cross-repository credential selection, transient PR identity retries, bounded pagination, and hosted checks. Do not reuse predecessor evidence.

@seonghobae
seonghobae force-pushed the codex/pr1142-current-main-successor branch from c3697b6 to f92f08e Compare August 20, 2026 04:09
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head f92f08e against main@2cce96f8. Rebased the read-only Actions queue-health evidence onto current main; allowlisted repositories, bounded pagination/identity retries, named read credentials, and no write/dispatch/merge permissions are preserved. Verified: 76 queue-health/commercial-readiness tests, actionlint, compileall, interrogate, ruff, and git diff --check passed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head ecosystem review requested. Verify the current source and checks only; preserve protected gates and read-only credential boundaries.

@opencode-agent review

@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 05:34

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review the current exact head of the read-only Actions queue-health successor. Verify complete bounded pagination, exact pull-request/head identity, transient incomplete-response retry, runner-assignment and queue-age classification, deterministic JSON/accessible HTML, and the absence of cancellation, dispatch, branch, merge, or credential-expansion authority. Reacquire exact-head quality, security, CodeQL, SAST, dependency/SBOM, and formal review evidence. Do not alter the branch.

@opencode-agent
opencode-agent Bot disabled auto-merge August 20, 2026 06:58
@seonghobae

seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Current exact head 7bbd13393b7d7bfc7f76b544d4e33fc572ccb471 is based on protected main@6479989bbff475404cc2cccc468d5fb1d6c632e5; all predecessor checks and review evidence are historical and non-passing.

The read-only queue-health collector bounds Actions workflow-run responses to 50 records per page, rejects path-traversal repository segments, retries one transient incomplete PR identity response after a bounded delay, records repository-scoped collection failures as explicit incomplete evidence, rejects duplicate repositories, applies a 30-second API subprocess timeout, and has a 30-minute workflow ceiling. It never cancels runs, changes branches, dispatches workflows, or mutates merge state.

Systematic RED → GREEN:

  • RED on predecessor 94e41c6fc3b05cd342fa912586cabebcb9fe5d9e: required interrogate failed at 99.9%, identifying the undocumented FakeClient.__init__.
  • Minimal GREEN: adopted the same compatible constructor docstring already present in the canonical Strix successor instead of creating a competing implementation.
  • local focused queue-health suites: 51 passed
  • local full central suite: 1285 passed, 16 subtests passed
  • local docstring gate: 100.0%
  • local queue collector coverage: 367 statements / 164 branches / 100% across 49 tests
  • Python compile and git diff --check: passed

Exact-head hosted evidence:

  • Organization Commercial Readiness Loop Quality CI run 32378389730, job 96455250457: log proves checkout of 7bbd13393b7d7bfc7f76b544d4e33fc572ccb471; 34 passed; completed success.
  • Strix Changed Path Quality CI run 32378389741, job 96455249166: log proves checkout of 7bbd13393b7d7bfc7f76b544d4e33fc572ccb471; 1285 passed, 16 subtests passed; completed success.

The eight security/SBOM/CodeQL runs and a qualifying exact-head formal Reviews API verdict remain non-passing prerequisites.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact current head evidence for a6ac2620207d419a988a9cfabe8903feb378b542:

  • full suite: 1285 passed, 16 subtests passed
  • production coverage: 8205 statements / 3210 branches, 100%
  • interrogate scripts/ci --fail-under=100: passed
  • Python compileall, git diff --check, and actionlint .github/workflows/actions-queue-health.yml: passed
  • fixed verified review findings: reject ./.. repository segments; typed pull-request identity retry with bounded delay; isolate per-repository API/pagination failures and publish explicit JSON/HTML incomplete-evidence entries

Please review and evaluate Checks against this exact SHA only. No self-approval or predecessor-head evidence transfer.

Copy link
Copy Markdown
Contributor Author

Final exact current head is now 94e41c6f7d6db6f9d1d8c0d4a4d1f2b1eebfbe4c after the doctoring APA 7 references were added (docs-only follow-up to the verified code commit). Prior exact-head evidence remains valid for the code at a6ac2620207d419a988a9cfabe8903feb378b542; please bind any independent review and required Checks to 94e41c6f7d6db6f9d1d8c0d4a4d1f2b1eebfbe4c.

Copy link
Copy Markdown
Contributor Author

Correction to my immediately preceding comment: the exact final HEAD is 94e41c6fc3b05cd342fa912586cabebcb9fe5d9e. The prior SHA text in that comment was incorrect; disregard it. The docs-only follow-up is on top of the verified code commit a6ac2620207d419a988a9cfabe8903feb378b542. Please bind review and Checks only to 94e41c6fc3b05cd342fa912586cabebcb9fe5d9e.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please perform the independent review on exact current head 94e41c6fc3b05cd342fa912586cabebcb9fe5d9e only. The prior CodeRabbit findings were addressed in the code commit below it; the latest commit only adds APA 7 doctoring references. Bind the verdict to current Checks and do not transfer predecessor-head evidence.

Copy link
Copy Markdown
Contributor Author

Fresh zero-job CodeQL consumer canary: ContextualWisdomLab/OriginWeave#238@09efb78ad4e8c3f7894e550aa6278c106aa2fe8f, required CodeQL PR run 33666453872 completed startup_failure. The adjacent OriginWeave native CI on the same head is separately queued before runner assignment and is tracked under #712, so this CodeQL admission failure must stay distinct from leaf source correctness. Acceptance: central workflow must materialize and execute on this unchanged exact head; no predecessor/synthetic status should be promoted.

Copy link
Copy Markdown
Contributor Author

Fresh fast-mlsirm canaries after non-force branch movement — 2026-09-03

The shared runner/control-plane symptom reproduces on two new exact heads, before any repository checkout/source step:

  • fast-mlsirm#1595@b5f7cb35f843099492480d879abbedb4d3218b72: CI 33676585448 has six jobs (rust, Python 3.12/3.14, gpu-smoke, package, fuzz), all queued, steps: [], label ubuntu-latest, runner_id: 0, empty runner/group names. CodeQL PR 33676587078 is terminal startup_failure; Semgrep/Scorecard/Security Scan/CodeQL/OSV are queued.
  • fast-mlsirm#1506@3a4399788d9ce235349e8f98d67d59c3e00029c3: CI 33676797830 is pending before checkout; CodeQL PR 33676799643 is startup_failure; CodeQL/Security/Semgrep/OSV/ClusterFuzzLite are queued and Scorecard pending.
  • stacked child fast-mlsirm#1724@0e83352e3af5ca314fe064f6393df6926d01cfa6: CI 33676913172 pending and CodeQL 33676913158 queued immediately after the required non-force restack.

These are fresh exact-head reproductions, not predecessor evidence. RED: new clean candidate heads still fail to acquire/start required hosted work and CodeQL PR can terminate before job creation. GREEN acceptance remains actual job creation + runner assignment + checkout on the unchanged exact head, followed by terminal required checks; leaf no-op commits, selector churn, or gate weakening are not acceptable substitutes.

Copy link
Copy Markdown
Contributor Author

Fresh OriginWeave zero-job startup-failure canary after a source-moving canonical-baseline update: ContextualWisdomLab/OriginWeave#238@817e2411139e54c477f7f994d6b3ca9e49d8ed2d, required CodeQL PR run 33684170512 completed startup_failure. The same exact head separately has repository-native CI run 33684168444 with two materialized pre-execution jobs (steps=[], no runner/group assignment), so the pre-job and pre-checkout failure classes coexist on one unchanged consumer head. Keep them distinct and fail closed; no leaf no-op push, workflow bypass, or predecessor-success promotion is authorized.

Copy link
Copy Markdown
Contributor Author

Fresh OriginWeave control-plane reproduction after a legitimate protected-main restack, 2026-09-03 KST:

This single dependency-ordered stack therefore reproduces both owner incident classes after meaningful, non-no-op head movement: (a) required workflow startup_failure before any job exists and (b) materialized ubuntu-24.04 jobs with no runner assignment or steps. Protected-main #278's docs-only paths-ignore legitimately lowers docs-only CI demand but does not resolve either class for code-bearing heads. Do not answer this with leaf no-op commits, runner-selector churn, predecessor-success promotion, self-approval, or gate weakening. GREEN remains actual runner acquisition/checkout and terminal exact-head conclusions, with the collector keeping the two pre-execution states distinct.

Copy link
Copy Markdown
Contributor Author

추가 독립 canary — 2026-09-03

ContextualWisdomLab/.github의 branch fix/remove-duplicate-org-sweep-queue-hygiene에서 임시 source-fix workflow run 33761818467이 commit 40794dc4765f400929fabc6b5d777b6dc155e6ff을 대상으로 생성됐습니다.

관측값:

  • event: push
  • status: completed
  • conclusion: failure
  • created_atrun_started_at: 2026-09-03T13:33:32Z
  • Jobs API: []
  • checkout·runner·step 증거: 없음

따라서 이 canary는 source test failure가 아니라 startup_failure_before_job_materialization 분류에 해당합니다. 임시 writer는 재실행·no-op retrigger하지 않았고, commit f8d15406f2a08fdfee1c8866e0a279055affe707에서 보호된 main tree로 되돌려 non-force 제거했습니다.

이 사례를 #1150의 분모와 보고서에 포함해 주십시오. Queue-health collector는 0-job startup failure와 runner_id=0 materialized job을 계속 별도 집계해야 하며, GREEN은 unchanged exact head에 실제 job·runner·checkout 증거가 생기는 것입니다.

Copy link
Copy Markdown
Contributor Author

2026-09-03 분류 보강 — stale workflow source와 0-job startup을 분리

추가 증거:

  • .github run 33761818467: push event가 같은 초에 failure, Jobs API []; source-fix writer는 실행되지 않음.
  • wardnet CodeQL run 33710719228: conclusion startup_failure, Jobs API [], run head와 연결 PR head가 불일치.
  • fast-mlsirm Noema run 33646974279: 자격증명과 repository-scoped token은 성공했으나, 장시간 queue 뒤 이미 superseded된 중앙 workflow/CO sidecar source로 materialize되어 옛 timeout·transport 경로를 실행.

보고서와 collector에서 최소 다음 분류를 서로 배타적으로 유지해 주십시오.

startup_failure_before_job_materialization
materialized_without_runner_assignment
stale_workflow_source_materialized
source_or_test_failure_after_checkout
credential_failure
gateway_transport_failure
provider_or_model_failure
stale_pr_head_retired

동일 PR/head라는 이유만으로 workflow_sha 차이를 버리면 중앙 수정이 소비자 실행에 실제로 반영됐는지 검증할 수 없습니다. 반대로 새 source run이 materialize되지 않은 상태에서 옛 run을 취소하면 required evidence를 모두 잃을 수 있으므로, current replacement evidence를 확인한 뒤 정리해야 합니다.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra canary evidence for the canonical queue-health lane: repository-owned runner-selector PR Orgmetra#161@8a4e82ede3abd008362c6b126742ab476f11d3a1 has Foundation CI run 33723646906 with 14 exact-head jobs explicitly labeled ubuntu-24.04; inspected jobs remain pre-checkout queued, runner_id=0, steps=[] (e.g. 100547814641). Separately, current auth owner Orgmetra#65@43821d812089fa4bc3c228a2f759ce7abe849471 still inherits protected ubuntu-latest; People job 100739744754 and Job Analysis jobs 100739744880/100739745244 are likewise queued with runner_id=0, steps=[]. This shows the current shared admission incident reproduces on both explicit ubuntu-24.04 and legacy alias selectors; do not answer it with further leaf selector churn or no-op retriggers.

Copy link
Copy Markdown
Contributor Author

Fresh quarantine consumer requirement for the queue-health owner lane. config/actions_queue_health_repositories.json@bbacf9e81ae954eb8365fbfe1856d8698a768a4a still does not include ContextualWisdomLab/quarantine-sandbox-runtime, while the canonical root quarantine-sandbox-runtime#1@3fa5c5493fcbfbfb1c28b075e3bad30c03ea29b3 is now the merge-order canary for a real effective-attestation RED. Exact CI 33800321670 has four explicit ubuntu-24.04 jobs — verify 100797988282, coverage 100797988539, podman-e2e 100797988692, branch-coverage 100797988726 — all materialized but still runner_id=0, empty runner identity and steps=[] before checkout.

This is a concrete coverage gap in the canonical read-only health artifact: #712 has manual quarantine evidence, but #1150 cannot currently collect/classify it because the repository is outside its bounded allowlist. Please repair this in the .github owner lane rather than in the leaf. RED acceptance: a queue-health fixture/config test proves the quarantine canary is absent and therefore cannot appear in the report. GREEN: add ContextualWisdomLab/quarantine-sandbox-runtime to the explicit allowlist, preserve bounded read-only behavior and exact-head/current-PR identity checks, and prove the collector can classify the unchanged 3fa5c549... run/jobs as pre-checkout runner-admission evidence without synthesizing source failure or success. No quarantine source mutation, runner-selector change, gate weakening or predecessor evidence transfer is requested.

Copy link
Copy Markdown
Contributor Author

opencode-review failure — stale pre-fix workflow snapshot, not this PR's diff

Head d08617bf, run 33588259526: the opencode-review-target job's "Request current-head OpenCode review execution" step hard-failed with ::error::Pull request head moved while validating live review state. and exit 1.

Root cause: this required (pull_request_target) job executed a workflow snapshot pinned to bb14b014 (2026-09-02, an ancestor of current main) — a version that treats "live head advanced since the event snapshot" on an open, non-draft PR as a hard error. Current main (07d9ec23) already fixes this: the closed/draft checks now run before the head-match check, and an open/ready PR whose head has moved exits 0 with "Pull request head moved on the live open, ready-for-review PR; a fresh dispatch will fire for the current head." instead of erroring — confirmed via tests/test_opencode_required_verdict_regression.py::test_request_review_step_exits_gracefully_when_open_nondraft_head_moved, which reproduces this exact production failure (originally from contextual-orchestrator#1000) and asserts the graceful exit.

No change is needed in this PR's own branch — opencode-review.yml is base-branch-trusted, not PR-branch content. Re-running this same job wouldn't help either: GitHub Actions pins a run's workflow definition to the ref at trigger time, so a manual re-run replays the same stale bb14b014 snapshot rather than fetching current main. This will self-resolve on the next pull_request_target lifecycle event (synchronize/ready_for_review/etc.) for this PR, which will pick up the already-fixed workflow. Leaving this as-is rather than forcing an artificial event.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Fresh downstream owner-path evidence for the existing pre-checkout/cancellation incident class:

  • consumer: ContextualWisdomLab/html4tree#594
  • unchanged exact head: e7722b203ff9cbfc5217f7cd4ff2ef12d8295ba1
  • source state: deterministic partial-read RED is already causally GREEN on that head; PR remains Draft only because exact-head hosted evidence is non-passing
  • exact-head runs, all completed/cancelled: CI 33835519645, Security Scan 33835519718, SAST Semgrep 33835519620, OSV-Scanner PR 33835520315, Scorecard PR 33835519614

Treat this as control-plane evidence, not an html4tree source failure and not permission for a no-op leaf retrigger. RED is the unchanged exact head losing every applicable hosted lane to cancellation before admissible terminal evidence exists. GREEN is the same unchanged consumer head receiving real workflow materialization/runner assignment/exact checkout and terminal conclusions while the queue-health collector keeps cancellation distinct from source/test failure. Preserve fail-closed classification; do not synthesize PASS, reuse predecessor evidence, weaken required checks, or require a source-neutral leaf commit merely to obtain another run.

Copy link
Copy Markdown
Contributor Author

The opencode-review failure on this head (bbacf9e) ("No current-head OpenCode verdict after 180 minutes of polling; failing closed and releasing the runner", run 33655226756/job 100923252050) is not a defect in this PR's diff. That failure string was introduced by commit e29302c (#1707) as a 3-hour polling backstop in the required job; that entire architecture was removed by commit 9db155a (#1830), merged to main on 2026-09-04, which fails the required job immediately instead of holding the runner and reruns it via the Actions API once a verdict/receipt publishes (tests/test_opencode_required_verdict_regression.py now asserts the old polling message is absent). PR #1150 was last reviewed against a workflow snapshot older than that fix. Re-running the check should now pick up current main's fixed workflow content on the next fresh dispatch.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

tests/test_actions_queue_health.py — 5 real failures on unchanged exact head bbacf9e8, root-caused

Checked out bbacf9e81ae954eb8365fbfe1856d8698a768a4a locally and ran PYTHONPATH=. python3 -m pytest tests/test_actions_queue_health.py -v. Reproduces the "Scheduler, contextual-orchestrator, writer, and conflict-scope contracts" job's 5 failed, 50 passed exactly:

1. test_normalise_run_validates_links_jobs_and_fallback_namesAttributeError: 'str' object has no attribute 'get' at scripts/ci/actions_queue_health.py:45

Diagnosis: genuine bug in the new module. actions_queue_health.py defines a wrapper _normalise_run (lines 39-63) that monkeypatches over the core _normalise_run in actions_queue_health_core.py to add workflow_id. The wrapper does workflow_id = workflow_run.get("workflow_id") on line 45 before delegating to _CORE_NORMALISE_RUN. The core function (actions_queue_health_core.py:282-283) already validates isinstance(run, dict) and raises QueueHealthError for bad input — but the wrapper's own line 45 crashes with AttributeError first whenever workflow_run isn't a dict (e.g. the test's "bad" string case), short-circuiting the documented QueueHealthError contract. Fix is to validate/delegate before touching .get().

2. test_collect_snapshot_deduplicates_status_views_and_preserves_orderKeyError: 'repos/owner/repo/actions/runs?status=completed&head_sha=head&per_page=50'

3. test_collect_snapshot_retries_pull_request_with_empty_identity_fields — same KeyError pattern

4. test_collect_snapshot_and_build_report_preserve_linked_head_through_round_tripKeyError: 'repos/owner/repo/actions/runs?status=completed&head_sha=pr-head-sha&per_page=50'

5. test_collect_snapshot_bounds_workflow_run_payloads_to_fifty_itemsValueError: tuple.index(x): x not in tuple (on "cancelled")

Diagnosis for 2-5: test-fixture mismatch, not a production bug. collect_snapshot (actions_queue_health.py ~lines 223-273) was extended with two new "terminal diagnostic" GitHub API queries per current-PR head SHA — status=completed&head_sha=<sha> (catches startup_failure/cancelled conclusions on completed runs) and status=cancelled&event=pull_request_target (catches cancelled-before-checkout pull_request_target runs) — matching this PR's own documented RED/GREEN startup_failure/cancelled evidence design. These 4 tests' mock runner() doubles use an exhaustive, exact-match fixture (a responses dict keyed by literal path, or ("in_progress","pending","queued","requested","waiting").index(status)) that was never updated to include the two new endpoints, so the test double raises KeyError/ValueError on the unrecognized path — not collect_snapshot itself. Confirms as fixture drift: the one collect_snapshot test in the same file that already passes, test_collect_snapshot_isolates_repository_errors_and_reports_incomplete_evidence, uses a generic elif "/actions/runs?status=" in path: payload = [] wildcard instead of an exhaustive list and is unaffected.

Checked existing PR comments (59, via issue_read get_comments) for a prior acknowledgment of these 5 specific failures — none found; the one comment mentioning test_collect_snapshot_* by name (2026-08-30) is about an earlier, already-fixed set of bugs, not these.

Not fixing this myself

Per this PR's own documented design, its RED/GREEN methodology depends on the unchanged exact head bbacf9e8 accumulating check results over time, and its body states "No self-approval, bypass, force update... authorized." All 5 failures are inside this PR's own new work (scripts/ci/actions_queue_health.py and/or tests/test_actions_queue_health.py), so resolving them needs an actual code change to that new work — not a mechanical branch update — which is outside what I should do on someone else's read-only-evidence-designed PR without explicit go-ahead. Leaving this for the PR owner/author to fix.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Fresh queue-health canary from ConceptWeave bootstrap: central native CodeQL dispatch run 33961083940 for unchanged ContextualWisdomLab/ConceptWeave#35@a31ae0c2df920f2794f7ddb456795b04797ab472 has one validate-dispatch job 101292962988 on ubuntu-24.04 that remains queued, with runner_id=0, empty runner name and steps=[]. It was created 2026-09-05T10:35:43Z and is still pre-checkout/pre-runner. The required leaf CodeQL run 33938445642 already succeeded in dispatching this work and failed only while the authenticated codeql-dispatch/actions verdict remained pending. This is therefore another exact-current consumer instance of the queue-health class this lane owns; ConceptWeave is not being no-op retriggered or mutated to work around it. Central dispatch workflow provenance for this run is .github@7fcada597d5b79bdb14445f24322b2c9f6ed4b19; current protected central main is later f250638827f8252b0d9e5cb2601f4d333f96162f, which does not retroactively restamp the queued run.

Copy link
Copy Markdown
Contributor Author

Fresh read-only leaf evidence for the queue-health owner path:

  • ContextualWisdomLab/ScopeWeave#667 exact head 54407911da97d63b09dfa55de77e3c82426432d2 generated Server Tests run 33987534734 after a substantive test commit.
  • Both exact-head jobs are materialized but still pre-checkout: unit-and-api job 101363763736 and cloud-e2e job 101363763870 are queued, steps=[], runner_id=null, runner_name=null, labels ubuntu-latest.
  • The same head newly materialized Fuzz 33987534737, CodeQL PR 33987534761, SAST 33987534758, and Security Scan 33987534780, all non-terminal at the same observation.

This reproduces the owner lane's pre-checkout admission class on a fresh writable-leaf descendant without no-op retrigger or runner-selector churn. GREEN remains unchanged-head runner assignment + checkout identity + terminal required conclusions.

Also note a canonical-evidence drift in #1150 itself for the dedicated writer to repair: live PR metadata now reports base main@6d7fbebec8aec31d88a30a36e71ca5b3925d241d and head e6622a428060194b558929ad651d5b4ae3a9840f, while the body still declares protected main@8c085835... / exact head bbacf9e8.... This fleet is not editing the dedicated .github PR state; please refresh the owner PR authority and re-evaluate current-head evidence there.

@seonghobae
seonghobae marked this pull request as draft September 6, 2026 23:46
Preserve the complete queue-health RED/GREEN lineage while integrating current protected main with a two-parent, non-force reconciliation. The post-merge tree uses current main as the base and overlays only the 13 queue-health owner files; the compared path sets do not overlap.
@seonghobae seonghobae added the enhancement New feature or request label Sep 7, 2026 — with ChatGPT Codex Connector
@seonghobae
seonghobae marked this pull request as ready for review September 7, 2026 02:44
@seonghobae
seonghobae marked this pull request as draft September 7, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: operations Operability, observability, readiness, SLO, backup, or retention enhancement New feature or request priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: feature New or expanded product capability

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants