Skip to content

ci: let the quality gate choose a fixed repository runner - #2671

Open
seonghobae wants to merge 3 commits into
mainfrom
ci/quality-gate-runs-on-input-20261116
Open

seonghobae wants to merge 3 commits into
mainfrom
ci/quality-gate-runs-on-input-20261116

Conversation

@seonghobae

@seonghobae seonghobae commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • exact-head-coverage-quality-gate.yml gains an optional boolean input, use_repository_hosted_substitute, defaulting to false.
  • false keeps the current route: group CWL CI isolated with labels self-hosted, linux, x64, cwlab-ci-isolated. Existing callers are unchanged.
  • true sends the job to a repository-registered runner with labels self-hosted, linux, x64, hosted-substitute. That branch carries an empty group, because repository-registered runners belong to no organization runner group and naming one (such as Default) would exclude them. The caller cannot pass a runner name, group or labels.
  • A free-form runs_on string input was not used, because the repository contracts reject an unconstrained selector and any hosted fallback.

Review follow-up

  • cb107b63 addresses the group: Default finding from cwl-noema-review and Devin Review on e928768f. The substitute branch no longer names an organization group.
  • Both branches stay typed fromJSON objects, so the existing typed-mapping and isolated-fallback contracts still apply unchanged in shape.

Test plan

  • The quality-gate contract test asserts the empty-group substitute branch, the isolated default and the absence of group: Default.
  • Runner-selector contract tests and the fallback sensitivity fixture: 84 passed on cb107b63.
  • actionlint reports no findings for the changed workflow.
  • An empty group with a repository runner is not yet exercised by a real job; it needs the ops caller opt-in to run once.

Summary by CodeRabbit

  • 새 기능
    • 품질 검사 작업에서 선택적으로 저장소 범위의 자체 호스팅 러너를 사용할 수 있습니다. 기본 설정에서는 기존 격리된 러너를 계속 사용합니다.

Callers can opt into the repository-scoped hosted-substitute runner with
a boolean input. The default stays on the shared isolated group, and the
caller cannot name an arbitrary runner. Both choices are fixed and
self-hosted.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

워크플로에 선택적 use_repository_hosted_substitute 입력을 추가했습니다. 입력값에 따라 두 가지 고정된 self-hosted 러너 설정 중 하나를 사용합니다. 관련 계약 테스트와 러너 선언 수 검사를 갱신했습니다.

Changes: 러너 선택

Layer / File(s) Summary
입력 및 조건부 러너 선택
.github/workflows/exact-head-coverage-quality-gate.yml, tests/test_exact_head_coverage_quality_gate_contract.py, tests/test_all_self_hosted_runner_contract.py, tests/test_runner_mapping_schema_contract.py, tests/test_runner_fallback_checker_sensitivity.py
워크플로에 기본값이 false인 선택적 boolean 입력을 추가했습니다. 값이 true이면 hosted-substitute 라벨을 가진 러너를 선택하고, 그렇지 않으면 기존 CWL CI isolated 그룹과 cwlab-ci-isolated 라벨을 선택합니다. 테스트는 두 설정과 입력 계약을 검증하며, 러너 선언 수 검사를 29개에서 30개로 갱신합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: Minimal · up to 9bcc8

This adds an optional workflow input that lets a caller route the quality gate to a fixed repository-registered runner. The default behavior is unchanged. A caller that opts in needs a runner with the labels self-hosted, linux, x64 and hosted-substitute to be registered and accessible, or the job will wait in the queue. Callers that do not opt in are unaffected.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed PR 제목은 quality gate가 고정 저장소 러너를 선택하도록 한다는 변경의 핵심을 설명합니다. 변경 내용은 선택적 입력 use_repository_hosted_substitute를 추가하고, opt-in 시 저장소 등록 러너(hosted-substitute 라벨, 빈 group)를 사용하도록 합니다. 기본값은 기존 `CWL CI isolate…
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.
Full details: Title check

Explanation

PR 제목은 quality gate가 고정 저장소 러너를 선택하도록 한다는 변경의 핵심을 설명합니다. 변경 내용은 선택적 입력 use_repository_hosted_substitute를 추가하고, opt-in 시 저장소 등록 러너(hosted-substitute 라벨, 빈 group)를 사용하도록 합니다. 기본값은 기존 CWL CI isolated 그룹 경로를 유지합니다. 관련 테스트 기대값도 함께 갱신되었습니다. 제목은 변경 범위와 일치하므로 통과합니다.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e3e05660-2502-44ca-baec-7ac14733f7fb
Commits

Reviewing files that changed from the base of the PR and between e928768 and 9bcc8aa.

Files selected for processing: 4

  • .github/workflows/exact-head-coverage-quality-gate.yml
  • tests/test_all_self_hosted_runner_contract.py
  • tests/test_exact_head_coverage_quality_gate_contract.py
  • tests/test_runner_mapping_schema_contract.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

@cwl-noema-review cwl-noema-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noema LLM review

The new boolean keeps the isolated default, but the true branch cannot schedule the repository-scoped runner it claims to select: group Default excludes repository-registered runners, and the new contract freezes that selector.

Reviewed changed lines

  • .github/workflows/exact-head-coverage-quality-gate.yml:36 (RIGHT): The input text says the true branch must choose the caller's repository-scoped hosted-substitute runner. In this repo that term already means a label-only repository runner (the k-csap admission), not an organization runner group.
  • .github/workflows/exact-head-coverage-quality-gate.yml:41 (RIGHT): default: false is a real boolean default. With && binding tighter than ||, an omitted input still resolves to the CWL CI isolated object, so existing callers stay on the previous static selector.
  • .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT): The true arm hard-codes group Default. GitHub ANDs group membership with labels, and only organization or enterprise runners belong to groups. A repository-registered hosted-substitute runner is therefore ineligible, so the opt-in quality gate never starts on the intended machine.
  • .github/workflows/exact-head-coverage-quality-gate.yml:50 (RIGHT): The label set self-hosted/linux/x64/hosted-substitute matches the described runner, but it is the same expression's .labels and is still conjoined with group Default. Labels cannot admit a runner the group has already excluded.
  • tests/test_exact_head_coverage_quality_gate_contract.py:156 (RIGHT): The new contract requires the substitute arm to be fromJSON group Default. That records the ineligible selector as desired behavior and will fail a fix that drops the group or names a real repository-runner target.
  • tests/test_all_self_hosted_runner_contract.py:164 (RIGHT): Raising the conditional-fallback inventory from 29 to 30 matches the single static quality-gate selector that became dynamic. The fallback object remains CWL CI isolated; the checker does not inspect the true arm's group.
  • tests/test_runner_mapping_schema_contract.py:24 (RIGHT): The observed==30 bump is consistent with one new typed group/labels expression. The pre-existing substring check only requires CWL CI isolated to appear somewhere in the expression, so it accepts the Default true arm.

Adversarial validation

  • .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT) confirmed: use_repository_hosted_substitute true still cannot select the caller's repository-scoped hosted-substitute runner because group Default excludes it. — Line 49 hard-codes "group":"Default" on the true arm while lines 36-37 require a repository-scoped runner. Runner groups contain only organization or enterprise runners; Default is the org default group, not a repository runner set. Group and labels are conjunctive.
  • tests/test_exact_head_coverage_quality_gate_contract.py:156 (RIGHT) confirmed: The added contract would reject a selector that can actually target a repository-registered runner and would keep passing for the ineligible Default group. — Lines 155-160 build choice from the Default fromJSON object and require both the group and labels lines to contain it. Nothing in the test checks runner-group eligibility.
  • .github/workflows/exact-head-coverage-quality-gate.yml:41 (RIGHT) falsified: Omitting the new input, or leaving it false, moves existing quality-gate callers off the isolated runner. — The input type is boolean with default false. && has higher precedence than ||, and a false left operand yields the second fromJSON value, whose group is CWL CI isolated and whose labels include cwlab-ci-isolated, identical to the deleted static runs-on. Quoting matches the fromJSON shape already used by the other conditional selectors.
  • Residual risk: A rename of Default to another organization group would still miss a repository-registered runner. The dynamic mapping contract requires a .group field, so the correct label-only shape needs an explicit exception similar to k-csap or the job stays unschedulable.

Findings

  • [high] .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT): The true branch sets runs-on.group to Default while requesting a repository-scoped hosted-substitute runner. GitHub intersects group and labels, and repository-registered runners are not members of the organization Default group, so the gate cannot start on that runner regardless of matching labels. Select it with a label list and no group (as k-csap does) or name the real group that owns the runner; do not use Default as a stand-in for repository scope.
  • [medium] tests/test_exact_head_coverage_quality_gate_contract.py:156 (RIGHT): test_runner_choice_is_a_fixed_boolean_with_isolated_default asserts the substitute arm must use group Default. That freezes the ineligible selector and will fail the fix. Assert the repository-runner target that can actually be scheduled, not the Default group string.
  • Result: REQUEST_CHANGES
  • Head SHA: e928768fd93ff7babf5f002a0751222dea122a28
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • .github/workflows/exact-head-coverage-quality-gate.yml — GitHub Actions review job
  • tests/test_all_self_hosted_runner_contract.py — regression suite
  • tests/test_exact_head_coverage_quality_gate_contract.py — regression suite
  • tests/test_runner_fallback_checker_sensitivity.py — regression suite
  • tests/test_runner_mapping_schema_contract.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: e928768fd93ff7babf5f002a0751222dea122a28
  • Workflow run: 43749220656
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

An organization runner group excludes repository-registered runners, so
the substitute branch carries an empty group with the fixed label set.
The default branch stays on the shared isolated group.

@cwl-noema-review cwl-noema-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noema LLM review

The new boolean keeps the default on CWL CI isolated, but the opt-in still submits runs-on.group. An empty group string is not a label-only selector, so a repository-scoped hosted-substitute runner is excluded and the quality gate cannot start on the runner the input promises. The new contract freezes that ineligible selector.

Reviewed changed lines

  • .github/workflows/exact-head-coverage-quality-gate.yml:41 (RIGHT): The boolean input defaults to false, so existing callers that omit it still take the isolated branch.
  • .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT): When the input is true, this expression sets group to the empty string while the group key remains present. Repository-level runners are not members of any runner group and are only eligible for a label array; group:"" does not drop the group constraint.
  • .github/workflows/exact-head-coverage-quality-gate.yml:50 (RIGHT): False && object || isolated-object evaluates to the CWL CI isolated labels, so the default path preserves the previous self-hosted isolated selector. The true path still returns labels only as the sibling of the empty group, not as runs-on itself.
  • tests/test_exact_head_coverage_quality_gate_contract.py:156 (RIGHT): Rejecting the literal 'group: Default' does not prove the substitute is ungrouped. The workflow never emits that text even though it still sends a group.
  • tests/test_exact_head_coverage_quality_gate_contract.py:158 (RIGHT): The contract requires fromJSON group "" and calls that branch a label array. The workflow mapping always has group and labels keys, so this assertion locks in the ineligible selector.
  • tests/test_all_self_hosted_runner_contract.py:164 (RIGHT): Bumping the conditional-fallback inventory from 29 to 30 matches the one static selector that became a typed &&/|| expression. That checker only pins the || isolated object, so the empty-group arm is not exercised.
  • tests/test_runner_mapping_schema_contract.py:24 (RIGHT): The observed-count change to 30 is consistent with one new ${{ ( ... ).group }} mapping whose text still contains CWL CI isolated. It does not check runner eligibility of the substitute arm.

Adversarial validation

  • .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT) confirmed: use_repository_hosted_substitute true still applies a runner-group constraint, so the repository-scoped hosted-substitute runner is ineligible. — Line 49 always emits the group key from (choice).group, and the true arm is fromJSON({"group":"","labels":[...]}). The repo's only repository-scoped admission, k-csap, is a label list without a group. The new test comment claims a label array, but the YAML object never is one.
  • .github/workflows/exact-head-coverage-quality-gate.yml:50 (RIGHT) falsified: Operator precedence or the empty-group arm changes the default selector and drops cwlab-ci-isolated for existing callers. — The input default is false, && binds before ||, fromJSON objects are truthy, and the || operand is exactly the previous static isolated pair.
  • tests/test_all_self_hosted_runner_contract.py:164 (RIGHT) falsified: Raising the fallback inventory to 30 mis-counts because the new selector is not the same conditional shape those tests already recognize. — The static group/labels pair was replaced by exactly one expression of that shape, and the schema and sensitivity expectations were incremented by the same one. The count matches the new inventory; it just never asserts the first fromJSON arm.
  • Residual risk: Callers that leave the new input unset still schedule CWL CI isolated. Any caller that sets it true queues a job whose group constraint repository runners cannot satisfy; a later label-only fix must not keep a group key or widen eligibility to organization groups that merely share the hosted-substitute label.

Findings

  • [high] .github/workflows/exact-head-coverage-quality-gate.yml:49 (RIGHT): With use_repository_hosted_substitute true, runs-on.group is set to the empty string from the substitute fromJSON object. An empty group is still a group selector, not a label-only runs-on array, and repository-scoped runners cannot belong to a runner group, so they will not pick up the job. Keep the isolated branch as the group/labels mapping, but select the substitute with a true label array that omits group entirely.
  • [medium] tests/test_exact_head_coverage_quality_gate_contract.py:158 (RIGHT): The contract requires {"group":"","labels":[...,"hosted-substitute"]} and only bans the text 'group: Default'. That encodes the ineligible empty-group selector and would fail a correct label-only substitute. Assert the true arm is a label array without a group key, and that the false arm remains CWL CI isolated.
  • Result: REQUEST_CHANGES
  • Head SHA: cb107b63fd442b50b8f3eeac501846e143cbe9a8
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • .github/workflows/exact-head-coverage-quality-gate.yml — GitHub Actions review job
  • tests/test_all_self_hosted_runner_contract.py — regression suite
  • tests/test_exact_head_coverage_quality_gate_contract.py — regression suite
  • tests/test_runner_fallback_checker_sensitivity.py — regression suite
  • tests/test_runner_mapping_schema_contract.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: cb107b63fd442b50b8f3eeac501846e143cbe9a8
  • Workflow run: 43753921250
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

The opt-in resolves to a fixed label array and names no runner group, so
a repository-registered runner stays eligible. The default resolves to
the shared isolated group and its labels.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • .github/workflows/exact-head-coverage-quality-gate.yml — GitHub Actions review job
  • tests/test_all_self_hosted_runner_contract.py — regression suite
  • tests/test_exact_head_coverage_quality_gate_contract.py — regression suite
  • tests/test_runner_fallback_checker_sensitivity.py — regression suite
  • tests/test_runner_mapping_schema_contract.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 9bcc8aa746cfd6834cc8714f9730f6a54707a0d4
  • Workflow run: 43761831959
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: exact-head-coverage-quality-gate.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: exact-head-coverage-quality-gate.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Test: test_all_self_hosted_runner_contract.py (4 files)"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_all_self_hosted_runner_contract.py (4 files)"]
  R2 --> V2["targeted test run"]
Loading

This branch has not been deployed

No deployments
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.

1 participant