Skip to content

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 28 May 03:10
· 12 commits to main since this release

Added

  • CLI: Added -c / --clipboard flag to input directly from the system clipboard.

Changed

  • Logging: Improved debug and trace logging. Reduced log spam during parsing, elevated key file I/O operations to debug level, and added detailed trace logs to the smart indentation algorithm (using escape_debug to visualize tabs vs. spaces). Also added visibility into parse_auto format detection and fallback behavior.
  • Diagnostics: Significantly enhanced the anonymization of debug reports (-vvvv). The report generator now actively redacts the input file path, target directory, current working directory, and user home directory from the entire report, including the full trace log, file contents, and error messages.
  • Diagnostics: The discrepancy check failure output in the debug report (-vvvv) now includes a unified diff between the original input patch and the regenerated patch to make differences easier to spot. The full patch contents are now placed inside a collapsible <details> block to reduce visual clutter.
  • Diagnostics: Improved the discrepancy check to normalize patches before comparison. It now ignores context lines, hunk headers, +/- interleaving, and self-replacements, significantly reducing noise and eliminating false positives caused by structural differences.

Security

  • Path Validation: Fixed a vulnerability in ensure_path_is_safe where a dangling symlink could bypass the path traversal check and allow arbitrary file creation outside the target directory. The validation now correctly detects dangling symlinks using symlink_metadata.

Fixed

  • CLI: Fixed a critical bug where --dry-run would incorrectly create parent directories on the filesystem. The path safety check now performs symlink resolution without requiring intermediate directory creation.
  • CLI/API: Fixed an issue where the preview diff generated during a dry run (PatchResult::diff) contained hardcoded "a" and "b" file headers instead of the actual target file paths.
  • Patch Application: Fixed a bug where the trailing newline status could be handled incorrectly if a patch contained out-of-order hunks that modified the end of the file before modifying earlier lines.

🆚 Compare changes