Narrows a states list to the named states, and to those only.
An ancestor reached through extends is resolution input, not a capture
target. Returning it alongside the named states — which is what a flat
"keep the ancestors too" list does — captures states the user did not name
and re-runs their side-effecting steps, a request seed among them, which
is the opposite of what a filter means. So the chain is resolved here and
folded into each named state instead: the returned states carry everything
the chain contributes — the ancestors' steps, the inherited url and the
inherited allowVideoReplay — and carry no extends, so a filtered run
captures each named state exactly as an unfiltered one does.
Throws when a name matches nothing, because silently running zero states is
the coverage lie again, and propagates StateDefinitionError from
chain resolution — a filtered run has to resolve before it can be flattened.
Narrows a states list to the named states, and to those only.
An ancestor reached through
extendsis resolution input, not a capture target. Returning it alongside the named states — which is what a flat "keep the ancestors too" list does — captures states the user did not name and re-runs their side-effecting steps, arequestseed among them, which is the opposite of what a filter means. So the chain is resolved here and folded into each named state instead: the returned states carry everything the chain contributes — the ancestors' steps, the inheritedurland the inheritedallowVideoReplay— and carry noextends, so a filtered run captures each named state exactly as an unfiltered one does.Throws when a name matches nothing, because silently running zero states is the coverage lie again, and propagates StateDefinitionError from chain resolution — a filtered run has to resolve before it can be flattened.