Record that reading a config option does not force NixOS assertions #38

Merged
vnprc merged 1 commit from agent/nix-assertions-need-toplevel into master 2026-07-31 06:16:11 +01:00
Member

A check that reads a marker option off a built NixOS system proves the module was composed but forces none of its assertions — config.assertions is reached only through system.build.toplevel. A fixture violating the composed module's own contract therefore reads green. Found while adding the guest-module selection check in allod/archetypes#23, where a microvm fixture would have passed with allod/vm's persistent-volume contract unevaluated.

Also records the ordering subtlety: compare the marker first and force second, because forcing first reports a wrong-module composition as whatever that module's option surface breaks on rather than as the mismatch the check names.

Refs allod/archetypes#22

A check that reads a marker option off a built NixOS system proves the module was composed but forces none of its assertions — `config.assertions` is reached only through `system.build.toplevel`. A fixture violating the composed module's own contract therefore reads green. Found while adding the guest-module selection check in allod/archetypes#23, where a microvm fixture would have passed with allod/vm's persistent-volume contract unevaluated. Also records the ordering subtlety: compare the marker first and force second, because forcing first reports a wrong-module composition as whatever that module's option surface breaks on rather than as the mismatch the check names. Refs allod/archetypes#22
vnprc approved these changes 2026-07-31 06:16:05 +01:00
vnprc merged commit 6bfa5bd4b8 into master 2026-07-31 06:16:11 +01:00
vnprc deleted branch agent/nix-assertions-need-toplevel 2026-07-31 06:16:12 +01:00
Sign in to join this conversation.
No description provided.