Skip to content

Conversation

@dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jan 2, 2026

This PR refactors Data Connect's the character generation logic within its testing utility. By transitioning from sequential Arb.merge() calls to a single Arb.choice() invocation, the PR improves the statistical distribution of generated codepoints, ensuring that test data more accurately represents a diverse range of characters.

Highlights

  • Improved Character Distribution: The method for generating codepoints in testing utilities has been updated from a series of Arb.merge() calls to a single Arb.choice() call. This change ensures a more even distribution of generated characters, addressing the previous strong weighting towards the final Arb in the chain.
Changelog
  • arbs.kt
    • Replaced chained Arb.merge() calls with a single Arb.choice() call for the codepoints arbitrary generator.
    • Updated import statements to include io.kotest.property.arbitrary.choice and remove io.kotest.property.arbitrary.merge.

@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@google-oss-bot
Copy link
Contributor

@dconeybe
Copy link
Contributor Author

dconeybe commented Jan 2, 2026

/gemini review

@dconeybe
Copy link
Contributor Author

dconeybe commented Jan 2, 2026

/gemini summary

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly refactors the codepoints arbitrary generator by replacing a chain of Arb.merge() calls with a single Arb.choice() call. This is a great improvement as it ensures a more even distribution of generated characters for property-based testing. The change is clean, correct, and aligns with the goal of improving test data generation. I have no further suggestions.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request refactors the character generation logic within the dataconnect testing utility. By transitioning from sequential Arb.merge() calls to a single Arb.choice() invocation, the PR aims to significantly improve the statistical distribution of generated codepoints. This ensures that test data more accurately represents a diverse range of characters, enhancing the robustness of property-based tests.

Highlights

  • Improved Character Distribution: The method for generating codepoints in testing utilities has been updated from a series of Arb.merge() calls to a single Arb.choice() call. This change ensures a more even distribution of generated characters, addressing the previous strong weighting towards the final Arb in the chain.
  • Kotest Property Arbitrary Update: The imports for Kotest property arbitrary functions have been adjusted to reflect the change, adding io.kotest.property.arbitrary.choice and removing io.kotest.property.arbitrary.merge.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • firebase-dataconnect/testutil/src/main/kotlin/com/google/firebase/dataconnect/testutil/property/arbitrary/arbs.kt
    • Replaced chained Arb.merge() calls with a single Arb.choice() call for the codepoints arbitrary generator.
    • Updated import statements to include io.kotest.property.arbitrary.choice and remove io.kotest.property.arbitrary.merge.
Activity
  • Gemini Code Assist bot provided usage instructions for the tool.
  • GitHub Actions bot posted a reminder regarding PRs merging into the main branch.
  • Google OSS bot generated a coverage report, indicating no changes in affected products between the base and merge commits.
  • Author dconeybe requested a review from Gemini.
  • Author dconeybe requested a summary from Gemini.

@dconeybe dconeybe marked this pull request as ready for review January 2, 2026 18:09
@dconeybe dconeybe requested a review from stephenarosaj January 2, 2026 18:56
@dconeybe dconeybe merged commit 7d35531 into main Jan 5, 2026
42 checks passed
@dconeybe dconeybe deleted the dconeybe/dataconnect/ArbsChoiceNotArbsMerge branch January 5, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants