Skip to content

Commit 050671c

Browse files
Keras Automations : Refine auto fix to add unit tests (#22624)
* auto fix updates * fix label * fix auto fix workflow * refine autofix pr * add prompt to add unit tests
1 parent 05bbdae commit 050671c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/gemini-pr-re-fix.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ jobs:
100100
- Change whitespace, imports, or formatting of untouched lines
101101
5. A typical bug fix changes fewer than 20 lines. If you are changing more, stop and reconsider.
102102
6. After editing, verify your changes make sense by reading the modified sections.
103+
7. Add unit tests for your fix:
104+
- Find the existing test file for the module you modified (look in the corresponding `*_test.py` file under the same directory or under `keras/src/**/`).
105+
- Add a focused test that reproduces the original bug and verifies the fix.
106+
- Follow the existing test style and conventions in that file.
107+
- The test should FAIL without your fix and PASS with it.
103108
104109
DO NOT output JSON. Use your file editing tools to directly modify the files.
105110
@@ -297,6 +302,10 @@ jobs:
297302
- Change whitespace, imports, or formatting of untouched lines
298303
4. A re-fix should typically change fewer than 20 lines.
299304
5. After editing, verify your changes make sense by reading the modified sections.
305+
6. If the failing tests reveal that a unit test is missing for the fix, add one:
306+
- Find the existing test file for the module (the corresponding `*_test.py` file).
307+
- Add a focused test that covers the fixed behavior.
308+
- Follow the existing test style and conventions in that file.
300309
301310
DO NOT output JSON. Use your file editing tools to directly modify the files.
302311

0 commit comments

Comments
 (0)