Skip to content

ci: satisfy foundation workflow coalescing contract - #60

Merged
seonghobae merged 37 commits into
test/actions-concurrency-foundation-red-v1from
fix/actions-concurrency-foundation-green-v1
Sep 5, 2026
Merged

ci: satisfy foundation workflow coalescing contract#60
seonghobae merged 37 commits into
test/actions-concurrency-foundation-red-v1from
fix/actions-concurrency-foundation-green-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Refs #58 and stacked on #59.

Landed GREEN workflow repair

Base at merge: #59@cb458621b5cfdcec35820083bb82e19e9dc627cf

Exact head: e2309106eba4f41f45c770676885b27bf73aa69b

Effective child delta was exactly .github/workflows/ci.yml and .github/workflows/supply-chain.yml (+17/-9). The parent carried the three Rust workflow oracles. The workflows restrict duplicate push evidence to protected main; coalesce first-attempt PR work by workflow/repository/PR identity; isolate reruns with github.run_id; cancel only pull-request runs; admit opened, synchronize, reopened, converted_to_draft, and ready_for_review; and guard every direct PR job with github.event_name != 'pull_request' || github.event.pull_request.draft == false.

Exact terminal GREEN

CI 33966008873 completed success on exact e2309106... after real ubuntu-24.04 runner assignment and exact checkout:

  • load-contract 101306149126: success after release build, checksum-pinned k6, concurrent loopback traffic and evidence upload;
  • oci-runtime 101306149369: success after image build, declared non-root identity and read-only least-privilege runtime;
  • test 101306149265: success through formatting, cargo test --all-targets --locked, strict Clippy, public rustdoc, pinned coverage tooling, owned-production coverage enforcement, resolved dependency-lock verification and lock evidence upload.

Supply Chain 33966008876 / candidate-evidence 101306148582 also completed success on the same exact head after dependency-policy audit, exact candidate image build, SPDX SBOM generation, exact-image scan, exact-source binding and evidence upload.

Exact k6 artifact 9970973185 / digest sha256:2f6e8b16813a58498a12df71bc38feae33e4a6193cc426b8351ad32185eba57d records 400 requests, zero failed requests, 400/400 HTTP-200 checks, 400/400 upstream-body checks and loopback http_req_duration p(95)=1.56505725 ms, satisfying p(95)<20. This is loopback gateway-path evidence, not WAN/TLS/H2/H3 buyer-path performance.

Parent #59 exact cb458621... independently established current hosted semantic RED before this repair: load and OCI succeeded while the workflow-concurrency test binary failed exactly the intended two foundation invariants, 11 passed / 2 failed.

Fresh exact-range CodeRabbit review of cb458621...e2309106 reported no static findings; it is technical review evidence, not a human approval.

Normal merge / successor authority

After both current-head workflows reached terminal success and no review thread remained, this PR was normally merged into the #59 owner branch. Merge commit is cf60f0bce57a8ac530e8fff52fa9ae00be232f07. No force update, destructive rebase, administrative bypass or self-approval was used.

#59 is now Ready on cf60f0bc...; its newly materialized exact CI 33971798747 and Supply Chain 33971798802 supersede this PR for combined-head promotion. Do not transfer this PR's terminal GREEN to the merge commit.

No protected-main merge, release, canary, cutover or legacy-removal credit is claimed.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 0a559c76-7a8f-4965-a61c-f8820db8c294

📥 Commits

Reviewing files that changed from the base of the PR and between 7d14b9e and ee48595.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .github/workflows/supply-chain.yml

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


📝 Walkthrough

Walkthrough

CI 및 공급망 워크플로가 main push에서 실행됩니다. 동시 실행 그룹은 워크플로, 저장소, pull request 번호 또는 실행 ID를 사용합니다. 이전 실행 취소는 pull request 이벤트에서만 활성화됩니다.

Changes

워크플로 실행 정책

Layer / File(s) Summary
트리거 및 동시 실행 정책
.github/workflows/ci.yml, .github/workflows/supply-chain.yml
두 워크플로의 main push 트리거를 설정합니다. 동시 실행 그룹에 저장소와 실행 식별자를 포함합니다. cancel-in-progress는 pull request 이벤트에서만 활성화됩니다.

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

Merge Risk: ⚪ Minimal · up to ee485

The CI and supply-chain workflows now coalesce pull-request runs by PR identity while preserving independent main-push runs and avoiding their cancellation. No concrete current-head merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 워크플로 동시 실행(coalescing) 계약을 충족하기 위한 변경을 정확히 설명하며, 주요 변경 사항과 직접 관련됩니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/actions-concurrency-foundation-green-v1

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

❤️ Share

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

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the exact current range 7d14b9e22d9842355cc3cf59a986f31968e1b92a...ee48595723ded58ebcdb4233bf8fffaf5e8a8462. Focus on GitHub Actions concurrency semantics, event-specific fallback identity, protected-main push admission, and whether any success/gate condition was weakened. The Rust contract in the base must remain unchanged.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="7d14b9e22d9842355cc3cf59a986f31968e1b92a"
head="ee48595723ded58ebcdb4233bf8fffaf5e8a8462"

echo '== Commit availability and merge base =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo "base_is_ancestor=yes"

echo
echo '== Exact changed-file scope =='
git diff --name-status "$base" "$head"
echo
git diff --stat "$base" "$head"

echo
echo '== Exact workflow diff =='
git diff --no-ext-diff --unified=80 "$base" "$head" -- \
  .github/workflows/ci.yml \
  .github/workflows/supply-chain.yml

echo
echo '== Base contract: concurrency assertions =='
contract="$(fd -a '^workflow_concurrency_contract\.rs$' . | head -n1)"
if [ -z "$contract" ]; then
  echo 'ERROR: tests/workflow_concurrency_contract.rs was not found'
  exit 1
fi
echo "contract=$contract"
git diff --no-ext-diff --name-status "$base" "$head" -- "$contract"
git show "${base}:${contract}" | nl -ba | sed -n '1,320p'

echo
echo '== Workflow maps at head =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  ast-grep outline "$workflow" --items all || true
  echo '--- top-level and condition-bearing lines ---'
  nl -ba "$workflow" | rg -n -C2 '(^\s*[0-9]+\s+(name:|on:|push:|pull_request:|branches:|concurrency:|group:|cancel-in-progress:|permissions:|jobs:|if:|needs:|runs-on:|steps:|uses:|run:))'
done

echo
echo '== Semantic comparison excluding intended concurrency controls =='
python3 - "$base" "$head" <<'PY'
import subprocess, sys
base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
for path in paths:
    a = subprocess.check_output(["git", "show", f"{base}:{path}"], text=True).splitlines()
    b = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()
    # Remove the exact, indentation-aware intended fields and their value lines.
    def filtered(lines):
        result = []
        skip_next_group_value = False
        for line in lines:
            stripped = line.strip()
            if stripped == "concurrency:":
                continue
            if stripped.startswith("group:") or stripped.startswith("cancel-in-progress:"):
                continue
            if stripped == "push:":
                result.append(line)
                continue
            if stripped.startswith("branches:") and "main" in stripped:
                continue
            result.append(line)
        return result
    if filtered(a) == filtered(b):
        print(f"{path}: no differences remain after intended concurrency/push controls")
    else:
        print(f"{path}: unexpected differences remain after filtering")
PY

Length of output: 11285


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="7d14b9e22d9842355cc3cf59a986f31968e1b92a"
head="ee48595723ded58ebcdb4233bf8fffaf5e8a8462"

echo '== Locate base-side workflow concurrency contract =='
git ls-tree -r --name-only "$base" | grep -E '(^|/)workflow_concurrency_contract\.rs$' || true

contract="$(git ls-tree -r --name-only "$base" | grep -E '(^|/)workflow_concurrency_contract\.rs$' | head -n 1)"
test -n "$contract"
echo "contract=$contract"

echo
echo '== Contract changed in requested range =='
git diff --no-ext-diff --name-status "$base" "$head" -- "$contract"
echo
echo '== Base contract source =='
git show "$base:$contract" | cat -n

echo
echo '== Contract source at head =='
git show "$head:$contract" | cat -n

echo
echo '== Exact workflow content outside intended controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]

def show(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_intended(lines):
    result = []
    in_concurrency = False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith("  ") and not line.startswith("    "):
            if line.lstrip().startswith(("group:", "cancel-in-progress:")):
                continue
            in_concurrency = False
        if line == "  push:\n":
            result.append(line)
            continue
        if line.startswith("    branches:\n") or line.startswith("      - main\n"):
            continue
        result.append(line)
    return result

for path in paths:
    left = strip_intended(show(base, path))
    right = strip_intended(show(head, path))
    print(f"--- {path} ---")
    diff = list(difflib.unified_diff(left, right, fromfile="base-filtered", tofile="head-filtered"))
    if diff:
        print("UNEXPECTED DIFFERENCES:")
        print("".join(diff), end="")
    else:
        print("No differences outside push-branch admission and concurrency controls.")

echo
PY

echo '== Head workflow trigger/concurrency sections with line numbers =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  sed -n '1,28p' "$workflow" | cat -n
done

Length of output: 9323


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="7d14b9e22d9842355cc3cf59a986f31968e1b92a"
head="ee48595723ded58ebcdb4233bf8fffaf5e8a8462"
expected_group='group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}'
expected_cancel="cancel-in-progress: \${{ github.event_name == 'pull_request' }}"
expected_push=$'push:\n    branches:\n      - main'

echo '== Diff whitespace validation =='
git diff --check "$base" "$head"

echo
echo '== Changed workflow headers at head =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | sed -n '1,20p' | cat -n
done

echo
echo '== Base-contract source checks over all workflows at head =='
status=0
while IFS= read -r path; do
  source="$(git show "$head:$path")"
  if printf '%s' "$source" | grep -Fq 'pull_request:'; then
    if printf '%s' "$source" | grep -Fqx "$expected_group" &&
       printf '%s' "$source" | grep -Fqx "$expected_cancel"; then
      echo "PASS PR concurrency: $path"
    else
      echo "FAIL PR concurrency: $path"
      status=1
    fi
  fi
  if printf '%s' "$source" | grep -Fq 'push:'; then
    if printf '%s' "$source" | grep -Fq "$expected_push"; then
      echo "PASS protected-main push: $path"
    else
      echo "FAIL protected-main push: $path"
      status=1
    fi
  fi
done < <(git ls-tree -r --name-only "$head" .github/workflows | grep -E '\.ya?ml$')

exit "$status"

Length of output: 3103


🤖 web_search executed:

site:docs.github.com/actions "cancel-in-progress" "expression" concurrency

Length of output: 10362


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head="ee48595723ded58ebcdb4233bf8fffaf5e8a8462"
expected_group='group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}'
expected_cancel='cancel-in-progress: ${{ github.event_name == '\''pull_request'\'' }}'
expected_push=$'push:\n    branches:\n      - main'

echo '== Repository-wide base-contract checks at head =='
status=0
workflows="$(git ls-tree -r --name-only "$head" .github/workflows | grep -E '\.ya?ml$' || true)"
test -n "$workflows"

for path in $workflows; do
  source="$(git show "$head:$path")"

  if printf '%s\n' "$source" | grep -Fq 'pull_request:'; then
    if printf '%s\n' "$source" | grep -Fqx "$expected_group" &&
       printf '%s\n' "$source" | grep -Fqx "$expected_cancel"; then
      echo "PASS PR concurrency: $path"
    else
      echo "FAIL PR concurrency: $path"
      status=1
    fi
  fi

  if printf '%s\n' "$source" | grep -Fq 'push:'; then
    if printf '%s\n' "$source" | grep -Fq "$expected_push"; then
      echo "PASS protected-main push: $path"
    else
      echo "FAIL protected-main push: $path"
      status=1
    fi
  fi
done

exit "$status"

Length of output: 1748


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head="ee48595723ded58ebcdb4233bf8fffaf5e8a8462"

python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
expected_group = (
    "group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_main_push = "push:\n    branches:\n      - main"

paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, ".github/workflows"],
    text=True,
).splitlines()

failed = False
for path in (p for p in paths if p.endswith((".yml", ".yaml"))):
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    if "pull_request:" in source:
        ok = expected_group in source and expected_cancel in source
        print(f"{'PASS' if ok else 'FAIL'} PR concurrency: {path}")
        failed |= not ok
    if "push:" in source:
        ok = expected_main_push in source
        print(f"{'PASS' if ok else 'FAIL'} protected-main push: {path}")
        failed |= not ok

raise SystemExit(1 if failed else 0)
PY

Length of output: 1495


@seonghobae No findings for 7d14b9e22d9842355cc3cf59a986f31968e1b92a...ee48595723ded58ebcdb4233bf8fffaf5e8a8462.

I verified these conditions:

  • The exact range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is unchanged.
  • Both workflows admit push events only for main.
  • Both workflows use the required group:
    ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}.
  • PR runs coalesce by workflow, repository, and PR number.
  • Protected-main push runs use the unique github.run_id fallback. They cannot share a group with a PR run.
  • cancel-in-progress is true only for pull_request events. Therefore, a protected-main push cannot cancel an in-progress run.
  • No job, step, permission, check, threshold, or success condition changed outside the admitted trigger and concurrency controls.
  • git diff --check passed.
  • A repository-wide static check confirms that both workflows satisfy the unchanged Rust contract.

GitHub Actions supports expressions in workflow-level cancel-in-progress, including the github context. See the GitHub Actions concurrency documentation.

This is a static review. It does not replace the required exact-head CI, Supply Chain, formatting, actionlint, and Rust-contract execution after #59 has produced its required RED evidence.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the current exact child range bbb74256a35d566e7d9c902086da5944dd62821d...562a699e902388798b9f7015dcabd1e5f8040998. The effective child delta should remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml. Verify that protected-main-only push and PR-only cancellation satisfy the strengthened current RED contract without breaking legitimate push-only release/tag workflows or introducing cross-workflow/run cancellation. Do not transfer the predecessor 7d14b9e...ee485957... review.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='bbb74256a35d566e7d9c902086da5944dd62821d'
head='562a699e902388798b9f7015dcabd1e5f8040998'

echo '== Exact range and changed-file scope =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
echo
echo '== Exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head" -- \
  .github/workflows/ci.yml \
  .github/workflows/supply-chain.yml \
  tests/workflow_concurrency_contract.rs

echo
echo '== Locate and compare workflow concurrency contract =='
contract="$(git ls-tree -r --name-only "$base" | grep -E '(^|/)workflow_concurrency_contract\.rs$' | head -n 1 || true)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
git diff --no-ext-diff --name-status "$base" "$head" -- "$contract"
echo '--- base contract ---'
git show "$base:$contract" | cat -n
echo '--- head contract ---'
git show "$head:$contract" | cat -n

echo
echo '== All workflow event and concurrency declarations at head =='
while IFS= read -r workflow; do
  echo "--- $workflow ---"
  git show "$head:$workflow" | cat -n | rg -C3 \
    '^[[:space:]]*[0-9]+[[:space:]]+(name:|on:|push:|pull_request:|release:|create:|workflow_dispatch:|schedule:|branches:|branches-ignore:|tags:|tags-ignore:|concurrency:|group:|cancel-in-progress:)'
done < <(git ls-tree -r --name-only "$head" .github/workflows | grep -E '\.ya?ml$' | sort)

echo
echo '== Full head content for the two modified workflows =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  git show "$head:$workflow" | cat -n
done

Length of output: 29932


🤖 web_search executed:

GitHub Actions documentation: workflow-level concurrency group expressions, fallback values for undefined github.event.pull_request.number on push events, and conditional cancel-in-progress semantics.

Length of output: 17423


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='bbb74256a35d566e7d9c902086da5944dd62821d'
head='562a699e902388798b9f7015dcabd1e5f8040998'

echo '== All workflow event and concurrency declarations at head =='
git ls-tree -r --name-only "$head" .github/workflows \
  | grep -E '\.ya?ml$' \
  | sort \
  | while IFS= read -r workflow; do
      echo "--- $workflow ---"
      git show "$head:$workflow" | cat -n | rg -C3 \
        '^[[:space:]]*[0-9]+[[:space:]]+(name:|on:|push:|pull_request:|release:|create:|workflow_dispatch:|schedule:|branches:|branches-ignore:|tags:|tags-ignore:|concurrency:|group:|cancel-in-progress:)' || true
    done

echo
echo '== Static evaluation of the unchanged Rust workflow concurrency contract =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"

paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, ".github/workflows"],
    text=True,
).splitlines()
paths = sorted(p for p in paths if p.endswith((".yml", ".yaml")))

def indent(line):
    return len(line) - len(line.lstrip(" "))

def event_block(source, event):
    target = f"  {event}:"
    in_on = False
    in_event = False
    block = []
    for line in source.splitlines():
        trimmed = line.strip()
        ignorable = not trimmed or trimmed.startswith("#")
        if not in_on:
            if line == "on:":
                in_on = True
            continue
        if not in_event:
            if not ignorable and indent(line) == 0:
                return None
            if line == target:
                in_event = True
            continue
        if not ignorable and indent(line) <= 2:
            break
        block.append(line)
    return block if in_event else None

def concurrency_block(source):
    in_block = False
    block = []
    for line in source.splitlines():
        trimmed = line.strip()
        ignorable = not trimmed or trimmed.startswith("#")
        if not in_block:
            if line == "concurrency:":
                in_block = True
            continue
        if not ignorable and indent(line) == 0:
            break
        block.append(line)
    return block if in_block else None

def push_branches(source):
    block = event_block(source, "push")
    if block is None:
        return None
    in_branches = False
    branches = []
    for line in block:
        trimmed = line.strip()
        ignorable = not trimmed or trimmed.startswith("#")
        if not in_branches:
            if line == "    branches:":
                in_branches = True
            continue
        if not ignorable and indent(line) <= 4:
            break
        if indent(line) == 6 and trimmed.startswith("- "):
            branches.append(trimmed[2:].strip().strip("'\""))
    return branches if in_branches else None

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    top_level_on = [
        line for line in source.splitlines()
        if indent(line) == 0 and line.lstrip().startswith("on:")
    ]
    syntax_ok = top_level_on == ["on:"]
    print(f"{'PASS' if syntax_ok else 'FAIL'} block-style on: {path}")
    failed |= not syntax_ok

    has_pr = event_block(source, "pull_request") is not None
    has_push = event_block(source, "push") is not None
    if has_pr:
        concurrency = concurrency_block(source) or []
        pr_ok = concurrency.count(expected_group) == 1 and concurrency.count(expected_cancel) == 1
        print(f"{'PASS' if pr_ok else 'FAIL'} PR identity and PR-only cancellation: {path}")
        failed |= not pr_ok
    if has_pr and has_push:
        branches = push_branches(source)
        push_ok = branches == ["main"]
        print(f"{'PASS' if push_ok else 'FAIL'} protected-main-only duplicate push: {path} ({branches!r})")
        failed |= not push_ok
    if has_push and not has_pr:
        print(f"INFO push-only workflow outside PR contract: {path}")

raise SystemExit(1 if failed else 0)
PY

echo
echo '== Exact range check for push-only workflow changes =='
git diff --name-status "$base" "$head" -- .github/workflows \
  | grep -v -E '^M[[:space:]]+\.github/workflows/(ci|supply-chain)\.yml$' \
  && exit 1 || true
echo 'PASS: no push-only workflow changed in the exact range.'

Length of output: 7660


@seonghobae No findings for the exact child range bbb74256a35d566e7d9c902086da5944dd62821d...562a699e902388798b9f7015dcabd1e5f8040998.

I reviewed this range independently. I did not transfer the predecessor review.

  • The range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is unchanged.
  • Both modified workflows limit push to the main branch.
  • Both workflows use this concurrency group:
    ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
  • A pull request uses its PR number. Runs from the same workflow and repository for the same PR coalesce.
  • A push uses github.run_id. Each protected-main push has a distinct group.
  • A push run cannot share a group with a PR run.
  • github.workflow separates CI runs from Supply Chain runs. The workflows cannot cancel each other.
  • cancel-in-progress is true only when github.event_name == 'pull_request'.
  • Protected-main push runs do not cancel in-progress runs.
  • The static evaluation of the strengthened RED contract passed for both workflows.
  • The workflow inventory contains no modified push-only release or tag workflow. The exact range therefore does not change their admission behavior.
  • No job, step, permission, check, threshold, artifact condition, or success condition changed.
  • git diff --check passed.

GitHub Actions supports expression-based concurrency groups, fallback identities, and conditional cancel-in-progress values: GitHub Actions concurrency documentation.

This is a static review. Exact-head CI, Supply Chain, formatting, actionlint, and Rust-contract execution remain required after #59 produces the required RED evidence.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Re-review the current exact child range 3e45d88d46420c949ce0d98072229df3b8cfc33f...b177f42f25d1481fc3db8b1a4d063ad18e99e63b after the RED oracle repair and non-force restack. Effective child delta must remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml. Verify current main-only push, workflow/repository/PR grouping with github.run_id fallback, and PR-only cancellation against the strengthened current contract. Do not transfer predecessor-range review.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='3e45d88d46420c949ce0d98072229df3b8cfc33f'
head='b177f42f25d1481fc3db8b1a4d063ad18e99e63b'

echo '== Exact range =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'

echo
echo '== Changed-file scope and whitespace =='
git diff --check "$base" "$head"
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

echo
echo '== Exact workflow and contract diffs =='
git diff --no-ext-diff --unified=100 "$base" "$head" -- \
  .github/workflows/ci.yml \
  .github/workflows/supply-chain.yml \
  tests/workflow_concurrency_contract.rs

echo
echo '== Locate and compare the contract =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n 1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
git diff --name-status "$base" "$head" -- "$contract"
echo '--- contract at base ---'
git show "$base:$contract" | cat -n
echo '--- contract at head ---'
git show "$head:$contract" | cat -n

echo
echo '== Current modified workflow headers =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  git show "$head:$workflow" | sed -n '1,35p' | cat -n
done

echo
echo '== Static strengthened-contract validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"

paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, ".github/workflows"],
    text=True,
).splitlines()
paths = sorted(p for p in paths if p.endswith((".yml", ".yaml")))

def indent(line):
    return len(line) - len(line.lstrip(" "))

def event_block(source, event):
    active = False
    result = []
    for line in source.splitlines():
        if not active:
            if line == f"  {event}:":
                active = True
            continue
        if line.strip() and not line.lstrip().startswith("#") and indent(line) <= 2:
            break
        result.append(line)
    return result if active else None

def push_branches(source):
    block = event_block(source, "push")
    if block is None:
        return None
    branches, active = [], False
    for line in block:
        if line == "    branches:":
            active = True
            continue
        if active and line.strip() and not line.lstrip().startswith("#") and indent(line) <= 4:
            break
        if active and indent(line) == 6 and line.strip().startswith("- "):
            branches.append(line.strip()[2:].strip("'\""))
    return branches if active else None

def concurrency_block(source):
    active = False
    result = []
    for line in source.splitlines():
        if not active:
            if line == "concurrency:":
                active = True
            continue
        if line.strip() and not line.lstrip().startswith("#") and indent(line) == 0:
            break
        result.append(line)
    return result if active else []

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    has_pr = event_block(source, "pull_request") is not None
    has_push = event_block(source, "push") is not None
    if has_pr:
        block = concurrency_block(source)
        ok = block.count(expected_group) == 1 and block.count(expected_cancel) == 1
        print(f"{'PASS' if ok else 'FAIL'} PR identity and PR-only cancellation: {path}")
        failed |= not ok
    if has_pr and has_push:
        branches = push_branches(source)
        ok = branches == ["main"]
        print(f"{'PASS' if ok else 'FAIL'} main-only duplicate push: {path} ({branches!r})")
        failed |= not ok
    if has_push and not has_pr:
        print(f"INFO unchanged push-only workflow outside PR concurrency contract: {path}")

raise SystemExit(1 if failed else 0)
PY

echo
echo '== Push-only workflow protection =='
unexpected="$(
  git diff --name-status "$base" "$head" -- .github/workflows \
    | rg -v '^M[[:space:]]+\.github/workflows/(ci|supply-chain)\.yml$' || true
)"
test -z "$unexpected"
echo 'PASS: no push-only release or tag workflow changed in this range.'

Length of output: 37958


@seonghobae No findings for the exact child range 3e45d88d46420c949ce0d98072229df3b8cfc33f...b177f42f25d1481fc3db8b1a4d063ad18e99e63b.

I reviewed this range independently. I did not transfer the predecessor-range review.

  • The base revision is an ancestor of the head revision.

  • The effective child delta changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.

  • tests/workflow_concurrency_contract.rs is unchanged.

  • Both workflows admit push events only for main.

  • Both workflows use this concurrency group:

    ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
  • Pull request runs use the pull request number. Superseding runs can coalesce only within the same workflow, repository, and pull request.

  • Push runs use github.run_id. Each protected-main push has a distinct concurrency identity.

  • github.workflow separates CI and Supply Chain runs. The workflows cannot cancel each other.

  • cancel-in-progress is true only for pull_request events.

  • A protected-main push cannot cancel an in-progress run.

  • The strengthened static contract validation passed for both workflows.

  • No push-only release or tag workflow changed in this range.

  • No job, step, permission, gate, threshold, or success condition changed.

  • git diff --check passed.

This is a static review. Exact-head CI, Supply Chain, formatting, actionlint, and Rust-contract execution remain required after #59 produces the required RED evidence.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review the current exact child range 7288ae2185935ae80a7df8209ae77c2e70f0e7dc...db4d981793fcdd3cd46d091ff6a0cf36f4b7ce0b after the non-force restack onto the repaired RED oracle. Effective child delta must remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml. Verify main-only push, workflow/repository/PR grouping with github.run_id fallback, PR-only cancellation, and compatibility with the strengthened event-syntax oracle. Do not transfer any predecessor-range review.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 20 minutes and 4 seconds before sending another message.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review the current exact child range 7109015c5c01bc855286075353b3a600f0ac98fb...94432aae96359e429ef6e7d9933d96176195cdba. Effective child delta must remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml. The strengthened Rust oracle is inherited unchanged from #59. Verify exact main push scope, workflow/repository/PR cancellation identity with github.run_id non-PR fallback, PR-only cancel-in-progress, and absence of gate/runner/security weakening. Do not transfer predecessor-head conclusions.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='7109015c5c01bc855286075353b3a600f0ac98fb'
head='94432aae96359e429ef6e7d9933d96176195cdba'
expected_group='  group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}'
expected_cancel="  cancel-in-progress: \${{ github.event_name == 'pull_request' }}"

echo '== Exact range and ancestry =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'

echo
echo '== Changed-file scope and whitespace =='
git diff --check "$base" "$head"
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

echo
echo '== Complete exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Locate and compare strengthened Rust contract =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n 1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
git diff --name-status "$base" "$head" -- "$contract"
echo '--- contract at base ---'
git show "$base:$contract" | cat -n
echo '--- contract at head ---'
git show "$head:$contract" | cat -n

echo
echo '== Changed workflow headers and concurrency declarations at head =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  git show "$head:$workflow" | sed -n '1,45p' | cat -n
done

echo
echo '== Structured workflow contract validation =='
python3 - "$head" "$expected_group" "$expected_cancel" <<'PY'
import subprocess
import sys

head, expected_group, expected_cancel = sys.argv[1:]
changed = {".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"}

paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, ".github/workflows"],
    text=True,
).splitlines()
paths = sorted(p for p in paths if p.endswith((".yml", ".yaml")))

def indent(line):
    return len(line) - len(line.lstrip(" "))

def block(source, heading, heading_indent):
    lines = source.splitlines()
    start = next((i for i, line in enumerate(lines) if line == heading), None)
    if start is None:
        return None
    result = []
    for line in lines[start + 1:]:
        stripped = line.strip()
        if stripped and not stripped.startswith("#") and indent(line) <= heading_indent:
            break
        result.append(line)
    return result

def event_block(source, event):
    return block(source, f"  {event}:", 2)

def push_branches(source):
    lines = event_block(source, "push")
    if lines is None:
        return None
    branches = block("\n".join(lines), "    branches:", 4)
    if branches is None:
        return None
    return [
        line.strip()[2:].strip("'\"")
        for line in branches
        if indent(line) == 6 and line.strip().startswith("- ")
    ]

def concurrency(source):
    return block(source, "concurrency:", 0) or []

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    has_pr = event_block(source, "pull_request") is not None
    has_push = event_block(source, "push") is not None
    if path in changed:
        c = concurrency(source)
        group_ok = c.count(expected_group) == 1
        cancel_ok = c.count(expected_cancel) == 1
        push_ok = has_push and push_branches(source) == ["main"]
        print(f"{'PASS' if group_ok else 'FAIL'} group identity: {path}")
        print(f"{'PASS' if cancel_ok else 'FAIL'} PR-only cancellation: {path}")
        print(f"{'PASS' if push_ok else 'FAIL'} main-only push: {path} ({push_branches(source)!r})")
        failed |= not (group_ok and cancel_ok and push_ok)
    elif has_push and not has_pr:
        print(f"INFO unchanged push-only workflow: {path}")

raise SystemExit(1 if failed else 0)
PY

echo
echo '== Semantic comparison excluding approved trigger/concurrency fields =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def remove_approved(lines):
    output = []
    in_concurrency = False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency:
            if line.startswith("  group:") or line.startswith("  cancel-in-progress:"):
                continue
            in_concurrency = False
        if line == "    branches:\n" or line == "      - main\n":
            continue
        output.append(line)
    return output

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        remove_approved(read(base, path)),
        remove_approved(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        failed = True
        print(f"FAIL unexpected changes: {path}")
        print("".join(diff), end="")
    else:
        print(f"PASS no changes outside approved trigger/concurrency fields: {path}")
raise SystemExit(1 if failed else 0)
PY

Length of output: 43429


@seonghobae No findings for the exact range 7109015c5c01bc855286075353b3a600f0ac98fb...94432aae96359e429ef6e7d9933d96176195cdba.

I reviewed this range independently.

  • The base revision is an ancestor of the head revision.

  • The effective child delta changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.

  • tests/workflow_concurrency_contract.rs is unchanged.

  • Both workflows use block-style event syntax that the strengthened Rust oracle accepts.

  • Both workflows restrict push events to exactly main.

  • Both workflows use this concurrency identity:

    ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
  • Pull request runs use the PR number.

  • The workflow name and repository name prevent cross-workflow and cross-repository cancellation.

  • Non-PR runs use github.run_id.

  • Each protected-main push therefore has a unique concurrency group.

  • A protected-main push cannot share a group with a pull request run.

  • cancel-in-progress is true only for pull_request events.

  • A protected-main push cannot cancel an in-progress run.

  • No job, runner, permission, step, security check, gate, threshold, or success condition changed outside the approved trigger and concurrency fields.

  • git diff --check passed.

  • The static strengthened-contract validation passed for both modified workflows.

This is a static review. Exact-head CI, Supply Chain, formatting, actionlint, and Rust-contract execution remain required.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review current exact child range 9e6afedb179b0d0c29b7752082020728bafb97f8...8590d7b05d10edcc19e0629f3173e384476a8d1e. Effective child delta must remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml; the strengthened Rust oracle is inherited unchanged. Verify exact main push scope, workflow/repository/PR cancellation identity with github.run_id non-PR fallback, PR-only cancel-in-progress, and no runner/gate/security weakening. Do not transfer predecessor-head conclusions.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='9e6afedb179b0d0c29b7752082020728bafb97f8'
head='8590d7b05d10edcc19e0629f3173e384476a8d1e'
readonly base head

echo '== Exact range and ancestry =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'

echo
echo '== Changed-file scope and whitespace =='
git diff --check "$base" "$head"
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

echo
echo '== Complete exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Rust concurrency contract at range endpoints =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n 1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
git diff --name-status "$base" "$head" -- "$contract"
echo '--- base contract ---'
git show "$base:$contract" | cat -n
echo '--- head contract ---'
git show "$head:$contract" | cat -n

echo
echo '== Modified workflow headers at head =='
for workflow in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $workflow ---"
  git show "$head:$workflow" | sed -n '1,48p' | cat -n
done

echo
echo '== Static workflow concurrency and event-syntax validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
changed = {".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"}
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"

paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, ".github/workflows"],
    text=True,
).splitlines()
paths = sorted(path for path in paths if path.endswith((".yml", ".yaml")))

def indent(line):
    return len(line) - len(line.lstrip(" "))

def block(lines, heading, heading_indent):
    start = next((index for index, line in enumerate(lines) if line == heading), None)
    if start is None:
        return None
    output = []
    for line in lines[start + 1:]:
        stripped = line.strip()
        if stripped and not stripped.startswith("#") and indent(line) <= heading_indent:
            break
        output.append(line)
    return output

def event_block(lines, event):
    return block(lines, f"  {event}:", 2)

def push_branches(lines):
    push = event_block(lines, "push")
    if push is None:
        return None
    branch_lines = block(push, "    branches:", 4)
    if branch_lines is None:
        return None
    return [
        line.strip()[2:].strip("'\"")
        for line in branch_lines
        if indent(line) == 6 and line.strip().startswith("- ")
    ]

def concurrency_block(lines):
    return block(lines, "concurrency:", 0) or []

failed = False
for path in paths:
    lines = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()
    has_pr = event_block(lines, "pull_request") is not None
    has_push = event_block(lines, "push") is not None

    if path in changed:
        event_syntax_ok = lines.count("on:") == 1
        group_ok = concurrency_block(lines).count(expected_group) == 1
        cancel_ok = concurrency_block(lines).count(expected_cancel) == 1
        push_ok = has_push and push_branches(lines) == ["main"]
        print(f"{'PASS' if event_syntax_ok else 'FAIL'} block-style event syntax: {path}")
        print(f"{'PASS' if group_ok else 'FAIL'} workflow/repository/PR/run identity: {path}")
        print(f"{'PASS' if cancel_ok else 'FAIL'} PR-only cancellation: {path}")
        print(f"{'PASS' if push_ok else 'FAIL'} exact main-only push: {path} ({push_branches(lines)!r})")
        failed |= not (event_syntax_ok and group_ok and cancel_ok and push_ok)
    elif has_push and not has_pr:
        print(f"INFO unchanged push-only workflow: {path}")

raise SystemExit(1 if failed else 0)
PY

echo
echo '== Semantic comparison outside approved trigger and concurrency fields =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def filtered(lines):
    result = []
    in_concurrency = False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency:
            if line.startswith(("  group:", "  cancel-in-progress:")):
                continue
            in_concurrency = False
        if line in ("    branches:\n", "      - main\n"):
            continue
        result.append(line)
    return result

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        filtered(read(base, path)),
        filtered(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        failed = True
        print(f"FAIL unexpected workflow changes: {path}")
        print("".join(diff), end="")
    else:
        print(f"PASS no changes outside approved trigger/concurrency fields: {path}")
raise SystemExit(1 if failed else 0)
PY

echo
echo '== Push-only workflow protection =='
unexpected="$(
  git diff --name-status "$base" "$head" -- .github/workflows \
    | rg -v '^M[[:space:]]+\.github/workflows/(ci|supply-chain)\.yml$' || true
)"
test -z "$unexpected"
echo 'PASS: no push-only release or tag workflow changed in this range.'

Length of output: 45574


@seonghobae No findings for the exact child range 9e6afedb179b0d0c29b7752082020728bafb97f8...8590d7b05d10edcc19e0629f3173e384476a8d1e.

I reviewed this range independently.

  • The base revision is an ancestor of the head revision.

  • The range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.

  • tests/workflow_concurrency_contract.rs is unchanged.

  • Both workflows use the required block-style on: mapping.

  • Both workflows restrict push to exactly main.

  • Both workflows use this concurrency identity:

    ${{ github.workflow }}-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
  • Pull request runs use the pull request number.

  • github.workflow and github.repository prevent cross-workflow and cross-repository cancellation.

  • Non-pull-request runs use github.run_id.

  • Each protected-main push has a unique concurrency group.

  • A protected-main push cannot share a group with a pull request run.

  • cancel-in-progress is true only for pull_request events.

  • Protected-main push runs cannot cancel in-progress runs.

  • No runner, job, permission, step, security check, gate, threshold, or success condition changed outside the approved trigger and concurrency fields.

  • No push-only release or tag workflow changed.

  • git diff --check passed.

  • The static strengthened-contract validation passed for both modified workflows.

This is a static review. Exact-head CI, Supply Chain, formatting, actionlint, and Rust-contract execution remain required.

⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the current exact child range 0c68e5d299928f4480930ddbe36d3b8dc9b3d304...7f0d599b473f1815b34d2746dfb3bb5a5137a798. The RED oracle is identical to the base; the effective child delta should remain only .github/workflows/ci.yml and .github/workflows/supply-chain.yml. Do not transfer predecessor review credit.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the current exact range 802d9a30030759fc6410f86fda7128a1569956c8...b587d043bef8d11a5d08de9ea7e5f690e289250f. Effective GREEN range must be exactly the two workflow files. Please focus on rerun isolation plus the converted_to_draft → skipped/cancelled → ready_for_review admission contract; writer-safe #61 exercised that transition on an unchanged source head.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='802d9a30030759fc6410f86fda7128a1569956c8'
head='b587d043bef8d11a5d08de9ea7e5f690e289250f'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: exact range changes only the two workflow files.'
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=100 "$base" "$head" -- \
  .github/workflows/ci.yml .github/workflows/supply-chain.yml

echo
echo '== Strengthened Rust oracle identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: Rust oracle is byte-identical at both endpoints.'

echo
echo '== Workflow headers and direct job guards at head =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | sed -n '1,180p' | cat -n
done

echo
echo '== Static concurrency, admission, and direct-job-guard validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_types = "    types: [opened, synchronize, reopened, ready_for_review]"
expected_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def lines_at(path):
    return subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()

def indent(line):
    return len(line) - len(line.lstrip(" "))

def block(lines, heading, depth):
    try:
        start = lines.index(heading)
    except ValueError:
        return None
    result = []
    for line in lines[start + 1:]:
        text = line.strip()
        if text and not text.startswith("#") and indent(line) <= depth:
            break
        result.append(line)
    return result

def direct_job_guards(lines):
    jobs = block(lines, "jobs:", 0)
    if jobs is None:
        return []
    starts = [i for i, line in enumerate(jobs)
              if indent(line) == 2 and line.rstrip().endswith(":")]
    guarded = []
    for pos, start in enumerate(starts):
        end = starts[pos + 1] if pos + 1 < len(starts) else len(jobs)
        name = jobs[start].strip()[:-1]
        guarded.append((name, expected_guard in jobs[start + 1:end]))
    return guarded

failed = False
for path in paths:
    lines = lines_at(path)
    push = block(lines, "  push:", 2) or []
    concurrency = block(lines, "concurrency:", 0) or []
    guards = direct_job_guards(lines)
    checks = {
        "block_on": lines.count("on:") == 1,
        "pr_types": expected_types in (block(lines, "  pull_request:", 2) or []),
        "main_push": "    branches:" in push and "      - main" in push,
        "rerun_isolation_group": concurrency.count(expected_group) == 1,
        "pr_only_cancellation": concurrency.count(expected_cancel) == 1,
        "all_direct_jobs_draft_guarded": bool(guards) and all(ok for _, ok in guards),
    }
    print(f"{path}: {checks}; direct_jobs={guards}")
    failed |= not all(checks.values())

raise SystemExit(1 if failed else 0)
PY

echo
echo '== Compare execution controls at range endpoints =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def filtered(lines):
    out, in_concurrency = [], False
    admission_lines = {
        "    branches:\n", "      - main\n",
        "    types: [opened, synchronize, reopened, ready_for_review]\n",
        "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
    }
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in admission_lines:
            continue
        out.append(line)
    return out

bad = False
for path in paths:
    diff = list(difflib.unified_diff(
        filtered(read(base, path)), filtered(read(head, path)),
        fromfile=f"{path}:base-filtered", tofile=f"{path}:head-filtered",
    ))
    if diff:
        print(f"FAIL unexpected changes: {path}")
        print("".join(diff), end="")
        bad = True
    else:
        print(f"PASS approved-policy-only changes: {path}")
raise SystemExit(bad)
PY

echo
echo '== Hosted runs: exact head and PR `#61` =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
echo '-- Exact requested head --'
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.head_sha,.html_url] | `@tsv`'
echo '-- Pull request `#61` metadata --'
gh api "repos/$repo/pulls/61" \
  --jq '[.number,.state,.draft,.head.sha,.base.ref,.updated_at,.html_url] | `@tsv`'
pr61_head="$(gh api "repos/$repo/pulls/61" --jq '.head.sha')"
echo '-- Pull request `#61` source-head runs --'
gh api "repos/$repo/actions/runs?head_sha=$pr61_head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`'

Length of output: 34611


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='802d9a30030759fc6410f86fda7128a1569956c8'
head='b587d043bef8d11a5d08de9ea7e5f690e289250f'
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"

echo '== Corrected static policy validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
expected_types = ["opened", "synchronize", "reopened", "converted_to_draft", "ready_for_review"]
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def read(path):
    return subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()

def indent(line):
    return len(line) - len(line.lstrip(" "))

def block(lines, header, depth):
    try:
        start = lines.index(header)
    except ValueError:
        return None
    result = []
    for line in lines[start + 1:]:
        if line.strip() and not line.lstrip().startswith("#") and indent(line) <= depth:
            break
        result.append(line)
    return result

def list_values(lines, header, depth):
    section = block(lines, header, depth)
    if section is None:
        return None
    return [line.strip()[2:].strip("'\"") for line in section
            if indent(line) == depth + 2 and line.strip().startswith("- ")]

def direct_job_guards(lines):
    jobs = block(lines, "jobs:", 0) or []
    starts = [i for i, line in enumerate(jobs)
              if indent(line) == 2 and line.rstrip().endswith(":")]
    result = []
    for pos, start in enumerate(starts):
        end = starts[pos + 1] if pos + 1 < len(starts) else len(jobs)
        result.append((jobs[start].strip()[:-1], expected_guard in jobs[start + 1:end]))
    return result

failed = False
for path in paths:
    lines = read(path)
    push = list_values(lines, "  push:", 2)
    pr_types = list_values(lines, "  pull_request:", 2)
    concurrency = block(lines, "concurrency:", 0) or []
    guards = direct_job_guards(lines)
    result = {
        "block_style_on": lines.count("on:") == 1,
        "main_only_push": push == ["main"],
        "pr_admission_types": pr_types == expected_types,
        "first_pr_attempt_uses_pr_group": concurrency.count(expected_group) == 1,
        "rerun_and_non_pr_use_run_id": concurrency.count(expected_group) == 1,
        "pr_only_cancellation": concurrency.count(expected_cancel) == 1,
        "draft_jobs_skip": bool(guards) and all(guarded for _, guarded in guards),
    }
    print(f"{path}: {result}; direct_jobs={guards}")
    failed |= not all(result.values())
raise SystemExit(1 if failed else 0)
PY

echo
echo '== Changes outside admission and concurrency policy =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
approved = {
    "    branches:\n", "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def filter_policy(lines):
    result, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in approved:
            continue
        result.append(line)
    return result

bad = False
for path in paths:
    diff = list(difflib.unified_diff(filter_policy(read(base, path)), filter_policy(read(head, path))))
    print(f"{path}: {'FAIL unexpected changes' if diff else 'PASS policy-only changes'}")
    if diff:
        print("".join(diff), end="")
        bad = True
raise SystemExit(bad)
PY

echo
echo '== Exact-head workflow runs =='
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`'

echo
echo '== PR `#61` metadata and timeline transition events =='
gh api "repos/$repo/pulls/61" \
  --jq '[.number,.state,.draft,.head.sha,.base.ref,.updated_at,.html_url] | `@tsv`'
gh api -H 'Accept: application/vnd.github+json' "repos/$repo/issues/61/timeline?per_page=100" \
  --jq '.[] | select(.event == "converted_to_draft" or .event == "ready_for_review") | [.event,.created_at,.actor.login] | `@tsv`'

pr61_head="$(gh api "repos/$repo/pulls/61" --jq '.head.sha')"
echo
echo '== PR `#61` source-head workflow runs =='
runs="$(gh api "repos/$repo/actions/runs?head_sha=$pr61_head&per_page=100" \
  --jq '.workflow_runs[] | select(.name == "CI" or .name == "Supply Chain") | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`')"
printf '%s\n' "$runs"

echo
echo '== PR `#61` CI and Supply Chain job conclusions =='
while IFS=$'\t' read -r run_id name rest; do
  [ -n "${run_id:-}" ] || continue
  printf '%s\t%s\n' "$run_id" "$name"
  gh api "repos/$repo/actions/runs/$run_id/jobs?per_page=100" \
    --jq '.jobs[] | [.name,.status,(.conclusion // "null"),.started_at,.completed_at] | `@tsv`'
done <<< "$runs"

Length of output: 6766


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='802d9a30030759fc6410f86fda7128a1569956c8'
head='b587d043bef8d11a5d08de9ea7e5f690e289250f'
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"

echo '== Source-accurate workflow policy checks =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
required = [
    "on:\n  push:\n    branches:\n      - main\n  pull_request:\n    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]",
    "  group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}",
    "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}",
]
guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_job_blocks(source):
    lines = source.splitlines()
    start = lines.index("jobs:")
    jobs = lines[start + 1:]
    positions = [i for i, line in enumerate(jobs)
                 if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")]
    output = []
    for index, begin in enumerate(positions):
        end = positions[index + 1] if index + 1 < len(positions) else len(jobs)
        output.append((jobs[begin].strip()[:-1], guard in jobs[begin + 1:end]))
    return output

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_job_blocks(source)
    checks = {
        "event_admission": required[0] in source,
        "rerun_isolation_identity": source.count(required[1]) == 1,
        "pr_only_cancellation": source.count(required[2]) == 1,
        "all_direct_jobs_draft_guarded": bool(jobs) and all(ok for _, ok in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())
raise SystemExit(1 if failed else 0)
PY

echo
echo '== Full semantic diff after removing policy fields =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_fragments = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def filter_policy(lines):
    out, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_fragments:
            continue
        out.append(line)
    return out

failed = False
for path in paths:
    diff = list(difflib.unified_diff(filter_policy(read(base, path)), filter_policy(read(head, path)),
                                     fromfile=f"{path}:base", tofile=f"{path}:head"))
    print(f"{path}: {'FAIL unexpected changes' if diff else 'PASS policy-only changes'}")
    if diff:
        print("".join(diff), end="")
        failed = True
raise SystemExit(failed)
PY

echo
echo '== Exact-head workflow runs =='
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`'

echo
echo '== PR `#61` transition history =='
gh api "repos/$repo/pulls/61" \
  --jq '[.number,.state,.draft,.head.sha,.base.ref,.updated_at,.html_url] | `@tsv`'
gh api -H 'Accept: application/vnd.github+json' "repos/$repo/issues/61/timeline?per_page=100" \
  --jq '.[] | select(.event == "converted_to_draft" or .event == "ready_for_review") | [.event,.created_at,.actor.login] | `@tsv`'

pr61_head="$(gh api "repos/$repo/pulls/61" --jq '.head.sha')"
echo
echo '== PR `#61` CI and Supply Chain runs on its unchanged source head =='
runs="$(gh api "repos/$repo/actions/runs?head_sha=$pr61_head&per_page=100" \
  --jq '.workflow_runs[] | select(.name == "CI" or .name == "Supply Chain") | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`')"
printf '%s\n' "$runs"

echo
echo '== PR `#61` CI and Supply Chain job conclusions =='
while IFS=$'\t' read -r run_id name _; do
  [ -n "${run_id:-}" ] || continue
  printf '%s\t%s\n' "$run_id" "$name"
  gh api "repos/$repo/actions/runs/$run_id/jobs?per_page=100" \
    --jq '.jobs[] | [.name,.status,(.conclusion // "null"),.started_at,.completed_at] | `@tsv`'
done <<< "$runs"

Length of output: 7015


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='b587d043bef8d11a5d08de9ea7e5f690e289250f'
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"

echo '== Exact requested-head workflow runs =='
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`' \
  || true

echo
echo '== PR `#61` state and draft-transition timeline =='
gh api "repos/$repo/pulls/61" \
  --jq '[.number,.state,.draft,.head.sha,.base.ref,.updated_at,.html_url] | `@tsv`'
gh api --paginate -H 'Accept: application/vnd.github+json' "repos/$repo/issues/61/timeline?per_page=100" \
  --jq '.[] | select(.event == "converted_to_draft" or .event == "ready_for_review") | [.event,.created_at,.actor.login] | `@tsv`'

pr61_head="$(gh api "repos/$repo/pulls/61" --jq '.head.sha')"
echo
echo '== PR `#61` CI and Supply Chain runs on current source head =='
runs_file="$(mktemp)"
gh api "repos/$repo/actions/runs?head_sha=$pr61_head&per_page=100" \
  --jq '.workflow_runs[]
        | select(.name == "CI" or .name == "Supply Chain")
        | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url]
        | `@tsv`' | tee "$runs_file"

echo
echo '== Job conclusions for each PR `#61` workflow run =='
while IFS=$'\t' read -r run_id name _; do
  [ -n "${run_id:-}" ] || continue
  printf -- '-- run=%s workflow=%s --\n' "$run_id" "$name"
  gh api "repos/$repo/actions/runs/$run_id/jobs?per_page=100" \
    --jq '.jobs[] | [.name,.status,(.conclusion // "null"),.started_at,.completed_at] | `@tsv`'
done < "$runs_file"

rm -f "$runs_file"

Length of output: 2955


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
pr61_head="$(gh api "repos/$repo/pulls/61" --jq '.head.sha')"
runs_file="$(mktemp)"

echo '== PR `#61` workflow runs on current source head =='
gh api "repos/$repo/actions/runs?head_sha=$pr61_head&per_page=100" \
  --jq '.workflow_runs[]
        | select(.name == "CI" or .name == "Supply Chain")
        | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url]
        | `@tsv`' > "$runs_file"
cat "$runs_file"

echo
echo '== Job conclusions for each PR `#61` workflow run =='
while IFS=$'\t' read -r run_id name _; do
  [ -n "${run_id:-}" ] || continue
  printf -- '-- run=%s workflow=%s --\n' "$run_id" "$name"
  gh api "repos/$repo/actions/runs/$run_id/jobs?per_page=100" \
    --jq '.jobs[] | [.name,.status,(.conclusion // "null"),.started_at,.completed_at] | `@tsv`'
done < "$runs_file"

echo
echo '== Pull request `#61` public issue-event history =='
gh api --paginate "repos/$repo/issues/61/events?per_page=100" \
  --jq '.[] | select(.event == "converted_to_draft" or .event == "ready_for_review") | [.event,.created_at,.actor.login] | `@tsv`'

rm -f "$runs_file"

Length of output: 2328


@seonghobae Static review found no code defect in 802d9a30030759fc6410f86fda7128a1569956c8...b587d043bef8d11a5d08de9ea7e5f690e289250f.

  • The base is an ancestor of the head.
  • The effective range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.

Both workflows use the required event admission:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}

This gives the required isolation.

  • A first-attempt PR run uses its PR number.
  • A rerun uses github.run_id.
  • A rerun cannot re-enter or cancel the live PR group.
  • A non-PR run uses github.run_id.
  • github.workflow separates CI from Supply Chain.
  • github.repository separates repositories.
  • A protected-main push cannot share a group with a PR run.

Both workflows use PR-only cancellation:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

All direct jobs have this draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, a converted_to_draft event enters the PR concurrency group and can cancel an older PR run. Its direct jobs are skipped because the PR is draft. A later ready_for_review event enters the same PR group and admits the direct jobs.

The CI cleanup change preserves the OCI cleanup commands. It changes the EXIT trap form and adds the SC2329 suppression for the separate load-contract cleanup function. It does not change runner selection, permissions, security checks, gates, thresholds, release behavior, or success conditions.

Hosted transition verification is still inconclusive.

  • Exact head b587d043bef8d11a5d08de9ea7e5f690e289250f has two queued PR runs: CI 33942572341 and Supply Chain 33942572392.
  • PR #61 currently has queued CI 33942722409 and Supply Chain 33942722411 runs.
  • The public PR #61 timeline returned ready_for_review events, but it did not return a converted_to_draft event.
  • The queried #61 jobs are queued. The available data does not show a skipped draft job or a cancelled prior run.

The static policy is correct. The hosted converted_to_draft → skipped/cancelled → ready_for_review evidence still needs a completed run history before that transition can be verified.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Fresh exact-range review requested for 3e452c850a6585ffca94468d841a8b8b3d817040...0e70ea9916146bcf82a305a349778ea4ec33e10a. Effective GREEN delta must remain exactly the two workflow files; revalidate admission/coalescing/rerun/Draft semantics against the current parent rather than transferring predecessor review credit.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='3e452c850a6585ffca94468d841a8b8b3d817040'
head='0e70ea9916146bcf82a305a349778ea4ec33e10a'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: exact range changes only the two intended workflow files.'
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Current parent Rust oracle identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: Rust oracle is byte-identical at both endpoints.'

echo
echo '== Head workflow declarations and direct job guards =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Static admission, coalescing, rerun, and Draft policy validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
expected_admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_job_guards(source):
    lines = source.splitlines()
    try:
        start = lines.index("jobs:")
    except ValueError:
        return []
    jobs = lines[start + 1:]
    starts = [
        index for index, line in enumerate(jobs)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    result = []
    for position, begin in enumerate(starts):
        end = starts[position + 1] if position + 1 < len(starts) else len(jobs)
        result.append((jobs[begin].strip()[:-1], expected_guard in jobs[begin + 1:end]))
    return result

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_job_guards(source)
    checks = {
        "block_style_event_admission": source.count("on:") == 1 and expected_admission in source,
        "first_pr_attempt_pr_identity": source.count(expected_group) == 1,
        "rerun_and_non_pr_run_id_fallback": source.count(expected_group) == 1,
        "pr_only_cancellation": source.count(expected_cancel) == 1,
        "all_direct_jobs_draft_guarded": bool(jobs) and all(guarded for _, guarded in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())

raise SystemExit(failed)
PY

echo
echo '== Semantic comparison outside allowed policy fields =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    output, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        output.append(line)
    return output

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    print(f"{path}: {'FAIL unexpected changes' if diff else 'PASS policy-only changes'}")
    if diff:
        print("".join(diff), end="")
        failed = True
raise SystemExit(failed)
PY

echo
echo '== Hosted status at the requested exact head =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`'

Length of output: 36179


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='3e452c850a6585ffca94468d841a8b8b3d817040'
head='0e70ea9916146bcf82a305a349778ea4ec33e10a'

echo '== Corrected exact workflow-policy validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
expected_admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_job_guards(source):
    lines = source.splitlines()
    start = lines.index("jobs:")
    jobs = lines[start + 1:]
    starts = [
        i for i, line in enumerate(jobs)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    return [
        (
            jobs[start].strip()[:-1],
            expected_guard in jobs[start + 1:(starts[position + 1] if position + 1 < len(starts) else len(jobs))]
        )
        for position, start in enumerate(starts)
    ]

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_job_guards(source)
    checks = {
        "top_level_block_style_on": source.splitlines().count("on:") == 1,
        "event_admission": expected_admission in source,
        "first_pr_attempt_uses_pr_identity": source.count(expected_group) == 1,
        "rerun_and_non_pr_use_run_id": source.count(expected_group) == 1,
        "pr_only_cancellation": source.count(expected_cancel) == 1,
        "direct_jobs_skip_drafts": bool(jobs) and all(guarded for _, guarded in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())

raise SystemExit(failed)
PY

echo
echo '== Compare all changes outside policy controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    result, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        result.append(line)
    return result

for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    print(f"--- {path} ---")
    if diff:
        print("Changes outside admission/concurrency/Draft-guard policy:")
        print("".join(diff), end="")
    else:
        print("No changes outside the policy controls.")
PY

echo
echo '== Exact-head hosted workflow runs and checks =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.display_title,.event,.run_attempt,.status,(.conclusion // "null"),.created_at,.updated_at,.html_url] | `@tsv`'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`'

Length of output: 7412


@seonghobae No static findings for the exact range 3e452c850a6585ffca94468d841a8b8b3d817040...0e70ea9916146bcf82a305a349778ea4ec33e10a.

  • The base revision is an ancestor of the head revision.
  • The range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.

Both workflows have the required admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

Both workflows use the required concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}

This policy has the expected behavior:

  • A first-attempt PR run uses the PR number.
  • A PR rerun uses github.run_id.
  • A rerun cannot re-enter the live PR concurrency group.
  • A non-PR run uses github.run_id.
  • github.workflow separates CI and Supply Chain groups.
  • github.repository separates groups across repositories.
  • A protected main push cannot share a group with a PR run.

Both workflows set:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Only PR runs can cancel in-progress runs.

All direct jobs have a non-Draft guard. Therefore, a converted_to_draft event can cancel an earlier first-attempt PR run, while its direct jobs skip. A later ready_for_review event can admit the jobs again.

The CI workflow has two additional changes outside the policy fields:

  • The SC2329 annotation documents the existing EXIT trap invocation.
  • The OCI cleanup function is replaced by a direct EXIT trap with the same docker logs and forced container-removal commands.

These changes do not weaken runner selection, permissions, security checks, gates, thresholds, or success conditions.

Exact-head hosted verification remains pending:

  • Supply Chain run 33943319632 is queued.
  • CI run 33943319652 is pending.
  • candidate-evidence, test, load-contract, and oci-runtime are queued.

The exact-head jobs must complete successfully before the hosted GREEN state is established.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Current exact review target moved to 2d84080562d5c1d39067d89eb542147e40e217cc...275aa356b59968337c60a964c6759fb3eb4378ca. Fresh compare is workflow-only; revalidate admission/coalescing/rerun/Draft semantics against the stronger semantic job-admission parent. Predecessor review credit does not transfer.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='2d84080562d5c1d39067d89eb542147e40e217cc'
head='275aa356b59968337c60a964c6759fb3eb4378ca'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range and scope =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: only intended workflow files changed.'
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Parent semantic job-admission contract identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: semantic contract is byte-identical at range endpoints.'
git show "$head:$contract" | cat -n

echo
echo '== Workflow sources at head =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Static admission, coalescing, rerun, and Draft-job policy =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
expected_admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
expected_group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
expected_cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
expected_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_job_guards(source):
    lines = source.splitlines()
    try:
        start = lines.index("jobs:")
    except ValueError:
        return []
    jobs = lines[start + 1:]
    starts = [
        i for i, line in enumerate(jobs)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    result = []
    for n, begin in enumerate(starts):
        end = starts[n + 1] if n + 1 < len(starts) else len(jobs)
        result.append((jobs[begin].strip()[:-1], expected_guard in jobs[begin + 1:end]))
    return result

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    guards = direct_job_guards(source)
    checks = {
        "block_style_on": source.splitlines().count("on:") == 1,
        "event_admission": expected_admission in source,
        "first_pr_attempt_uses_pr_identity": source.count(expected_group) == 1,
        "rerun_and_non_pr_use_run_id": source.count(expected_group) == 1,
        "pr_only_cancellation": source.count(expected_cancel) == 1,
        "all_direct_jobs_skip_drafts": bool(guards) and all(guarded for _, guarded in guards),
    }
    print(f"{path}: {checks}; direct_jobs={guards}")
    failed |= not all(checks.values())

raise SystemExit(failed)
PY

echo
echo '== Difference check outside workflow policy controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    output, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        output.append(line)
    return output

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    print(f"--- {path} ---")
    if diff:
        print("FAIL: changes outside policy controls")
        print("".join(diff), end="")
        failed = True
    else:
        print("PASS: no changes outside policy controls.")
raise SystemExit(failed)
PY

Length of output: 55255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='2d84080562d5c1d39067d89eb542147e40e217cc'
head='275aa356b59968337c60a964c6759fb3eb4378ca'

echo '== Focused cleanup change =='
git diff --no-ext-diff --unified=20 "$base" "$head" -- .github/workflows/ci.yml | sed -n '/gateway_pid=\$!/,/for _ in/p;/cid="\$(docker run/,/test "\$(docker inspect/p'

echo
echo '== Standalone Bash EXIT-trap status probes =='
set +e
bash -c 'trap '\''true'\'' EXIT; false'
printf 'trap_true_after_false=%s\n' "$?"
bash -c 'trap '\''false'\'' EXIT; false'
printf 'trap_false_after_false=%s\n' "$?"
bash -c 'trap '\''echo cleanup >/dev/null || true; true'\'' EXIT; false'
printf 'direct_cleanup_after_false=%s\n' "$?"
set -e

echo
echo '== actionlint workflow validation =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is not installed in this sandbox'
fi

Length of output: 2758


@seonghobae No findings for the exact range 2d84080562d5c1d39067d89eb542147e40e217cc...275aa356b59968337c60a964c6759fb3eb4378ca.

  • The base revision is an ancestor of the head revision.
  • The range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.
  • actionlint passed for both modified workflows.

Both workflows use the required admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

Both workflows use the required concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}

This gives the required behavior:

  • A first-attempt pull request run uses the pull request number.
  • A pull request rerun uses github.run_id.
  • A rerun cannot re-enter or cancel the active pull request group.
  • A non-pull-request run uses github.run_id.
  • github.workflow separates CI from Supply Chain.
  • github.repository separates repositories.
  • A protected-main push cannot share a group with a pull request run.

Both workflows set:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Only pull request runs can cancel in-progress runs.

Every direct job has the required draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, converted_to_draft can cancel the prior first-attempt pull request run while direct jobs skip. ready_for_review can then admit direct jobs again.

The CI workflow also updates the OCI EXIT cleanup implementation and adds an SC2329 suppression for the existing indirect cleanup function. The direct trap keeps the same docker logs and forced container-removal commands. A standalone Bash check confirmed that this trap preserves the prior failure status. The change does not weaken runners, permissions, checks, gates, thresholds, or success conditions.

This is an independent static review. Exact-head hosted checks still need to complete successfully.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Fresh exact range: 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a. Please review the effective two-workflow delta only; the strengthened Rust oracle lives entirely in the parent. Predecessor review credit does not transfer.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: only the intended workflow files changed.'
git diff --stat "$base" "$head"
echo '== Complete exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Parent oracle identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: Rust oracle is byte-identical at range endpoints.'

echo
echo '== Head workflow sources =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Static workflow policy validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
draft_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_jobs(source):
    lines = source.splitlines()
    try:
        start = lines.index("jobs:")
    except ValueError:
        return []
    section = lines[start + 1:]
    starts = [
        i for i, line in enumerate(section)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    return [
        (
            section[begin].strip()[:-1],
            draft_guard in section[begin + 1:(starts[index + 1] if index + 1 < len(starts) else len(section))]
        )
        for index, begin in enumerate(starts)
    ]

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_jobs(source)
    checks = {
        "block_style_on": source.splitlines().count("on:") == 1,
        "event_admission": admission in source,
        "rerun_isolation_group": source.count(group) == 1,
        "pr_only_cancellation": source.count(cancel) == 1,
        "all_direct_jobs_draft_guarded": bool(jobs) and all(ok for _, ok in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())
raise SystemExit(failed)
PY

echo
echo '== Differences outside allowed workflow policy controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    out, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        out.append(line)
    return out

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    print(f"--- {path} ---")
    if diff:
        print("CHANGES OUTSIDE POLICY CONTROLS:")
        print("".join(diff), end="")
        failed = True
    else:
        print("PASS: no changes outside policy controls.")
raise SystemExit(failed)
PY

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

echo
echo '== Exact-head hosted workflow runs and checks =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.html_url] | `@tsv`' || true
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`' || true

Length of output: 37428


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'

echo '== Focused CI cleanup diff =='
git diff --no-ext-diff --unified=24 "$base" "$head" -- .github/workflows/ci.yml

echo
echo '== Cleanup command comparison =='
python3 - "$base" "$head" <<'PY'
import subprocess
import sys

base, head = sys.argv[1:]
path = ".github/workflows/ci.yml"

def text(rev):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True)

before, after = text(base), text(head)
required = [
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
]
for command in required:
    print(f"{command}: base={command in before}, head={command in after}")
    if command not in before or command not in after:
        raise SystemExit(1)
PY

echo
echo '== Standalone Bash EXIT-trap exit-status probes =='
set +e
bash -c 'trap '\''docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true'\'' EXIT; false'
printf 'direct_trap_after_failure=%s\n' "$?"
bash -c 'cleanup(){ docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true; }; trap cleanup EXIT; false'
printf 'function_trap_after_failure=%s\n' "$?"
set -e

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

echo
echo '== Exact-head hosted workflow runs and checks =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.html_url] | `@tsv`'
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`'

Length of output: 12398


@seonghobae No static findings for the exact range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a.

  • The base revision is an ancestor of the head revision.
  • The range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.
  • actionlint passed for both workflows.

Both workflows use this admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}

This configuration has the required behavior:

  • A first-attempt pull request run uses its pull request number.
  • A pull request rerun uses github.run_id.
  • A rerun cannot enter or cancel the active pull request group.
  • A non-pull-request run uses github.run_id.
  • github.workflow separates CI and Supply Chain runs.
  • github.repository separates runs from different repositories.
  • A main push cannot share a concurrency group with a pull request run.

Both workflows set:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Only pull request runs can cancel in-progress runs.

Every direct job has the non-Draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, a converted_to_draft event can cancel the prior first-attempt pull request run while its direct jobs skip. A subsequent ready_for_review event can admit the direct jobs.

The CI workflow also adds an SC2329 suppression and replaces the OCI cleanup function with a direct EXIT trap. The docker logs and forced container-removal commands are unchanged. Standalone Bash checks confirm that both trap forms preserve a prior failure status. This change does not weaken runner selection, permissions, security checks, gates, thresholds, or success conditions.

Exact-head hosted verification is pending:

  • CI run 33947016327 is queued.
  • Supply Chain run 33947016368 is pending.
  • All four jobs are queued.

The hosted jobs must complete successfully before the exact-head GREEN state is established.

You are interacting with an AI system.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 06:56

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the exact current child range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a. Treat predecessor reviews as historical. Effective delta must remain exactly the two workflow files; check Draft admission/retraction, main-only push scope, first-attempt coalescing, rerun isolation, cancellation semantics, and preservation of existing gates.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: exact range changes only the intended workflow files.'
git diff --stat "$base" "$head"
echo '== Complete exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Parent concurrency contract identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
printf 'base_object=%s\n' "$(git rev-parse "$base:$contract")"
printf 'head_object=%s\n' "$(git rev-parse "$head:$contract")"
test "$(git rev-parse "$base:$contract")" = "$(git rev-parse "$head:$contract")"
echo 'PASS: contract is byte-identical at range endpoints.'

echo
echo '== Workflow policy and direct job guards at head =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Static admission, concurrency, rerun, and Draft-guard validation =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_job_guards(source):
    lines = source.splitlines()
    try:
        start = lines.index("jobs:")
    except ValueError:
        return []
    jobs = lines[start + 1:]
    starts = [i for i, line in enumerate(jobs)
              if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")]
    result = []
    for index, begin in enumerate(starts):
        end = starts[index + 1] if index + 1 < len(starts) else len(jobs)
        result.append((jobs[begin].strip()[:-1], guard in jobs[begin + 1:end]))
    return result

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_job_guards(source)
    checks = {
        "block_style_on": source.splitlines().count("on:") == 1,
        "exact_admission": admission in source,
        "rerun_isolation_group": source.count(group) == 1,
        "pr_only_cancellation": source.count(cancel) == 1,
        "all_direct_jobs_draft_guarded": bool(jobs) and all(ok for _, ok in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())
raise SystemExit(failed)
PY

echo
echo '== Changes outside admitted policy fields =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    result, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        result.append(line)
    return result

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        print(f"CHANGES OUTSIDE POLICY: {path}")
        print("".join(diff), end="")
        failed = True
    else:
        print(f"PASS policy-only changes: {path}")
raise SystemExit(failed)
PY

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 36932


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'

echo '== Focused non-policy CI changes =='
git diff --no-ext-diff --unified=24 "$base" "$head" -- .github/workflows/ci.yml

echo
echo '== OCI cleanup command presence at both endpoints =='
python3 - "$base" "$head" <<'PY'
import subprocess
import sys

base, head = sys.argv[1:]
path = ".github/workflows/ci.yml"
commands = [
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
]
for command in commands:
    values = []
    for rev in (base, head):
        source = subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True)
        values.append(command in source)
    print(f"{command}: base={values[0]}, head={values[1]}")
    if not all(values):
        raise SystemExit(1)
PY

echo
echo '== EXIT trap status preservation probes =='
set +e
bash -c 'cleanup(){ :; }; trap cleanup EXIT; false'
printf 'function_trap_after_failure=%s\n' "$?"
bash -c "trap 'true' EXIT; false"
printf 'direct_trap_after_failure=%s\n' "$?"
bash -c "trap 'docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true' EXIT; false"
printf 'direct_cleanup_after_failure=%s\n' "$?"
set -e

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 11114


@seonghobae No static findings for the exact range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a.

  • The base revision is an ancestor of the head revision.
  • The exact range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.
  • actionlint passed for both workflow files.

Both workflows use this event admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

This restricts push admission to main. It also admits the events required for Draft retraction and later promotion.

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}
  • A first-attempt pull request run uses its pull request number.
  • A new first-attempt PR event coalesces with the active group for that workflow, repository, and PR.
  • A rerun uses github.run_id.
  • A rerun cannot enter or cancel the active PR group.
  • A non-PR run uses github.run_id.
  • github.workflow separates CI and Supply Chain groups.
  • github.repository separates groups across repositories.
  • A main push cannot share a group with a pull request run.

Both workflows use PR-only cancellation:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Every direct job has this Draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, converted_to_draft can cancel a prior first-attempt PR run, while all direct jobs skip for the Draft PR. A later ready_for_review event can again admit the direct jobs.

The CI workflow also adds an SC2329 annotation and changes the OCI cleanup from a function trap to a direct EXIT trap. The docker logs and forced container-removal commands are present at both endpoints. Bash status probes confirm that both trap forms preserve a preceding nonzero exit status. This change does not weaken runners, permissions, security checks, gates, thresholds, or success conditions.

This is an independent static review. Exact-head hosted checks must still complete successfully.

You are interacting with an AI system.

@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 07:22

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Fresh exact-range review requested for 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a. Treat predecessor reviews as historical. Please verify the effective two-workflow GREEN delta against the current three-contract RED parent: protected-main-only duplicate push evidence, first-attempt PR coalescing by workflow/repository/PR identity, rerun isolation, PR-only cancellation, Ready↔Draft event handling, and direct-job Draft guards. Do not transfer predecessor-head conclusions.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, path scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: the exact range changes only the two workflow files.'
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=100 "$base" "$head" -- \
  .github/workflows/ci.yml .github/workflows/supply-chain.yml

echo
echo '== Parent contract identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: Rust workflow contract is byte-identical at both endpoints.'
git show "$head:$contract" | cat -n

echo
echo '== Complete head workflow sources =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Source-level policy assertions =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
draft_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_jobs(source):
    lines = source.splitlines()
    start = lines.index("jobs:")
    jobs = lines[start + 1:]
    starts = [i for i, line in enumerate(jobs)
              if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")]
    result = []
    for n, begin in enumerate(starts):
        end = starts[n + 1] if n + 1 < len(starts) else len(jobs)
        result.append((jobs[begin].strip()[:-1], draft_guard in jobs[begin + 1:end]))
    return result

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_jobs(source)
    checks = {
        "block_style_on": source.splitlines().count("on:") == 1,
        "main_push_and_pr_event_admission": admission in source,
        "first_attempt_pr_identity_and_rerun_fallback": source.count(group) == 1,
        "pr_only_cancellation": source.count(cancel) == 1,
        "all_direct_jobs_have_draft_guard": bool(jobs) and all(guarded for _, guarded in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())
raise SystemExit(failed)
PY

echo
echo '== Semantic comparison outside workflow-policy controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(rev, path):
    return subprocess.check_output(["git", "show", f"{rev}:{path}"], text=True).splitlines(keepends=True)

def strip_policy(lines):
    output, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        output.append(line)
    return output

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        print(f"CHANGES OUTSIDE POLICY CONTROLS: {path}")
        print("".join(diff), end="")
        failed = True
    else:
        print(f"PASS: no changes outside policy controls: {path}")
raise SystemExit(failed)
PY

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

echo
echo '== Exact-head hosted workflow runs and checks =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.html_url] | `@tsv`' || true
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`' || true

Length of output: 55876


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'

echo '== OCI cleanup commands at both endpoints =='
python3 - "$base" "$head" <<'PY'
import subprocess
import sys

base, head = sys.argv[1:]
path = ".github/workflows/ci.yml"
commands = (
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
)
for command in commands:
    result = []
    for revision in (base, head):
        source = subprocess.check_output(
            ["git", "show", f"{revision}:{path}"], text=True
        )
        result.append(command in source)
    print(f"{command}: base={result[0]} head={result[1]}")
    if not all(result):
        raise SystemExit(1)
PY

echo
echo '== Bash EXIT-trap exit-status preservation =='
set +e
bash -c 'cleanup() { :; }; trap cleanup EXIT; false'
printf 'function_trap_after_failure=%s\n' "$?"
bash -c "trap 'true' EXIT; false"
printf 'direct_trap_after_failure=%s\n' "$?"
bash -c "trap 'docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true' EXIT; false"
printf 'direct_cleanup_after_failure=%s\n' "$?"
set -e

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

echo
echo '== Exact-head hosted workflow runs and check runs =='
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"
printf 'repo=%s\n' "$repo"
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.html_url] | `@tsv`' || true
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`' || true

Length of output: 3018


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'
repo="$(git remote get-url origin | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')"

echo '== Exact-head hosted workflow runs =='
gh api "repos/$repo/actions/runs?head_sha=$head&per_page=100" \
  --jq '.workflow_runs[] | [.id,.name,.event,.run_attempt,.status,(.conclusion // "null"),.html_url] | `@tsv`'

echo
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
  --jq '.check_runs[] | [.name,.status,(.conclusion // "null"),.details_url] | `@tsv`'

Length of output: 3095


@seonghobae No static findings for the exact range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a.

  • The base revision is an ancestor of the head revision.
  • The exact range changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.
  • actionlint passed for both workflow files.

Both workflows use this admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

This policy limits duplicate push evidence to protected main. It does not add tag filters. It admits both converted_to_draft and ready_for_review.

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}

This group has the required behavior.

  • A first-attempt PR run uses the PR number.
  • A later first-attempt PR event coalesces only with the same workflow, repository, and PR.
  • A PR rerun uses github.run_id.
  • A rerun cannot re-enter or cancel the active PR group.
  • A non-PR run uses github.run_id.
  • github.workflow prevents cancellation between CI and Supply Chain.
  • github.repository prevents cancellation across repositories.
  • A protected-main push cannot share a group with a PR run.

Both workflows use PR-only cancellation:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Every direct job has this Draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, a converted_to_draft event can cancel an earlier first-attempt PR run. Its direct jobs skip while the PR is Draft. A subsequent ready_for_review event can admit the direct jobs again.

The CI workflow also adds an SC2329 suppression and converts the OCI cleanup function to a direct EXIT trap. The docker logs and forced docker rm commands remain unchanged. Bash probes show that both trap forms preserve a preceding nonzero exit status. The change does not weaken runners, permissions, security checks, gates, thresholds, or success conditions.

Exact-head hosted verification is not complete. CI run 33952390050 and Supply Chain run 33952390006 are queued. Their four jobs are also queued. Earlier exact-head runs include both cancelled and skipped PR runs, but the current queued runs must finish successfully before the exact-head GREEN state is established.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review only the current exact GREEN range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a. Verify that the effective delta is only .github/workflows/ci.yml and .github/workflows/supply-chain.yml, Draft/Ready admission semantics match the parent oracle, rerun isolation remains intact, and protected-main push scope does not admit tag evidence. Do not reuse predecessor review credit.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Revisions, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: only the two intended workflow files changed.'
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=100 "$base" "$head" -- \
  .github/workflows/ci.yml .github/workflows/supply-chain.yml

echo
echo '== Parent Rust workflow contract identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
git show "$head:$contract" | cat -n

echo
echo '== Head workflow sources =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Source-accurate policy assertions =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
draft_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_jobs(source):
    lines = source.splitlines()
    start = lines.index("jobs:")
    section = lines[start + 1:]
    starts = [
        i for i, line in enumerate(section)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    return [
        (
            section[begin].strip()[:-1],
            draft_guard in section[begin + 1:(starts[n + 1] if n + 1 < len(starts) else len(section))]
        )
        for n, begin in enumerate(starts)
    ]

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_jobs(source)
    checks = {
        "block_style_on": source.splitlines().count("on:") == 1,
        "main_only_push_and_draft_ready_events": admission in source,
        "first_attempt_pr_group_and_rerun_run_id_fallback": source.count(group) == 1,
        "pr_only_cancellation": source.count(cancel) == 1,
        "every_direct_job_has_draft_guard": bool(jobs) and all(ok for _, ok in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())

raise SystemExit(failed)
PY

echo
echo '== Compare changes outside admission/concurrency/Draft-guard policy =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(revision, path):
    return subprocess.check_output(
        ["git", "show", f"{revision}:{path}"], text=True
    ).splitlines(keepends=True)

def strip_policy(lines):
    result, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        result.append(line)
    return result

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        print(f"CHANGES OUTSIDE POLICY CONTROLS: {path}")
        print("".join(diff), end="")
        failed = True
    else:
        print(f"PASS: no changes outside policy controls: {path}")
raise SystemExit(failed)
PY

echo
echo '== Static YAML lint, if available =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 55296


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='8893ab433a06bf25b63385689118d60861fe6a78'
head='f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a'

echo '== Focused CI cleanup diff =='
git diff --no-ext-diff --unified=24 "$base" "$head" -- .github/workflows/ci.yml

echo
echo '== Required OCI cleanup commands at both endpoints =='
python3 - "$base" "$head" <<'PY'
import subprocess
import sys

base, head = sys.argv[1:]
path = ".github/workflows/ci.yml"
commands = (
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
)

for command in commands:
    present = []
    for revision in (base, head):
        source = subprocess.check_output(
            ["git", "show", f"{revision}:{path}"], text=True
        )
        present.append(command in source)
    print(f"{command}: base={present[0]} head={present[1]}")
    if not all(present):
        raise SystemExit(1)
PY

echo
echo '== Isolated Bash EXIT-trap status checks =='
set +e
bash -c 'cleanup() { :; }; trap cleanup EXIT; false'
printf 'function_trap_after_failure=%s\n' "$?"
bash -c "trap 'true' EXIT; false"
printf 'direct_trap_after_failure=%s\n' "$?"
bash -c "trap 'docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true' EXIT; false"
printf 'direct_cleanup_trap_after_failure=%s\n' "$?"
set -e

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 11152


@seonghobae No static findings for the exact range 8893ab433a06bf25b63385689118d60861fe6a78...f1b09eb0a669a6f9f439daf250b1c7d0d95b6c1a.

  • The base revision is an ancestor of the head revision.
  • The effective delta changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints.
  • git diff --check passed.
  • actionlint passed for both workflow files.

Both workflows use this admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

This policy admits duplicate push evidence only on main. It does not add tags or tags-ignore filters. It admits both Draft conversion and Ready promotion events.

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}
  • A first-attempt pull request run uses the pull request number.
  • A later first-attempt pull request event coalesces only when workflow, repository, and pull request number match.
  • A pull request rerun uses github.run_id.
  • A rerun cannot join or cancel the live pull request group.
  • A non-pull-request run uses github.run_id.
  • github.workflow separates CI from Supply Chain concurrency groups.
  • github.repository separates concurrency groups across repositories.
  • A protected-main push cannot share a concurrency group with a pull request run.

Both workflows set:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Only pull request runs can cancel in-progress runs.

Every direct job has the required Draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

A converted_to_draft event can cancel an earlier first-attempt pull request run. Its direct jobs skip while the pull request is Draft. A later ready_for_review event can admit the direct jobs again.

The CI workflow also adds an SC2329 annotation and replaces an OCI cleanup function with a direct EXIT trap. The docker logs and forced docker rm commands remain present. Isolated Bash checks confirm that both trap forms preserve a preceding nonzero exit status. This change does not weaken runners, permissions, security checks, gates, thresholds, or success conditions.

This is an independent static review. Exact-head hosted checks must still complete successfully.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review the current exact child range cb458621b5cfdcec35820083bb82e19e9dc627cf...e2309106eba4f41f45c770676885b27bf73aa69b. The parent change is the verified lint-only let Some(...) else { return None; }document.get("on")? repair in the semantic admission oracle; the effective child delta must remain exactly .github/workflows/ci.yml and .github/workflows/supply-chain.yml. Verify current protected-main push scope, PR-scoped coalescing/rerun isolation, PR-only cancellation, Draft job admission guard, and absence of gate/security/runner weakening. Do not transfer predecessor-head conclusions.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='cb458621b5cfdcec35820083bb82e19e9dc627cf'
head='e2309106eba4f41f45c770676885b27bf73aa69b'
expected_paths=$'.github/workflows/ci.yml\n.github/workflows/supply-chain.yml'

echo '== Exact range, ancestry, scope, and whitespace =='
git rev-parse "$base" "$head"
git merge-base "$base" "$head"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=yes'
git diff --check "$base" "$head"
actual_paths="$(git diff --name-only "$base" "$head" | sort)"
printf '%s\n' "$actual_paths"
test "$actual_paths" = "$expected_paths"
echo 'PASS: only intended workflow files changed.'
git diff --stat "$base" "$head"
echo '== Complete exact diff =='
git diff --no-ext-diff --unified=100 "$base" "$head"

echo
echo '== Parent semantic-admission contract identity =='
contract="$(git ls-tree -r --name-only "$base" | rg '(^|/)workflow_concurrency_contract\.rs$' | head -n1)"
test -n "$contract"
printf 'contract=%s\n' "$contract"
base_contract="$(git rev-parse "$base:$contract")"
head_contract="$(git rev-parse "$head:$contract")"
printf 'base_object=%s\nhead_object=%s\n' "$base_contract" "$head_contract"
test "$base_contract" = "$head_contract"
echo 'PASS: semantic admission contract is byte-identical at range endpoints.'
git show "$head:$contract" | cat -n

echo
echo '== Head workflow sources =='
for path in .github/workflows/ci.yml .github/workflows/supply-chain.yml; do
  echo "--- $path ---"
  git show "$head:$path" | cat -n
done

echo
echo '== Source-accurate admission, concurrency, rerun, and Draft-guard checks =='
python3 - "$head" <<'PY'
import subprocess
import sys

head = sys.argv[1]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
admission = (
    "on:\n"
    "  push:\n"
    "    branches:\n"
    "      - main\n"
    "  pull_request:\n"
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]"
)
group = (
    "  group: ${{ github.workflow }}-${{ github.repository }}-"
    "${{ github.event_name == 'pull_request' && github.run_attempt == 1 && "
    "github.event.pull_request.number || github.run_id }}"
)
cancel = "  cancel-in-progress: ${{ github.event_name == 'pull_request' }}"
draft_guard = "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false"

def direct_jobs(source):
    lines = source.splitlines()
    start = lines.index("jobs:")
    section = lines[start + 1:]
    starts = [
        index for index, line in enumerate(section)
        if line.startswith("  ") and not line.startswith("    ") and line.endswith(":")
    ]
    result = []
    for index, begin in enumerate(starts):
        end = starts[index + 1] if index + 1 < len(starts) else len(section)
        result.append((
            section[begin].strip()[:-1],
            draft_guard in section[begin + 1:end],
        ))
    return result

failed = False
for path in paths:
    source = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True)
    jobs = direct_jobs(source)
    checks = {
        "single_block_style_on": source.splitlines().count("on:") == 1,
        "main_push_and_pr_admission": admission in source,
        "first_attempt_pr_identity_with_rerun_run_id_fallback": source.count(group) == 1,
        "pr_only_cancellation": source.count(cancel) == 1,
        "all_direct_jobs_draft_guarded": bool(jobs) and all(ok for _, ok in jobs),
    }
    print(f"{path}: {checks}; direct_jobs={jobs}")
    failed |= not all(checks.values())

raise SystemExit(failed)
PY

echo
echo '== Differences outside admission, concurrency, and Draft-guard controls =='
python3 - "$base" "$head" <<'PY'
import difflib
import subprocess
import sys

base, head = sys.argv[1:]
paths = [".github/workflows/ci.yml", ".github/workflows/supply-chain.yml"]
policy_lines = {
    "    branches:\n",
    "      - main\n",
    "    types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]\n",
    "    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\n",
}

def read(revision, path):
    return subprocess.check_output(
        ["git", "show", f"{revision}:{path}"], text=True
    ).splitlines(keepends=True)

def strip_policy(lines):
    result, in_concurrency = [], False
    for line in lines:
        if line == "concurrency:\n":
            in_concurrency = True
            continue
        if in_concurrency and line.startswith(("  group:", "  cancel-in-progress:")):
            continue
        if in_concurrency:
            in_concurrency = False
        if line in policy_lines:
            continue
        result.append(line)
    return result

failed = False
for path in paths:
    diff = list(difflib.unified_diff(
        strip_policy(read(base, path)),
        strip_policy(read(head, path)),
        fromfile=f"{path}:base-filtered",
        tofile=f"{path}:head-filtered",
    ))
    if diff:
        print(f"FAIL: changes outside policy controls: {path}")
        print("".join(diff), end="")
        failed = True
    else:
        print(f"PASS: no changes outside policy controls: {path}")
raise SystemExit(failed)
PY

echo
echo '== OCI cleanup command preservation =='
python3 - "$base" "$head" <<'PY'
import subprocess
import sys

base, head = sys.argv[1:]
path = ".github/workflows/ci.yml"
commands = (
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
)
for command in commands:
    present = [
        command in subprocess.check_output(
            ["git", "show", f"{revision}:{path}"], text=True
        )
        for revision in (base, head)
    ]
    print(f"{command}: base={present[0]} head={present[1]}")
    if not all(present):
        raise SystemExit(1)
PY

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 56161


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='cb458621b5cfdcec35820083bb82e19e9dc627cf'
head='e2309106eba4f41f45c770676885b27bf73aa69b'
path='.github/workflows/ci.yml'

echo '== Focused non-policy CI changes =='
git diff --no-ext-diff --unified=24 "$base" "$head" -- "$path"

echo
echo '== OCI cleanup command preservation =='
python3 - "$base" "$head" "$path" <<'PY'
import subprocess
import sys

base, head, path = sys.argv[1:]
commands = (
    'docker logs "${cid}" || true',
    'docker rm --force "${cid}" >/dev/null 2>&1 || true',
)
for command in commands:
    present = []
    for revision in (base, head):
        source = subprocess.check_output(
            ["git", "show", f"{revision}:{path}"], text=True
        )
        present.append(command in source)
    print(f"{command}: base={present[0]} head={present[1]}")
    if not all(present):
        raise SystemExit(1)
PY

echo
echo '== EXIT trap status preservation probes =='
set +e
bash -c 'cleanup() { :; }; trap cleanup EXIT; false'
printf 'function_trap_after_failure=%s\n' "$?"
bash -c "trap 'true' EXIT; false"
printf 'direct_trap_after_failure=%s\n' "$?"
bash -c "trap 'docker_logs(){ :; }; docker_rm(){ :; }; docker_logs || true; docker_rm || true' EXIT; false"
printf 'direct_cleanup_trap_after_failure=%s\n' "$?"
set -e

echo
echo '== actionlint =='
if command -v actionlint >/dev/null 2>&1; then
  actionlint .github/workflows/ci.yml .github/workflows/supply-chain.yml
  echo 'PASS: actionlint'
else
  echo 'SKIP: actionlint is unavailable in this sandbox'
fi

Length of output: 11126


@seonghobae No static findings for the exact range cb458621b5cfdcec35820083bb82e19e9dc627cf...e2309106eba4f41f45c770676885b27bf73aa69b.

  • The base revision is an ancestor of the head revision.
  • The effective delta changes only .github/workflows/ci.yml and .github/workflows/supply-chain.yml.
  • tests/workflow_concurrency_contract.rs is byte-identical at both endpoints. The parent oracle repair is not part of this child delta.
  • git diff --check passed.
  • actionlint passed for both workflow files.

Both workflows have the required admission policy:

push:
  branches:
    - main
pull_request:
  types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]

This policy admits duplicate push evidence only for main. It has no tags or tags-ignore filter. It also admits Draft conversion and Ready promotion.

Both workflows use this concurrency group:

${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && github.event.pull_request.number || github.run_id }}
  • A first-attempt pull request run uses the pull request number.
  • A later first-attempt event coalesces only when workflow, repository, and pull request number match.
  • A pull request rerun uses github.run_id.
  • A rerun cannot join or cancel the live pull request group.
  • A non-pull-request run uses github.run_id.
  • github.workflow separates CI and Supply Chain groups.
  • github.repository separates groups across repositories.
  • A protected-main push cannot share a group with a pull request run.

Both workflows use PR-only cancellation:

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Every direct job has the required Draft guard:

if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

Therefore, converted_to_draft can cancel an earlier first-attempt pull request run while the Draft run skips its direct jobs. A later ready_for_review event can admit the direct jobs again.

The CI workflow also adds an SC2329 annotation and changes the OCI cleanup to a direct EXIT trap. The docker logs and forced docker rm commands remain present. The direct trap preserves the preceding failure status. The range does not weaken runners, permissions, security checks, gates, thresholds, or success conditions.

This is an independent static review.

You are interacting with an AI system.

@seonghobae
seonghobae merged commit cf60f0b into test/actions-concurrency-foundation-red-v1 Sep 5, 2026
5 checks passed
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