Skip to content

yaml/compiler: audio::mixer num_inputs auto-injection silently no-ops on non-object params #472

@staging-devin-ai-integration

Description

Found while writing tests for crates/api/src/yaml/compiler.rs in PR #464 (Phase 3 coverage — Stream A).

Behavior

The `audio::mixer` `num_inputs` auto-injection in `compile_dag` only takes effect when the user-provided `params` is a JSON object. When `params` is present but not an object (e.g. a scalar, an array, a string), the injection silently no-ops and the compiled `audio::mixer` node ends up with no `num_inputs` set.

PR #464 pins this with the test `compile_dag_oneshot_audio_mixer_skips_inject_when_params_is_non_object`.

Why this matters

Pipelines that accidentally pass a non-object `params` for `audio::mixer` will compile silently but then fail at engine init or produce wrong behavior at runtime, with no compile-time signal pointing back to the user input.

Suggested resolution

In `compile_dag`, when a node's `kind` is `audio::mixer` and `params` is present but not an object, return a `Result::Err` with a clear message (e.g. `"audio::mixer params must be an object, got "`). This matches the existing error-on-bad-needs pattern in the same function.

Tracking

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions