Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

No description provided.

@julio-lopez julio-lopez requested a review from Copilot October 23, 2025 04:26
Copy link

Copilot AI left a comment

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 modernizes the codebase by replacing manual min/max conditional logic with Go's built-in min() and max() functions (available since Go 1.21). The changes improve code readability and reduce verbosity while maintaining identical functionality.

Key changes:

  • Replaced manual min/max patterns (if-else comparisons) with built-in min() and max() functions
  • Applied changes consistently across multiple packages including splitter, format, blob, and internal utilities
  • Preserved existing logic and behavior while simplifying code structure

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
repo/splitter/splitter_rabinkarp64.go Replaced manual min/max logic with built-in functions in split point calculation
repo/splitter/splitter_buzhash32.go Replaced manual min/max logic with built-in functions in split point calculation
repo/format/format_blob.go Simplified chunk length calculation using min()
repo/blob/s3/s3_versioned_test.go Replaced manual min logic in test helper with min()
internal/uitask/uitask_manager.go Simplified sleep interval calculation using min()
internal/timetrack/estimator.go Replaced manual max logic with max() for time duration
internal/sleepable/sleepable_timer.go Simplified sleep time calculation using min()
internal/retry/retry.go Simplified exponential backoff calculation using min()
internal/gather/gather_write_buffer.go Replaced manual min logic in buffer append with min()
internal/gather/gather_bytes.go Simplified size calculation using min()
internal/epoch/epoch_manager.go Simplified exponential backoff delay calculation using min()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.74%. Comparing base (cb455c6) to head (0ddc332).
⚠️ Report is 693 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4898      +/-   ##
==========================================
+ Coverage   75.86%   76.74%   +0.88%     
==========================================
  Files         470      537      +67     
  Lines       37301    40932    +3631     
==========================================
+ Hits        28299    31414    +3115     
- Misses       7071     7478     +407     
- Partials     1931     2040     +109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julio-lopez julio-lopez marked this pull request as ready for review October 23, 2025 05:09
@julio-lopez julio-lopez merged commit af62386 into kopia:master Oct 23, 2025
33 of 35 checks passed
@julio-lopez julio-lopez deleted the refactor/ifaceany branch October 23, 2025 05:22
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.

1 participant