Skip to content

ci: trust same-head OpenCode review OID - #458

Merged
seonghobae merged 2 commits into
developfrom
codex/current-head-review-oid
Jun 25, 2026
Merged

ci: trust same-head OpenCode review OID#458
seonghobae merged 2 commits into
developfrom
codex/current-head-review-oid

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Summary

  • Treat an OpenCode review attached to the exact PR head commit OID as current-head approval.
  • Remove the committedDate/submittedAt ordering check that caused false negatives when Git commit metadata had a later timestamp.
  • Keep old-head reviews blocked by OID mismatch and keep conflict PRs on the conflict repair guide path.

Evidence

Validation

  • python3 scripts/ci/pr_review_merge_scheduler.py --self-test
  • python3 -m py_compile scripts/ci/pr_review_merge_scheduler.py
  • python3 scripts/ci/pr_review_merge_scheduler.py --repo ContextualWisdomLab/bandscope --base-branch develop --project-flow git-flow --dry-run --no-trigger-reviews --enable-auto-merge --update-branches --max-prs 100
  • git diff --check

Copilot AI review requested due to automatic review settings June 25, 2026 17:13

Copilot AI 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.

Pull request overview

Adjusts the CI PR review/merge scheduler so an OpenCode “APPROVED” review attached to the exact current PR head commit OID is treated as current-head approval, eliminating false negatives caused by relying on Git timestamps.

Changes:

  • Simplifies current-head review validation to an OID equality check (review.commit.oid == headRefOid).
  • Removes the committedDate/submittedAt ordering-based staleness logic and the related auto-merge disable branch.
  • Updates self_test() expectations to reflect the new approval semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/ci/pr_review_merge_scheduler.py
@opencode-agent

opencode-agent Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 99c9b98bfef9f8c25ed0faa10032f86f5f077b24
  • Workflow run: 28189055131
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

Pull request overview

Reviewed workflow files and dependencies; no issues detected.

Findings

No blocking findings from OpenCode's independent review.

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: completed before approval; if structural exploration, changed-file inspection, or evidence completeness is missing, OpenCode must not approve.
  • Result: APPROVE
  • Reason: No source-backed blockers found and structural exploration completed.

Gate evidence

  • Head SHA: 99c9b98bfef9f8c25ed0faa10032f86f5f077b24
  • Workflow run: 28189055131
  • Workflow attempt: 1

@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.

OpenCode reviewed the current-head evidence but found unresolved human review threads before approval.

  • Problem: OpenCode reached an APPROVE control result, but the approval step found unresolved, non-outdated human review thread evidence on the current pull request.
  • Root cause: Human review feedback can arrive after bounded model evidence is prepared, so the approval step must re-query GitHub immediately before publishing an approval.
  • Fix: Address or resolve the listed human review thread(s), then re-run OpenCode on the current head.
  • Regression test: Keep the approval gate querying reviewThreads(first: 100) after model output and before create_pull_review APPROVE.

Review thread evidence

Latest unresolved human review thread evidence

scripts/ci/pr_review_merge_scheduler.py line 329

  • Latest human comment: @copilot-pull-request-reviewer at 2026-06-25T17:16:54Z

  • Comment URL: #458 (comment)

  • Comment excerpt: This PR removes the timestamp-based staleness helpers/messages (e.g. stale_current_head_review_reason, review_submitted_datetime(review), and the submitted_at > head_time / "does not postdate" text). The supply-chain policy test services/analysis-engine/tests/test_supply_chain_policy.py currently asserts those exact strings exist in this file (around lines 5015–5023), so CI will fail unless that test is updated to match the new OID-only contract. Also, after removing the timestamp comparison logic, the GraphQL commits(last: 1) { ... committedDate ... } fields appear unused by the sch

  • Result: REQUEST_CHANGES

  • Reason: unresolved human review thread(s) were present before approval.

  • Head SHA: 99c9b98bfef9f8c25ed0faa10032f86f5f077b24

  • Workflow run: 28187945340

  • Workflow attempt: 1

@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

Reviewed workflow files and dependencies; no issues detected.

Findings

No blocking findings from OpenCode's independent review.

Verification

  • Review source: independent OpenCode review of the current checkout, focused changed hunks, and current-head GitHub Check evidence.
  • Structural exploration: completed before approval; if structural exploration, changed-file inspection, or evidence completeness is missing, OpenCode must not approve.
  • Result: APPROVE
  • Reason: No source-backed blockers found and structural exploration completed.

Gate evidence

  • Head SHA: 99c9b98bfef9f8c25ed0faa10032f86f5f077b24
  • Workflow run: 28189055131
  • Workflow attempt: 1

@seonghobae
seonghobae merged commit 7f22920 into develop Jun 25, 2026
26 checks passed
@seonghobae
seonghobae deleted the codex/current-head-review-oid branch June 25, 2026 17:55
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.

2 participants