Repository navigation
fix: an aspect reference in a schema collection no longer recurses (#719) - #720
Merged
Merged
Conversation
) The kind identity hashed the contents of every schema collection when an instance was imported, and an aspect reference in includes / excludes reaches back into the host being built. den now declares both collections identity = false, which gen-schema keeps out of the kind identity; the gen pin moves to the hub revision that carries that support.
vic
approved these changes
Oct 13, 2026
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.
Fixes #719.
Cause
Since #717, gen-schema mints a kind's identity from the contents of its schema collections when an instance is imported.
includesandexcludeshold aspect references, and an aspect reference can reach back into the host being built. Hashing the collection therefore forced that host during its own import. The result was an infinite recursion, or an exclusion that silently did nothing.Fix
den.schemadeclaresincludesandexcludeswithidentity = false. gen-schema keeps a collection declared this way out of the kind identity. These collections are policy over aspects, not part of the kind's shape.templates/cipins gen at6427d42, which carries gen-schema10f4d12withidentity = falsesupport. Only thegeninput moved (nix flake update gen).Tests
templates/ci/modules/deadbugs/issue-719-schema-excludes-aspect-ref.nixnow has 5 cells:den.schema.host.excludes;den.schema.conf.excludes/includes.The 2
confcells expect the values den produced before #717, whereconf's collections do not apply to a host instance. I checked them against65c9fd4and all 5 cells pass there.nix-unit --override-input den . --flake ./templates/ci#tests:39c4833(old gen pin)identity = falselinesjust fmtmakes no changes.