den icon indicating copy to clipboard operation
den copied to clipboard

#694 transition warning lists <aspect>/to-hosts/<collision-validator> for content that is delivered

Open tomwrw opened this issue 4 weeks ago • 1 comments

Description

I am testing a migration as discussion #750 describes:

  • I moved a user-included aspect's parametric nixos module to provides.to-hosts.nixos.
  • I included den.batteries.mutual-provider on den.schema.host.includes.

The transition warning still lists one entry:

den: endgame receives nixos content only through den's transition default, which ends 2027-01-01:
  - from tomwrw (stylix/to-hosts/<collision-validator>)

The module is delivered. With den.migrations.user-host-content.acknowledged = true, both hosts' system.build.toplevel .drvs are byte-identical to the ones built before the release, and the warning is gone. The entry looks like the validator module from buildValidatorModule (nix/lib/aspects/fx/wrap-classes.nix:104) being counted as lost, even though mutual-provider delivers the module it validates.

Reproduction

theme is a den quirk that the user aspect emits:

den.quirks.theme.description = "…";
den.schema.host.includes = [ den.batteries.mutual-provider ];

den.aspects.stylix.provides.to-hosts.nixos =
  { lib, pkgs, theme, ... }:
  {
    # reads lib.head theme
  };

den.aspects.tomwrw = {
  includes = [ den.aspects.stylix ];
  theme = { scheme = "rose-pine-moon"; wallpaper = ./wallpaper.jpg; };
};

Evaluate the host on PR #753 bc9b0f6, with the transition defaults on.

Expected

No warning: everything the host needs reaches it through mutual-provider. _module.args.denTransitionDefaultLost is [ ].

Actual

The warning lists stylix/to-hosts/<collision-validator>.

Before the migration (with stylix.nixos directly on the aspect), the warning listed both stylix and stylix/<collision-validator>. Moving the module to to-hosts clears stylix, but the validator entry stays.

Impact

Cosmetic: nothing in the built system changes. But the warning can't be cleared by migrating, only by setting the acknowledgement flag, so it can't serve as the checklist the announcement intends.

Environment

  • den: PR #753 bc9b0f6
  • nixpkgs: nixos-unstable (26.11.20261101)

Related: #694, discussion #750

LLM disclosure

Discovered by Claude Opus 5.5 against my own config while planning a migration based on discussion #750.

tomwrw avatar Nov 08 '26 09:11 tomwrw

Fixed in v0.20.0, by #753 (22b2097).

The cause: den adds a collision validator beside every parametric class module. The validator is bookkeeping. When the provide that carried the module was delivered through mutual-provider, the module itself was matched as delivered, but its validator wasn't. So the transition warning listed <aspect>/to-hosts/<collision-validator> for content that does reach the host.

The fix: the warning's loss check skips den's validators by their own suffix, so an entry stays listed only for content that really reaches the host only through the default.

Cell: templates/ci/modules/deadbugs/issue-755-validator-not-lost.nix. A migrated parametric provides.to-hosts module produces no warning entry, while a non-migrated one still lists its aspect, so the check can't hide real losses.

sini avatar Nov 09 '26 19:11 sini