Cost model mis-identifies the long pole: cost trivial/glue derivations ~0 #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In the emmett aarch64 trial the reported critical path was:
These are NixOS assembly glue derivations —
writeText/runCommand/substituteAllbuilds that finish in milliseconds. But every one is costed at the flatDEFAULT = 1.0 min, so the chain sums to a fake ~165-min span and becomes the reported long pole. This distorts span (T∞), the recommendation, and the makespan floor.It also makes the recommendation tagline self-contradictory: it printed "The long pole is one derivation, so cores/node sets the floor" while the actual long pole was a thin chain of cheap glue, not one heavy compile.
Fix
In
costmodel.py, recognize trivial/glue derivations and cost them ~0 (a few seconds):builder+ args, or absence of aconfigurePhase/buildPhase);unit-*,*.service,*-restart-triggers,etc,activate,user-units,system-units,system-path,dbus-*-conf,nixos-system-*,*-env,*.conf.Add a
TRIVIAL = (0.05, 0.0)tier checked beforeDEFAULT. Add a unit test with a synthetic glue chain asserting it does not dominate the span. Depends on the schema-agnostic drv fields already available (issue is independent of #1).