Repository navigation
fix(core): a host's own aspect excludes as far as the host - #762
Merged
Merged
Conversation
`den.aspects.<host>.excludes` registered one include level below the host root, so it stopped at the host's own subtree, while `den.hosts.<sys>.<host>.excludes` and `den.schema.host.excludes` also reach what the host's users include. The host's own aspect, its parametric body and policy excludes in its includes now register at the host root. Its `handleWith` keeps the aspect's reach. An aspect-value exclude names the aspect written there: an inline aspect that only shares its name is no longer excluded. `excludes` in a host's `provides.<user>` or `provides.to-users` are refused: the provide is delivered after the user's includes are resolved, so they could never apply. Reported in Matrix.
sini
force-pushed
the
fix/exclude-reach
branch
from
November 11, 2026 19:50
215c74f to
de1566d
Compare
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.
Summary
Reported in Matrix by vipultyagi: with
featureinden.default.includes,den.aspects.igloo.excludes = [ den.aspects.feature ]leftfeatureon igloo, whileden.hosts.x86_64-linux.igloo.excludesandden.schema.host.excludesremoved it. The same was true on v0.19.0.Cause. An exclude applies only below the include chain it was registered under.
check-constraintkeeps an entry where the node's chain starts with the entry'sownerChain(handlers/constraint.nixfilterByScope).resolve-entity.nix), whereownerChainis[]. So they also reach tux's own copy ofden.default, which the transition default lifts to the host.den.aspects.igloois walked one level down, as the host's<self:host>self-provide. Its excludes register under that chain and stop at the host's own subtree.Fix.
children.nixownerChainOverride). That covers its parametric body (types.nixownBody) and policyexcludeeffects in its includes (registerIncludedPolicyExcludes). This is the host kind only.meta.handleWithfilters and substitutes keep the aspect's reach. Only excludes change.refDefPos, frommeta.__defPos). A node of the same identity is excluded only when it's the same definition. Before,den.hosts.….igloo.excludes = [ den.aspects.tools ]also removed a user's unrelated inline{ name = "tools"; … }. Nodes below the excluded aspect, matched by identity prefix, are unchanged.excludesin a host'sprovides.<user>orprovides.to-usersare now refused, with an error. Before, they were accepted and silently did nothing. The provide is delivered at the user's policy dispatch, after the user's includes have been gated, so its excludes can't apply in den v1 (the exclude-timing limit). Registering them early can't be made exact: whether the provide is itself excluded is only decided at dispatch. The error names the spellings that work:den.aspects.<user>.excludes, or the host's ownden.aspects.<host>.excludes, which now reaches its users.Behaviour against main
den.aspects.igloo.excludes, plain, parametric, or a policyexcludein its includesden.hosts.….igloo.excludes/den.schema.host.excludesexcludesden.aspects.igloo.meta.handleWithigloo.provides.tux.excludes,igloo.provides.to-users.excludesValidation
templates/ci/modules/public/c1-aspects-schema/:exclude-reach.nix: 10/10 here, 4/10 on main. Covers reach, the end state, another host, an included aspect, and a namesake under each host form.exclude-reach-forms.nix: 9/9 here, 3/9 on main. Covers parametric forms, policy excludes, the refused provides, andhandleWithkeeping its reach.deadbugs.issue-694-exclude-exactly: 35/35.ci.bash, 4 workers): 2165/2165 at 215c74f.handleWithwidening, and the parametric and policy forms. All are fixed, with cells.reference/batteries.mdx,reference/aspects.mdx,explanation/structural-introspection.mdx, and theexcludesoption description.