apply_code_patch
Applies validated Python code changes to a target file while enforcing Git safety gates and automatically rolling back invalid syntax modifications.
Instructions
Safely modifies a target Python source file after validating AST syntax and establishing Git safety gates. Automatically rolls back on invalid syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Target source file path to modify. | |
| new_content | Yes | Full updated source code content to apply. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |