fix(patch): cherry-pick ce56b4e to release/v0.15.1-pr-13073 [CONFLICTS]#13098
Conversation
# Conflicts: # packages/core/src/code_assist/experiments/experiments.test.ts
Summary of ChangesHello @gemini-cli-robot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the experiment flag identification mechanism from string-based names to numeric IDs. This change impacts how experiment flags are defined, parsed, and consumed throughout the application, ensuring a more robust and consistent approach to feature flagging. The PR also introduces new unit tests to validate the updated experiment handling logic. However, this is an automated cherry-pick that has encountered merge conflicts, which need to be resolved manually before it can be merged. Highlights
Using Gemini Code AssistThe 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
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 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the experiment flag handling to use numeric flagIds instead of string names. The changes are applied consistently across type definitions, constants, implementation, and tests. I've found one issue in the debug logging logic for experiments where the sorting of flags is incorrect and the logged flagId type is inconsistent. I've provided a suggestion to fix this.
| .sort(([a], [b]) => a.localeCompare(b)) | ||
| .map(([name, flag]) => { | ||
| const summary: Record<string, unknown> = { name }; | ||
| .map(([flagId, flag]) => { | ||
| const summary: Record<string, unknown> = { flagId }; |
There was a problem hiding this comment.
The experiment flags are now identified by numeric flagIds. For the debug summary, it would be better to sort them numerically and also to represent the flagId as a number in the summary object to be consistent with its type. Currently, they are sorted lexicographically as strings, which can lead to an unexpected order (e.g., '100' before '20'), and the flagId in the summary is a string.
| .sort(([a], [b]) => a.localeCompare(b)) | |
| .map(([name, flag]) => { | |
| const summary: Record<string, unknown> = { name }; | |
| .map(([flagId, flag]) => { | |
| const summary: Record<string, unknown> = { flagId }; | |
| .sort(([a], [b]) => Number(a) - Number(b)) | |
| .map(([, flag]) => { | |
| const summary: Record<string, unknown> = { flagId: flag.flagId }; |
|
Size Change: -66 B (0%) Total Size: 20.5 MB ℹ️ View Unchanged
|
This PR automatically cherry-picks commit ce56b4e to patch version v0.15.1 in the stable release to create version 0.15.2.
This cherry-pick resulted in merge conflicts that need manual resolution.
🔧 Next Steps:
📋 Files with conflicts:
The commit has been created with conflict markers for easier manual resolution.
🚨 Important: