Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Yegorov
Copy link
Contributor

@Yegorov Yegorov commented Oct 5, 2025

Closes #322

Summary by CodeRabbit

  • New Features
    • Unified stop logic ensures runs automatically halt when nearing quota, lifetime, or timeout limits.
    • Clearer log messages when processing stops, including reasons and context.
  • Bug Fixes
    • More consistent and predictable stopping behavior across loops and repositories.
  • Refactor
    • Consolidated multiple guard checks into a single centralized check for improved maintainability and performance.
  • Tests
    • Added comprehensive tests covering quota, lifetime, and timeout scenarios to validate stop behavior.

@coderabbitai
Copy link

coderabbitai bot commented Oct 5, 2025

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly identifies the introduction of the Fbe.over? function and its purpose of checking GitHub quota, lifetime, and timeout, which matches the main change in the pull request.
Linked Issues Check ✅ Passed The pull request introduces the new Fbe.over? method that centralizes quota, lifetime, and timeout checks, removes duplicate logic from Fbe.conclude and Fbe.iterate, and includes corresponding tests, fully satisfying the requirements of issue #322.
Out of Scope Changes Check ✅ Passed All modifications are directly related to implementing and integrating the new Fbe.over? function and its associated tests, with no unrelated code changes present in the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3473a48 and 448ca01.

📒 Files selected for processing (4)
  • lib/fbe/conclude.rb (2 hunks)
  • lib/fbe/iterate.rb (2 hunks)
  • lib/fbe/over.rb (1 hunks)
  • test/fbe/test_over.rb (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
lib/fbe/iterate.rb (1)
lib/fbe/over.rb (1)
  • over? (20-38)
lib/fbe/over.rb (1)
lib/fbe/octo.rb (2)
  • octo (44-232)
  • off_quota? (168-177)
lib/fbe/conclude.rb (1)
lib/fbe/over.rb (1)
  • over? (20-38)
test/fbe/test_over.rb (2)
lib/fbe/over.rb (1)
  • over? (20-38)
lib/fbe/octo.rb (1)
  • octo (44-232)

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cbaa26 and 3473a48.

📒 Files selected for processing (4)
  • lib/fbe/conclude.rb (2 hunks)
  • lib/fbe/iterate.rb (2 hunks)
  • lib/fbe/over.rb (1 hunks)
  • test/fbe/test_over.rb (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-29T21:46:05.507Z
Learnt from: Yegorov
PR: zerocracy/fbe#319
File: test/fbe/test_iterate.rb:388-389
Timestamp: 2025-09-29T21:46:05.507Z
Learning: In `Fbe.iterate` with `sort_by` configuration in `lib/fbe/iterate.rb`: when the sorted enumerator exhausts (StopIteration), the marker is correctly reset to `since` (typically 0). This reset behavior is intentional and allows the iteration to restart from the beginning on the next run.

Applied to files:

  • lib/fbe/iterate.rb
🧬 Code graph analysis (4)
lib/fbe/conclude.rb (1)
lib/fbe/over.rb (1)
  • over? (20-38)
lib/fbe/iterate.rb (1)
lib/fbe/over.rb (1)
  • over? (20-38)
lib/fbe/over.rb (1)
lib/fbe/octo.rb (2)
  • octo (44-232)
  • off_quota? (168-177)
test/fbe/test_over.rb (2)
lib/fbe/over.rb (1)
  • over? (20-38)
lib/fbe/octo.rb (1)
  • octo (44-232)

@Yegorov
Copy link
Contributor Author

Yegorov commented Oct 5, 2025

@yegor256 can you take a look, please?

@yegor256 yegor256 merged commit d80362c into zerocracy:master Oct 6, 2025
11 checks passed
@yegor256
Copy link
Member

yegor256 commented Oct 6, 2025

@Yegorov thanks!

@0crat
Copy link

0crat commented Oct 6, 2025

@Yegorov Thanks for the contribution! You've earned +12 points for this: +24 as a basis, -4 for exceeding our 133 hits-of-code threshold (162 HoC), and -8 for missing code review which is essential for quality assurance per our policy. Consider breaking larger contributions into smaller, reviewable chunks to maximize your rewards and maintain code quality - this approach will help you earn the full bonus potential. Please keep them coming! Your running balance is +721; don't forget to check your Zerocracy balance too.

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.

Fbe.over?() may help reduce code duplication

3 participants