Skip to content

Pass compression settings through the pipeline default context#673

Draft
rtibbles wants to merge 1 commit into
learningequality:mainfrom
rtibbles:compression_context
Draft

Pass compression settings through the pipeline default context#673
rtibbles wants to merge 1 commit into
learningequality:mainfrom
rtibbles:compression_context

Conversation

@rtibbles
Copy link
Copy Markdown
Member

@rtibbles rtibbles commented Jun 4, 2026

Summary

Compression was driven by the config.COMPRESS global, which handlers consulted at processing time. Now FilePipeline accepts a default_context merged into every execute() call, and SushiChef.run builds explicit video/audio settings from the --compress flag and passes them through it. All handlers — standalone media and archive — compress only when explicit settings are provided.

config.COMPRESS is removed since nothing reads it anymore. Breaking for any external chef script that read config.COMPRESS directly; the --compress CLI flag itself behaves as before.

References

Extracted from in-progress spreadsheet chef work; no linked issue.

Reviewer guidance

uv run --group test pytest tests/pipeline/ tests/test_files.py

Areas worth a careful look:

  • Behavior change: with --compress, standalone media previously compressed with ffmpeg defaults; now run() supplies crf: 32 / max_height / bit_rate: 96 explicitly — check those defaults are the ones we want
  • ArchiveProcessingBaseHandler.get_cache_key now keys on settings presence rather than config.COMPRESS — affects which cached results get reused across runs with different flags

AI usage

I used Claude Code to extract this change from a larger working branch and add the tests; tests were verified to fail against the old config.COMPRESS gating, and I reviewed the final diff.

FilePipeline now accepts a default_context merged into every execute()
call. SushiChef.run builds explicit video/audio compression settings
from the --compress flag and passes them via the pipeline context.
Both the standalone media handlers and the archive handlers now
compress only when explicit settings are provided, instead of
consulting the config.COMPRESS global, which is removed since
nothing reads it anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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