ActionComplete / ActionFailed called after Action completion

The worker now calls ActionComplete or ActionFailed on state, depending
on the success state of the Action and any errors.

The hook is set to an error state if the Action hook is missing, or if
other errors take place during hook execution.  If the Action hook sets
a fail state, the Hook will not error, rather the Action will fail.
I'm not following -- this will log the failure and set the unit to an error state.  The logic simply imitates the behavior of a normal hook error.  However, in the case of Actions, we don't want to bypass the error state if the Action is not implemented on the charm.  Instead, we want to return an error state to the uniter.  We also send an appropriate error to the state service as follows.

The RunAction method on the context finalizes the context, with any given error recorded to the state service via ActionFailed (worker/uniter/context.go L 348.)  If no error, ActionCompleted is called instead.

Do you mean the uniter state or state/state server?