Skip to content

🧪 testing: add scanner error-path coverage and preserve review output safety#78

Merged
seonghobae merged 14 commits into
developfrom
jules-4924104342017518268-7fab8d4e
Jun 16, 2026
Merged

🧪 testing: add scanner error-path coverage and preserve review output safety#78
seonghobae merged 14 commits into
developfrom
jules-4924104342017518268-7fab8d4e

Conversation

@seonghobae

@seonghobae seonghobae commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🎯 What: This PR addresses testing gaps by adding comprehensive tests for error handling paths (OSError, PermissionError) inside the critical file scanning (_scan_file) and file traversal (_collect_files) functionalities. It also includes testing for skipping large files (OOM prevention logic), files that lack applicable rules, and keeps the merged OpenCode review output normalization path-safety checks intact.

📊 Coverage: The following scenarios are now actively tested:

  • os.scandir failure during _collect_files yielding empty results.
  • Handling of inaccessible individual entries (symlink check raising PermissionError) during recursive iteration in _collect_files.
  • Exception catching when accessing file attributes (e.g., os.lstat raising OSError or PermissionError) in _scan_file.
  • Prevention mechanisms properly halting large file scanning without failure.
  • Mid-read OSError exceptions being safely handled while still retaining previously discovered findings.
  • Skipping files whose extensions don't match any loaded rule.
  • cmd_review prompt output coverage remains intact after the merge.
  • OpenCode review output normalization continues to reject output paths outside the repository root, independent of the current working directory.

Result: Test coverage for scanner/cli/vibesec.py has significantly improved, and the merged CI review-output normalization safety checks remain accurate and robust after conflict resolution.


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

Warning

Review limit reached

@Copilot, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 4 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3c021c0-2496-409b-a936-9d1a7217be53

📥 Commits

Reviewing files that changed from the base of the PR and between c6b3237 and 3ced2fc.

📒 Files selected for processing (1)
  • tests/test_vibesec.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jules-4924104342017518268-7fab8d4e
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch jules-4924104342017518268-7fab8d4e

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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: 3ced2fcdd35a3bb81f701dd49550b823f6c3838e
  • Workflow run: 27613793876
  • Workflow attempt: 2
  • Gate result: APPROVE (exit 0)

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.

The changes add new test cases for error conditions and edge cases in the file collection and scanning functions. The tests are well-written and cover important scenarios. The existing tests are reformatted for better readability. The changes are safe and improve the test suite.

  • Result: APPROVE
  • Reason: Tests added for error handling and edge cases, improving test coverage and robustness. No production code changes.
  • Head SHA: 9c6ad45c37fce5c6c190230da61ead3cfd28eee4
  • Workflow run: 27596530960
  • Workflow attempt: 1

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved in 8dc9e26.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex resolve the merge conflicts in this pull request

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

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.

Added 6 new tests covering file scanning edge cases and error conditions while maintaining existing test patterns. Changes improve robustness verification without introducing regressions.

  • Result: APPROVE
  • Reason: Enhanced test coverage for error handling
  • Head SHA: 8dc9e2622d6f602b0e7f249d6a555eb1641aa449
  • Workflow run: 27597813822
  • Workflow attempt: 2

@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex resolve the merge conflicts in this pull request

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved in b9e743b.

Copilot AI changed the title 🧪 testing: add coverage for scanner error paths 🧪 testing: add scanner error-path coverage and preserve review output safety 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 review evidence was missing or invalid.

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

@seonghobae

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

@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을 사��...

Addressed in 3ced2fc: fetched the latest develop, resolved the merge conflicts, kept the base branch’s Python 3.14 workflow setup intact, reviewed the OpenCode run/log state, and revalidated with python3 -m pytest -q tests/test_vibesec.py tests/test_opencode_review_normalize_output.py tests/test_pr_review_merge_scheduler.py (54 passed).

@copilot resolve the merge conflicts in this pull request

Resolved in 3ced2fc.

@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가 실패하는 경우 등에도 대응하여 버그를 고치십시오.

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

The PR adds tests for error handling and edge cases in the file scanner, and improves code formatting. The tests are well-written and cover important scenarios. No issues found.

  • Result: APPROVE
  • Reason: Test improvements and added coverage
  • Head SHA: 3ced2fcdd35a3bb81f701dd49550b823f6c3838e
  • Workflow run: 27613793876
  • Workflow attempt: 2

@seonghobae seonghobae merged commit f360058 into develop Jun 16, 2026
2 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