Skip to main content

enabled

Function enabled 

Source
pub fn enabled() -> bool
Expand description

Whether plan-driven attrset construction is enabled. Default: yes.

Flipped from opt-in to opt-out on 2026-08-18, on this evidence:

  • every wrong-answer shape in the class matches nix, including the acceptance case { a = rec { b = c+1; d = 2; }; a.c = d+3; }.a.b -> 6, which needs mutual recursion ACROSS the merge boundary;
  • a fleet scan found ZERO false rejects — every rejection is a file nix-instantiate --parse also refuses. Corrected 2026-08-18: the count was FOUR, not “the one”. Re-scanned at 4570 files: blackmatter-services/…/jitsi, …/keycloak, kindling-profiles/…/macos-developer, and blackmatter/…/enhanced/composed.nix, each verified individually against nix-instantiate --parse, which refuses all four and names the same attribute path sui does. The zero-false-rejects claim is unchanged and is the load-bearing half; the “one” was a coverage figure that rotted UPWARD — understated, so it read as modest and nothing ever flagged it. Re-run the scanner rather than trusting this number: cargo run --release -p sui-normalize --example scan -- <dir>;
  • sui perf-seal moved DOWN or held on all three attr-merge rows (dotted full-set leaf deep-merge 6 -> 5), which is what confirms the splice happens at PARSE time rather than adding eval work;
  • the suites are green both ways.

The latch is KEPT, deliberately, in the SUI_SCOPE_NARROW spirit: SUI_NORMALIZE=0 restores the pre-plan construction path, so a divergence suspected to come from this pass can be bisected in one command instead of a revert. That is also why the old entry loops are not deleted yet.

★ SINCE THE REJECTION TIER (2026-08-18) THE LATCH ALSO DISABLES REFUSAL, and that makes the engines disagree ON PURPOSE. plan_for_node returns Ok(None) when disabled, so with SUI_NORMALIZE=0 the walker goes back to silently ACCEPTING { a = 1; a = 2; } while the bytecode VM — which has no such latch and always plans — still refuses it. That is a bisect tool behaving as intended, not a bug; but it means an engine comparison run with SUI_NORMALIZE=0 is not measuring what it looks like it is measuring. Clear the variable before comparing engines.