← Back to Pull requests

ci: key workflow concurrency groups on pull request number #7829

Open
adityavaish opened this pull request with 58 lines diff across 4 files
View on GitHub
adityavaish adityavaish commented on Dec 02, 2026 16:44 UTC
Author

<!-- copilot-assessment:v1 -->

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 5c7929e3a447b9db68d3866bf96c4e89cf32a94c

| Dimension | Assessment | Rationale |
|---|---|---|
| Change confidence | 9.5/10 | ↑ Updates codeql.yml, pr_title_check.yml, and (for consistency) miri.yml, simplifies check_concurrency_groups() to a focused github.head_ref scan with zero edits to shared helpers, and passes all 19 check-ci-config.py checks, test-docs-permissions.py, and actionlint --shellcheck=off.<br>↓ Live GitHub Actions runs on Linux and check_local_ci_config() under native Linux bash are pending CI approval. |
| Diagnosis confidence | 9.5/10 | ↑ Workflow inspection confirmed codeql.yml and pr_title_check.yml still keyed PR concurrency.group on github.head_ref (and miri.yml carried the same template on non-PR triggers), while ci.yml was already updated in #7311. |
| Evidence fit | 9.5/10 | ↑ Directly resolves the remaining PR workflows in #7315 and guards against reintroducing github.head_ref in dev/ci/check-ci-config.py. |
<!-- /copilot-assessment -->

Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example Closes #123 indicates that this PR will close issue #123.
-->

Closes #7315.

Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->

codeql.yml and pr_title_check.yml still keyed concurrency.group on github.head_ref || github.sha. Because github.head_ref is only the branch name without the fork repository or PR number, two open pull requests from different forks sharing a branch name (such as main or patch-1) collide in the same concurrency group and cancel each other's runs. (ci.yml was already switched to github.event.pull_request.number in #7311; miri.yml only triggers on schedule/workflow_dispatch so its matching edit is for consistency rather than a runtime fix.)

What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->

  • Updated concurrency.group in .github/workflows/codeql.yml and .github/workflows/pr_title_check.yml from github.head_ref || github.sha to github.event.pull_request.number || github.sha (and updated .github/workflows/miri.yml to match for consistency).

  • Added a concise check_concurrency_groups() scan in dev/ci/check-ci-config.py that checks .github/workflows/.yml and fails if any workflow- or job-level concurrency: block references github.head_ref.
  • How are these changes tested?

    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code

    If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
    -->

  • Confirmed check_concurrency_groups() fails on the pre-fix codeql.yml, miri.yml, and pr_title_check.yml from main (3 failures) and passes on the updated files.

  • Verified edge cases for check_concurrency_groups() (inline scalar/flow concurrency:, multiline group: >-, job-level concurrency:, ignoring comments and run: blocks).

  • Verified all 19 Python checks in dev/ci/check-ci-config.py pass (bash -n dev/local-ci.sh passed separately; check_local_ci_config() has a pre-existing Windows backslash quirk).

  • python dev/ci/test-docs-permissions.py — passed.

  • actionlint --shellcheck=off (v1.7.12) across all workflows — passed (exit code 0).
  • Diff: 58 lines (+54 / -4) across 4 files Reviewer: comphead Review duration: 2079m
    All Vouch review confidence checks passed
    Residual risk 0.04 = Change Risk (0.37) × (1 − Review Confidence (0.90)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 58 lines diff across 4 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.88 · 5 substantive comment(s)
    0.88
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.244
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    16 items
    comphead comphead commented on code on Dec 03, 2026 00:51 UTC
    Code Review
    .github/workflows/miri.yml:1
    @@ -18,7 +18,7 @@
     name: Run Miri Safety Checks
     
     concurrency:
    -  group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
    +  group: ${{ github.repository }}-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }}

    miri.yml triggers only on schedule and workflow_dispatch (see its on: block), and nothing calls it through workflow_call. github.event.pull_request.number is never set there, and github.head_ref was already empty, so this edit changes no group at runtime. Keeping it for consistency is fine, but the PR description and the issue should not count it as a fix.

    comphead comphead commented on code on Dec 03, 2026 00:51 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,
    +        "github.run_id": run_id,
    +        "github.event.action": action,
    +        "github.event.label.name": label,
    +        "github.event.pull_request.number": number,
    +        "github.event.pull_request.head.ref": head_ref,
    +        "github.event.pull_request.head.repo.full_name": head_repo,
    +    }
    +
    +
    +def check_concurrency_groups():

    The bug is that a concurrency group names github.head_ref. A check that scans .github/workflows/.yml for a group: line containing github.head_ref is about 15 lines and fails on exactly the three files this PR fixes. check_concurrency_groups instead adds a hand-rolled YAML block parser (concurrency_blocks, about 60 lines), simulates pull request, workflow_run, push, merge_group, schedule and workflow_dispatch contexts, and re-derives the case-only and cross-fork properties by evaluating expressions. The script already holds a concurrency: regex check in check_fork_runs (line 1767) that could host the simple rule. I would replace the new function with the short scan and drop the helpers it needs.

    comphead comphead commented on code on Dec 03, 2026 00:51 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,
    +        "github.run_id": run_id,
    +        "github.event.action": action,
    +        "github.event.label.name": label,
    +        "github.event.pull_request.number": number,
    +        "github.event.pull_request.head.ref": head_ref,
    +        "github.event.pull_request.head.repo.full_name": head_repo,
    +    }
    +
    +
    +def check_concurrency_groups():
    +    """Concurrency groups must never collide across same-named fork branches."""
    +    failures = []
    +    for path in sorted(WORKFLOWS.glob("*.y*ml")):
    +        blocks = concurrency_blocks(path)
    +        if not blocks:
    +            continue
    +        triggers = workflow_triggers(path)
    +        wf_name = workflow_name(path) or path.name
    +        for scope, group, cancel in blocks:
    +            if not group:
    +                failures.append(f"{path} ({scope}) declares `concurrency` with no `group`")
    +                continue
    +            if re.search(r"\bgithub\.head_ref\b", group):
    +                failures.append(
    +                    f"{path} ({scope}) keys its concurrency group on `github.head_ref`, "
    +                    f"which is the bare branch name without the fork or pull request number; "
    +                    f"key on `github.event.pull_request.number` instead"
    +                )
    +            try:
    +                if "pull_request" in triggers or "pull_request_target" in triggers:
    +                    pr_types = triggers.get("pull_request") or triggers.get("pull_request_target") or []
    +                    pr_action = "synchronize" if not pr_types or "synchronize" in pr_types else pr_types[0]
    +                    pr_label = "run-iceberg-tests" if pr_action == "labeled" else ""
    +                    pr_a = pr_context(
    +                        7, workflow=wf_name, head_ref="patch-1",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    pr_b = pr_context(
    +                        8, workflow=wf_name, head_ref="patch-1",
    +                        head_repo="bob/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    group_a = evaluate_template(group, pr_a)
    +                    group_b = evaluate_template(group, pr_b)
    +                    if group_a.lower() == group_b.lower():
    +                        failures.append(
    +                            f"{path} ({scope}) gives two pull requests from different forks with "
    +                            f"the same branch name the same concurrency group ({group_a!r})"
    +                        )
    +                    pr_lower = pr_context(
    +                        7, workflow=wf_name, head_ref="feature",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    pr_upper = pr_context(
    +                        8, workflow=wf_name, head_ref="Feature",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    group_lower = evaluate_template(group, pr_lower)
    +                    group_upper = evaluate_template(group, pr_upper)
    +                    if group_lower.lower() == group_upper.lower():
    +                        failures.append(
    +                            f"{path} ({scope}) gives two pull requests whose branch names differ "
    +                            f"only by case the same concurrency group ({group_lower!r})"
    +                        )
    +                    if _cancel_in_progress(cancel, pr_a):
    +                        pr_next = pr_context(
    +                            7, workflow=wf_name, head_ref="patch-1",
    +                            head_repo="alice/datafusion-comet", sha="b" * 40,
    +                            action=pr_action, label=pr_label, run_id=2,
    +                        )
    +                        group_next = evaluate_template(group, pr_next)
    +                        if group_a.lower() != group_next.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) puts a new commit on the same pull request in a "
    +                                f"different concurrency group ({group_a!r} vs {group_next!r})"
    +                            )
    +
    +                if "workflow_run" in triggers:
    +                    run_a = {
    +                        "github.repository": UPSTREAM,
    +                        "github.event_name": "workflow_run",
    +                        "github.workflow": wf_name,
    +                        "github.sha": "a" * 40,
    +                        "github.run_id": 1,
    +                        "github.event.workflow_run.head_repository.full_name": "alice/datafusion-comet",
    +                        "github.event.workflow_run.head_branch": "patch-1",
    +                    }
    +                    run_b = {
    +                        **run_a,
    +                        "github.run_id": 2,
    +                        "github.event.workflow_run.head_repository.full_name": "bob/datafusion-comet",
    +                    }
    +                    if _cancel_in_progress(cancel, run_a):
    +                        group_a = evaluate_template(group, run_a)
    +                        group_b = evaluate_template(group, run_b)
    +                        if group_a.lower() == group_b.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) gives two workflow_run events from different "
    +                                f"forks with the same branch name the same concurrency group ({group_a!r})"
    +                            )
    +
    +                for event_name in ("push", "merge_group", "schedule", "workflow_dispatch"):
    +                    if event_name not in triggers:
    +                        continue
    +                    ctx_a = {
    +                        **actions_context(event_name, UPSTREAM, wf_name, "main"),
    +                        "github.sha": "a" * 40,
    +                        "github.run_id": 1,
    +                    }
    +                    ctx_b = {
    +                        **ctx_a,
    +                        "github.sha": "b" * 40,
    +                        "github.run_id": 2,
    +                    }
    +                    if _cancel_in_progress(cancel, ctx_a):
    +                        group_a = evaluate_template(group, ctx_a)
    +                        group_b = evaluate_template(group, ctx_b)
    +                        if group_a.lower() == group_b.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) collapses different commits on `{event_name}` "
    +                                f"into the same concurrency group ({group_a!r})"
    +                            )
    +            except (ValueError, SyntaxError) as error:
    +                failures.append(f"{path} ({scope}): cannot check concurrency group: {error}")
    +
    +    # ci_label.yml calls ci.yml on `labeled`; ci.yml owns the concurrency group
    +    # and shares the caller's pull_request context.
    +    if LABEL_WORKFLOW.exists():

    This block re-tests ci.yml's group against ci_label.yml runs and asserts that ci_label.yml has no concurrency. ci.yml is not touched by this PR (its group was fixed in https://github.com/apache/datafusion-comet/pull/7311), so this is new coverage for a different property and belongs in its own change if it is wanted.

    comphead comphead commented on code on Dec 03, 2026 00:51 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1234,16 +1240,26 @@ def check_required_checks():
         return not failures
     
     
    -def ci_triggers():
    -    """Return {event: its `types:` list, or None} from ci.yml's top-level `on:`."""
    -    lines = (WORKFLOWS / "ci.yml").read_text(encoding="utf-8").splitlines()
    -    event_key = re.compile(r"^  ([a-z_]+):\s*$")
    +def workflow_triggers(path):

    workflow_triggers (generalizing ci_triggers), the _unquote_yaml_scalar change to workflow_name, and the evaluate_condition to evaluate_expression split exist only to serve the new checker. If the checker shrinks to the short scan from my other comment, these edits to shared helpers are not needed, and the PR then does what its title says with no change to existing checks.

    comphead comphead commented on Dec 03, 2026 00:51 UTC
    Reviewer

    The three workflow edits are correct. For codeql.yml's push and schedule and for pr_title_check.yml's pull_request events the fallback to github.sha behaves as before, because github.head_ref is also empty on push and schedule. The 330 line checker is far larger than the bug needs, and it carries drive-by refactors of shared helpers. A grep-level rule would guard the same regression.

    comphead comphead approved these changes on Dec 03, 2026 00:57 UTC
    Approved Reviewer

    thanks @adityavaish, the PR goes into right direction, please check some nits!

    sunchao sunchao commented on code on Dec 03, 2026 01:14 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,

    I appended -${{ github.event.pull_request.head.sha }} to the CodeQL group and python3 dev/ci/check-ci-config.py still passed. pr_context varies github.sha but leaves the PR head SHA unset, so the evaluator substitutes an empty string on both pushes. In Actions the suffix changes and the previous run keeps running. If we keep this simulation, can we give successive pushes distinct head SHAs and check that this mutation fails?

    sunchao sunchao commented on Dec 03, 2026 01:14 UTC
    Reviewer

    The new keys separate same-named branches across forks and keep successive runs on one PR together. The CI configuration checks passed locally. I found one case the new regression check misses.

    _Automated review by Codex._

    adityavaish adityavaish commented on code on Dec 03, 2026 01:28 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,

    Thanks for catching that—per @comphead's feedback, 5c7929e3a replaced the context simulation with a direct github.head_ref concurrency-group scan, so pr_context has been removed.

    <sub>Auto-replied by the GitHub Copilot app</sub>

    adityavaish adityavaish commented on code on Dec 03, 2026 01:28 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1234,16 +1240,26 @@ def check_required_checks():
         return not failures
     
     
    -def ci_triggers():
    -    """Return {event: its `types:` list, or None} from ci.yml's top-level `on:`."""
    -    lines = (WORKFLOWS / "ci.yml").read_text(encoding="utf-8").splitlines()
    -    event_key = re.compile(r"^  ([a-z_]+):\s*$")
    +def workflow_triggers(path):

    Reverted all shared-helper edits in 5c7929e3a (ci_triggers, workflow_name, and evaluate_condition are now unchanged from main).

    <sub>Auto-replied by the GitHub Copilot app</sub>

    adityavaish adityavaish commented on code on Dec 03, 2026 01:28 UTC
    Code Review
    .github/workflows/miri.yml:1
    @@ -18,7 +18,7 @@
     name: Run Miri Safety Checks
     
     concurrency:
    -  group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
    +  group: ${{ github.repository }}-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }}

    Good catch—kept the miri.yml change for consistency and updated the PR description to note that miri.yml only triggers on schedule/workflow_dispatch and is a consistency edit rather than a runtime fix.

    <sub>Auto-replied by the GitHub Copilot app</sub>

    adityavaish adityavaish commented on code on Dec 03, 2026 01:28 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,
    +        "github.run_id": run_id,
    +        "github.event.action": action,
    +        "github.event.label.name": label,
    +        "github.event.pull_request.number": number,
    +        "github.event.pull_request.head.ref": head_ref,
    +        "github.event.pull_request.head.repo.full_name": head_repo,
    +    }
    +
    +
    +def check_concurrency_groups():
    +    """Concurrency groups must never collide across same-named fork branches."""
    +    failures = []
    +    for path in sorted(WORKFLOWS.glob("*.y*ml")):
    +        blocks = concurrency_blocks(path)
    +        if not blocks:
    +            continue
    +        triggers = workflow_triggers(path)
    +        wf_name = workflow_name(path) or path.name
    +        for scope, group, cancel in blocks:
    +            if not group:
    +                failures.append(f"{path} ({scope}) declares `concurrency` with no `group`")
    +                continue
    +            if re.search(r"\bgithub\.head_ref\b", group):
    +                failures.append(
    +                    f"{path} ({scope}) keys its concurrency group on `github.head_ref`, "
    +                    f"which is the bare branch name without the fork or pull request number; "
    +                    f"key on `github.event.pull_request.number` instead"
    +                )
    +            try:
    +                if "pull_request" in triggers or "pull_request_target" in triggers:
    +                    pr_types = triggers.get("pull_request") or triggers.get("pull_request_target") or []
    +                    pr_action = "synchronize" if not pr_types or "synchronize" in pr_types else pr_types[0]
    +                    pr_label = "run-iceberg-tests" if pr_action == "labeled" else ""
    +                    pr_a = pr_context(
    +                        7, workflow=wf_name, head_ref="patch-1",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    pr_b = pr_context(
    +                        8, workflow=wf_name, head_ref="patch-1",
    +                        head_repo="bob/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    group_a = evaluate_template(group, pr_a)
    +                    group_b = evaluate_template(group, pr_b)
    +                    if group_a.lower() == group_b.lower():
    +                        failures.append(
    +                            f"{path} ({scope}) gives two pull requests from different forks with "
    +                            f"the same branch name the same concurrency group ({group_a!r})"
    +                        )
    +                    pr_lower = pr_context(
    +                        7, workflow=wf_name, head_ref="feature",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    pr_upper = pr_context(
    +                        8, workflow=wf_name, head_ref="Feature",
    +                        head_repo="alice/datafusion-comet", action=pr_action, label=pr_label,
    +                    )
    +                    group_lower = evaluate_template(group, pr_lower)
    +                    group_upper = evaluate_template(group, pr_upper)
    +                    if group_lower.lower() == group_upper.lower():
    +                        failures.append(
    +                            f"{path} ({scope}) gives two pull requests whose branch names differ "
    +                            f"only by case the same concurrency group ({group_lower!r})"
    +                        )
    +                    if _cancel_in_progress(cancel, pr_a):
    +                        pr_next = pr_context(
    +                            7, workflow=wf_name, head_ref="patch-1",
    +                            head_repo="alice/datafusion-comet", sha="b" * 40,
    +                            action=pr_action, label=pr_label, run_id=2,
    +                        )
    +                        group_next = evaluate_template(group, pr_next)
    +                        if group_a.lower() != group_next.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) puts a new commit on the same pull request in a "
    +                                f"different concurrency group ({group_a!r} vs {group_next!r})"
    +                            )
    +
    +                if "workflow_run" in triggers:
    +                    run_a = {
    +                        "github.repository": UPSTREAM,
    +                        "github.event_name": "workflow_run",
    +                        "github.workflow": wf_name,
    +                        "github.sha": "a" * 40,
    +                        "github.run_id": 1,
    +                        "github.event.workflow_run.head_repository.full_name": "alice/datafusion-comet",
    +                        "github.event.workflow_run.head_branch": "patch-1",
    +                    }
    +                    run_b = {
    +                        **run_a,
    +                        "github.run_id": 2,
    +                        "github.event.workflow_run.head_repository.full_name": "bob/datafusion-comet",
    +                    }
    +                    if _cancel_in_progress(cancel, run_a):
    +                        group_a = evaluate_template(group, run_a)
    +                        group_b = evaluate_template(group, run_b)
    +                        if group_a.lower() == group_b.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) gives two workflow_run events from different "
    +                                f"forks with the same branch name the same concurrency group ({group_a!r})"
    +                            )
    +
    +                for event_name in ("push", "merge_group", "schedule", "workflow_dispatch"):
    +                    if event_name not in triggers:
    +                        continue
    +                    ctx_a = {
    +                        **actions_context(event_name, UPSTREAM, wf_name, "main"),
    +                        "github.sha": "a" * 40,
    +                        "github.run_id": 1,
    +                    }
    +                    ctx_b = {
    +                        **ctx_a,
    +                        "github.sha": "b" * 40,
    +                        "github.run_id": 2,
    +                    }
    +                    if _cancel_in_progress(cancel, ctx_a):
    +                        group_a = evaluate_template(group, ctx_a)
    +                        group_b = evaluate_template(group, ctx_b)
    +                        if group_a.lower() == group_b.lower():
    +                            failures.append(
    +                                f"{path} ({scope}) collapses different commits on `{event_name}` "
    +                                f"into the same concurrency group ({group_a!r})"
    +                            )
    +            except (ValueError, SyntaxError) as error:
    +                failures.append(f"{path} ({scope}): cannot check concurrency group: {error}")
    +
    +    # ci_label.yml calls ci.yml on `labeled`; ci.yml owns the concurrency group
    +    # and shares the caller's pull_request context.
    +    if LABEL_WORKFLOW.exists():

    Removed in 5c7929e3a so this PR stays focused strictly on preventing github.head_ref in concurrency groups.

    <sub>Auto-replied by the GitHub Copilot app</sub>

    adityavaish adityavaish commented on code on Dec 03, 2026 01:28 UTC
    Code Review
    dev/ci/check-ci-config.py:1
    @@ -1913,6 +1958,326 @@ def check_scheduled_workflows_stay_upstream():
         return not failures
     
     
    +CONCURRENCY_KEY = re.compile(r"^(\s*)concurrency:\s*(.*)$")
    +CONCURRENCY_FIELD = re.compile(r"^(\s*)(group|cancel-in-progress):\s*(.*)$")
    +LABEL_WORKFLOW = WORKFLOWS / "ci_label.yml"
    +
    +
    +def concurrency_blocks(path):
    +    """Every `concurrency:` block in a workflow, as [(scope, group, cancel)].
    +
    +    `scope` is `"workflow"` for a top-level block and the job id for a job-level
    +    block. Supports both the mapping form and the scalar shorthand.
    +    """
    +    lines = path.read_text(encoding="utf-8").splitlines()
    +    blocks = []
    +    in_jobs = False
    +    current_job = None
    +    index = 0
    +    while index < len(lines):
    +        line = lines[index]
    +        if line.startswith("jobs:"):
    +            in_jobs = True
    +            current_job = None
    +            index += 1
    +            continue
    +        if in_jobs:
    +            if line and not line.startswith((" ", "#")):
    +                in_jobs = False
    +                current_job = None
    +            else:
    +                job_match = JOB_START.match(line)
    +                if job_match:
    +                    current_job = job_match.group(1)
    +                    index += 1
    +                    continue
    +        match = CONCURRENCY_KEY.match(line)
    +        if not match:
    +            index += 1
    +            continue
    +        indent = len(match.group(1))
    +        if indent == 0:
    +            scope = "workflow"
    +        elif in_jobs and indent == 4 and current_job:
    +            scope = current_job
    +        else:
    +            index += 1
    +            continue
    +        inline = match.group(2).strip()
    +        if inline and not inline.startswith("#"):
    +            blocks.append((scope, _unquote_yaml_scalar(inline), None))
    +            index += 1
    +            continue
    +        group = None
    +        cancel = None
    +        index += 1
    +        while index < len(lines):
    +            entry = lines[index]
    +            if not entry.strip() or entry.lstrip().startswith("#"):
    +                index += 1
    +                continue
    +            entry_indent = len(entry) - len(entry.lstrip(" "))
    +            if entry_indent <= indent:
    +                break
    +            field = CONCURRENCY_FIELD.match(entry)
    +            if field and len(field.group(1)) > indent:
    +                key, raw_value = field.group(2), field.group(3).strip()
    +                if raw_value in (">", ">-", ">+", "|", "|-", "|+"):
    +                    parts = []
    +                    field_indent = len(field.group(1))
    +                    index += 1
    +                    while index < len(lines):
    +                        cont = lines[index]
    +                        if not cont.strip():
    +                            index += 1
    +                            continue
    +                        if len(cont) - len(cont.lstrip(" ")) <= field_indent:
    +                            break
    +                        parts.append(cont.strip())
    +                        index += 1
    +                    value = " ".join(parts)
    +                else:
    +                    if key == "cancel-in-progress":
    +                        raw_value = re.sub(r"\s+#.*$", "", raw_value)
    +                    value = _unquote_yaml_scalar(raw_value)
    +                    index += 1
    +                if key == "group":
    +                    group = value
    +                else:
    +                    cancel = value
    +                continue
    +            index += 1
    +        blocks.append((scope, group, cancel))
    +    return blocks
    +
    +
    +def _cancel_in_progress(cancel, context):
    +    if cancel is None:
    +        return False
    +    lowered = cancel.lower()
    +    if lowered == "true":
    +        return True
    +    if lowered == "false":
    +        return False
    +    if cancel.startswith("${{") and cancel.endswith("}}"):
    +        return evaluate_condition(cancel, context)
    +    raise ValueError(f"unsupported cancel-in-progress value `{cancel}`")
    +
    +
    +def pr_context(
    +    number,
    +    *,
    +    workflow,
    +    head_ref="patch-1",
    +    head_repo=FORK,
    +    sha="a" * 40,
    +    action="synchronize",
    +    label="",
    +    repository=UPSTREAM,
    +    run_id=1,
    +):
    +    return {
    +        "github.repository": repository,
    +        "github.event_name": "pull_request",
    +        "github.workflow": workflow,
    +        "github.head_ref": head_ref,
    +        "github.ref": f"refs/pull/{number}/merge",
    +        "github.ref_name": f"{number}/merge",
    +        "github.sha": sha,
    +        "github.run_id": run_id,
    +        "github.event.action": action,
    +        "github.event.label.name": label,
    +        "github.event.pull_request.number": number,
    +        "github.event.pull_request.head.ref": head_ref,
    +        "github.event.pull_request.head.repo.full_name": head_repo,
    +    }
    +
    +
    +def check_concurrency_groups():

    Simplified in 5c7929e3a—replaced the parser and context simulation with a concise check_concurrency_groups() scan (~35 lines) that flags any workflow- or job-level concurrency: block referencing github.head_ref (handling inline scalar/flow and multiline group: values while ignoring comments). Confirmed it catches the three pre-fix files and passes on the updated workflows.

    <sub>Auto-replied by the GitHub Copilot app</sub>

    adityavaish adityavaish commented on Dec 03, 2026 01:28 UTC
    Author

    Thanks @comphead and @sunchao for the review! Addressed all comments in 5c7929e3a (simplified \check_concurrency_groups()\ to a concise \github.head_ref\ scan, reverted unrelated helper edits, removed the \ci_label.yml\ check, and clarified \miri.yml\ in the PR description).

    @comphead could you please approve the workflow runs on this updated commit (and queue for merge once CI is green)?

    sunchao sunchao approved these changes on Dec 03, 2026 01:35 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    adityavaish adityavaish
    Labels
    risk: low confidence: 89.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.8% · Lower = rushed or shallow review
    89.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.8% · Safe to merge
    3.8%