refactor: isolate lossless cut configuration - #4
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
shorts_generator/local/clipper.pyowned the import-time parsing of the three lossless-cut cache environment variables alongside cache execution. This made the configuration contract harder to characterize and maintain inside the 7,599-line module.Scope
lossless_cut_config.py.clipper.pyas the compatibility facade and retain all three existing globals and monkeypatch targets.Explicit non-goals
No changes to video output, FFmpeg arguments/codecs, timestamps, cache keys/schema/paths, hit/miss/pruning behavior, file touching, cleanup, logs, captions, highlights, HookGate, Real-ESRGAN, providers, Node services, APIs, migrations, infrastructure, authentication, or product features.
Dependency boundary
Before:
After:
Git identity and size
e0513092bc1ccd4ab40c821af84146084c6f5c6f735afb9aa615b599ed64c9f7cd858b6e812b331cclipper.py: 7,599 -> 7,590 LOCCharacterization evidence
Ten behavioral tests passed against the pre-extraction implementation. The extraction then added the pure-leaf and supplied-mapping boundary assertions, for 11 configuration tests total. They cover:
ValueError/OverflowErrorbehavior;clipper.pymonkeypatch targets;Focused post-extraction checks:
git diff --check: passFull regression results
npm run lintnpm run buildnpm test37ef626b9901ad2eeb1056d47954d88cdf2ede6430cc80e449bd5f9c7a91f9c9d62ce934e038d9026263ce2be7efa5f0c6e3ffac8a583d7b23b609540a5f4fe9Limitations and warnings
npm auditreports five pre-existing moderate vulnerabilities in transitive Hono adapter/Hono and PostCSS packages; there are no high or critical findings.EPERM; both baseline and final host runs passed.Next slice
Keep separate from this PR: characterization-first caption command/render planning extraction, retaining caption I/O, subprocess execution, logs, and facade patch points.