fix(scheduler): revalidate live merge lifecycle - #2006
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
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.
Preserve the Draft mutation-boundary guard while inheriting current parent fixtures and CodeQL coordinator lineage. No rebase or force update.
Preserve case-insensitive repository identity while inheriting the complete current-main scheduler stack and exact fixture repairs. No rebase or force update.
seonghobae
left a comment
There was a problem hiding this comment.
P1 — exact-head finding: both new guards read the caller's already-fetched pr dictionary only. They do not re-fetch live PR state immediately before the guarded mutation, so the documented failure scene “Ready PR becomes Draft after inspection” remains possible: a stale isDraft=false snapshot passes and the GitHub mutation still executes. Keep the initial cheap guard, but revalidate repository/PR/current head and live Draft state at the irreversible boundary using the existing bounded host-scoped runner/credential path; fail closed before auto-merge/direct merge. Add an executable race fixture that changes live state after inspection while preserving all expected-head and authorization checks.
|
수리 착수: exact |
|
Exact-head repair receipt
The child #2007 must non-force absorb this exact repaired head before its own evidence can be current; no predecessor is closed or treated as replaced. |
|
Exact-head follow-up: evidence-link audit found that the first GREEN tree still named the local-only corrective RED SHA. Documentation-only commit |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Ready-for-review admission restored at unchanged exact head |
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head product diff. Coverage is a separate gate.
Changed files
CHANGELOG.md— repository behaviordocs/doctoring/draft-merge-mutation-boundary.md— operator or user guidancedocs/product-technical-gap-baseline.md— operator or user guidancescripts/ci/pr_review_merge_scheduler_core.py— review and security gate shell pathtests/test_pr_review_merge_scheduler.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: draft-merge-mutation-boundary.md (2 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: draft-merge-mutation-boundary.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_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
Findings
No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.
- Head SHA:
d739e0d8d6285261da0a2f530181a929f19a202d - Workflow run: 34198514532
- 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: draft-merge-mutation-boundary.md (2 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: draft-merge-mutation-boundary.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_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
OpenCode Review Overview
Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment. |
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head product diff. Coverage is a separate gate.
Changed files
CHANGELOG.md— repository behaviordocs/doctoring/draft-merge-mutation-boundary.md— operator or user guidancedocs/product-technical-gap-baseline.md— operator or user guidancescripts/ci/pr_review_merge_scheduler_core.py— review and security gate shell pathtests/test_pr_review_merge_scheduler.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: draft-merge-mutation-boundary.md (2 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: draft-merge-mutation-boundary.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_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
Findings
No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.
- Head SHA:
d739e0d8d6285261da0a2f530181a929f19a202d - Workflow run: 34202258714
- 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: draft-merge-mutation-boundary.md (2 files)"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: draft-merge-mutation-boundary.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_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
|
Non-force parent reconciliation completed after the #2005 base advanced.
The live Ready/Draft/head mutation guard and the complete current inventory/CodeQL prerequisite delta are both preserved. Git Data publication used an exact tree and Detached combined verification before publication:
#2006 remains Draft/Proposed. All predecessor Checks are stale; fresh exact-head hosted Checks and a qualifying independent approval remain mandatory before Ready admission or ordinary merge. |
|
Exact-head hosted RCA for This is the protected-handler convergence gap owned by #2040, not a regression in #2006's lifecycle guard or the restack. The exact repaired handler is still Proposed and is not protected-main authority. No blind rerun or status synthesis was used; #2006 remains Draft until a fresh exact-head CodeQL generation can consume protected handler evidence. |
Root cause
Scheduler inspection filters Draft pull requests, but the irreversible
enable_auto_mergeandmerge_prentrypoints trusted the caller's already-fetchedisDraftsnapshot.--match-head-commitprotects the head only; it cannot prevent a same-head Ready → Draft lifecycle race.This bounded successor carries the corresponding valid delta from historical Draft #1231 and remains stacked after #2005.
RED → GREEN
2d140a84203a0df0cb86cd6b6ab31fc37bbdbda21fbcc508fb552daf65eb8fd198b2a4d7641d6e809f5b4d6d9293c779b9634859acf7a311be4dba1be8b83008897c7e65c60a8e03d739e0d8Verification
Fresh detached verification at exact remote head
d739e0d8d6285261da0a2f530181a929f19a202d:python -m py_compile scripts/ci/pr_review_merge_scheduler_core.pypython -m pytest tests/test_pr_review_merge_scheduler.py -q→ 343 passedGITHUB_ACTIONS=true python -W error -m pytest tests/test_pr_review_merge_scheduler.py -q→ 343 passedgit diff --check fb552daf65eb8fd198b2a4d7641d6e809f5b4d6d..d739e0d8d6285261da0a2f530181a929f19a202dThe new live-mutation branches are exercised by the eight entrypoint scenarios. A standalone whole-module coverage run remains 99.04% because of inherited uncovered lines outside this delta; no 100% whole-module claim is made.
Stack and authority
fix/scheduler-skip-central-target-inventory@9293c779b9634859acf7a311be4dba1be8b83008