Skip to content

fix(governance): supersede stale review decisions safely - #1438

Draft
seonghobae wants to merge 8 commits into
developfrom
fix/current-head-governance-evidence
Draft

seonghobae wants to merge 8 commits into
developfrom
fix/current-head-governance-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Current exact authority

This PR owns Naruon's PR-governance metadata interpretation: stale aggregate review decisions may be superseded only by qualifying current-head evidence, while current-head requested changes, unreadable review metadata, pending evidence, and required-check failures remain blocking. It does not dismiss reviews or add a merge bypass.

  • protected develop: 042b0c70531b229af3acbd0421a2f23098d848b3
  • exact head: 899493fae44a50648faa0ecaa6e7095b94037833
  • ancestry: ahead-only, ahead_by=8, behind_by=0, merge base = current protected develop
  • effective delta: 6 files — changelog, ADR, merge-gate policy, doctoring, governance script, executable shell regression
  • lifecycle: Draft / mergeable / exact-head hosted evidence non-terminal

The prior body described 5cc9ca33... as diverged and needing another protected-base adoption. That state is stale: the current head already contains develop@042b0c... as its merge base with no behind commits. Do not create another gratuitous restack or no-op requeue.

Contract preserved

  • distinguish stale aggregate reviewDecision from current-head CHANGES_REQUESTED;
  • supersede stale requests only through qualifying exact-head CodeRabbit/OpenCode evidence;
  • never supersede current-head requests, unreadable metadata, pending robot evidence, or required-check failures;
  • use each reviewer's latest relevant state;
  • no review dismissal, admin merge, self-approval, synthetic check, or gate weakening;
  • keep ADR, merge-gate policy, doctoring, changelog, and shell regression aligned.

Current evidence boundary

Exact-head repository runs currently include Bandit terminal-success, while Application CI is in progress and Security Scan, Semgrep, CodeQL PR, and Docker are queued. Historical shell/local evidence is development evidence only. Keep Draft until one unchanged head has all then-live repository/organization required checks terminal-success, zero actionable current-head findings/threads, and qualifying independent post-last-push approval. No close-as-cleanup, force push, destructive rebase, self-approval, bypass/admin merge, dummy requeue, or predecessor-evidence transfer.

@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 00:10
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8db8c6fa-d85e-4f8a-9570-99dd50f96d68

📥 Commits

Reviewing files that changed from the base of the PR and between 767bbd4 and 4ccee12.

📒 Files selected for processing (3)
  • docs/adr/0006-current-head-review-evidence.md
  • scripts/ci/pr_governance_gate.sh
  • scripts/ci/test_pr_governance_gate.sh

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


📝 Walkthrough

Walkthrough

The protected merge gate evaluates review requests against the current pull request head. Current-head requests remain blocking, while stale aggregate requests can be superseded by valid exact-head robot evidence. Documentation and tests define and verify this behavior.

Changes

Current-head review evidence

Layer / File(s) Summary
Review policy and decision contract
docs/adr/0006-current-head-review-evidence.md, docs/development/merge-gate-policy.md, docs/doctoring/pr-governance-current-head-review-evidence.md, CHANGELOG.md
Documents current-head review blockers, stale aggregate supersession, failure handling, and operational constraints.
Deferred review-decision evaluation
scripts/ci/pr_governance_gate.sh
Tracks qualifying current-head robot evidence and defers CHANGES_REQUESTED handling until review metadata is available.
Scenario coverage and test harness
scripts/ci/test_pr_governance_gate.sh
Adds stale and current-head review scenarios and verifies supersession, blocking, marker comments, and merge outcomes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 4ccee

The PR changes how stale review decisions are superseded, but its regression coverage does not exercise an actual stale CHANGES_REQUESTED review. That leaves a concrete correctness gap, so merge should wait for this test case to be added.

Sequence Diagram(s)

sequenceDiagram
  participant MergeGate
  participant GitHubReviews
  participant RobotEvidence
  MergeGate->>RobotEvidence: Evaluate exact-head OpenCode and CodeRabbit evidence
  MergeGate->>GitHubReviews: Fetch review metadata and commit_id values
  GitHubReviews-->>MergeGate: Return review metadata
  MergeGate->>MergeGate: Block current-head requests or supersede stale requests
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: safely superseding stale review decisions in governance checks.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/current-head-governance-evidence

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae force-pushed the fix/current-head-governance-evidence branch from 2e7b086 to c9abd79 Compare August 21, 2026 00:12
coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae force-pushed the fix/current-head-governance-evidence branch from fbbf7dd to a9f9b1e Compare August 21, 2026 01:11
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for df1e5a8f2530c8da923de7d1010308cbf0cf1bc3:

  • Review decision is CHANGES_REQUESTED; address requested changes before merge.
  • 2 unresolved current review thread(s) remain.
  • Current-head CodeRabbit issue comment has blocking warning/failure evidence on df1e5a8.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review Please review the exact current head a9f9b1e. Re-evaluate governance evidence only for this head and supersede stale requested changes from prior heads.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will review pull request #1438 at a9f9b1e09a1333697b7bd73eda294818872f7f40.

I will evaluate governance evidence only for this head. I will treat requested changes from earlier heads as stale evidence unless current-head review metadata or required checks still block the merge.

⚠️ Action not completed

Review rate limited.

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.

@seonghobae

seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head a9f9b1e. Verify stale CHANGES_REQUESTED supersession is bounded by exact-head robot evidence, current-head requested changes still block, and all current-head Checks are verified. Publish structured adversarial evidence only.

@seonghobae

seonghobae commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

PR governance metadata gate is not ready for 5cc9ca3348575931b5d2ec35d1277436d1eece63:

  • Required check strix is FAILURE on the current head.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will review PR #1438 at a9f9b1e09a1333697b7bd73eda294818872f7f40.

I will evaluate current-head governance evidence. I will treat requested changes from earlier heads as stale unless current-head review metadata or required checks block the merge.

⚠️ Action not completed

Review rate limited.

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.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will review PR #1438 at dc1155a26bbbad97797ca89059b78377bdec0950.

I will evaluate governance evidence for this head. I will treat requested changes from older heads as stale only when valid exact-head robot evidence supersedes them. I will verify that current-head requested changes and required-check failures still block the merge.

⚠️ Action not completed

Review rate limited.

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will review PR #1438 at dc1155a26bbbad97797ca89059b78377bdec0950.

I will evaluate only exact-head governance evidence. I will treat prior-head CHANGES_REQUESTED reviews as stale only when valid exact-head robot evidence supersedes them. I will verify that current-head requested changes and required-check failures remain blocking.

⚠️ Action not completed

Review rate limited.

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.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
pr="1438"
head="dc1155a26bbbad97797ca89059b78377bdec0950"

printf '%s\n' '== Checked-out and pull-request head identity =='
git rev-parse HEAD
gh pr view "$pr" --repo "$repo" --json number,headRefOid,reviewDecision,mergeStateStatus,statusCheckRollup \
  --jq '{number,headRefOid,reviewDecision,mergeStateStatus,statusCheckRollup: [.statusCheckRollup[] | {name,conclusion,status,workflowName}]}'

printf '%s\n' '== Commit identity =='
git show -s --format='%H%n%P%n%s' "$head"

printf '%s\n' '== Changed paths and diff =='
git diff --name-status "${head}^" "$head"
git diff --check "${head}^" "$head"
git diff --unified=80 "${head}^" "$head" -- scripts/ci/pr_governance_gate.sh scripts/ci/test_pr_governance_gate.sh

printf '%s\n' '== Static structure and relevant gate/test excerpts =='
ast-grep outline scripts/ci/pr_governance_gate.sh --items all
ast-grep outline scripts/ci/test_pr_governance_gate.sh --items all
rg -n -C 12 'CURRENT_ROBOT_REVIEW_READY|CHANGES_REQUESTED|commit_id|OpenCode|CodeRabbit|reviewDecision' \
  scripts/ci/pr_governance_gate.sh scripts/ci/test_pr_governance_gate.sh

printf '%s\n' '== Exact-head pull-request review evidence =='
gh api "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
  --jq --arg head "$head" \
  '[.[] | {id,user:.user.login,state,commit_id,submitted_at} | select(.commit_id == $head)]'

printf '%s\n' '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,details_url}]'

printf '%s\n' '== Unresolved non-outdated review threads =='
gh api graphql \
  -F owner="ContextualWisdomLab" \
  -F name="naruon" \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes { isResolved isOutdated }
      }
    }
  }
}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .isOutdated == false)] | length'

Length of output: 84149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
pr="1438"
head="dc1155a26bbbad97797ca89059b78377bdec0950"

printf '%s\n' '== Exact-head review objects =='
gh api "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
  --jq "[.[] | {id, user: .user.login, state, commit_id, submitted_at} | select(.commit_id == \"${head}\")]"

printf '%s\n' '== Non-current requested-change review objects =='
gh api "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
  --jq "[.[] | {id, user: .user.login, state, commit_id, submitted_at} | select(.state == \"CHANGES_REQUESTED\" and .commit_id != \"${head}\")]"

printf '%s\n' '== Exact-head check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name, status, conclusion, app: .app.slug}]'

printf '%s\n' '== Exact-head combined commit status =='
gh api "repos/${repo}/commits/${head}/status" \
  --jq '{state, statuses: [.statuses[] | {context, state, updated_at}]}'

printf '%s\n' '== Unresolved, non-outdated review-thread count =='
gh api graphql \
  -F owner="ContextualWisdomLab" \
  -F name="naruon" \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes { isResolved isOutdated }
      }
    }
  }
}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .isOutdated == false)] | length'

printf '%s\n' '== Branch-protection requirement sources =='
gh api "repos/${repo}/branches/main/protection/required_status_checks" \
  --jq '{strict, contexts, checks}' || true

Length of output: 5874


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
pr="1438"
head="dc1155a26bbbad97797ca89059b78377bdec0950"

printf '%s\n' '== Unresolved non-outdated review threads =='
gh api graphql \
  -F owner="ContextualWisdomLab" \
  -F name="naruon" \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          id
          isResolved
          isOutdated
          path
          line
          originalLine
          comments(first: 20) {
            nodes {
              author { login }
              commit { oid }
              originalCommit { oid }
              body
              createdAt
            }
          }
        }
      }
    }
  }
}' \
  --jq --arg head "$head" '
    [.data.repository.pullRequest.reviewThreads.nodes[]
      | select(.isResolved == false and .isOutdated == false)
      | {
          path,
          line,
          originalLine,
          comments: [
            .comments.nodes[] | {
              author: .author.login,
              commit: .commit.oid,
              originalCommit: .originalCommit.oid,
              createdAt,
              body
            }
          ]
        }
    ]'

printf '%s\n' '== Current-head review comments =='
gh api "repos/${repo}/pulls/${pr}/comments?per_page=100" \
  --jq --arg head "$head" \
  '[.[] | select(.commit_id == $head or .original_commit_id == $head)
    | {id, user: .user.login, commit_id, original_commit_id, path, line, body}]'

printf '%s\n' '== Current-head issue comments with blocking terms =='
gh api "repos/${repo}/issues/${pr}/comments?per_page=100" \
  --jq --arg head "$head" '
    [.[] | select((.body | contains($head))
      and (.body | test("pre[- ]merge|blocking|failure|failed|warning|potential issue|actionable comment"; "i")))
      | {id, user: .user.login, created_at, body}]'

Length of output: 2352


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
pr="1438"
head="dc1155a26bbbad97797ca89059b78377bdec0950"

printf '%s\n' '== Unresolved non-outdated review threads =='
gh api graphql \
  -F owner="ContextualWisdomLab" \
  -F name="naruon" \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          isResolved
          isOutdated
          path
          line
          originalLine
          comments(first: 20) {
            nodes {
              author { login }
              commit { oid }
              originalCommit { oid }
              body
            }
          }
        }
      }
    }
  }
}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[]
    | select(.isResolved == false and .isOutdated == false)
    | {
        path,
        line,
        originalLine,
        comments: [
          .comments.nodes[] | {
            author: .author.login,
            commit: .commit.oid,
            originalCommit: .originalCommit.oid,
            body
          }
        ]
      }]'

printf '%s\n' '== Current-head review comments =='
gh api "repos/${repo}/pulls/${pr}/comments?per_page=100" \
  --jq "[.[] | select(.commit_id == \"${head}\" or .original_commit_id == \"${head}\")
    | {id, user: .user.login, commit_id, original_commit_id, path, line, body}]"

printf '%s\n' '== Current-head blocking issue comments =='
gh api "repos/${repo}/issues/${pr}/comments?per_page=100" \
  --jq "[.[] | select((.body | contains(\"${head}\"))
      and (.body | test(\"pre[- ]merge|blocking|failure|failed|warning|potential issue|actionable comment\"; \"i\")))
      | {id, user: .user.login, created_at, body}]"

Length of output: 41564


@seonghobae Review completed for exact head dc1155a26bbbad97797ca89059b78377bdec0950.

I found no new defect in the stale-review supersession logic.

  • The only CHANGES_REQUESTED review is on prior head 767bbd43ef39a3406445934a137d677f4c070640.
  • No CHANGES_REQUESTED review targets the current head.
  • The current head has a successful CodeRabbit commit status.
  • CURRENT_ROBOT_REVIEW_READY=true exists in the exact-head OpenCode fallback branch at Line 386.
  • The gate blocks current-head requested changes and unreadable review metadata.
  • The gate permits stale aggregate supersession only when current-head robot evidence is ready.
  • The regression fixture now includes a stale requested-change review with an exact-head OpenCode approval.

The earlier Devin fallback-flag observation is not valid for this source. The current source sets the readiness flag in the OpenCode fallback path.

The PR is not ready for a protected merge yet:

  • GitHub reports five unresolved, non-outdated review threads.
  • Many current-head GitHub Actions checks remain queued.
  • Required-check configuration could not be read because the integration lacks branch-protection access.

No approval is issued while these current-head merge conditions remain unresolved.

You are interacting with an AI system.

@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 16:07

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Open in Devin Review

Comment thread scripts/ci/pr_governance_gate.sh
Comment thread scripts/ci/pr_governance_gate.sh Outdated
@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 17:06
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review review only exact current head 4ccee12 of PR #1438 against base develop@81c105645ca6e680f5f8c15ba9c33b67eb63c48b. Recheck the complete current diff, current review threads, current hosted Checks, and any stale aggregate review decision. Publish structured exact-head verdicts; do not merge, update branch, dismiss reviews, bypass protection, or reuse predecessor evidence.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
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 The title clearly and concisely describes the main change: safely superseding stale governance review decisions.

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

Lifecycle repair on exact head 5cc9ca3348575931b5d2ec35d1277436d1eece63: converted this historical governance lane back to Draft after re-reading the current effective protection.

The valid part is distinguishing stale aggregate review state from an exact-current-head human review. The branch must not, however, make passing CodeRabbit/OpenCode evidence look like authority to supersede a review decision in the merge gate. Current effective rules are stronger and explicit: organization ruleset CWL Central required workflows is active; repository ruleset Lock default branch is active; protected develop requires the current required contexts, and the live operator-policy lane #1544 records one qualifying approval after the last push plus thread resolution as the effective merge boundary. Automated/model review remains evidence, not formal human approval authority.

This PR also carries an old base identity (e5e99b4e...) while protected develop is now 042b0c70531b229af3acbd0421a2f23098d848b3. Keep the useful stale-review classification idea alive, but reconcile it only after #1544/current governance authority stabilizes: stale aggregate metadata may be ignored when exact review history proves it stale, while CodeRabbit/OpenCode can supply findings/check evidence but cannot replace the independently required approval. Regenerate tests/checks/reviews on a non-force current-base successor; do not close, self-approve, dismiss reviews to manufacture eligibility, or weaken the live rule.

@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 05:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-05T05:42:58.125036Z 899493f 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 899493fae4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +499 to +500
| map(last)
| map(select((.state // "" | ascii_upcase) == "CHANGES_REQUESTED"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve change requests across later comment reviews

When a reviewer requests changes on the current head and later submits a COMMENTED review, the unconditional map(last) treats the comment as the reviewer's effective decision even though a comment does not clear the requested changes. With passing current-head CodeRabbit evidence, CURRENT_CHANGES_REQUESTED_COUNT becomes zero and the governance check can incorrectly publish success. Ignore non-decision states such as COMMENTED when selecting each reviewer's latest effective state, and add this sequence to bash scripts/ci/test_pr_governance_gate.sh.

AGENTS.md reference: AGENTS.md:L190-L194

Useful? React with 👍 / 👎.

Comment on lines +508 to +509
else
printf 'Stale CHANGES_REQUESTED review decision is superseded by current-head robot evidence on %s.\n' "$HEAD_REF_OID"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require robot evidence to postdate stale review requests

When a pending review is started on an older commit but submitted after the current-head CodeRabbit/OpenCode run has already passed, its commit_id is stale while its submitted_at is newer than the robot evidence. The boolean CURRENT_ROBOT_REVIEW_READY loses that ordering, so this branch treats the older robot result as superseding the newer CHANGES_REQUESTED review and can publish a successful governance check. Retain evidence timestamps and supersede a stale request only when qualifying robot evidence was produced afterward; cover this ordering in bash scripts/ci/test_pr_governance_gate.sh.

AGENTS.md reference: AGENTS.md:L190-L194

Useful? React with 👍 / 👎.

Comment on lines +493 to +495
| ..
| objects
| select(has("state") and has("commit_id"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fail closed when review metadata cannot prove stale requests

When GitHub reports aggregate CHANGES_REQUESTED but the reviews endpoint returns an empty array or a requested review with a missing/null commit_id, this filter silently produces no current request. A passing robot check then reaches the supersession branch even though the response never proved that every requested review belongs to an older commit. Validate that the aggregate decision can be reconciled with at least one well-formed requested review, otherwise add a metadata blocker; add empty and null-commit_id fixtures to bash scripts/ci/test_pr_governance_gate.sh.

AGENTS.md reference: AGENTS.md:L190-L194

Useful? React with 👍 / 👎.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 10:08
@seonghobae seonghobae added the bug Something isn't working label Sep 7, 2026 — with ChatGPT Codex Connector
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 status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant