Skip to content

Harden upscaler CLI and add test coverage - #1

Merged
kernastra merged 1 commit into
mainfrom
agent/harden-upscaler-cli
Jul 27, 2026
Merged

Harden upscaler CLI and add test coverage#1
kernastra merged 1 commit into
mainfrom
agent/harden-upscaler-cli

Conversation

@kernastra

Copy link
Copy Markdown
Owner

What changed

  • prevent custom output names from escaping the configured output directory
  • keep tiny scaled images at valid nonzero dimensions
  • handle nested input/output directories, .tif files, EXIF orientation, and JPEG color modes
  • add --yes for automation and return nonzero status for processing failures
  • remove unused OpenCV and NumPy dependencies
  • update installation and usage documentation
  • add an eight-test unit/CLI suite and a Python 3.10–3.14 GitHub Actions matrix

Why

The audit reproduced a path traversal issue in custom naming, zero-dimension failures for tiny images, and avoidable installation weight from unused dependencies. The CLI also lacked automated regression coverage and reliable exit codes for scripted use.

Impact

PixelNova is safer for custom naming, more reliable across supported image formats and edge cases, lighter to install, and easier to automate and maintain.

Validation

  • python3 -m unittest discover -v — 8 tests pass
  • python3 -m compileall -q upscaler.py demo.py example.py setup.py tests
  • bash -n run.sh
  • git diff --check
  • GitHub Actions YAML parsed successfully

@kernastra
kernastra marked this pull request as ready for review July 27, 2026 06:56
@kernastra
kernastra merged commit 3eed5dc into main Jul 27, 2026
3 checks passed
@kernastra
kernastra deleted the agent/harden-upscaler-cli branch July 27, 2026 06:57
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.

1 participant