Skip to content

remove-except v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 05:31
· 86 commits to main since this release
3355783

remove-except v0.3.0

Highlights

  • Prebuilt Windows x64 (MSVC) and Linux x64 (GNU) binaries, with SHA-256 checksum files.
  • UTF-8 stdin keep patterns with --patterns-from-stdin and machine-readable pre-deletion plans with --format json (schema_version: 1).
  • A built-in viewer for long human-readable plans, with scrolling, section navigation, grapheme-aware path wrapping, and resize handling.
  • A final-confirmation recap showing the processing directory, keep/delete counts, and applicable warnings on stderr.

Important upgrade and deletion-safety notes

  • Keep/delete results can change. Braces ({ and }), and backslash escapes on Ubuntu, now count as glob syntax rather than literal-directory recursive-retention prefixes. Previously retained descendants may become deletion targets. reports/{2024,2025} keeps matching directories but not their contents; use reports/{2024,2025}/** for descendants. Back up important data and review every item with --dry-run and without --summary after upgrading.
  • Confirmation now reads a whole line on every input path. Only y or yes followed by Enter confirms (case-insensitive; surrounding whitespace ignored). Other answers, empty input, and EOF cancel.
  • Exit codes changed: cancellation returns 3 instead of 0; invalid arguments, stdin input, roots, or patterns return 2; runtime failures return 1; successful preview or deletion returns 0. Update automation that relies on previous exit codes or single-key confirmation.
  • --pager auto is the default and opens the viewer for long terminal output. Use --pager never for ordinary output. c finishes viewing only; Enter and y in the viewer never authorize deletion. q, Escape, and Ctrl+C cancel without deletion (code 3). Pending viewer input is discarded and terminal state restored before a separate whole-line confirmation.
  • With stdin patterns or after viewing, confirmation uses the controlling terminal, not consumed stdin. If confirmation has no terminal, nothing is deleted (code 3). An unavailable explicitly requested viewer or terminal failure returns 1; auto explains pre-start fallback on stderr. --pager always conflicts with JSON and --force (code 2).
  • Stdin patterns are newline-delimited UTF-8 (LF/CRLF). One leading BOM is stripped, completely empty lines are ignored, other whitespace is preserved, and there is no comment syntax. Invalid UTF-8 or NUL is rejected with a line number. CR is removed only as part of CRLF. Each line is a path/glob, not an escaped literal filename; NUL-delimited input is not supported.
  • JSON contains exactly one pre-deletion plan on stdout, not an execution result. Messages and prompts go to stderr. Unrepresentable Unicode paths fail before JSON output or deletion. Human layout, summary, and type-sort options conflict with JSON.
  • The viewer does not change keep/delete decisions or deletion order. The same plan is reused, but it is not a protected filesystem snapshot. Root validation, no-follow-symlinks behavior, and no-match warnings remain in effect; --force skips only confirmation. No matches still means every item below the processing directory is a deletion target.

Downloads and installation

Platform Archive Matching checksum
Windows x64 (MSVC) remove-except-v0.3.0-x86_64-pc-windows-msvc.zip .zip.sha256
Linux x64 (GNU) remove-except-v0.3.0-x86_64-unknown-linux-gnu.tar.gz .tar.gz.sha256

Download the archive and its matching checksum from this Release's Assets after publication. Verify the SHA-256 before extraction. Each archive contains the executable, both READMEs, and both project licenses inside a platform-named directory. Add the executable's directory to PATH and check remove-except --version.

Archive SHA-256 values:

cbebd5b403346f178a21eca0c77cde1d1fb12cb599fca2994611b4abbe1c5d22  remove-except-v0.3.0-x86_64-pc-windows-msvc.zip
087da32c905870af88da214403566b9b5c1eafb51ef16cb77ad4c6f14e72115c  remove-except-v0.3.0-x86_64-unknown-linux-gnu.tar.gz

Verify each archive's provenance with GitHub CLI:

gh attestation verify <archive-path> --repo tresuke/remove-except --signer-workflow tresuke/remove-except/.github/workflows/prepare-release.yml --source-ref refs/tags/v0.3.0 --source-digest 3355783653a9b1242186eb17781501722ba2fd29

The archives were built from v0.3.0 at commit 3355783653a9b1242186eb17781501722ba2fd29 by Prepare Release run 40272516699, attempt 1. Both downloaded archives passed checksum and provenance verification.

cargo-auditable 0.7.7 embeds dependency crate names and versions. cargo-audit 0.22.2 audited Cargo.lock and each target binary during the workflow; independent audits of both downloaded binaries also reported no known vulnerabilities against the advisory database available on October 26, 2026. Embedded metadata, checksums, audits, and provenance do not guarantee safety. No separate SBOM or attestation file is attached.

Compatibility and verification scope

  • The package and command remain remove-except; --root, -n/--dry-run, and -f/--force are unchanged.
  • Rust 1.88 remains the minimum for source builds. Library callers can identify input-validation errors with the new public ValidationError type.
  • Linux binaries are built in Ubuntu 22.04 and require glibc 2.35 or later and the normal GNU runtime libraries (libgcc_s.so.1, libc.so.6, and the ELF loader). The downloaded binary was inspected and smoke-tested on Ubuntu 22.04.5 with glibc 2.35. Its highest directly required GLIBC symbol version is 2.34; this does not lower the supported 2.35 baseline or imply support for other distributions.
  • The release workflow passed tests on Rust 1.88.0 for Windows (133 tests including doctests) and Ubuntu 22.04 (134). All summaries reported zero failures and zero ignored tests. Symlink tests have internal early-return paths when creation is unavailable, so these summaries do not prove absence of internal skips.
  • Downloaded binaries passed version, help, full dry-run, JSON/retention checks, and confirmation smoke tests. Windows real-console confirmation passed 14 cases. The downloaded Windows executable additionally passed 13 viewer cases covering q/Escape/Ctrl+C cancellation, separate approval/rejection, queued-input disposal, dry-run, stdin patterns, resize, insufficient screen space, section cycling, grapheme wrapping, colors, and terminal-mode restoration. Four additional Windows cases passed for modifier/unsupported keys and redirected stdin during dry-run, no-removal, and destructive runs. These checks used the extracted release executable, not a rebuilt binary; its SHA-256 was b8dc9fbeefe032abe449e8a7e40333d0edee85792b0703b7b37e5c0ca7dd71d6 before and after testing and matched the archive entry. Ubuntu 22.04 PTY checks covered rejection, approval, EOF, stdin patterns, viewer cancellation, and separate confirmation after viewing, including terminal restoration. Destructive checks used dedicated temporary fixtures only. No claim of exhaustive terminal/font/OS-version coverage is made.
  • Once published, source installation is available with cargo install --git https://github.com/tresuke/remove-except --tag v0.3.0 --locked.
  • No macOS, ARM64, or musl binary, and no crates.io publication, is included. The source-only v0.2.4 Release remains unchanged.

Full changelog

v0.2.4...v0.3.0