fix: parametric - preserve meta on materialized parametric results (#440)
Parametric sub-aspects defined as bare functions
(`foo._.sub = { host, ... }: { nixos = ...; }`) lost their `foo`
provider prefix in the resolved aspect tree: when the functor was
invoked by applyDeep, the raw user return (`{ nixos = ...; }`) didn't
carry the sub's `meta.provider = ["foo"]`, so downstream
aspectPath-based queries saw the aspect as `["sub"]` instead of
`["foo","sub"]`.
This was invisible as long as consumers only extracted classModule via
`aspect.${class}` without caring about aspectPath — see
deadbugs/issue-413-provider-sub-aspect-function, still passes. It
surfaces the moment anything compares aspect references by their full
`meta.provider ++ [name]` identity.
Fix: add a small `carryMeta fn result` helper in applyDeep that copies
`meta` from the originating fn onto the materialized result when the
result doesn't already carry its own. Applied to both:
- the outer `take` result (direct-include path)
- the inner re-recursion on bare-result.includes (parametric-parent
path, where a functor returns `{ includes = [foo._.sub] }`)
`isBareResult` is checked against the pre-carryMeta value so the
bare-result recursion branch still fires — carrying meta would otherwise
mask it and skip the sub-recursion.
Scope kept narrow to applyDeep rather than touching `take.carryAttrs`
globally: a broader fix there affects every take.* call site (including
statics.nix and resolve.apply) and breaks unrelated tests that depend on
take results being metaless.
authored by