Repository navigation
ci: let the quality gate choose a fixed repository runner - #2671
seonghobae wants to merge 3 commits into
Conversation
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.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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 jobtests/test_all_self_hosted_runner_contract.py— regression suitetests/test_exact_head_coverage_quality_gate_contract.py— regression suitetests/test_runner_fallback_checker_sensitivity.py— regression suitetests/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"]
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"]
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.
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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 jobtests/test_all_self_hosted_runner_contract.py— regression suitetests/test_exact_head_coverage_quality_gate_contract.py— regression suitetests/test_runner_fallback_checker_sensitivity.py— regression suitetests/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"]
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"]
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.
There was a problem hiding this comment.
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 jobtests/test_all_self_hosted_runner_contract.py— regression suitetests/test_exact_head_coverage_quality_gate_contract.py— regression suitetests/test_runner_fallback_checker_sensitivity.py— regression suitetests/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"]
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"]
Summary
exact-head-coverage-quality-gate.ymlgains an optional boolean input,use_repository_hosted_substitute, defaulting tofalse.falsekeeps the current route: groupCWL CI isolatedwith labelsself-hosted,linux,x64,cwlab-ci-isolated. Existing callers are unchanged.truesends the job to a repository-registered runner with labelsself-hosted,linux,x64,hosted-substitute. That branch carries an emptygroup, because repository-registered runners belong to no organization runner group and naming one (such asDefault) would exclude them. The caller cannot pass a runner name, group or labels.runs_onstring input was not used, because the repository contracts reject an unconstrained selector and any hosted fallback.Review follow-up
cb107b63addresses thegroup: Defaultfinding from cwl-noema-review and Devin Review one928768f. The substitute branch no longer names an organization group.fromJSONobjects, so the existing typed-mapping and isolated-fallback contracts still apply unchanged in shape.Test plan
group: Default.cb107b63.actionlintreports no findings for the changed workflow.groupwith a repository runner is not yet exercised by a real job; it needs the ops caller opt-in to run once.Summary by CodeRabbit