Skip to content

fix(scheduler): filter central review workflow authority - #2005

Draft
seonghobae wants to merge 9 commits into
fix/stacked-python-runtime-review-triggersfrom
fix/scheduler-skip-central-target-inventory
Draft

fix(scheduler): filter central review workflow authority#2005
seonghobae wants to merge 9 commits into
fix/stacked-python-runtime-review-triggersfrom
fix/scheduler-skip-central-target-inventory

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Root cause

The first implementation skipped the target repository's entire old-head Actions inventory whenever review dispatch was centralized. That avoided an unauthoritative OpenCode target lookup, but it also preserved stale target-owned CodeQL, Python Security, and other direct pull-request runs.

This remains a bounded successor for the corresponding valid delta preserved in historical Draft #1231. It follows the credential/stack trigger chain #2002#2003#2004.

RED → GREEN

  • Original RED: 08a16caa4fdb0d0d86c44bb8cd7aed611beaab7b
    • covered only the now-rejected broad target-inventory suppression
  • Corrective RED: 234d98dec14ae7a91819857f561b78d0d424ec98 and 32a0d66cd1210f6fae1cb675265ce4ce49f63167
    • proves unrelated target security/CodeQL runs remain candidates
    • proves bare and rendered OpenCode names use central authority
    • proves central and case-insensitive same-repository wiring
  • GREEN: 9293c779b9634859acf7a311be4dba1be8b83008
    • retains target repository inventory and destructive-boundary live PR/head revalidation
    • excludes only OpenCode workflow names when the dispatch repository differs
    • retains unfiltered same-repository cleanup
    • corrects CHANGELOG, doctoring, and docs/product-technical-gap-baseline.md

Verification

Local evidence at GREEN (not hosted authority):

  • python -m py_compile scripts/ci/pr_review_merge_scheduler_core.py tests/test_pr2005_central_inventory_boundary.py
  • python -m pytest tests/test_pr2005_central_inventory_boundary.py tests/test_pr_review_merge_scheduler.py -q --tb=short → 339 passed
  • GITHUB_ACTIONS=true python -W error -m pytest tests/test_pr2005_central_inventory_boundary.py tests/test_pr_review_merge_scheduler.py -q --tb=short → 339 passed

Authority and safety

  • Base: fix/stacked-python-runtime-review-triggers@9fb02c92ef680710cd4737746b719f77cfd97cd5
  • Normal fast-forward commits only; no force push or rebase
  • Central review routing, required checks, reviewer identity, mutation permissions, and live cancellation guards are not weakened
  • Status remains Proposed / Ready-for-review. Runtime/security evidence is GREEN, but the parent stack, fresh lifecycle-triggered replacement Checks, CodeQL settlement, and qualifying independent approval remain required before merge

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

독립 baseline 검증: hosted run 34082563712 / job 101620505562의 15개 실패 모두 이 PR 이전 부모 14f7c85ca56be3297fa4d090d39d487d7be9bf14에서도 재현했습니다. clean detached worktree에서 기존 pytest 환경으로 동일 test node들을 두 묶음 실행: 4 failed / 330 deselected / 13.60s 및 11 failed / 323 deselected / 1.65s, 모두 exit 1. 첫 세 건은 취소 함수 테스트 대역이 stdin 키워드 인자를 받지 못하는 TypeError이며, 나머지는 workflow-starting credential 증거 누락과 관련된 assertion/RuntimeError입니다. 따라서 관측된 15개 실패는 이번 target inventory 생략 변경 이전에도 존재합니다. 부모 #2002/#2003 계약과 fixture를 함께 수리해야 하며, 자격 증명 안전 검사를 제거하거나 기대값만 wait로 바꾸는 것은 해결이 아닙니다. 이 결과는 #2005 전체 정상 동작이나 hosted 통과를 뜻하지 않습니다. 소스 변경 없이 검증했습니다.

@seonghobae

Copy link
Copy Markdown
Contributor Author

부모에서 재현한 15개 실패의 테스트 계약 수리를 #2029에 보존했습니다. exact eebcc79, 부모는 #2004의 14f7c85c입니다. 운영 안전 검사 변경 없이 fixture와 callable doubles만 수정했고, 스케줄러 334개가 일반 환경 및 GITHUB_ACTIONS=true/-W error에서 각각 통과했습니다. AGENTS 노하우와 실제 브라우저 VI도 포함했습니다. #2005 inventory 생략 delta는 별개로 유지해야 합니다. 정상 통합 후 combined exact-head hosted 검증이 필요하며, 이 댓글은 병합 승인이나 전체 successor 선언이 아닙니다.

Preserve this PR's bounded RED→GREEN delta while integrating protected-main CodeQL fixes through its exact parent branch. No force update; both parent SHAs are recorded.
Keep the central-inventory ordering delta while inheriting exact parent fixture repairs. The resolved tree was built from the current child head; no rebase or force update.
seonghobae added a commit that referenced this pull request Sep 8, 2026
Preserve the Draft mutation-boundary guard while inheriting current parent fixtures and CodeQL coordinator lineage. No rebase or force update.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

P1 — exact-head finding: this child skips the entire broad cancel_stale_pr_runs() call whenever review dispatch is centralized. That function inventories/cancels every direct target-repository PR workflow whose head is stale, not only the central model-review run, so the change also preserves stale target CodeQL/security/other workflow executions. The stated boundary (“central reviewer owns its own lifecycle”) does not justify suppressing unrelated target workflow cleanup, and the single positive test cannot detect the loss. Split the inventory by workflow authority (or introduce a narrowly filtered central-review cleanup path), retain target-owned stale-run retirement with existing live PR/head revalidation, and add same-repository/casefold plus unrelated-workflow regressions. Keep Draft until combined parent exact-head Runtime Quality and hosted evidence are GREEN.

Comment thread scripts/ci/pr_review_merge_scheduler_core.py Outdated

Copy link
Copy Markdown
Contributor Author

수리 착수: exact 3f09f3159fe133aed20a4dcfe9375d431b15b2ab에서 중앙 dispatch 시 cancel_stale_pr_runs() 전체를 생략해 target-owned CodeQL/Python Security 등 stale-run 정리까지 보존되는 P1을 재확인했습니다. 현재 active exact-head model run/동시 source writer가 보이지 않아 기존 branch의 single-writer를 맡습니다. 안전 경계는 repository-wide target inventory와 live PR/head 재검증을 유지하되, 중앙 dispatch repository가 다른 경우에만 OpenCode Review 계열 run-name을 cancellation 후보에서 제외하는 것입니다. 먼저 별도 executable RED로 unrelated security run 보존 및 bare/rendered central-review 이름 제외를 증명한 뒤 최소 구현·문서 정정·exact-head 재검증을 진행합니다. Force/rebase/bypass/lifecycle toggle은 사용하지 않습니다.

@seonghobae seonghobae changed the title fix(scheduler): skip central target Actions inventory fix(scheduler): filter central review workflow authority Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head repair receipt: 9293c779b9634859acf7a311be4dba1be8b83008 (normal fast-forward, no force/rebase). Broad target-inventory suppression is removed. The scheduler always retains target-owned stale-run inventory and live destructive-boundary PR/head validation; only central OpenCode bare/rendered workflow names are excluded when dispatch and target repositories differ, while case-insensitive same-repository cleanup remains unfiltered. Corrective RED: 234d98de…, 32a0d66c…. Local direct evidence: py_compile PASS; 339 focused scheduler tests PASS in normal and GITHUB_ACTIONS=true -W error environments. Remote tree was re-fetched and matches the verified local tree. Exact-head hosted runs are currently pending/queued, so this is not a hosted GREEN or merge authorization. PR remains Draft/Proposed behind parent #2004.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-head re-review at 9293c779b9634859acf7a311be4dba1be8b83008: the broad-skip P1 is repaired and its only inline thread is resolved. The bounded delta keeps target-owned Actions inventory plus live PR/head revalidation and excludes only central OpenCode names for cross-repository dispatch. Current-head Runtime Quality, SAST, Python Security, and Security Scan are GREEN. CodeQL run 34190638093 is not GREEN: the python shard remained pending without an authenticated terminal verdict, while the actions rerun failed because it still had no authenticated terminal verdict/dispatch receipt. That is a central CodeQL settlement blocker, not merge evidence. No new substantive source finding in this bounded delta; this COMMENT is not approval or merge authority.

@seonghobae
seonghobae marked this pull request as ready for review September 8, 2026 07:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T08:05:01.612847Z 9293c77 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Contributor Author

Ready-for-review admission receipt for exact head 9293c779b9634859acf7a311be4dba1be8b83008. Before the lifecycle transition, the PR was open/Draft/mergeable with zero active exact-head runs; Runtime Quality, SAST, Python Security, and Security Scan were terminal GREEN, the sole P1 thread was resolved, and exact-head review 5138926330 found no new bounded-delta source defect. CodeQL 34190638093 remained a failed central settlement contract and was not treated as GREEN. The Ready event created same-head replacement runs: Security 34202089727, Python Security 34202089875, SAST 34202089869, CodeQL 34202089945. These replacements must terminate independently; no predecessor check is transferred. Parent #2004, qualifying independent approval, and required Checks still block merge. No auto-merge or bypass was configured.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Changed files

  • CHANGELOG.md — repository behavior
  • docs/doctoring/central-review-target-inventory-suppression.md — operator or user guidance
  • docs/product-technical-gap-baseline.md — operator or user guidance
  • scripts/ci/pr_review_merge_scheduler_core.py — review and security gate shell path
  • tests/test_pr2005_central_inventory_boundary.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: central-review-target-inventory-suppression.md (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: central-review-target-inventory-suppression.md (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["CI script: pr_review_merge_scheduler_core.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: pr_review_merge_scheduler_core.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_pr2005_central_inventory_boundary.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_pr2005_central_inventory_boundary.py"]
  R4 --> V4["targeted test run"]
Loading

Findings

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

  • Head SHA: 9293c779b9634859acf7a311be4dba1be8b83008
  • Workflow run: 34203012562
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

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

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: central-review-target-inventory-suppression.md (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: central-review-target-inventory-suppression.md (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["CI script: pr_review_merge_scheduler_core.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: pr_review_merge_scheduler_core.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_pr2005_central_inventory_boundary.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_pr2005_central_inventory_boundary.py"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

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

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Changed files

  • CHANGELOG.md — repository behavior
  • docs/doctoring/central-review-target-inventory-suppression.md — operator or user guidance
  • docs/product-technical-gap-baseline.md — operator or user guidance
  • scripts/ci/pr_review_merge_scheduler_core.py — review and security gate shell path
  • tests/test_pr2005_central_inventory_boundary.py — regression suite

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: central-review-target-inventory-suppression.md (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: central-review-target-inventory-suppression.md (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["CI script: pr_review_merge_scheduler_core.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: pr_review_merge_scheduler_core.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_pr2005_central_inventory_boundary.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_pr2005_central_inventory_boundary.py"]
  R4 --> V4["targeted test run"]
Loading

Findings

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

  • Head SHA: 9293c779b9634859acf7a311be4dba1be8b83008
  • Workflow run: 34205898313
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

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

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Repository file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Repository file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: central-review-target-inventory-suppression.md (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: central-review-target-inventory-suppression.md (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["CI script: pr_review_merge_scheduler_core.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: pr_review_merge_scheduler_core.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test: test_pr2005_central_inventory_boundary.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_pr2005_central_inventory_boundary.py"]
  R4 --> V4["targeted test run"]
Loading

@seonghobae
seonghobae marked this pull request as draft September 8, 2026 15:59

Copy link
Copy Markdown
Contributor Author

Non-force restack receipt for exact head 51fd0c4d6a8d6ed0991e54692b249ea1b1b7c94f.

Parents are the prior #2005 head and repaired #2004@8e7e9cdcd8f30f55b8f6652c69ee4d3ee3ca3124; exact remote tree 45c3eb1b1088c9402d8a842304c6eddcd79a3abf matched the verified local merge. The intended #2005 central-inventory boundary remains intact while the #2003 coverage repair and #2004 stacked-trigger contract are now ordinary ancestry.

Combined exact-tree verification under GITHUB_ACTIONS=true and -W error: scheduler, central-inventory, stacked-trigger, and inherited CodeQL contracts 385 passed; git diff --check PASS.

The PR was moved to Draft before restack because its prior checks did not cover the new parent. Fresh exact-head hosted checks and independent review are required. #2006/#2007 still need sequential non-force restack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Normal-priority or P2 work type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant