Skip to main content

select_contexts

Function select_contexts 

Source
pub fn select_contexts(
    available: &[String],
    requested: &[String],
) -> Result<Vec<String>, SelectError>
Expand description

Pick the workers dev will serve together (#552). No --context serves every context in the project — the whole point of the increment, since a cross-context call only resolves when its callee is up too. --context is repeatable and narrows to a subset, in available’s deterministic order rather than the order they were typed, and duplicates collapse.

There is no Ambiguous case: several contexts is the expected shape, not a failure. Pure (the FS scan is the caller’s) so the rule is unit-tested.