Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

scidomino
Copy link
Collaborator

@scidomino scidomino commented Oct 13, 2025

TLDR

Fixes "should fail safely when old_string is not found" to give the agent clearer directions.

Also: Fix arg parsing in deflake.ts so I can run:

$ npm run deflake:test:integration:sandbox:none -- integration-tests/replace.test.ts 

instead of having to run everything.

Reviewer Test Plan

See this run using deflake. There was one flake but not from this test file: https://github.com/google-gemini/gemini-cli/actions/runs/18480274254/job/52653514207?pr=11073

Linked issues / bugs

Fixes #10916

@scidomino scidomino changed the title Fix and unskip replace test. Fix and unskip flakey integration test in replace.test.ts Oct 13, 2025
Copy link

github-actions bot commented Oct 13, 2025

Size Change: -2 B (0%)

Total Size: 17.8 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.8 MB -2 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

@scidomino scidomino force-pushed the tomm_replace branch 4 times, most recently from 89b2595 to ec12446 Compare October 13, 2025 23:47
@scidomino scidomino marked this pull request as ready for review October 13, 2025 23:47
@scidomino scidomino requested a review from a team as a code owner October 13, 2025 23:47
@scidomino
Copy link
Collaborator Author

/gemini review

@scidomino scidomino force-pushed the tomm_replace branch 2 times, most recently from 3fcbc10 to c08a0b6 Compare October 13, 2025 23:49
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 aims to fix a flaky integration test and clean up the test suite. The changes in replace.test.ts simplify the tests and make the previously flaky test more robust by providing a more constrained prompt to the model. The change in scripts/deflake.js is intended to improve the script's argument handling. My review focuses on potential issues in the new code. I've identified a potential source of flakiness in one of the simplified tests due to removed line-ending normalization, and a bug in the new argument handling logic in the deflake.js script that affects arguments with spaces.

integration-tests/replace.test.ts Show resolved Hide resolved
scripts/deflake.js Outdated Show resolved Hide resolved
@scidomino scidomino force-pushed the tomm_replace branch 2 times, most recently from 09410a2 to fe2b8da Compare October 14, 2025 00:06
@scidomino
Copy link
Collaborator Author

/gemini review

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 effectively addresses a flaky integration test in replace.test.ts by providing more explicit instructions to the AI model and streamlining the test code. These changes enhance the reliability and readability of the test suite. The deflake.js script is also refactored for better command-line argument handling. I've identified a critical security vulnerability in the updated deflake.js script and provided a suggestion to mitigate the risk of command injection.

scripts/deflake.js Outdated Show resolved Hide resolved
@scidomino scidomino force-pushed the tomm_replace branch 2 times, most recently from 596a1d5 to 0f5d74d Compare October 14, 2025 00:18
scripts/deflake.js Show resolved Hide resolved
@cornmander cornmander added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit f56a561 Oct 14, 2025
25 of 26 checks passed
@cornmander cornmander deleted the tomm_replace branch October 14, 2025 01:04
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.

Integration tests: Fix "replace.test.ts" flakes

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.