Skip to content

fix(PROC-1927): respect compress flag in _handle_new#142

Merged
CalNightingale merged 1 commit into
mainfrom
CalNightingale/proc-1927
Jun 3, 2026
Merged

fix(PROC-1927): respect compress flag in _handle_new#142
CalNightingale merged 1 commit into
mainfrom
CalNightingale/proc-1927

Conversation

@CalNightingale

Copy link
Copy Markdown
Collaborator

The compress flag is plumbed from runner.py (--compression-mode=PRESERVEcompress=False) through ingest_instances_handle_new, but was then dropped: _handle_new called _compress_instances() unconditionally, making --compression-mode=PRESERVE a no-op. Any caller wanting to skip JPEG2000 encoding (e.g. DICOMs whose pixel data won't encode cleanly) hit compression errors regardless.

  • Gate the _compress_instances() call in _handle_new on the compress flag; when False, instances pass through validated-but-untranscoded with no compression errors.
  • Add test_append_no_compress asserting compress=False preserves the original transfer syntax and file size.

Surfaced while seeding the gh-laplace-combo test environment, where 16×16 noise frames openjpeg can't encode and PRESERVE failed to escape compression. A local patch of this shape on Cal's laptop should be reverted once this lands.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CalNightingale CalNightingale self-assigned this Jun 2, 2026
@CalNightingale CalNightingale changed the title PROC-1927 - Respect compress flag in _handle_new fix(PROC-1927): respect compress flag in _handle_new Jun 2, 2026
@CalNightingale CalNightingale requested a review from Alceu-wv June 2, 2026 19:32

@Alceu-wv Alceu-wv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CalNightingale CalNightingale merged commit e1d2a3b into main Jun 3, 2026
4 of 5 checks passed
@CalNightingale CalNightingale deleted the CalNightingale/proc-1927 branch June 3, 2026 13:33
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.

2 participants