Skip to content

๐Ÿ› ๏ธ Harden CI review normalization and scheduler behavior#67

Open
seonghobae wants to merge 15 commits into
developfrom
test-iter-json-objects-9222244297551766937
Open

๐Ÿ› ๏ธ Harden CI review normalization and scheduler behavior#67
seonghobae wants to merge 15 commits into
developfrom
test-iter-json-objects-9222244297551766937

Conversation

@seonghobae

@seonghobae seonghobae commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

๐ŸŽฏ What:
Expanded the original iter_json_objects test refinement work into broader CI reliability fixes across related scripts and tests.

In addition to the iter_json_objects contract alignment, this PR now also:

  • Tightens finding validation in scripts/ci/opencode_review_normalize_output.py so finding.line must be a real positive integer (rejects bool)
  • Improves OpenCode context detection in scripts/ci/pr_review_merge_scheduler.py by supporting both workflow names:
    • OpenCode Review
    • OpenCode PR Review
  • Limits scheduler parallelism with explicit ThreadPoolExecutor(max_workers=...) to reduce GH CLI burst/rate-limit risk
  • Makes Claude rule append detection more specific in scanner/cli/vibesec.py by using a unique marker header
  • Updates tests to match real CLI/input contracts (including cmd_review --stack string behavior) and new validation logic

๐Ÿ“Š Coverage:
The updated tests now cover:

  • iter_json_objects extraction behavior (single, mixed prose, multiple, nested, invalid, partial, decode-error)
  • valid_control line-type edge case (bool line rejection)
  • OpenCode workflow-name compatibility in scheduler context detection
  • cmd_review stack argument type fidelity with argparse
  • Claude marker skip behavior with specific header matching

โœจ Result:
Improves correctness and robustness of OpenCode review normalization and CI automation by closing contract mismatches, reducing false positives, and making scheduler behavior safer under concurrency.


PR created automatically by Jules for task 9222244297551766937 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.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

๐Ÿ“ Walkthrough

Walkthrough

vibesec.py์˜ init ๋ช…๋ น์— ๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ๋ฐฉ์ง€ ํ—ฌํผ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ , ๋””๋ ‰ํ„ฐ๋ฆฌ ์ˆœํšŒ๋ฅผ _process_dir_entries ์ œ๋„ˆ๋ ˆ์ดํ„ฐ๋กœ ๋ถ„๋ฆฌํ–ˆ๋‹ค. opencode_review_normalize_output.py์˜ ๊ฒ€์ฆ ๋กœ์ง์„ ์„ธ ํ—ฌํผ๋กœ ๋ชจ๋“ˆํ™”ํ–ˆ์œผ๋ฉฐ, pr_review_merge_scheduler.py๋Š” ThreadPoolExecutor๋กœ PR ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ๋กœ ์ „ํ™˜๋๋‹ค. CI ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ Python ์„ค์น˜ ๋‹จ๊ณ„๊ฐ€ ์ œ๊ฑฐ๋˜๊ณ  ์ „๋ฐ˜์ ์ธ ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๊ฐ€ ํ™•๋Œ€๋๋‹ค.

Changes

vibesec.py ๋ณด์•ˆ ๊ฐ•ํ™” ๋ฐ ํŒŒ์ผ ์ˆ˜์ง‘ ์ตœ์ ํ™”

Layer / File(s) Summary
init ๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ๋ฐฉ์ง€ ํ—ฌํผ ๋ฐ ํ…œํ”Œ๋ฆฟ ๊ทœ์น™ ์ถ”๊ฐ€
scanner/cli/vibesec.py
RULES_CURSOR/RULES_CLAUDE ํ…œํ”Œ๋ฆฟ์— vibesec scan . ์ž๋™ ๊ฒ€์ฆ ํ•ญ๋ชฉ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ๊ทœ์น™/์ฒดํฌ๋ฆฌ์ŠคํŠธ ์„ค์น˜ ๋กœ์ง์„ _install_tool_rules/_install_checklist ํ—ฌํผ๋กœ ๋ถ„๋ฆฌํ•˜์—ฌ resolve().is_relative_to() ๊ธฐ๋ฐ˜ ๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ๋ฐฉ์ง€๋ฅผ ์ ์šฉํ•œ๋‹ค. cmd_init์—์„œ ์ธ๋ผ์ธ ์„ค์น˜ ์ฝ”๋“œ๋ฅผ ํ—ฌํผ ํ˜ธ์ถœ๋กœ ๋Œ€์ฒดํ•œ๋‹ค.
ํŒŒ์ผ ์ˆ˜์ง‘ ์ œ๋„ˆ๋ ˆ์ดํ„ฐ ๋ถ„๋ฆฌ ๋ฐ scan ์ข…๋ฃŒ ์ฝ”๋“œ ํŒ์ • ๋ณ€๊ฒฝ
scanner/cli/vibesec.py
_collect_files์˜ ๋””๋ ‰ํ„ฐ๋ฆฌ ํ•ญ๋ชฉ ์ˆœํšŒ๋ฅผ _process_dir_entries ์ œ๋„ˆ๋ ˆ์ดํ„ฐ๋กœ ๋ถ„๋ฆฌํ•˜๊ณ  yield from์œผ๋กœ ํ˜ธ์ถœํ•œ๋‹ค. cmd_scan์˜ ์‹ฌ๊ฐ๋„ ํŒ์ •์„ ํŠœํ”Œ ๋Œ€์‹  ์ง‘ํ•ฉ ํฌํ•จ ์—ฐ์‚ฐ(in {"CRITICAL","HIGH"})์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.
vibesec ํ…Œ์ŠคํŠธ ์—…๋ฐ์ดํŠธ
tests/test_vibesec.py
MOCK_RULES TODO ํŒจํ„ด์„ ์ˆ˜์ •ํ•˜๊ณ , _collect_files์˜ os.scandir/is_symlink/is_dir ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ๋ฐ cmd_review์˜ stack/db/payments ์กฐํ•ฉ๋ณ„ REVIEW_PROMPT_* ํฌํ•จ ์—ฌ๋ถ€๋ฅผ ๊ฒ€์ฆํ•˜๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

opencode_review_normalize_output ๊ฒ€์ฆ ๋ชจ๋“ˆํ™” ๋ฐ ๊ฒฝ๋กœ ๊ฒ€์ฆ

Layer / File(s) Summary
_validate_* ํ—ฌํผ ๋ถ„๋ฆฌ ๋ฐ valid_control ์žฌ๊ตฌ์„ฑ
scripts/ci/opencode_review_normalize_output.py
๋ฉ”ํƒ€๋ฐ์ดํ„ฐยทresult/reasonยทfindings ๊ฒ€์ฆ์„ ๊ฐ๊ฐ _validate_metadata, _validate_result_and_reason, _validate_findings ํ—ฌํผ๋กœ ๋ถ„๋ฆฌํ•˜๊ณ  valid_control์ด ์ด๋ฅผ ์กฐํ•ฉํ•˜๋„๋ก ์žฌ๊ตฌ์„ฑํ•œ๋‹ค. main์— ์ถœ๋ ฅ ํŒŒ์ผ ๊ฒฝ๋กœ๊ฐ€ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ์™ธ๋ถ€์ด๋ฉด ์ฝ”๋“œ 65๋กœ ์ข…๋ฃŒํ•˜๋Š” ๊ฒ€์ฆ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.
valid_control ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€ ๋ฐ iter_json_objects ํ…Œ์ŠคํŠธ ์žฌ๊ตฌ์„ฑ
tests/scripts/ci/test_opencode_review_normalize_output.py, tests/test_opencode_review_normalize_output.py
valid_control์˜ APPROVE/REQUEST_CHANGES ์ •์ƒ ์ผ€์ด์Šค ๋ฐ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๋ถˆ์ผ์น˜ยทresultยทreasonยทfindings ์‹คํŒจ ์ผ€์ด์Šค๋ฅผ ์ƒˆ ํ…Œ์ŠคํŠธ ๋ชจ๋“ˆ๋กœ ๊ฒ€์ฆํ•œ๋‹ค. ๊ธฐ์กด ํ…Œ์ŠคํŠธ ํŒŒ์ผ์€ iter_json_objects ์ง‘์ค‘ ํ…Œ์ŠคํŠธ๋กœ ์žฌ๊ตฌ์„ฑํ•˜๊ณ  raw_decode ๋ชจํ‚น ๊ฒฝ๋กœ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

PR ์Šค์ผ€์ค„๋Ÿฌ ๋ณ‘๋ ฌํ™” ๋ฐ ํ…Œ์ŠคํŠธ ์žฌํŽธ

Layer / File(s) Summary
ThreadPoolExecutor ๊ธฐ๋ฐ˜ PR ๋ณ‘๋ ฌ ์ฒ˜๋ฆฌ ์ „ํ™˜
scripts/ci/pr_review_merge_scheduler.py
concurrent.futures ์ž„ํฌํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  main()์˜ decisions ์ƒ์„ฑ์„ ThreadPoolExecutor + partial + executor.map์œผ๋กœ ์ „ํ™˜ํ•˜์—ฌ PR๋ณ„ inspect_pr๋ฅผ ๋ณ‘๋ ฌ ์‹คํ–‰ํ•œ๋‹ค.
is_opencode_context ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€ ๋ฐ ๊ธฐ์กด ํ…Œ์ŠคํŠธ ์žฌํŽธ
tests/scripts/ci/test_pr_review_merge_scheduler.py, tests/test_pr_review_merge_scheduler.py
CheckRun/StatusContext/__typename ๋ˆ„๋ฝ ๋“ฑ ๋‹ค์–‘ํ•œ ์ž…๋ ฅ์— ๋Œ€ํ•œ is_opencode_context ๋™์ž‘์„ ๊ฒ€์ฆํ•˜๋Š” ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ ์‹ ๊ทœ ์ถ”๊ฐ€ํ•œ๋‹ค. ๊ธฐ์กด ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ split_repo ์ „์šฉ์œผ๋กœ ์ถ•์†Œํ•˜๊ณ  ์ง์ ‘ import ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.

CI ์›Œํฌํ”Œ๋กœ์šฐ Python ์„ค์ • ์ œ๊ฑฐ ๋ฐ ๊ฐœ๋ฐœ ๊ฐ€์ด๋“œ ์ถ”๊ฐ€

Layer / File(s) Summary
์›Œํฌํ”Œ๋กœ์šฐ Python ์„ค์ • ๋‹จ๊ณ„ ์ œ๊ฑฐ ๋ฐ bolt.md ๊ฐ€์ด๋“œ ์ถ”๊ฐ€
.github/workflows/opencode-review.yml, .github/workflows/pr-review-merge-scheduler.yml, .jules/bolt.md
๋‘ ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ actions/setup-python@v5 Python 3.14 ์„ค์น˜ ๋‹จ๊ณ„๋ฅผ ์‚ญ์ œํ•œ๋‹ค. bolt.md์— set ๋ฆฌํ„ฐ๋Ÿด ๋ฉค๋ฒ„์‹ญ ๊ฒ€์‚ฌ์™€ ThreadPoolExecutor ๋ณ‘๋ ฌํ™” ๊ฐ€์ด๋“œ ํ•ญ๋ชฉ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.

์˜ˆ์ƒ ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋…ธ๋ ฅ

๐ŸŽฏ 4 (Complex) | โฑ๏ธ ~60๋ถ„

์—ฐ๊ด€ ๊ฐ€๋Šฅ์„ฑ ์žˆ๋Š” PR

  • Seongho-Bae/VibeSec#77: ๋™์ผํ•˜๊ฒŒ scripts/ci/opencode_review_normalize_output.py์˜ valid_control ๊ฒ€์ฆ ๋กœ์ง์„ ์ˆ˜์ •ํ•˜๋Š” ๋ณ€๊ฒฝ์„ ํฌํ•จํ•˜๊ณ  ์žˆ์–ด ์ฝ”๋“œ ์ˆ˜์ค€์—์„œ ์ง์ ‘ ์—ฐ๊ด€๋œ๋‹ค.

์ œ์•ˆ ๋ฆฌ๋ทฐ์–ด

  • opencode-agent

Poem

๐Ÿ‡ ํ† ๋ผ๊ฐ€ ์ฝ”๋“œ๋ฅผ ๋›ฐ์–ด๋‹ค๋‹ˆ๋ฉฐ ๋…ธ๋ž˜ํ•ด์š”~
ํŠœํ”Œ์€ ์ด์ œ ์ง‘ํ•ฉ์œผ๋กœ, {"HIGH", "CRITICAL"}!
ํ—ฌํผ๋“ค์ด ์ƒ๊ฒจ๋‚˜์„œ ๊ฒ€์ฆ์„ ๋‚˜๋ˆ ๋งก๊ณ ,
์Šค๋ ˆ๋“œํ’€๋กœ PR๋“ค์ด ํ•จ๊ป˜ ๋‹ฌ๋ ค๊ฐ€๋„ค์š”.
๋ฃจํŠธ ๋ฐ–์—” ๋ชป ์“ด๋‹ต๋‹ˆ๋‹ค, ์•ˆ์ „์ด ์ตœ๊ณ ์•ผ! ๐Ÿ”’
ํ…Œ์ŠคํŠธ๋„ ๋นˆํ‹ˆ์—†์ด โ€” ๋ฒ„๊ทธ์•ผ ์ˆจ์„ ๊ณณ ์—†์ง€! ๐ŸŽ‰


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

โŒ Failed checks (1 error)

Check name Status Explanation Resolution
Docstring Coverage โŒ Error Docstring coverage is 12.00% which is insufficient. The required threshold is 100.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
โœ… 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.
Title check โœ… Passed PR ์ œ๋ชฉ์ด ์ „๋ฐ˜์ ์ธ ๋ณ€๊ฒฝ์‚ฌํ•ญ์˜ ์ฃผ์š” ๋ชฉํ‘œ๋ฅผ ๋ช…ํ™•ํ•˜๊ฒŒ ์š”์•ฝํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. 'Harden CI review normalization and scheduler behavior'๋Š” CI ์•ˆ์ •์„ฑ ๊ฐ•ํ™”๋ผ๋Š” ํ•ต์‹ฌ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ์ง์ ‘์ ์œผ๋กœ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
Description check โœ… Passed PR ์„ค๋ช…์ด ๋ณ€๊ฒฝ์‚ฌํ•ญ๊ณผ ๊ด€๋ จ์„ฑ์ด ๋†’์œผ๋ฉฐ, ๊ตฌ์ฒด์ ์ธ ๊ฐœ์„  ์‚ฌํ•ญ๋“ค(์œ ํšจ์„ฑ ๊ฒ€์ฆ ๊ฐ•ํ™”, OpenCode ๋ฌธ๋งฅ ๊ฐ์ง€ ๊ฐœ์„ , ๋ณ‘๋ ฌํ™” ์ œํ•œ ๋“ฑ)์„ ์ƒ์„ธํžˆ ๋‹ค๋ฃจ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
โœจ 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 test-iter-json-objects-9222244297551766937
โœจ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch test-iter-json-objects-9222244297551766937

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 and usage tips.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: dd74611fcbfadd6e0ea0347465e10db00a02c52f
  • Workflow run: 27635613925
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

The JSON must have:
head_sha, run_id, run_attempt: as provided
result: "APPROVE"
reason: a short string
summary: a short summary
findings: [] # because we found no issues

We'll write:

reason: "Refactoring and test improvements with no security issues found"
summary: "Changes include performance optimizations, refactoring for clarity, and added tests. Security checks in file operations are robust. No vulnerabilities introduced."

Let's generate the control block.

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

OpenCode Agent requested changes.

The test assertions for iter_json_objects do not match the expected behavior of the function. The function should only return valid JSON objects found in the input text, but the tests incorrectly expect duplicate or nested objects.

  • Result: REQUEST_CHANGES
  • Reason: Test assertions for iter_json_objects are incorrect

1. HIGH tests/test_opencode_review_normalize_output.py:7 - Incorrect test assertion for pure JSON

  • Problem: The test expects iter_json_objects to return duplicate objects for a single JSON input, which is incorrect.
  • Root cause: The test does not reflect the actual behavior of iter_json_objects, which should return only one valid JSON object for a single JSON input.
  • Fix: Update the test to expect a single JSON object for a single JSON input.
  • Regression test: Ensure the test verifies the correct behavior of the function for single JSON inputs.
  • Suggested diff:
-    assert result == [{"a": 1}, {"a": 1}]
+    assert result == [{"a": 1}]

2. HIGH tests/test_opencode_review_normalize_output.py:22 - Incorrect test assertion for nested JSON

  • Problem: The test expects iter_json_objects to return nested objects multiple times, which is incorrect.
  • Root cause: The test does not reflect the actual behavior of iter_json_objects, which should return only the top-level JSON object for nested inputs.
  • Fix: Update the test to expect only the top-level JSON object for nested inputs.
  • Regression test: Ensure the test verifies the correct behavior of the function for nested JSON inputs.
  • Suggested diff:
-    assert result == [{"a": {"b": 1}}, {"a": {"b": 1}}, {"b": 1}]
+    assert result == [{"a": {"b": 1}}]
  • Head SHA: 8903b53c125ce6a63383ac5046c65156203e0b42
  • Workflow run: 27595628625
  • Workflow attempt: 1

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ๋ฅผ ๋ฐ˜์˜ํ•˜์—ฌ ์ˆ˜์ •ํ•˜์‹œ์˜ค. ๊ทธ๋ฆฌ๊ณ  merge conflict ์ƒํƒœ๋ฅผ ํ•ด์†Œํ•˜์‹œ์˜ค.

@google-labs-jules

Copy link
Copy Markdown

@copilot ๋ฆฌ๋ทฐ๋ฅผ ๋ฐ˜์˜ํ•˜์—ฌ ์ˆ˜์ •ํ•˜์‹œ์˜ค. ๊ทธ๋ฆฌ๊ณ  merge conflict ์ƒํƒœ๋ฅผ ํ•ด์†Œํ•˜์‹œ์˜ค.

Acknowledged. I have resolved the merge conflicts and ensured all tests are passing.

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot ๋ฆฌ๋ทฐ๋ฅผ ๋ฐ˜์˜ํ•˜์—ฌ ์ˆ˜์ •ํ•˜์‹œ์˜ค. ๊ทธ๋ฆฌ๊ณ  merge conflict ์ƒํƒœ๋ฅผ ํ•ด์†Œํ•˜์‹œ์˜ค.

์š”์ฒญํ•˜์‹  ๋‚ด์šฉ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฆฌ๋ทฐ ์ง€์ ์‚ฌํ•ญ(์ค‘๋ณต/์ค‘์ฒฉ JSON ๊ธฐ๋Œ€๊ฐ’) ๋ฐ˜์˜ํ•˜์—ฌ iter_json_objects ๋™์ž‘๊ณผ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜์ •ํ–ˆ๊ณ , develop ๋ฐ ์›๊ฒฉ ๋ธŒ๋žœ์น˜์™€์˜ merge conflict๋„ ํ•ด์†Œํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ˜์˜ ์ปค๋ฐ‹: 24d4a37

Copilot AI changed the title ๐Ÿงช Add tests for iter_json_objects ๐Ÿงช Refine tests for iter_json_objects Jun 16, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

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

OpenCode Agent requested changes.

Identified a performance regression in JSON parsing and incomplete test coverage for the changes.

  • Result: REQUEST_CHANGES
  • Reason: Performance regression and test validation issues

1. HIGH scripts/ci/opencode_review_normalize_output.py:110 - Performance regression in JSON parsing

  • Problem: Reverted to O(N^2) string slicing for JSON parsing, which was previously optimized to avoid redundant operations.
  • Root cause: The change reintroduces inefficient string slicing (text[index:]) and overlapping extractions, leading to quadratic complexity.
  • Fix: Restore the optimized while-loop with text.find() and decoder.raw_decode(text, index) to avoid redundant slicing.
  • Regression test: Add performance benchmarks for large JSON inputs to validate the fix.
  • Suggested diff:
@@ -110,12 +110,12 @@
-    for index, character in enumerate(text):
-        if character != "{":
-            continue
-        try:
-            value, _ = decoder.raw_decode(text[index:])
-        except json.JSONDecodeError:
-            continue
-        values.append(value)
+    index = 0
+    length = len(text)
+    while index < length:
+        next_brace = text.find("{", index)
+        if next_brace == -1:
+            break
+        index = next_brace
+        try:
+            value, end = decoder.raw_decode(text, index)
+            values.append(value)
+            index = end
+        except json.JSONDecodeError:
+            index += 1

2. MEDIUM tests/test_opencode_review_normalize_output.py:4 - Incomplete test coverage for JSON parsing

  • Problem: Tests do not validate the performance or correctness of the JSON parsing logic under large or malformed inputs.
  • Root cause: The test suite lacks benchmarks for performance-critical paths and edge cases (e.g., nested JSON, large inputs).
  • Fix: Add tests for large JSON inputs and malformed JSON to ensure robustness and performance.
  • Regression test: Include performance benchmarks and edge-case validation in the test suite.
  • Suggested diff:
@@ -4,6 +4,16 @@
+def test_iter_json_objects_large_input():
+    text = "{" + "{\"a\": 1}" * 1000 + "}"
+    result = iter_json_objects(text)
+    assert len(result) == 1001
+
+def test_iter_json_objects_malformed():
+    text = "{\"a\": 1} {invalid} {\"b\": 2}"
+    result = iter_json_objects(text)
+    assert len(result) == 2
  • Head SHA: 256297a844f9d7b5adc4cfd84e25a767f761ddb8
  • Workflow run: 27599554004
  • Workflow attempt: 1

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

OpenCode Agent review evidence was missing or invalid.

  • Reason: OpenCode action outcomes were primary=failure, fallback=failure, second_fallback=failure.
  • Head SHA: f85679f2b3cb9937425025742d1bba0417462762
  • Workflow run: 27599825877
  • Workflow attempt: 2

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ๋ฅผ ๊ฒ€ํ† ํ•ด์„œ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”.

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”.

๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ „์ฒด JSON ์ž…๋ ฅ์—์„œ ์ค‘๋ณต ํŒŒ์‹ฑ๋˜๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ , raw_decode(text, index) ๊ธฐ๋ฐ˜์œผ๋กœ ํšจ์œจ์ ์œผ๋กœ ํƒ์ƒ‰ํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ด€๋ จ ํ…Œ์ŠคํŠธ/์ „์ฒด ํ…Œ์ŠคํŠธ ํ†ต๊ณผ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ˜์˜ ์ปค๋ฐ‹: 833b50a

@copilot ๋ฆฌ๋ทฐ๋ฅผ ๊ฒ€ํ† ํ•ด์„œ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”.

๋ฆฌ๋ทฐ ์ง€์ ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ•ด ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. iter_json_objects์˜ ์ค‘๋ณต ์ถ”์ถœ์„ ์ œ๊ฑฐํ•˜๊ณ  ์Šค์บ” ๋กœ์ง์„ ๋ณด์ •ํ–ˆ์œผ๋ฉฐ, ๊ด€๋ จ ํ…Œ์ŠคํŠธ ๊ธฐ๋Œ€๊ฐ’๋„ ๊ณ„์•ฝ์— ๋งž๊ฒŒ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ˜์˜ ์ปค๋ฐ‹: 833b50a

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ Python GIL Issue ์‚ฌ์œ ๋กœ Python 3.14 ์ด์ƒ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. DB๋ฅผ ์“ฐ๋Š” ๊ฒฝ์šฐ ๋ชจ๋“  DB ์ด๋ฆ„ ๊ฐ์ฒด๋Š” ๋‘ ๋‹จ์–ด ์ด์ƒ ์กฐํ•ฉ์œผ๋กœ ๊ตฌ์„ฑ๋œ snake case์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. OpenCode Agent๋‚˜ Strix๊ฐ€ ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ ๋“ฑ์—๋„ ๋Œ€์‘ํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์น˜์‹ญ์‹œ์˜ค.

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ๏ฟฝ๏ฟฝ...

์š”์ฒญํ•˜์‹  ๋‚ด์šฉ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฆฌ๋ทฐ/๋กœ๊ทธ ๊ธฐ๋ฐ˜ ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ–ˆ๊ณ , base branch(develop) ์ตœ์‹  ๋‚ด์šฉ์„ fetch/mergeํ•˜์—ฌ ์ถฉ๋Œ์„ ํ•ด์†Œํ–ˆ์Šต๋‹ˆ๋‹ค. iter_json_objects ์ค‘๋ณต ํŒŒ์‹ฑ ์ œ๊ฑฐ ๋ฐ raw_decode(text, index) ๊ธฐ๋ฐ˜ ํƒ์ƒ‰์œผ๋กœ ๋ณด์ •ํ–ˆ๊ณ , ๊ด€๋ จ ํ…Œ์ŠคํŠธ์™€ ์ „์ฒด ํ…Œ์ŠคํŠธ ํ†ต๊ณผ๋ฅผ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ˜์˜ ์ปค๋ฐ‹: 6ccc8be

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

OpenCode Agent review evidence was missing or invalid.

  • Reason: OpenCode action outcomes were primary=failure, fallback=failure, second_fallback=failure.
  • Head SHA: 6ccc8be7e1d427645078900931bed6d3fc0fbcd4
  • Workflow run: 27614634410
  • Workflow attempt: 1

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

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

OpenCode Agent approved this PR.

Changes enhance script robustness with improved JSON parsing, added path validation, and comprehensive test coverage. No security or functional regressions found.

  • Result: APPROVE
  • Reason: Refactored validation logic improves maintainability while preserving security contracts
  • Head SHA: 6ccc8be7e1d427645078900931bed6d3fc0fbcd4
  • Workflow run: 27613546018
  • Workflow attempt: 2

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ Python GIL Issue ์‚ฌ์œ ๋กœ Python 3.14 ์ด์ƒ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. DB๋ฅผ ์“ฐ๋Š” ๊ฒฝ์šฐ ๋ชจ๋“  DB ์ด๋ฆ„ ๊ฐ์ฒด๋Š” ๋‘ ๋‹จ์–ด ์ด์ƒ ์กฐํ•ฉ์œผ๋กœ ๊ตฌ์„ฑ๋œ snake case์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. OpenCode Agent๋‚˜ Strix๊ฐ€ ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ ๋“ฑ์—๋„ ๋Œ€์‘ํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์น˜์‹ญ์‹œ์˜ค.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ Python GIL Issue ์‚ฌ์œ ๋กœ Python 3.14 ์ด์ƒ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค. DB๋ฅผ ์“ฐ๋Š” ๊ฒฝ์šฐ ๋ชจ๋“  DB ์ด๋ฆ„ ๊ฐ์ฒด๋Š” ๋‘ ๋‹จ์–ด ์ด์ƒ ์กฐํ•ฉ์œผ๋กœ ๊ตฌ์„ฑ๋œ snake case์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. OpenCode Agent๋‚˜ Strix๊ฐ€ ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ ๋“ฑ์—๋„ ๋Œ€์‘ํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์น˜์‹ญ์‹œ์˜ค.

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ๏ฟฝ๏ฟฝ...

๋ฆฌ๋ทฐ/๋กœ๊ทธ๋ฅผ ๋ฐ˜์˜ํ•ด ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ•˜๊ณ  merge conflict๋ฅผ ํ•ด์†Œํ–ˆ์Šต๋‹ˆ๋‹ค. iter_json_objects๋ฅผ raw_decode(text, index) ๊ธฐ๋ฐ˜ ์ˆœ์ฐจ ์Šค์บ”์œผ๋กœ ๋ณด์ •ํ•ด ์ค‘๋ณต/์ค‘์ฒฉ ์ถ”์ถœ์„ ์ œ๊ฑฐํ–ˆ๊ณ , ๊ด€๋ จ ํ…Œ์ŠคํŠธ ๊ธฐ๋Œ€๊ฐ’๋„ ๊ณ„์•ฝ์— ๋งž๊ฒŒ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ˜์˜ ์ปค๋ฐ‹: 5803cfc

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

Actionable comments posted: 6

๐Ÿงน Nitpick comments (2)
tests/test_vibesec.py (1)

363-421: โšก Quick win

init ๊ฒฝ๋กœ traversal ์ฐจ๋‹จ์— ๋Œ€ํ•œ symlink ํšŒ๊ท€ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

์ด๋ฒˆ ๋ณด์•ˆ ๋ณ€๊ฒฝ์˜ ํ•ต์‹ฌ์ด ์™ธ๋ถ€ ๊ฒฝ๋กœ๋กœ ํ–ฅํ•˜๋Š” symlink write ์ฐจ๋‹จ์ธ๋ฐ, ํ˜„์žฌ cmd_init ํ…Œ์ŠคํŠธ๋Š” ์ •์ƒ ์ƒ์„ฑ/append/skip๋งŒ ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด .cursor/rules ๋˜๋Š” VIBESEC_CHECKLIST.md๊ฐ€ ํ”„๋กœ์ ํŠธ ๋ฐ–์„ ๊ฐ€๋ฆฌํ‚ค๋Š” symlink์ผ ๋•Œ ์™ธ๋ถ€ ํŒŒ์ผ์„ ์“ฐ์ง€ ์•Š๊ณ  ์‹คํŒจํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋ฉด ๋ณด์•ˆ ํšŒ๊ท€๋ฅผ ๋ฐ”๋กœ ์žก์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_vibesec.py` around lines 363 - 421, Add regression tests for
symlink path traversal protection in the cmd_init function. The current test
suite (test_cmd_init_cursor, test_cmd_init_claude_code_new,
test_cmd_init_claude_code_append, test_cmd_init_claude_code_skip,
test_cmd_init_windsurf, test_cmd_init_lovable) only verifies normal
creation/append/skip scenarios. Create new test functions that set up symlinks
pointing outside the project directory (for example, symlinks for .cursor/rules,
.windsurf/rules, and VIBESEC_CHECKLIST.md pointing to external paths), then
invoke cmd_init with the affected tools and verify that the function either
fails gracefully or refuses to write to the external target. This will ensure
the security path traversal blocking feature works correctly.
tests/scripts/ci/test_opencode_review_normalize_output.py (1)

149-153: โšก Quick win

line=True ์ผ€์ด์Šค๋ฅผ invalid line ํ…Œ์ŠคํŠธ์— ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

Line 149-153์€ ์ˆซ์ž ๊ฒฝ๊ณ„ ํ…Œ์ŠคํŠธ๊ฐ€ ์ข‹์ง€๋งŒ, bool์ด int๋กœ ์ทจ๊ธ‰๋˜๋Š” ๊ฒฝ๊ณ„๋ฅผ ์žก์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ๊ตฌํ˜„ ์ˆ˜์ •๊ณผ ํ•จ๊ป˜ ์ด ์ผ€์ด์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ํšŒ๊ท€๋ฅผ ๋ง‰์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์ถ”๊ฐ€ ์˜ˆ์‹œ
     val = dict(base, findings=[dict(valid_finding, line="1")])
     assert valid_control(val, expected_head_sha="sha", expected_run_id="id", expected_run_attempt="1") is None
+    val = dict(base, findings=[dict(valid_finding, line=True)])
+    assert valid_control(val, expected_head_sha="sha", expected_run_id="id", expected_run_attempt="1") is None
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/scripts/ci/test_opencode_review_normalize_output.py` around lines 149 -
153, The invalid line test cases in the test_opencode_review_normalize_output.py
file currently test for line=0 and line="1" (string), but they do not test the
case where line=True (a boolean value). Since Python treats bool as a subclass
of int, the value True would be coerced to 1 and pass validation when it should
be rejected. Add a test case with line=True to the invalid line tests (after the
existing line=0 and line="1" assertions) to ensure this boundary condition is
caught and prevent regression after the implementation is fixed.
๐Ÿค– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scanner/cli/vibesec.py`:
- Around line 319-323: The current `append_marker` value (like "VibeSec") is too
generic and can cause false positive matches when checking if rules are already
installed. Replace the generic marker with a more specific and unique
identifier, such as a template header with distinctive markers (similar to how
template headers are typically formatted). This change should be made to the
marker value in the config that is being checked in the condition on line 320,
and ensure the corresponding content in `config["content"]` includes this same
unique marker so that future checks correctly identify when the rules have
already been installed. Using a unique, well-formatted header-style marker
instead of a plain keyword will reduce false positive skips.

In `@scripts/ci/opencode_review_normalize_output.py`:
- Around line 59-60: The isinstance check for the "line" field in the finding
validation allows boolean values to pass because bool is a subclass of int in
Python, creating a contract mismatch with the numeric validation in the approval
gate script. Modify the condition to explicitly exclude boolean values by adding
a check that the value is not a boolean before or within the isinstance check,
ensuring only actual integers are accepted and True/False values are rejected as
invalid.

In `@scripts/ci/pr_review_merge_scheduler.py`:
- Around line 343-345: The ThreadPoolExecutor() at line 343 uses default
parallelism which creates up to min(32, os.cpu_count() + 4) concurrent workers.
This causes excessive simultaneous gh CLI calls from within the inspect_pr
function (specifically from enable_auto_merge and dispatch_opencode_review
calls), leading to GitHub API rate limit exceeded errors and partial processing
failures. Add an explicit max_workers parameter to the ThreadPoolExecutor()
constructor to limit the number of concurrent workers to a reasonable value that
prevents gh CLI call bursts while still allowing parallel processing.

In `@tests/scripts/ci/test_pr_review_merge_scheduler.py`:
- Around line 12-24: The test for the is_opencode_context function in
test_is_opencode_context_checkrun_workflow_name uses an incorrect workflow name
that does not match the actual CI contract. Update the workflow name in the node
dictionary from "OpenCode Review" to "OpenCode PR Review" to align with the
actual workflow name defined in the CI contract file
(.github/workflows/opencode-review.yml). This ensures the test accurately
validates that the is_opencode_context function correctly identifies OpenCode
contexts using the correct workflow name.

In `@tests/test_opencode_review_normalize_output.py`:
- Around line 7-11: The test function test_iter_json_objects_pure_json expects
the iter_json_objects function to return duplicate copies of the same JSON
object, but the function should extract each top-level JSON object once without
duplicates. Change the assertion in test_iter_json_objects_pure_json to expect a
list containing the object a single time instead of duplicated. The same issue
exists in the test around lines 22-26, where the expected output should be
corrected to reflect the contract that top-level objects are extracted once with
duplicates removed, not that nested objects or duplicates are included in the
output.

In `@tests/test_vibesec.py`:
- Line 530: The `cmd_review` test is passing stack parameter as a list type
(e.g., stack=["nextjs"]) but the actual CLI contract from argparse passes it as
a string (e.g., stack="nextjs"). Change all instances in the test where stack is
set to a list value to use string values instead, matching how the review
--stack command actually receives arguments. This applies to the Namespace
initialization at line 530 and the similar stack assignments also mentioned at
lines 542, 554, and 566, ensuring the substring-based branching logic in
cmd_review is properly tested against the correct input type.

---

Nitpick comments:
In `@tests/scripts/ci/test_opencode_review_normalize_output.py`:
- Around line 149-153: The invalid line test cases in the
test_opencode_review_normalize_output.py file currently test for line=0 and
line="1" (string), but they do not test the case where line=True (a boolean
value). Since Python treats bool as a subclass of int, the value True would be
coerced to 1 and pass validation when it should be rejected. Add a test case
with line=True to the invalid line tests (after the existing line=0 and line="1"
assertions) to ensure this boundary condition is caught and prevent regression
after the implementation is fixed.

In `@tests/test_vibesec.py`:
- Around line 363-421: Add regression tests for symlink path traversal
protection in the cmd_init function. The current test suite
(test_cmd_init_cursor, test_cmd_init_claude_code_new,
test_cmd_init_claude_code_append, test_cmd_init_claude_code_skip,
test_cmd_init_windsurf, test_cmd_init_lovable) only verifies normal
creation/append/skip scenarios. Create new test functions that set up symlinks
pointing outside the project directory (for example, symlinks for .cursor/rules,
.windsurf/rules, and VIBESEC_CHECKLIST.md pointing to external paths), then
invoke cmd_init with the affected tools and verify that the function either
fails gracefully or refuses to write to the external target. This will ensure
the security path traversal blocking feature works correctly.
๐Ÿช„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

โ„น๏ธ Review info
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75730aba-955e-4f91-8fcf-0d5dd2a942bd

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between c6b3237 and 1c8bbe0.

๐Ÿ“’ Files selected for processing (13)
  • .github/workflows/opencode-review.yml
  • .github/workflows/pr-review-merge-scheduler.yml
  • .jules/bolt.md
  • scanner/cli/vibesec.py
  • scripts/ci/opencode_review_normalize_output.py
  • scripts/ci/pr_review_merge_scheduler.py
  • tests/scripts/__init__.py
  • tests/scripts/ci/__init__.py
  • tests/scripts/ci/test_opencode_review_normalize_output.py
  • tests/scripts/ci/test_pr_review_merge_scheduler.py
  • tests/test_opencode_review_normalize_output.py
  • tests/test_pr_review_merge_scheduler.py
  • tests/test_vibesec.py
๐Ÿ’ค Files with no reviewable changes (2)
  • .github/workflows/opencode-review.yml
  • .github/workflows/pr-review-merge-scheduler.yml

Comment thread scanner/cli/vibesec.py
Comment thread scripts/ci/opencode_review_normalize_output.py Outdated
Comment thread scripts/ci/pr_review_merge_scheduler.py Outdated
Comment thread tests/scripts/ci/test_pr_review_merge_scheduler.py Outdated
Comment thread tests/test_opencode_review_normalize_output.py
Comment thread tests/test_vibesec.py Outdated

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot ๋ฆฌ๋ทฐ์™€ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•˜์—ฌ ๋ฒ„๊ทธ๋ฅผ ํ•ด๊ฒฐํ•˜์„ธ์š”. ๊ทธ๋ฆฌ๊ณ  merge conflicts๊ฐ€ ์žˆ์œผ๋ฉด ํ•ด๊ฒฐํ•˜์„ธ์š”. Base branch ์ตœ์‹  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ fetch ํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. Python์„ ์‚ฌ๏ฟฝ๏ฟฝ...

๋ฆฌ๋ทฐ/๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ์œ ํšจํ•œ ์ง€์ ์‚ฌํ•ญ์„ ๋ฐ˜์˜ํ•ด ์ˆ˜์ •ํ–ˆ๊ณ , ์ถฉ๋Œ ์—ฌ๋ถ€๋„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค(ํ˜„์žฌ base develop๊ฐ€ HEAD์— ํฌํ•จ๋˜์–ด merge conflict ์—†์Œ). ๋ฐ˜์˜ ์ปค๋ฐ‹: dd74611.

์ฃผ์š” ์ˆ˜์ •:

  • finding.line ๊ฒ€์ฆ์—์„œ bool ํ—ˆ์šฉ ๋ฌธ์ œ ์ˆ˜์ • (type(line) is int)
  • OpenCode ์›Œํฌํ”Œ๋กœ์šฐ ์ด๋ฆ„ ํ˜ธํ™˜ ํ™•์žฅ(OpenCode Review, OpenCode PR Review)
  • PR ์Šค์ผ€์ค„๋Ÿฌ ThreadPool ๋ณ‘๋ ฌ๋„ ์ œํ•œ(max_workers)
  • cmd_review ํ…Œ์ŠคํŠธ๋ฅผ argparse ๊ณ„์•ฝ(๋ฌธ์ž์—ด stack)์— ๋งž๊ฒŒ ์ •์ •
  • claude-code append marker๋ฅผ ๊ณ ์œ  ํ—ค๋”๋กœ ๋ณ€๊ฒฝ ๋ฐ ๊ด€๋ จ ํ…Œ์ŠคํŠธ ๋ณด์ •

๊ฒ€์ฆ:

  • ๋Œ€์ƒ ํ…Œ์ŠคํŠธ ๋ฐ ์ „์ฒด ํ…Œ์ŠคํŠธ ํ†ต๊ณผ (66 passed)
  • parallel validation(Code Review + CodeQL) ํ†ต๊ณผ

Copilot AI changed the title ๐Ÿงช Refine tests for iter_json_objects ๐Ÿ› ๏ธ Harden CI review normalization and scheduler behavior Jun 16, 2026

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

OpenCode Agent approved this PR.

Changes show performance optimizations, test coverage improvements, and security hardening with no critical vulnerabilities introduced. All modifications maintain security boundaries and tenant isolation.

  • Result: APPROVE
  • Reason: No security/privacy regressions found
  • Head SHA: dd74611fcbfadd6e0ea0347465e10db00a02c52f
  • Workflow run: 27635613925
  • Workflow attempt: 1

@github-actions github-actions Bot enabled auto-merge June 16, 2026 21:20
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