ensureRuleRegistryBuilt function

void ensureRuleRegistryBuilt()

Forces the lazy rule registry to build, if it has not already.

The registry is a lazy final, so it initializes on first access — and getRulesFromRegistry only accesses it inside its loop body, which means calling it with an empty set does NOT build anything. Light-lane membership is published as a side effect of that build (see _buildRuleFactoriesMap), so any caller that needs the membership without wanting rule instances must come through here. Calling it with an empty set instead silently leaves the lane set empty, which makes the lane gate and the daemon's de-duplication no-op.

Implementation

void ensureRuleRegistryBuilt() {
  // Bind to a throwaway so the access is a documented consumer, not a
  // statement the analyzer flags as unnecessary.
  final _ = _ruleFactories;
}