Repository navigation
fix: nested classification, hm-host bridge, bare aspect access - #501
Merged
Merged
Conversation
sini
enabled auto-merge (squash)
May 10, 2026 12:53
drupol
reviewed
May 10, 2026
Freeform data keys with sub-keys that coincidentally match registered class names (e.g. git.user colliding with den.classes.user) were misclassified as nested aspects, causing their content to leak into class routing (users.users.<name>.email does not exist). Add looksLikeClassContent guard to hasRecognizedSubKeys so flat-scalar attrsets are no longer treated as class content. Bridge den.schema.hm-host includes into host resolution via a policy.when-guarded policy that fires only for hosts with homeManager users, restoring den.ctx.hm-host backward compatibility.
Shallow-merge attrset definition values onto the __contentValues wrapper so nested freeform keys are directly accessible via config attribute access (e.g. gloom.apps.polybar.razermon). Enables bare nested aspect patterns without provides indirection. Pipeline consumers continue using __contentValues; the forwarded attributes are a convenience for direct access and includes.
sini
force-pushed
the
fix/nested-classification-and-hm-host
branch
from
May 10, 2026 13:00
946f432 to
e087a49
Compare
drupol
approved these changes
May 10, 2026
5 tasks done
charlesfire
pushed a commit
to charlesfire/den
that referenced
this pull request
May 16, 2026
…l#501) ## Summary Three post-fx-pipeline regressions reported by a user after updating: - **Nested classification false positive** — freeform data keys with sub-keys matching registered class names (e.g. `git.user` colliding with `den.classes.user`) were misclassified as nested aspects, causing content to leak into class routing (`users.users.loom.email` does not exist). Added `looksLikeClassContent` guard to `hasRecognizedSubKeys`. - **`den.schema.hm-host` not consumed** — the ctx-shim forwarded `den.ctx.hm-host` to `den.schema.hm-host.includes`, but nothing in the pipeline read that schema. Added a `policy.when`-guarded bridge in the HM battery that injects `hm-host` schema includes via `policy.include` when the host has homeManager users. - **Bare nested aspect access** — `aspectContentType` wrapped all freeform values into opaque `__contentValues` wrappers, preventing direct attribute access like `gloom.apps.polybar.razermon`. Shallow-merge attrset definition values onto the wrapper so sub-keys are accessible for config access and includes. ## Test plan - [x] 758/758 CI tests pass (`nix develop -c just ci`) - [x] New regression test `test-class-name-collision-not-nested` - [x] User's dotfiles: all 8 nixosConfigurations eval on both `main` and `new_den` (migration) branches - [x] `den.ctx.hm-host` deprecation warning fires and `useGlobalPkgs` propagates correctly
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
Three post-fx-pipeline regressions reported by a user after updating:
Nested classification false positive — freeform data keys with sub-keys matching registered class names (e.g.
git.usercolliding withden.classes.user) were misclassified as nested aspects, causing content to leak into class routing (users.users.loom.emaildoes not exist). AddedlooksLikeClassContentguard tohasRecognizedSubKeys.den.schema.hm-hostnot consumed — the ctx-shim forwardedden.ctx.hm-hosttoden.schema.hm-host.includes, but nothing in the pipeline read that schema. Added apolicy.when-guarded bridge in the HM battery that injectshm-hostschema includes viapolicy.includewhen the host has homeManager users.Bare nested aspect access —
aspectContentTypewrapped all freeform values into opaque__contentValueswrappers, preventing direct attribute access likegloom.apps.polybar.razermon. Shallow-merge attrset definition values onto the wrapper so sub-keys are accessible for config access and includes.Test plan
nix develop -c just ci)test-class-name-collision-not-nestedmainandnew_den(migration) branchesden.ctx.hm-hostdeprecation warning fires anduseGlobalPkgspropagates correctly