fix(actions): bound agent mention dispatch envelope - #840
Conversation
|
Warning Review limit reached
Next review available in: 11 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
📝 WalkthroughWalkthroughOpenCode 호출을 v2 canonical claim envelope로 변경했습니다. Wrapper와 scheduler가 payload와 PR snapshot을 재검증합니다. 리뷰 전용 경로는 병합과 브랜치 변경을 수행하지 않습니다. OpenCode와 Strix 실행은 run ID 또는 invocation key로 격리됩니다. ChangesOpenCode v2 호출 계약
스케줄러 dispatch 검증
스냅샷 보호 리뷰
실행 격리와 품질 계약
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review Please review the exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected='826c6eeec7aa5a72ce69521e23c3f6a1b998fe52'
actual="$(git rev-parse HEAD)"
printf 'HEAD=%s\nEXPECTED=%s\n' "$actual" "$expected"
git diff-tree --no-commit-id --name-status -r "$expected"
printf '\n--- Python and workflow outlines ---\n'
git diff-tree --no-commit-id --name-only -r "$expected" |
while IFS= read -r file; do
case "$file" in
*.py)
printf '\n### %s\n' "$file"
ast-grep outline "$file" --items all --type function,class 2>/dev/null || true
;;
*.yml|*.yaml)
printf '\n### %s\n' "$file"
nl -ba "$file" | sed -n '1,260p'
;;
esac
done
printf '\n--- Relevant contract and concurrency references ---\n'
rg -n -C 4 -g '*.py' -g '*.yml' -g '*.yaml' \
'(opencode_payload|agent-mention-opencode|merge-scheduler-agent-review-v2|cwl\.agent-invocation/v2|repository_dispatch|client_payload|agent_invocation_key|review_policy|concurrency:|cancel-in-progress|ledger|claim)' .Length of output: 2376 🏁 Script executed: #!/bin/bash
set -euo pipefail
commit='826c6eeec7aa5a72ce69521e23c3f6a1b998fe52'
base="${commit}^"
printf '%s\n' '--- Changed implementation diffs ---'
git diff --unified=80 "$base" "$commit" -- \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/agent-mention-router-quality-ci.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/strix.yml \
scripts/ci/agent_mention_router.py \
scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Complete changed workflows ---'
for file in \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/agent-mention-router-quality-ci.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/strix.yml
do
printf '\n### %s\n' "$file"
sed -n '1,420p' "$file"
done
printf '%s\n' '--- Contract-related source definitions and test assertions ---'
grep -nE -C 8 \
'^(def |class )|opencode_payload|agent_invocation_key|review_policy|repository_dispatch|client_payload|ledger|claim|snapshot|cancel|concurrency|merge-scheduler-agent-review-v2' \
scripts/ci/agent_mention_router.py \
scripts/ci/pr_review_merge_scheduler.py \
tests/test_agent_mention_complete_payload_binding.py \
tests/test_agent_mention_downstream_idempotency.py \
tests/test_agent_mention_idempotency.py \
tests/test_agent_mention_repository_dispatch_envelope.py \
tests/test_agent_mention_router.py \
tests/test_opencode_agent_contract.py \
tests/test_pr_review_merge_scheduler.py \
tests/test_required_workflow_queue_contract.py || trueLength of output: 202196 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Python definitions and key references ---'
grep -nE \
'^(def |class )|AGENT.*(SCHEMA|CLAIM|PAYLOAD)|opencode_payload|validate_.*(payload|claim|invocation|snapshot)|claim_.*(ledger|key)|ledger.*claim|dispatch_(opencode|strix)|active_.*run|force_cancel|inspect_snapshot_bound|validate_expected_pr_snapshot|expected_(head|base)|agent_invocation_key' \
scripts/ci/agent_mention_router.py \
scripts/ci/pr_review_merge_scheduler.py || true
printf '%s\n' '--- Workflow section markers ---'
for file in \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/agent-mention-router-quality-ci.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/strix.yml
do
printf '\n### %s\n' "$file"
grep -nE \
'^(name:|on:|concurrency:|permissions:| [A-Za-z0-9_-]+:| - name:)|repository_dispatch|merge-scheduler-agent-review-v2|cwl\.agent-invocation/v2|client_payload|agent_invocation_key|claim|ledger|concurrency|cancel-in-progress|expected-(head|base)|TARGET_' \
"$file" || true
doneLength of output: 73580 🏁 Script executed: #!/bin/bash
set -euo pipefail
show() {
file="$1"
start="$2"
end="$3"
printf '\n### %s:%s-%s\n' "$file" "$start" "$end"
sed -n "${start},${end}p" "$file"
}
show scripts/ci/agent_mention_router.py 220 490
show .github/workflows/agent-mention-opencode-dispatch.yml 1 290
show .github/workflows/pr-review-merge-scheduler.yml 86 680
show scripts/ci/pr_review_merge_scheduler.py 1840 2205
show scripts/ci/pr_review_merge_scheduler.py 2281 2535
show scripts/ci/pr_review_merge_scheduler.py 3946 4115
show .github/workflows/strix.yml 66 370Length of output: 101297
I found no Critical or Important findings in the requested scope. The review verified these controls:
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (4)
tests/test_agent_mention_repository_dispatch_envelope.py (1)
194-203: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winwrapper의 정책 검증과 형식 검증을 다루는 변이를 추가하세요.
현재 변이 목록은 envelope 키, claim 키, bool 타입, digest, schema만 다룹니다. wrapper의
expected_policy검사와 정규식 검사(repository,head_sha,base_branch,actor)는 이 파일에서 실행 검증되지 않습니다.정책 위반 변이는 digest도 함께 갱신해야 해당 분기에 도달합니다. 그렇지 않으면 digest 불일치로 먼저 거부되어 정책 분기를 검증하지 못합니다.
♻️ 제안 변이 추가
"altered-bound-field", "unsupported-schema", + "policy-violating-claim", ], )정책 변이 처리 분기 예시:
elif mutation == "policy-violating-claim": payload["claim"]["update_branches"] = True payload["agent_invocation_key"] = hashlib.sha256( json.dumps( payload["claim"], ensure_ascii=True, separators=(",", ":"), sort_keys=True, ).encode("utf-8") ).hexdigest()
INVOCATION_KEY와PAYLOAD_SCHEMA는 이미payload에서 읽으므로 추가 변경은 필요하지 않습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_agent_mention_repository_dispatch_envelope.py` around lines 194 - 203, 변이 테스트 목록과 해당 mutation 처리 로직에 expected_policy 위반 변이 및 repository, head_sha, base_branch, actor 정규식 위반 변이를 추가하세요. policy-violating-claim은 claim 변경 후 payload의 agent_invocation_key도 동일한 정규화·정렬 방식으로 다시 계산해 digest 검증을 통과한 뒤 정책 분기에 도달하게 하며, 각 형식 변이는 해당 필드만 유효하지 않은 값으로 바꾸고 나머지 검증 조건은 유지하세요..github/workflows/strix.yml (1)
72-78: 🚀 Performance & Scalability | 🔵 Trivialrepository_dispatch 실행에 대한 동시 실행 상한이 사라집니다.
github.run_id는 dispatch마다 고유하므로 각 실행이 별도 그룹을 가집니다.cancel-in-progress도 해당 이벤트에서 비활성화됩니다. 결과적으로 같은 PR에 대한 Strix 실행이 직렬화되지 않고, 각 실행은 최대 120분 예산을 사용합니다. 중복 억제는 scheduler의 same-head 판정에만 남습니다. 이 트레이드오프는 stale dispatch의 취소를 막기 위한 의도적 선택입니다. Actions 동시 실행 사용량을 관찰하십시오.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/strix.yml around lines 72 - 78, Update the repository_dispatch concurrency configuration in the workflow’s group expression to avoid using the unique github.run_id as the group key, so dispatches for the same target remain serialized and subject to the intended concurrency limit. Preserve the stale-dispatch protection only if it does not remove same-PR serialization, and keep cancel-in-progress disabled for repository_dispatch..github/workflows/opencode-review-dispatch.yml (1)
15-18: 🚀 Performance & Scalability | 🔵 Trivialrun-id 단위 격리는 PR별 동시 실행 상한을 제거합니다.
이전 그룹은 target repository와 PR 번호를 사용했으므로 같은 PR의 실행이 직렬화되었습니다. 이제 모든 dispatch가 고유 그룹을 가지며 취소도 하지 않습니다. 중복 억제는 scheduler의
active_opencode_run_refssame-head 판정에만 의존합니다. 해당 판정이 지연되거나 실패하면 동일 PR에 대해 최대 325분 예산의 리뷰 job이 병렬로 누적될 수 있습니다.Actions 동시 실행 사용량과 큐 대기 시간을 모니터링하십시오. 필요하면 조직 수준 러너 상한이나 dispatch 발행 측 rate limit을 함께 두십시오.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/opencode-review-dispatch.yml around lines 15 - 18, Restore PR-level concurrency grouping in the workflow by deriving group from the target repository and PR number, while preserving cancel-in-progress behavior that prevents stale runs from cancelling newer valid work. Update the group expression near the repository_dispatch configuration and keep duplicate suppression from depending solely on scheduler active_opencode_run_refs same-head checks.scripts/ci/pr_review_merge_scheduler.py (1)
2329-2335: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win승인된 head에서도 "no OpenCode approval" 사유가 출력됩니다.
이 분기는
current_head_approved확인(2342번 줄)보다 먼저 실행됩니다. 현재 head가 이미 승인된 상태에서 base가 앞서 있으면, 결정 사유가 "current head has no OpenCode approval"로 기록됩니다. 결정 자체는wait로 올바르지만 운영자가 보는 사유가 실제 상태와 다릅니다. 사유 문자열을 승인 상태에 맞게 분기하십시오.♻️ 제안 수정
behind_by = branch_outdated_by_base(pr, merge_state) if behind_by and trigger_reviews: + approval_state = ( + "current head is approved" + if current_head_approved + else "current head has no OpenCode approval" + ) return Decision( number, "wait", - "current head has no OpenCode approval; snapshot-bound review cannot update an outdated branch", + f"{approval_state}; snapshot-bound review cannot update an outdated branch", )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/ci/pr_review_merge_scheduler.py` around lines 2329 - 2335, Update the decision-reason selection in the behind_by and trigger_reviews branch to account for current_head_approved before reporting the missing-approval message. Preserve the existing wait decision, but use an approval-consistent reason when the head is already approved and retain the current no-approval reason otherwise; reuse the current_head_approved check rather than duplicating approval logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/agent-mention-router-quality-ci.yml:
- Line 23: quality job의 변경 감시 목록이 테스트 파일만 포함하고 소스 모듈을 누락하고 있습니다. 해당 workflow의
paths 목록에 pr_review_fix_scheduler.py 소스 경로를 추가하거나, 테스트 파일 항목을 제거해 소스 변경 시에도 job이
실행되도록 정리하십시오.
- Around line 17-18: quality job의 coverage 및 interrogate 게이트 대상에
pr_review_merge_scheduler.py가 빠져 있습니다. 기존 agent_mention_router.py와
agent_mention_sweep.py를 유지하면서 두 게이트의 검사 대상에
scripts/ci/pr_review_merge_scheduler.py를 추가하고, 해당 파일에도 100% 기준이 적용되도록 수정하십시오.
In `@tests/test_agent_mention_repository_dispatch_envelope.py`:
- Line 138: Remove the unnecessary f-string prefix from the assertion containing
PAYLOAD_SCHEMA, change the doubled braces to the required literal GitHub
expression braces, and use a double-quoted string so the embedded single quotes
need no escaping.
---
Nitpick comments:
In @.github/workflows/opencode-review-dispatch.yml:
- Around line 15-18: Restore PR-level concurrency grouping in the workflow by
deriving group from the target repository and PR number, while preserving
cancel-in-progress behavior that prevents stale runs from cancelling newer valid
work. Update the group expression near the repository_dispatch configuration and
keep duplicate suppression from depending solely on scheduler
active_opencode_run_refs same-head checks.
In @.github/workflows/strix.yml:
- Around line 72-78: Update the repository_dispatch concurrency configuration in
the workflow’s group expression to avoid using the unique github.run_id as the
group key, so dispatches for the same target remain serialized and subject to
the intended concurrency limit. Preserve the stale-dispatch protection only if
it does not remove same-PR serialization, and keep cancel-in-progress disabled
for repository_dispatch.
In `@scripts/ci/pr_review_merge_scheduler.py`:
- Around line 2329-2335: Update the decision-reason selection in the behind_by
and trigger_reviews branch to account for current_head_approved before reporting
the missing-approval message. Preserve the existing wait decision, but use an
approval-consistent reason when the head is already approved and retain the
current no-approval reason otherwise; reuse the current_head_approved check
rather than duplicating approval logic.
In `@tests/test_agent_mention_repository_dispatch_envelope.py`:
- Around line 194-203: 변이 테스트 목록과 해당 mutation 처리 로직에 expected_policy 위반 변이 및
repository, head_sha, base_branch, actor 정규식 위반 변이를 추가하세요.
policy-violating-claim은 claim 변경 후 payload의 agent_invocation_key도 동일한 정규화·정렬
방식으로 다시 계산해 digest 검증을 통과한 뒤 정책 분기에 도달하게 하며, 각 형식 변이는 해당 필드만 유효하지 않은 값으로 바꾸고 나머지
검증 조건은 유지하세요.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6d598337-0ae6-4383-8542-9d9f4d1a5ccb
📒 Files selected for processing (19)
.github/workflows/agent-mention-opencode-dispatch.yml.github/workflows/agent-mention-router-quality-ci.yml.github/workflows/opencode-review-dispatch.yml.github/workflows/pr-review-merge-scheduler.yml.github/workflows/strix.ymlCHANGELOG.mddocs/automation/review-agent-comment-invocation.mdscripts/ci/agent_mention_router.pyscripts/ci/pr_review_merge_scheduler.pyscripts/ci/test_strix_quick_gate.shtests/test_agent_mention_complete_payload_binding.pytests/test_agent_mention_downstream_idempotency.pytests/test_agent_mention_idempotency.pytests/test_agent_mention_repository_dispatch_envelope.pytests/test_agent_mention_router.pytests/test_opencode_agent_contract.pytests/test_opencode_workflow_shell_syntax.pytests/test_pr_review_merge_scheduler.pytests/test_required_workflow_queue_contract.py
|
@coderabbitai review Please perform one fresh full review of unchanged exact head |
|
The review will not transfer conclusions from the predecessor-head review. It will examine the v2 dispatch envelope, live-PR snapshot binding, ledger-before-forward ordering, review-only mutation denial, and stale-event concurrency and cancellation behavior.
|
|
@coderabbitai review Please review the unchanged exact head |
|
I will evaluate the current
|
|
@coderabbitai review Please perform one fresh full review of unchanged exact head |
|
I will evaluate only findings valid on this exact head. I will not transfer predecessor-head conclusions or treat this automated review as human approval.
|
|
@coderabbitai review Please complete one fresh full automated review of unchanged exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head='ba93f537302086ae54a919ea45c3ca96f2458415'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
printf '%s\n' '--- Exact revision check ---'
printf 'HEAD=%s\n' "$(git rev-parse HEAD)"
printf 'REQUESTED_HEAD=%s\nREQUESTED_BASE=%s\n' "$head" "$base"
git cat-file -e "${head}^{commit}"
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" "$head"
printf 'BASE_IS_ANCESTOR=true\n'
printf '%s\n' '--- Base-to-head changed files ---'
git diff --name-status "$base" "$head"
printf '%s\n' '--- Relevant Python outlines ---'
for f in scripts/ci/agent_mention_router.py scripts/ci/pr_review_merge_scheduler.py; do
if [ -f "$f" ]; then
printf '\n### %s\n' "$f"
ast-grep outline "$f" --items all --type function,class --view expanded || true
fi
done
printf '%s\n' '--- Relevant workflow anchors ---'
for f in \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/strix.yml
do
if [ -f "$f" ]; then
printf '\n### %s\n' "$f"
rg -n -C 3 \
'repository_dispatch|client_payload|cwl\.agent-invocation/v2|merge-scheduler-agent-review-v2|concurrency:|cancel-in-progress|artifact|claim|expected-(head|base)|TARGET_|auto-merge|update-branch' \
"$f" || true
fi
doneLength of output: 122178 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
head='ba93f537302086ae54a919ea45c3ca96f2458415'
printf '%s\n' '--- Focused base-to-head implementation diff ---'
git diff --unified=35 "$base" "$head" -- \
scripts/ci/agent_mention_router.py \
scripts/ci/pr_review_merge_scheduler.py \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/strix.yml
printf '%s\n' '--- Router invocation payload implementation ---'
sed -n '220,455p' scripts/ci/agent_mention_router.py
printf '%s\n' '--- Scheduler dispatch and snapshot-bound inspection ---'
sed -n '1840,2215p' scripts/ci/pr_review_merge_scheduler.py
sed -n '2281,2715p' scripts/ci/pr_review_merge_scheduler.py
sed -n '3940,4135p' scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Wrapper ledger forwarding step ---'
sed -n '30,285p' .github/workflows/agent-mention-opencode-dispatch.yml
printf '%s\n' '--- Scheduler targeted-dispatch validation and invocation ---'
sed -n '225,690p' .github/workflows/pr-review-merge-scheduler.yml
printf '%s\n' '--- Current-head contract-test anchors ---'
rg -n -C 4 \
'three|property|envelope|canonical|invocation|ledger|snapshot|expected_(head|base)|review-only|snapshot_changed|cancel|concurrency|merge-scheduler-agent-review-v2' \
tests/test_agent_mention_repository_dispatch_envelope.py \
tests/test_opencode_workflow_shell_syntax.py \
tests/test_pr_review_merge_scheduler.py \
tests/test_required_workflow_queue_contract.py \
tests/test_opencode_agent_contract.pyLength of output: 166339 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Dispatch and active-run implementation ---'
sed -n '1840,2210p' scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Snapshot-bound inspection implementation ---'
sed -n '2281,2495p' scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Router claim and payload implementation ---'
sed -n '220,425p' scripts/ci/agent_mention_router.py
printf '%s\n' '--- Changed lines only: requested implementation surfaces ---'
git diff --unified=8 \
6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba \
ba93f537302086ae54a919ea45c3ca96f2458415 -- \
scripts/ci/pr_review_merge_scheduler.py \
scripts/ci/agent_mention_router.py \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/strix.yml \
| rg -n -C 6 '^\+|^-\s|^@@|snapshot_guarded|snapshot_changed|active_.*run|force_cancel|dispatch_(opencode|strix)|opencode_payload|OPENCODE_INVOCATION_SCHEMA|concurrency|cancel-in-progress|upload-artifact|dispatches|expected-(head|base)'
printf '%s\n' '--- Workflow syntax parser checks available in repository tests ---'
rg -n -C 2 \
'agent_mention_repository_dispatch_envelope|test_opencode_workflow_shell_syntax|test_pr_review_merge_scheduler|test_required_workflow_queue_contract' \
.github/workflows/agent-mention-router-quality-ci.ymlLength of output: 102232
I found no Critical or Important findings in the requested scope. I verified the following current-head controls:
This review is current-head automated review evidence only. It does not represent counted independent human approval. You are interacting with an AI system. |
|
@coderabbitai review Please perform one fresh full automated review of unchanged exact head |
|
I will revalidate the revisions before review. I will assess only the current diff. I will not transfer predecessor-head conclusions. The review will cover the v2 envelope, claim and policy validation, snapshot binding, ledger ordering, review-only behavior, and concurrency isolation. ✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/agent-mention-router-quality-ci.yml (1)
119-134: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
pr_review_fix_scheduler.py를 품질 게이트에 추가하십시오.이 파일은 트리거 경로에는 있지만 coverage
include목록과interrogate대상에는 없습니다. 두 목록에 추가하십시오. 트리거 경로 수를 검사하는workflow.count(...) == 2단언은 수정하지 않아도 됩니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/agent-mention-router-quality-ci.yml around lines 119 - 134, Update the quality-gate configuration around the coverage include list and the interrogate command to add scripts/ci/pr_review_fix_scheduler.py to both. Leave the workflow.count(...) == 2 assertion unchanged.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/ci/test_strix_quick_gate.sh`:
- Around line 516-524: Remove the queue: max assertion from the test block
around workflow concurrency checks in test_strix_quick_gate.sh, including its
associated “preserves pending runs” assertion, so the test no longer requires
the unsupported concurrency key. Keep the valid group and cancel-in-progress
assertions unchanged.
---
Nitpick comments:
In @.github/workflows/agent-mention-router-quality-ci.yml:
- Around line 119-134: Update the quality-gate configuration around the coverage
include list and the interrogate command to add
scripts/ci/pr_review_fix_scheduler.py to both. Leave the workflow.count(...) ==
2 assertion unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8e9557e7-d484-432d-a1c7-e10bcc74f0a5
📒 Files selected for processing (20)
.github/workflows/agent-mention-opencode-dispatch.yml.github/workflows/agent-mention-router-quality-ci.yml.github/workflows/opencode-review-dispatch.yml.github/workflows/pr-review-merge-scheduler.yml.github/workflows/strix.ymlCHANGELOG.mddocs/automation/review-agent-comment-invocation.mdscripts/ci/agent_mention_router.pyscripts/ci/pr_review_merge_scheduler.pyscripts/ci/test_strix_quick_gate.shtests/test_agent_mention_complete_payload_binding.pytests/test_agent_mention_downstream_idempotency.pytests/test_agent_mention_idempotency.pytests/test_agent_mention_repository_dispatch_envelope.pytests/test_agent_mention_router.pytests/test_agent_mention_workflow_contract.pytests/test_opencode_agent_contract.pytests/test_opencode_workflow_shell_syntax.pytests/test_pr_review_merge_scheduler.pytests/test_required_workflow_queue_contract.py
|
RCA on the current CodeRabbit Primary docs:
No source change is made for that finding. Separately, the valid current-head quality-gate finding was addressed in descendant commit |
|
@coderabbitai review Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
head='04c68a997b658019a1df9958a6bfe88ec72f792c'
printf '%s\n' '--- Revision verification ---'
printf 'checked_out=%s\nrequested_head=%s\nrequested_base=%s\n' \
"$(git rev-parse HEAD)" "$head" "$base"
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head"
printf 'base_is_ancestor=true\n'
printf '%s\n' '--- Base-to-head changed files ---'
git diff --name-status "$base" "$head"
printf '%s\n' '--- Descendant change from previous reviewed head ---'
git diff --unified=80 \
ba93f537302086ae54a919ea45c3ca96f2458415 "$head" -- \
.github/workflows/agent-mention-router-quality-ci.yml
printf '%s\n' '--- Changed workflow outline and relevant sections ---'
nl -ba .github/workflows/agent-mention-router-quality-ci.yml | sed -n '1,360p'
printf '%s\n' '--- Quality-gate contract references ---'
rg -n -C 5 \
'pr_review_fix_scheduler\.py|pr_review_merge_scheduler\.py|coverage|interrogate|agent-mention-router-quality-ci' \
.github/workflows/agent-mention-router-quality-ci.yml \
tests \
scripts/ci \
-g '*.py' -g '*.yml' -g '*.yaml' -g '*.sh' \
|| true
printf '%s\n' '--- Target script outline ---'
ast-grep outline scripts/ci/pr_review_fix_scheduler.py \
--items all --type function,class --view expanded 2>/dev/null || trueLength of output: 7220 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Complete quality workflow ---'
sed -n '1,300p' .github/workflows/agent-mention-router-quality-ci.yml
printf '%s\n' '--- Workflow target lines ---'
grep -n -E -C 4 \
'agent-mention-coveragerc|include =|pr_review_(fix|merge)_scheduler\.py|interrogate|coverage (run|report)' \
.github/workflows/agent-mention-router-quality-ci.yml
printf '%s\n' '--- Locate and inspect fix-scheduler coverage tests ---'
find tests -maxdepth 1 -type f -name 'test_pr_review_fix_scheduler*.py' -print \
-exec sed -n '1,360p' {} \;
printf '%s\n' '--- References to exclusion or coverage configuration ---'
grep -RInE -C 3 \
'pr_review_fix_scheduler|# pragma: no cover|omit[[:space:]]*=|exclude_lines|interrogate' \
.github/workflows tests scripts/ci \
--include='*.py' --include='*.yml' --include='*.yaml' \
|| true
printf '%s\n' '--- Fix scheduler structure ---'
grep -nE '^(class |def |if __name__)' scripts/ci/pr_review_fix_scheduler.py
sed -n '1,260p' scripts/ci/pr_review_fix_scheduler.pyLength of output: 75062
I found no Critical or Important findings. I confirmed that the quality workflow now:
This result applies only to the exact reviewed head. It does not reuse predecessor-head review or check evidence. ✏️ Learnings added
|
|
@coderabbitai review Please perform a fresh full review of exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
head='04c68a997b658019a1df9958a6bfe88ec72f792c'
printf '%s\n' '--- Revision identity ---'
printf 'checked_out=%s\nrequested_head=%s\nrequested_base=%s\n' \
"$(git rev-parse HEAD)" "$head" "$base"
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head"
printf 'base_is_ancestor=true\n'
printf '%s\n' '--- Complete base-to-head file list ---'
git diff --name-status "$base" "$head"
printf '%s\n' '--- Changed source and test outlines ---'
git diff --name-only "$base" "$head" |
while IFS= read -r file; do
case "$file" in
*.py)
printf '\n### %s\n' "$file"
ast-grep outline "$file" --items all --type function,class --view expanded 2>/dev/null || true
;;
esac
done
printf '%s\n' '--- Focused contract locations ---'
rg -n -C 3 \
'cwl\.agent-invocation/v2|client_payload|merge-scheduler-agent-review-v2|agent_invocation_key|canonical|snapshot_guarded|snapshot_changed|dispatch_(opencode|strix)|active_.*run|force_cancel|concurrency:|cancel-in-progress|queue: max|upload-artifact|expected-(head|base)|auto-merge|update-branch|pr_review_fix_scheduler\.py|interrogate|coverage' \
.github/workflows scripts/ci tests \
-g '*.py' -g '*.yml' -g '*.yaml' -g '*.sh'Length of output: 201856 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
head='04c68a997b658019a1df9958a6bfe88ec72f792c'
printf '%s\n' '--- Changed files ---'
git diff --name-status "$base" "$head"
printf '%s\n' '--- Focused implementation diff ---'
git diff --unified=20 "$base" "$head" -- \
.github/workflows/agent-mention-opencode-dispatch.yml \
.github/workflows/agent-mention-router-quality-ci.yml \
.github/workflows/opencode-review-dispatch.yml \
.github/workflows/pr-review-merge-scheduler.yml \
.github/workflows/strix.yml \
scripts/ci/agent_mention_router.py \
scripts/ci/pr_review_merge_scheduler.py \
tests/test_agent_mention_complete_payload_binding.py \
tests/test_agent_mention_downstream_idempotency.py \
tests/test_agent_mention_idempotency.py \
tests/test_agent_mention_repository_dispatch_envelope.py \
tests/test_agent_mention_router.py \
tests/test_opencode_agent_contract.py \
tests/test_opencode_workflow_shell_syntax.py \
tests/test_pr_review_merge_scheduler.py \
tests/test_required_workflow_queue_contract.py \
tests/test_agent_mention_workflow_contract.py
printf '%s\n' '--- Wrapper: validation, ledger, forwarding ---'
sed -n '30,310p' .github/workflows/agent-mention-opencode-dispatch.yml
printf '%s\n' '--- Scheduler workflow: concurrency, validation, execution arguments ---'
sed -n '1,90p' .github/workflows/pr-review-merge-scheduler.yml
sed -n '210,620p' .github/workflows/pr-review-merge-scheduler.yml
printf '%s\n' '--- Scheduler implementation: dispatch and snapshot paths ---'
rg -n -C 12 \
'^def (dispatch_opencode_review|dispatch_strix_evidence|validate_expected_pr_snapshot|inspect_pr|main)\b|snapshot_guarded|snapshot_changed|active_.*run|force_cancel|expected_(head|base)|enable_auto_merge|update_branches' \
scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Quality workflow follow-up ---'
sed -n '1,260p' .github/workflows/agent-mention-router-quality-ci.ymlLength of output: 118779 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
head='04c68a997b658019a1df9958a6bfe88ec72f792c'
printf '%s\n' '--- Exact changed-file summary ---'
git diff --stat "$base" "$head"
git diff --name-status "$base" "$head"
printf '%s\n' '--- Snapshot-bound review implementation ---'
sed -n '2200,2505p' scripts/ci/pr_review_merge_scheduler.py
printf '%s\n' '--- Scheduler workflow concurrency and inspection invocation ---'
sed -n '85,145p' .github/workflows/pr-review-merge-scheduler.yml
sed -n '600,760p' .github/workflows/pr-review-merge-scheduler.yml
printf '%s\n' '--- OpenCode and Strix repository-dispatch concurrency ---'
sed -n '1,85p' .github/workflows/opencode-review-dispatch.yml
sed -n '1,120p' .github/workflows/strix.yml
printf '%s\n' '--- Current-head regression tests for review-only and stale-event boundaries ---'
rg -n -C 4 \
'snapshot_bound|snapshot_guarded|snapshot_changed|no.*mutation|cleanup|enable_auto_merge|update_branch|force_cancel|different-head|different_head|run-id|queue: max|expected_base_sha|expected_head_sha' \
tests/test_pr_review_merge_scheduler.py \
tests/test_agent_mention_repository_dispatch_envelope.py \
tests/test_opencode_workflow_shell_syntax.py \
tests/test_required_workflow_queue_contract.py \
tests/test_opencode_agent_contract.pyLength of output: 129521
I verified both revision identities before the review. The base commit is an ancestor of the reviewed head. I found no Critical or Important source-backed findings. I verified these current-head controls:
This is automated current-head review evidence only. It is not counted independent human approval. You are interacting with an AI system. |
|
@cwl-noema-review Please review the exact current head |
|
Current-head review clarification for @coderabbitai review |
|
I will review only the current base-to-head diff. I will not modify, merge, retarget, or change credentials or rulesets. I will assess the v2 envelope, snapshot binding, replay and idempotency controls, concurrency isolation, credential boundaries, and the
|
RCA
The organization-wide mention sweep at run 31258218169 / job 93104819883 isolated 402 HTTP 422 failures. Every failure said
No more than 10 properties are allowed; 14 were supplied.Two OpenCode repository-dispatch hops violated GitHub's maximum of ten top-level
client_payloadproperties:agent_mention_router.py::opencode_payload()emitted 14 properties.agent-mention-opencode-dispatch.ymlemitted another 14-propertymerge-schedulerpayload.Noema remains within the limit at nine properties.
Fix
cwl.agent-invocation/v2envelope:schema, canonicalclaim, andagent_invocation_key.merge-scheduler-agent-review-v2handling while retaining the schema-free legacymerge-schedulerpath.Organization-wide validation
agent-mention-opencode,merge-scheduler-agent-review-v2, or the nestedreview_policy/v2 claim schema.repository_dispatchbuilder is within the ten-property limit; no sibling rollout is required.Exact-current-head verification
Current exact head:
ba93f537302086ae54a919ea45c3ca96f2458415on protected base6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.1017 passed, 16 subtests passedgit diff --check: passtest_strix_quick_gate: PASSThe prior independent review that reported no Critical or Important findings was anchored to predecessor head
826c6eeec7aa5a72ce69521e23c3f6a1b998fe52; it is diagnostic history only and does not transfer to current headba93f537302086ae54a919ea45c3ca96f2458415. A fresh current-head automated review remains required. The latest CodeRabbit full-review attempt on the current head was organization-rate-limited; reviewer capacity is not a source defect and must not trigger speculative source changes. A qualifying counted independent non-author approval remains a separate governance gate.This replaces and supersedes #826 without modifying its branch.
Summary by CodeRabbit
개선 사항
문서
Protected deployment status