Skip to content

shared_audits: parse whois dates with spaces - #24276

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fix_edgecase
Oct 17, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
fix_edgecase

Conversation

@bevanjkay

@bevanjkay bevanjkay commented Oct 17, 2026 •

Copy link
Copy Markdown
Member
  • DNS Belgium's whois prints Registered: Fri Jan 18 2013, so capturing only \S+ passed Fri to Date.parse, which resolves it to the current week's Friday and flagged long-registered .be domains as new.

Discovered in Homebrew/homebrew-cask#294489


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

Claude with Opus 5.5 at Extra High effort, with local review and testing.


Summary by CodeRabbit

  • Bug Fixes
    • Domain registration dates in weekday-prefixed WHOIS formats are now recognised and reported correctly.

- DNS Belgium's `whois` prints `Registered: Fri Jan 18 2013`, so
  capturing only `\S+` passed `Fri` to `Date.parse`, which resolves it
  to the current week's Friday and flagged long-registered `.be`
  domains as new.
@coderabbitai

coderabbitai Bot commented Oct 17, 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: 911c7900-b881-4c14-ac0e-604250ea07c9
📥 Commits

Reviewing files that changed from the base of the PR and between 19fe946 and 9f467f1.

📒 Files selected for processing: 2
  • Library/Homebrew/test/utils/shared_audits_spec.rb
  • Library/Homebrew/utils/shared_audits.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.

📝 Walkthrough

The WHOIS creation-date pattern now captures the full date text. A test checks that new_domain_problem reports a weekday-prefixed registration date as 2026-07-01.

Changes: WHOIS date parsing

Layer / File(s) Summary
Capture and validate full creation dates
Library/Homebrew/utils/shared_audits.rb, Library/Homebrew/test/utils/shared_audits_spec.rb
The pattern captures the full remainder of a matching creation-date line. A test checks that a weekday-prefixed Registered: date produces 2026-07-01.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 9f467

The change corrects the reported WHOIS registration date without an identified merge-blocking issue.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: parsing WHOIS dates that contain spaces.
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 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit aac1fb8 Oct 17, 2026
54 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the fix_edgecase branch October 17, 2026 08:44
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.

3 participants