اول یک نکته و آن اینکه نحوه استفاده شما از محیط latin داخل محیط algorithm اشتباه است و فایل ورودی شما باید به شکل زیر تغییر کند:
\documentclass[a4]{book}
\usepackage{tocbibind}
\usepackage[ruled,vlined,linesnumbered,resetcount,algochapter]{algorithm2e}
\usepackage{xepersian}
\settextfont{XB Yas}
\newcommand{\listofalgorithmes}{\tocfile{\listalgorithmcfname}{loa}}
\begin{document}
\tableofcontents
\listofalgorithmes
\chapter{chapter1}
\begin{algorithm}[H]
\centering
\caption{الگوریتم Aggregation}
\label{algo1}
\begin{latin}
test\;
\end{latin}
\end{algorithm}
\chapter{chapter2}
\begin{algorithm}[H]
\centering
\caption{Partitioning}
\label{algo2}
\begin{latin}
test\;
\end{latin}
\end{algorithm}
\end{document}
مشکل مورد نظر از لحلظ تئوری (کد تست نشده) درست شده است. برای امتحان اینکه آیا مشکل برطرف شده است یا خیر احتیاج به نسخه بسته bidi موجود در GitHub دارید که میتوانید آن را از اینجا دریافت کنید.
به طور دقیقتر برای حل مشکل به نسخه جدید فایلهای algorithm2e-xetex-bidi.def (این فایل به تازگی افزوده شده است) و latex-xetex-bidi.def احتیاج خواهید داشت.