refactor: centralize persistence composition and scheduler state storage (#2556)