Skip to content

test: add scheduler decision contract fixtures - #60

Merged
github-actions[bot] merged 1 commit into
mainfrom
codex/scheduler-update-branch-fixtures
Jun 25, 2026
Merged

test: add scheduler decision contract fixtures#60
github-actions[bot] merged 1 commit into
mainfrom
codex/scheduler-update-branch-fixtures

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • add a machine-readable pr-review-merge-scheduler/v1 decision payload with per-PR contract_decision values
  • keep conflict/tool/policy failures out of false REQUEST_CHANGES; only current-head OpenCode changes-requested maps to REQUEST_CHANGES
  • add safe fixtures for update-branch 403 and stale expected_head_sha 422, proving both stay as action_error while later PRs are still inspected
  • update the governance audit to record the JSON contract and fixture coverage

Live scan note

A fresh dry-run across public non-fork repos found no current update_branch candidate. Current merge-ready candidates remain naruon #760 and scopeweave #127, both requiring the repo-level contents-write merge policy exception if GitHub Actions is to perform merge/auto-merge.

Validation

  • git diff --check
  • python3 scripts/ci/pr_review_merge_scheduler.py --self-test
  • PYTHONPATH=$PWD pytest -q tests/test_pr_review_merge_scheduler.py tests/test_opencode_review_normalize_output.py
  • coverage erase && PYTHONPATH=$PWD coverage run -m pytest tests/test_pr_review_merge_scheduler.py tests/test_opencode_review_normalize_output.py && coverage report --fail-under=100 scripts/ci/pr_review_merge_scheduler.py scripts/ci/opencode_review_normalize_output.py
  • python3 scripts/ci/pr_review_merge_scheduler.py --repo ContextualWisdomLab/hyosung-itx-slogan-brief --base-branch main --project-flow github-flow --dry-run --max-prs 5 --no-trigger-reviews --no-enable-auto-merge | tail -n 1

Copilot AI review requested due to automatic review settings June 25, 2026 06:46

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

This PR extends the PR review merge scheduler to emit a stable, machine-readable decision contract (pr-review-merge-scheduler/v1) alongside its existing human-readable output, and adds fixtures ensuring update-branch permission/stale-head failures are recorded as action_error without aborting queue scanning.

Changes:

  • Add contract_decision() and decision_payload() to produce a bounded per-PR contract_decision and include it in the emitted JSON payload.
  • Update and expand unit tests to validate the new JSON schema and to fixture update-branch 403 and 422 expected_head_sha failures while continuing to inspect later PRs.
  • Update governance audit documentation to reflect the new JSON contract and fixture coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/test_pr_review_merge_scheduler.py Updates assertions for the new JSON contract and adds fixtures for update-branch 403/422 action-error handling while continuing scans.
scripts/ci/pr_review_merge_scheduler.py Introduces the pr-review-merge-scheduler/v1 JSON decision payload and bounded contract_decision mapping, and prints it from print_summary().
PR_GOVERNANCE_AUDIT.md Documents the emitted JSON contract and notes the new fixture coverage for update-branch failure modes.

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

@opencode-agent

opencode-agent Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 2180e27988bf025d80c50c0a6e951bfd8e6a4ee4
  • Workflow run: 28153773896
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

Pull request overview

OpenCode reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Added machine-readable contract fixtures for scheduler decisions. Maintained 100% test/doc coverage. No security issues. Verification: Linter/static: Passed, TDD/regression: Added tests, Coverage: 100%, Docstring coverage: 100%, DAG: Unchanged, PoC/execution: Self-test passed, DDD/domain: Aligned, CDD/context: Consistent, Similar issues: N/A, Claim/concept: Validated, Standards: N/A, Compatibility: Maintained, Breaking-change: None, Performance: Unaffected, Developer experience: Improved, User experience: Clearer status, Security/privacy: Unchanged

Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including PR_GOVERNANCE_AUDIT.md, scripts/ci/pr_review_merge_scheduler.py, tests/test_pr_review_merge_scheduler.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence proves 100% test coverage.
Docstring coverage: coverage execution evidence proves 100% docstring coverage.
DAG: Change Flow DAG maps PR_GOVERNANCE_AUDIT.md through bounded evidence, review risk, and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, and current-head workflow evidence were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions and compatibility surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: changed files did not identify a user-facing UI surface; bounded evidence was reviewed for UX impact.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: No blockers found
  • Head SHA: 2180e27988bf025d80c50c0a6e951bfd8e6a4ee4
  • Workflow run: 28153773896
  • Workflow attempt: 1

Change Flow DAG

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: PR_GOVERNANCE_AUDIT.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: PR_GOVERNANCE_AUDIT.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["CI script: pr_review_merge_scheduler.py"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: pr_review_merge_scheduler.py"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_pr_review_merge_scheduler.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_pr_review_merge_scheduler.py"]
  R3 --> V3["targeted test run"]
Loading

opencode-agent[bot]
opencode-agent Bot previously approved these changes Jun 25, 2026

@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 bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Structural exploration and MCP evidence checks completed. No actionable issues found in the PR changes. Verification posture: Linter/static: Passed, TDD/regression: Not applicable, Coverage: Not applicable, Docstring coverage: Not applicable, DAG: Not applicable, PoC/execution: Not applicable, DDD/domain: Not applicable, CDD/context: Not applicable, Similar issues: Not applicable, Claim/concept check: Not applicable, Standards search: Not applicable, Compatibility/convention: Not applicable, Breaking-change/backcompat: Not applicable, Performance: Not applicable, Developer experience: Improved, User experience: Not applicable, Security/privacy: Not applicable.

Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including PR_GOVERNANCE_AUDIT.md, scripts/ci/pr_review_merge_scheduler.py, tests/test_pr_review_merge_scheduler.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence proves 100% test coverage.
Docstring coverage: coverage execution evidence proves 100% docstring coverage.
DAG: Change Flow DAG maps PR_GOVERNANCE_AUDIT.md through bounded evidence, review risk, and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, and current-head workflow evidence were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions and compatibility surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: changed files did not identify a user-facing UI surface; bounded evidence was reviewed for UX impact.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: No blockers found in the PR changes.
  • Head SHA: b30f06cf3acfa5a293cae8154a2400a61ced0b57
  • Workflow run: 28152536652
  • 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

OpenCode reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Added machine-readable contract fixtures for scheduler decisions. Maintained 100% test/doc coverage. No security issues. Verification: Linter/static: Passed, TDD/regression: Added tests, Coverage: 100%, Docstring coverage: 100%, DAG: Unchanged, PoC/execution: Self-test passed, DDD/domain: Aligned, CDD/context: Consistent, Similar issues: N/A, Claim/concept: Validated, Standards: N/A, Compatibility: Maintained, Breaking-change: None, Performance: Unaffected, Developer experience: Improved, User experience: Clearer status, Security/privacy: Unchanged

Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including PR_GOVERNANCE_AUDIT.md, scripts/ci/pr_review_merge_scheduler.py, tests/test_pr_review_merge_scheduler.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence proves 100% test coverage.
Docstring coverage: coverage execution evidence proves 100% docstring coverage.
DAG: Change Flow DAG maps PR_GOVERNANCE_AUDIT.md through bounded evidence, review risk, and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, and current-head workflow evidence were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions and compatibility surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: changed files did not identify a user-facing UI surface; bounded evidence was reviewed for UX impact.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

  • Result: APPROVE
  • Reason: No blockers found
  • Head SHA: 2180e27988bf025d80c50c0a6e951bfd8e6a4ee4
  • Workflow run: 28153773896
  • Workflow attempt: 1

@github-actions
github-actions Bot merged commit 517809c into main Jun 25, 2026
4 checks passed
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