#gpowerd - Fix compare behavior when some state is missing

With this change, compare will return Unavailable when any abort condition's state is missing while we test the condition. Note that if _any_ abort does match, the result will still be an immediate abort.

When checking conditions, we will continue waiting when an unavailable state is reported.

This change also serializes local -> global state updaters: Previously, we had some listeners listening to state changes on both global and local, but now each listener listens to one or the other, and the global state accumulates all local state as well. This prevents unavailable state when the global state doesn't have the entire local state in it. This isn't expected during nominal s4v2 actuations, but may happen when we insert events etc. and during tests. The result of this is that we may end up with duplicate events on the global state updater, but this should not cause problems.

This fix doesn't correctly address handling situations where the pre-run validation check is unavailable.

PiperOrigin-RevId: 883480038
Change-Id: Ie7ae92a0c67ea4fc645ae574d9e878f28da02681
4 files changed