Stabilize native pipeline builds and configurable audio limits - #97
Merged
Merged
Conversation
`Pipeline::run` rejected any input over one hour against the hard-coded `MAX_AUDIO_SAMPLES`. That constant documents itself as a guard so the C FFI and the Python bindings cannot unbounded-allocate on untrusted buffers, but it was enforced on the Rust pipeline API too, where the caller often produced the audio itself and knows its length is bounded. Such a caller had no way to diarize a two-hour recording: the constant is read directly at the check site, `Pipeline`'s stage fields are private, and splitting the input into sub-hour chunks would break recording-wide clustering. Move the limit into `PipelineConfig::max_audio_samples`, defaulting to `MAX_AUDIO_SAMPLES`, with a matching builder setter. This mirrors the legacy pipeline, which already exposes `max_duration_secs` on its own config. Existing callers are unaffected: the default is unchanged, and the C FFI and WAV loader keep enforcing the constant directly, so the untrusted-input guard stays where its documentation says it is.
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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.
Native pipeline configuration and local model support left FFI and local-only tests unable to compile, while a stale Python lockfile was silently rewritten by dependency checks. This integrates the reviewed fixes and configurable audio length limit, preserving the default one-hour cap and independent FFI/WAV limits.
Validation on the combined changes: 943 CLI/FFI library tests and 875 local-only library tests pass with local models available; CLI, baseline metadata and FFI integration suites pass (22 tests; 3 model-dependent FFI cases ignored). Clippy passes with all features/targets and separately for kernels. Dependency regression tests, locked standalone lockfiles, dependency invariants, formatting and diff checks pass. Semver accepts the 0.21 to 0.22 compatibility bump. The locked CPython 3.13 Linux release wheel builds and its 11 model-free smoke/result tests pass. All 58 active kernel tests pass in release mode (3 manual benchmarks ignored). Linux native-scoreboard passes: DER micro 7.0295%, macro 7.3559%, model-size ceiling retained. Remote CI is running without failures at merge time; no Darwin hardware performance/RSS rerun was performed locally.
The original audio-cap contribution and feature-build fix are retained in merge ancestry.