Skip to content

🧪 pr_review_merge_scheduler의 gh_graphql 단위 테스트 추가 - #111

Closed
seonghobae wants to merge 3 commits into
mainfrom
jules-6563421215456541166-bdc02f53
Closed

🧪 pr_review_merge_scheduler의 gh_graphql 단위 테스트 추가#111
seonghobae wants to merge 3 commits into
mainfrom
jules-6563421215456541166-bdc02f53

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

🎯 What:scripts/ci/pr_review_merge_scheduler.py 파일의 gh_graphql 함수가 GitHub CLI 명령을 올바르게 구성하고 실행하는지 확인하는 단위 테스트가 누락되어 있었습니다. 이를 해결하기 위해 self_test() 함수 내에 모킹 로직을 활용한 테스트를 추가했습니다.

📊 Coverage:gh_graphql 함수가 매개변수를 올바르게 구문 분석하여 -f-F 플래그로 매핑하고, 쿼리 문자열을 stdin으로 전달하며, 모킹된 JSON 반환값을 정확히 파싱하는지 확인하는 시나리오가 이제 테스트에 포함됩니다.

Result: 코드베이스의 핵심 GraphQL API 호출 기능에 대한 테스트 신뢰성이 크게 향상되었으며, 향후 발생할 수 있는 잠재적인 인자 처리 버그를 방지할 수 있습니다.


PR created automatically by Jules for task 6563421215456541166 started by @seonghobae

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@opencode-agentopencode-agentBot 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 evidence but cannot approve because required coverage evidence did not pass.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The OpenCode approval path reached an APPROVE control result while the separate coverage-evidence job result was failure.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763.

  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763

  • Workflow run: 28348992582

  • Workflow attempt: 2

Coverage evidence

Coverage Evidence

  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763
  • Coverage policy: current-head test coverage and docstring coverage must prove 100% before automated approval.
  • Approval policy: missing, partial, unavailable, failed, or below-100% coverage evidence is blocking.

Python test coverage

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/runner/work/.github/.github
configfile: pyproject.toml
collected 0 items
============================ no tests ran in 0.02s =============================
/home/runner/.local/lib/python3.12/site-packages/coverage/control.py:956: CoverageWarning: No data was collected. (no-data-collected); see https://coverage.readthedocs.io/en/7.14.2/messages.html#warning-no-data-collected
self._warn("No data was collected.", slug="no-data-collected")
  • Result: FAIL (exit 5)

Python coverage report

No data to report.
  • Result: FAIL (exit 1)

Python docstring coverage

RESULT: FAILED (minimum: 100.0%, actual: 24.1%)
  • Result: FAIL (exit 1)

Coverage Decision

  • Result: FAIL
  • Test coverage: not proven 100%
  • Docstring coverage: not proven 100%
  • Failure count: 3

Change Flow DAG

flowchart LR
Evidence["OpenCode evidence"] --> Review["Current PR review path"]
Review --> Verify["Required checks"]
Loading

@opencode-agent

opencode-agentBot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 7bf90a65878d80495cc58ca0a58a32010255a77a
  • Workflow run: 28515422788
  • Workflow attempt: 2
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch jules-6563421215456541166-bdc02f53 cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into jules-6563421215456541166-bdc02f53, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 111 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files># merge path: git commit# rebase path: git rebase --continue
git push origin HEAD:jules-6563421215456541166-bdc02f53
# rebase path only: git push --force-with-lease origin HEAD:jules-6563421215456541166-bdc02f53
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 7bf90a65878d80495cc58ca0a58a32010255a77a
  • Workflow run: 28515422788
  • Workflow attempt: 2

Changed-File Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: jules-6563421215456541166-bdc02f53
  • Fix direction: merge or rebase origin/main into jules-6563421215456541166-bdc02f53, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 111 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files># merge path: git commit# rebase path: git rebase --continue
git push origin HEAD:jules-6563421215456541166-bdc02f53
# rebase path only: git push --force-with-lease origin HEAD:jules-6563421215456541166-bdc02f53

@seonghobae

Copy link
Copy Markdown
ContributorAuthor

OpenCode Review Overview

  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763
  • Workflow run: 28348992582
  • Workflow attempt: 2
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head evidence but cannot approve because required coverage evidence did not pass.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The OpenCode approval path reached an APPROVE control result while the separate coverage-evidence job result was failure.
  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.
  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE.
  • Result: REQUEST_CHANGES
  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763.
  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763
  • Workflow run: 28348992582
  • Workflow attempt: 2

Coverage evidence

Coverage Evidence

  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763
  • Coverage policy: current-head test coverage and docstring coverage must prove 100% before automated approval.
  • Approval policy: missing, partial, unavailable, failed, or below-100% coverage evidence is blocking.

Python test coverage

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/runner/work/.github/.github
configfile: pyproject.toml
collected 0 items
============================ no tests ran in 0.02s =============================
/home/runner/.local/lib/python3.12/site-packages/coverage/control.py:956: CoverageWarning: No data was collected. (no-data-collected); see https://coverage.readthedocs.io/en/7.14.2/messages.html#warning-no-data-collected
self._warn("No data was collected.", slug="no-data-collected")
  • Result: FAIL (exit 5)

Python coverage report

No data to report.
  • Result: FAIL (exit 1)

Python docstring coverage

RESULT: FAILED (minimum: 100.0%, actual: 24.1%)
  • Result: FAIL (exit 1)

Coverage Decision

  • Result: FAIL
  • Test coverage: not proven 100%
  • Docstring coverage: not proven 100%
  • Failure count: 3

Change Flow DAG

flowchart LR
Evidence["OpenCode evidence"] --> Review["Current PR review path"]
Review --> Verify["Required checks"]
Loading

@copilot 고칩시다.

CopilotAI review requested due to automatic review settings July 1, 2026 11:50
@seonghobae
seonghobae removed the request for review from CopilotJuly 1, 2026 11:50
CopilotAI review requested due to automatic review settings July 1, 2026 11:51
@seonghobae
seonghobae removed the request for review from CopilotJuly 1, 2026 11:51

CopilotAI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 92cfbe68917ec7a4e2a711d857b73aa3fa5bd763
  • Workflow run: 28348992582
    ...

수정했습니다.

  • Decision 클래스를 포함한 모든 함수/클래스에 docstring 추가 → 100% docstring coverage
  • tests/test_pr_review_merge_scheduler.pytests/test_opencode_review_normalize_output.py 생성 (119개 테스트) → 100% line coverage
  • pyproject.toml 추가 (pytest/coverage/interrogate 설정)

로컬 검증 결과: 119 passed, 100% coverage, 100% docstring coverage

@github-actionsgithub-actionsBot 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 mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch jules-6563421215456541166-bdc02f53 cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into jules-6563421215456541166-bdc02f53, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 111 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files># merge path: git commit# rebase path: git rebase --continue
git push origin HEAD:jules-6563421215456541166-bdc02f53
# rebase path only: git push --force-with-lease origin HEAD:jules-6563421215456541166-bdc02f53
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 7bf90a65878d80495cc58ca0a58a32010255a77a
  • Workflow run: 28515422788
  • Workflow attempt: 2

Changed-File Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading

@seonghobae

Copy link
Copy Markdown
ContributorAuthor

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch jules-6563421215456541166-bdc02f53 cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into jules-6563421215456541166-bdc02f53, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 111 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files># merge path: git commit# rebase path: git rebase --continue
git push origin HEAD:jules-6563421215456541166-bdc02f53
# rebase path only: git push --force-with-lease origin HEAD:jules-6563421215456541166-bdc02f53
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 7bf90a65878d80495cc58ca0a58a32010255a77a
  • Workflow run: 28515422788
  • Workflow attempt: 2

Changed-File Evidence Map

flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> Conflict["Merge conflict blocks this path"]
Conflict --> V1["required checks"]
Evidence --> S2["CI script (4 files)"]
S2 --> I2["review and security gate shell path"]
I2 --> Conflict["Merge conflict blocks this path"]
Conflict --> V2["bash -n plus Strix self-test"]
Evidence --> S3["Test (6 files)"]
S3 --> I3["regression suite"]
I3 --> Conflict["Merge conflict blocks this path"]
Conflict --> V3["targeted test run"]
Loading

@copilot 해결합시다

@seonghobae

Copy link
Copy Markdown
ContributorAuthor

Closing during org-wide PR backlog reduction. This looks like a low-priority automated maintenance PR (test coverage only), while the repository has a large backlog of security, conflict, and required-workflow work. Reopen or recreate a fresh PR if this change is still needed.

Sign up for freeto 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

@seonghobae