Skip to content

Exclude end date from approved-review searches - #24260

Merged
MikeMcQuaid merged 1 commit into
mainfrom
approved_review_end_date
Oct 14, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
approved_review_end_date

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Keep next-period PRs out of contribution totals, including capped repository searches.
  • Use the adjusted boundary in cache keys to avoid stale results.

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 6 Astra at Extra High effort, with local review and testing.


- Keep next-period PRs out of contribution totals, including capped
  repository searches.
- Use the adjusted boundary in cache keys to avoid stale results.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2ea780e6-b6f7-4716-9fde-dffeb686103c
📥 Commits

Reviewing files that changed from the base of the PR and between d108ec4 and b918fd8.

📒 Files selected for processing: 2
  • Library/Homebrew/dev-cmd/contributions.rb
  • Library/Homebrew/test/dev-cmd/contributions_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 20
  • GitHub Check: docker (arm64 Ubuntu 24.04)
  • GitHub Check: docker (x86_64 Ubuntu 26.04)
  • GitHub Check: docker (arm64 Ubuntu 26.04)
  • GitHub Check: docker (x86_64 Ubuntu 24.04)
  • GitHub Check: workflow_syntax
  • GitHub Check: tests (generic OS, 2/2)
  • GitHub Check: tests (Linux, 1/2)
  • GitHub Check: tests (load-only macOS)
  • GitHub Check: tests (online, 1/2)
  • GitHub Check: tests (Linux, 2/2)
  • GitHub Check: tests (macOS, 1/2)
  • GitHub Check: tests (macOS, 2/2)
  • GitHub Check: tests (load-only Linux)
  • GitHub Check: tests (generic OS, 1/2)
  • GitHub Check: tests (online, 2/2)
  • GitHub Check: tests (no Sorbet)
  • GitHub Check: syntax
  • GitHub Check: docs
  • GitHub Check: Analyze
  • GitHub Check: autogenerated
🔇 Additional comments: 2
Library/Homebrew/dev-cmd/contributions.rb: 1

470-470: LGTM!

Also applies to: 475-478, 502-503, 505-505

Library/Homebrew/test/dev-cmd/contributions_spec.rb: 1

633-633: LGTM!

Also applies to: 947-947, 953-953, 972-972, 988-988

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Approved-review searches now respect the reporting period’s exclusive end date, preventing reviews from the following day from appearing in results. The corrected date range is applied consistently to organization-wide and repository-specific searches, helping keep review results aligned with the selected reporting period.

Approved-review searches now end on the day before the reporting end date. The adjusted date is also used in cache keys. Tests cover organization-wide searches, repository-scoped follow-up searches, and public-email lookups.

Changes: Approved-Review Search Dates

Layer / File(s) Summary
Approved-review search dates and tests
Library/Homebrew/dev-cmd/contributions.rb, Library/Homebrew/test/dev-cmd/contributions_spec.rb
Organization-wide and repository-scoped approved-review searches and their cache keys use the day before the reporting end date. Tests expect this end date, including for public-email lookups and capped searches.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: dduugg

Merge Risk: ⚪ Minimal · up to b918f

Approved-review searches now exclude pull requests created on the reporting end date, with cache keys aligned to that range. No actionable merge risk was identified.

Security architecture risk: ⚪ Minimal · up to b918f

The change narrows approved-review searches and keeps their cache keys aligned. It does not introduce new access, privileges, identities, or repository exposure.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated impact is limited to approved-review contribution totals and their local cached search results for the existing organization, reviewer, and repository scopes. The date adjustment does not expand independently reachable assets or services.

Trust Boundaries and Controls

  • observed — Existing GitHub-user resolution and repository-result filtering remain in place. Cache identity retains the query type, organization or repository, reviewer, and start date, with only the effective end date changing.

Resilience and Maintainability Implications

  • observed — The unchanged cache method validates cached JSON types, discards malformed or mismatched entries, obtains the result before writing, uses atomic_write, and retries GitHub rate-limit errors. It introduces no new locking or recovery mechanism; concurrent misses and process interruption were not exercised.
Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: excluding the end date from approved-review searches.
Description check Passed The description directly explains the change, its purpose, and the cache-key impact. It is related to the changeset.
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@MikeMcQuaid
MikeMcQuaid enabled auto-merge October 14, 2026 16:30
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit c6c18a4 Oct 14, 2026
54 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the approved_review_end_date branch October 14, 2026 16:48
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