mermaid-cli 0.10.2

Open-source AI pair programmer with agentic capabilities. Local-first with Ollama, native tool calling, and beautiful TUI.
Documentation
�

�K�i�d���UdZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZddlmZmZee�j+�j,dZed�j+�ZdZd	Zhd
�ZGd�de�Zej<Gd
�d��Zej<Gd�d��Z ej<d��Gd�d��Z!ej<Gd�d��Z"dGd�Z#dHd�Z$dId�Z%dJd�Z&dKd�Z'dLd�Z(dMd�Z)dNd�Z*dOd�Z+										dPd �Z,										dPd!�Z-										dPd"�Z.										dQd#�Z/										dRd$�Z0e!d%d&dde0�'�e!d(d&dde/�'�e!d)d*d+d,e,�'�e!d-d*d.d/e-d�0�e!d1d*d2d3e.d�0�d4�Z1d5e2d6<dSd7�Z3	dT							dUd8�Z4dVd9�Z5dWd:�Z6dXd;�Z7dYd<�Z8dZd=�Z9d[d>�Z:d\d?�Z;d]d@�Z<d^dA�Z=d_dB�Z>d`dC�Z?dadD�Z@dbdE�ZAeBdFk(re
j�e$��yy)ca(Run real Mermaid dogfood scenarios against a safe local fixture.

This harness is intentionally opt-in. It drives `mermaid run` with a real
model and real tools, verifies filesystem artifacts, and restores the fixture
between scenarios so agents can QA Mermaid without a human operating the TUI.
�)�annotationsN)�Path)�Callable�Iterable�z/home/nsabaj/Code/test-envzminimax-m2.7:cloudz.mermaid-qa-root>�.git�.mermaid�
.pytest_cache�dist�__pycache__�node_modules�.qa-runsc��eZdZy)�	QaFailureN)�__name__�
__module__�__qualname__���scripts/qa_mermaid.pyrr)s��rrc�H�eZdZUded<ded<ded<ded<ded<dd	�Zy
)�
CommandResult�	list[str]�args�str�cwd�int�
returncode�stdout�stderrc�,�tj|�S�N��dataclasses�asdict��selfs r�to_jsonzCommandResult.to_json5����!�!�$�'�'rN��return�dict)rrr�__annotations__r(rrrrr-s ��
�O�	�H��O��K��K�(rrc��eZdZUded<ded<ded<dZded	<dZd
ed<eje��Z	d
ed<eje��Z
d
ed<dZded<dd�Zy)�ScenarioResultr�name�bool�ok�float�duration_secondsN�
str | None�	workspacez
int | None�mermaid_returncode)�default_factoryr�mermaid_errors�checks�failurec�,�tj|�Sr"r#r&s rr(zScenarioResult.to_jsonDr)rr*)
rrrr-r6r7r$�field�listr9r:r;r(rrrr/r/9sd��

�I��H��� �I�z� �%)��
�)� 1�� 1� 1�$� G�N�I�G�)��)�)�$�?�F�I�?��G�Z��(rr/T)�frozenc�N�eZdZUded<ded<ded<ded<ded<d	Zd
ed<y)
�Scenariorr0�tierr5�fixture�promptzDCallable[['QaContext', Path, dict, CommandResult | None], list[str]]�checkerFr1�allow_mermaid_errorsN)rrrr-rFrrrrArAHs)��

�I�

�I�
����
Q�Q�!&��$�&rrAc�,�eZdZUded<ded<ded<y)�	QaContext�argparse.Namespacerr�run_dir�workspaces_dirN)rrrr-rrrrHrHRs��
��
�M��rrHc	��tjd��}|jdtjjdt
t��d��|jdtjjdt�d	��|jd
t
tdzdzd
z�d��|jdddt�vrttj��ndd��|jdgd�dd��|jdtdd��|jddd� �|jd!dd"� �|jd#dd$� �|jd%dd&� �|j�S)'NzRun Mermaid self-QA scenarios)�descriptionz
--test-env�MERMAID_QA_TEST_ENVz!Fixture root to wipe and recreate)�default�help�--model�MERMAID_QA_MODELz!Model passed to `mermaid --model`z
--mermaid-bin�target�debug�mermaidzMermaid binary to testz
--scenario�append�	SCENARIOSz Scenario to run; may be repeated)�action�choicesrPz--tier)�fast�real�allrZz/Scenario tier to run when --scenario is omitted)rYrOrPz	--timeouti�z"Per Mermaid run timeout in seconds)�typerOrPz--skip-build�
store_truez0Do not run `cargo build --bin mermaid` before QA)rXrPz--keep-workspacez/Do not restore scenario workspaces after checksz--wipe-runsz:Also delete prior .qa-runs logs when resetting the QA rootz--jsonz0Print only the final JSON report path and status)�argparse�ArgumentParser�add_argument�os�environ�getr�DEFAULT_TEST_ENV�
DEFAULT_MODEL�	REPO_ROOT�globals�sortedrW�keysr�
parse_args)�parsers rrkrkYs���
�
$�
$�1P�
Q�F�
�����
�
���4�c�:J�6K�L�
0���
�����
�
���1�=�A�
0���
�����I��(�7�2�Y�>�?�
%���
�����,7�7�9�,D��y�~�~�'�(�$�
/�	������'��
>�	������
��
1�	�������
?���
�����
>���
�����
I���
�����
?���
����rc
��t�}t|j�j�j	�}t|j
�j�j	�}t
|�|_t
|�|_tjjtj�}|jd�}	t|�t||j��|dz|z}|j+dd��|d
z}|j+dd��t-|||��}	d|j!�|j"t
|�t
|�t
|�gd�}
	|j.s=t1gd�t2d��}t5|dz|�|j6dk7rt9d��|j:xst=|j>�}|D�
cgc]}
tA|	tB|
���}}
|D�cgc]}|jE���c}|
d<tGd�|D��|
d<tjjtj�j!�|
d<|dz}|jIt%j(|
dd��dz�|j$r0t't%j(|
dt
|�d�d���ntK|
|�|
drdSd
S#t$r�}d|j!�tjjtj�j!�|j"t
|�t
|�t
|�gd�}|j$r!t't%j(|d���n.t'd�t'd|���t'�t'd	�Yd}~y
d}~wwxYwcc}
wcc}w#t$r}t
|�|
d<Yd}~���d}~wwxYw) Nz
%Y%m%d_%H%M%S)�	wipe_runsF)r2�
started_at�finished_at�model�mermaid_bin�test_env�fatal_error�resultsT)�	sort_keys�Mermaid self-QA�Fatal: �FAILrr��parents�exist_ok�
workspaces)rrJrK)r2rorqrrrsrJru)�cargo�buildz--binrUiX�r�timeoutzcargo_build.jsonrz cargo build --bin mermaid failedruc3�4K�|]}|j���y�wr")r2)�.0�results  r�	<genexpr>zmain.<locals>.<genexpr>�s����;�7��6�9�9�7�s�r2rtrpzreport.json���indentrv�
)r2�report)&rkrrs�
expanduser�resolverrr�dt�datetime�now�UTC�strftime�guard_test_env�reset_test_envrn�	Exception�	isoformatrq�json�print�dumps�mkdirrH�
skip_build�run_commandrg�
write_commandrr�scenario�scenarios_for_tierrB�run_scenariorWr(r\�
write_text�
print_summary)rrsrr�started�run_id�excr;rJrK�ctxr��build_result�selectedr0rur��report_paths                 r�mainr��sA���<�D��D�M�M�"�-�-�/�7�7�9�H��t�'�'�(�3�3�5�=�=�?�K���M�D�M��;�'�D���k�k�o�o�b�f�f�%�G�
�
�
�o�
.�F���x� ��x�4�>�>�:�*��#�f�,�G��M�M�$��M�.���,�N�������5�
��w�~�
N�C���'�'�)�����;�'���M��w�<���F�)����&�6����L�

�'�$6�6��E��&�&�!�+�� B�C�C��=�=�A�$6�t�y�y�$A��BJ�K�(�$�<��Y�t�_�5�(��K�<C�D�G�&�V�^�^�-�G�D��y���;�7�;�;��t���K�K�O�O�B�F�F�3�=�=�?�F�=���M�)�K����4�:�:�f�Q�$�G�$�N�O��y�y�
�d�j�j��t���K�8H�I�UY�Z�[��f�k�*��t��1�#�!�#��}���!�+�+�-��;�;�?�?�2�6�6�2�<�<�>��Z�Z��{�+��H�
��s�8��	
���9�9��$�*�*�W��5�6��#�$��G�C�5�/�"��G��&�M���%��`L��D���)� #�C���}���)�sP�"K-�-A0O�O�7O�=O�O�-	O�6CO
�
O�
O�	P�(O<�<Pc�>�tj�j�}td�j�|tj�tjj�h}t|�st
d��||vrt
d|����|tk7r+|tz}|j�st
d|�d|�d���|jtjk7r7|tzj�st
dtj�d|����y	y	)
zRefuse dangerous reset targets.�/ztest-env path is emptyz)refusing to use dangerous test-env path: zcustom test-env z is not initialized; create z" first if this path is intentionalz"refusing unmarked QA root outside �: N)
r�homer�rg�parentrrre�	QA_MARKER�exists)rsr��	forbidden�markers    rr�r��s���9�9�;��� �D��S�	������������ � �"�	�I��x�=��0�1�1��9���C�H�:�N�O�O��#�#��I�%���}�}���"�8�*�-� ��!C�E��
����*�1�1�1�8�i�;O�:W�:W�:Y��<�=M�=T�=T�<U�UW�X`�Wa�b�c�c�;Z�1rc���|jdd��t|j��D]}|jdk(r|s�t	|��!|t
zj
d�|dzjd��y)NTrzrz9Mermaid QA root. Safe to reset by scripts/qa_mermaid.py.
)r|)r�r>�iterdirr0�remove_pathr�r�)rsrn�childs   rr�r��so���N�N�4�$�N�/��h�&�&�(�)���:�:��#�I���E��*��	��%�%�&b�c�
�
��!�!�4�!�0rc��|j�r&|j�stj|�y|j	d��y)NT)�
missing_ok)�is_dir�
is_symlink�shutil�rmtree�unlink)�paths rr�r�s.���{�{�}�T�_�_�.��
�
�d�����t��$rc��tjj�}|j|jz}|jdd��|j|jz}|jdz|jz}	|j�"t||j�t||�|j�rt|�ni}d}i}|j��r|jj�}	|dzj|	dz�t|||	�}t!|dz|�|dzj|j"�|dzj|j$�t'|j"�}|d	zjt)j*|d
d��dz�t-|j/d�xsg�}
|j0d
k7r'|j2st5d|j0�d|
����|
r|j2st5d|
����t7|j/d�xsd�j�st5d��|j9||||�}|j�rt|�ni}t;|dz|�t;|dz|�t=|dz||�t?|jdtA|�|j�rt7|�nd|r|j0ndt-|j/d�xsg�|��}
|j�r2|j�r"|jDjFstI||�|
S#tB$rQ}t?|jdtA|�|j�rt7|�ndt7|���}
Yd}~��d}~wwxYw#|j�r5|j�r$|jDjFs
tI||�wwwwxYw)NTrz�	snapshotsz
prompt.txtr�zmermaid_command.jsonz
stdout.txtz
stderr.txtzmermaid.jsonr�r��errorsrzmermaid exited r�zmermaid reported tool errors: �response�z"mermaid returned an empty responsezbefore_manifest.jsonzafter_manifest.jsonz
diff.patch)r0r2r4r6r7r9r:F)r0r2r4r6r;)%r�r�r�rJr0r�rKrC�create_fixture�	copy_treer��manifestrD�stripr��run_mermaidr�rr �parse_mermaid_jsonr�r�r>rdrrFrrrE�write_manifest�
write_diffr/�elapsed_secondsr�r�keep_workspace�restore_tree)r�r��start�scenario_dirr6�snapshot�before�mermaid_result�mermaid_jsonrDr�r:�afterr�r�s               rr�r�	sq���K�K�O�O��E��;�;����.�L����t�d��3��"�"�X�]�]�2�I��{�{�[�(�8�=�=�8�H�4.����'��9�h�&6�&6�7��i��*�(1�(8�(8�(:��)�$��������?�?�&��_�_�*�*�,�F�
�L�
(�4�4�V�d�]�C�(��i��@�N��,�)?�?��P�
�L�
(�4�4�^�5J�5J�K�
�L�
(�4�4�^�5J�5J�K�-�n�.C�.C�D�L�
�N�
*�6�6��
�
�<��T�B�T�I�
��,�*�*�8�4�:��;�F��(�(�A�-�h�6S�6S��/�.�2K�2K�1L�B�v�h� W�X�X��h�;�;��"@��� I�J�J��|�'�'�
�3�9�r�:�@�@�B�� D�E�E��!�!�#�y�&�.�I��'0�'7�'7�'9���#�r���|�&<�<�f�E��|�&;�;�U�C��<�,�.��)�D������,�U�3�(1�(8�(8�(:�c�)�n��<J�~�8�8�PT��� 0� 0�� :� @�b�A��
��$����(�/�/�"3�C�H�H�<S�<S���9�-��M���
������,�U�3�(1�(8�(8�(:�c�)�n����H�
���
������(�/�/�"3�C�H�H�<S�<S���9�-�=T�"3��s-�JM�	N6�%AN1�,N9�1N6�6N9�9APc���t|jjd|jjdt	|�ddd|g	t
|jj��S)NrQ�--path�runz-fr�r�)r�rrrrqrrgr�)r�r6rDs   rr�r�IsW����H�H� � ���H�H�N�N���	�N�����
	
�
���� � ��rc�R�|j�rt|�nd|jdd��t|�}|j	�D]Y\}}||z}|j
jdd��|j
tj|�j���[y)NTrz)
r�r�r��
fixture_files�itemsr�r��textwrap�dedent�lstrip)r6rC�files�rel�contentr�s      rr�r�[s���'�.�.�0�K�	��d��
�O�O�D�4�O�0��'�"�E����
���W��3��������$���6��������0�7�7�9�:�&rc���ddddd�}|dk(r|jddd��|S|d	k(r|jd
dd��|S|dk(r|jdd
d��|Std|����)Nz�
            # Mermaid QA Arithmetic Fixture

            This is a tiny Python project used to test Mermaid.

            Run checks with:

            ```bash
            python3 -m unittest discover -s tests
            ```
        a5
            # Mermaid QA Fixture

            - This is a disposable QA project.
            - Use `python3 -m unittest discover -s tests` for validation.
            - Do not edit tests unless the user explicitly asks.
            - Keep implementation changes small and explain the command result.
        r�)z	README.mdz
MERMAID.mdzsrc/__init__.pyztests/__init__.py�cleanz�
                    def add(a, b):
                        return a + b


                    def subtract(a, b):
                        return a - b
                a�
                    import unittest

                    from src.calculator import add, subtract


                    class CalculatorTests(unittest.TestCase):
                        def test_add(self):
                            self.assertEqual(add(2, 3), 5)

                        def test_subtract(self):
                            self.assertEqual(subtract(7, 4), 3)


                    if __name__ == "__main__":
                        unittest.main()
                )�src/calculator.pyztests/test_calculator.py�	buggy_addz�
                    def add(a, b):
                        return a - b


                    def subtract(a, b):
                        return a - b
                a!
                    import unittest

                    from src.calculator import add, subtract


                    class CalculatorTests(unittest.TestCase):
                        def test_add(self):
                            self.assertEqual(add(2, 3), 5)
                            self.assertEqual(add(-1, 1), 0)

                        def test_subtract(self):
                            self.assertEqual(subtract(7, 4), 3)


                    if __name__ == "__main__":
                        unittest.main()
                �missing_multiplya�
                    import unittest

                    from src.calculator import add, multiply, subtract


                    class CalculatorTests(unittest.TestCase):
                        def test_add(self):
                            self.assertEqual(add(2, 3), 5)

                        def test_subtract(self):
                            self.assertEqual(subtract(7, 4), 3)

                        def test_multiply(self):
                            self.assertEqual(multiply(6, 7), 42)
                            self.assertEqual(multiply(-3, 4), -12)


                    if __name__ == "__main__":
                        unittest.main()
                zunknown fixture: )�updater)rC�commons  rr�r�es���
����+�F�0�'���
�
�&�-�
�	
�@�M�G
�K�	��
�
�&�-�
�	
�D�M�I
�&�	&��
�
�&�-�
� 	
�F�M��+�G�9�5�6�6rc�>�t|�}||k7rtd��dgS)Nz%read-only project scan modified fileszworkspace unchanged)r�r)�_ctxr6r��_mermaidr�s     r�check_read_onlyr��s*��
�Y��E�����?�@�@�!�"�"rc�0�tgd�|��}|jdk7r%td|j�d|j����t|�}t
||�}|dgk7rtd|����|dzd	zj�}d
|vrtd��gd�S)
N��python3z-m�unittest�discoverz-s�tests�rr�fixture tests still fail:
r�r��/expected only src/calculator.py to change, got �src�
calculator.pyzreturn a + bz/calculator.add was not repaired to use addition)�
tests pass�only implementation changedzadd uses addition�r�rrrr r��
changed_files�	read_text�r�r6r�r�r�r��changed�sources        r�check_fix_failing_testr�s����Q�W`�
a�F�
���A���5�f�m�m�_�B�v�}�}�o�V�W�W��Y��E��F�E�*�G��&�'�'��I�'��S�T�T��%��/�1�
<�
<�
>�F��V�#��I�J�J�M�Mrc�0�tgd�|��}|jdk7r%td|j�d|j����t|�}t
||�}|dgk7rtd|����|dzd	zj�}d
|vrtd��gd�S)
Nr�r�rr�r�r�r�r�r�zdef multiplyz%multiply function was not implemented)r�r�zmultiply implementedr�r�s        r�check_add_small_featurers����Q�W`�
a�F�
���A���5�f�m�m�_�B�v�}�}�o�V�W�W��Y��E��F�E�*�G��&�'�'��I�'��S�T�T��%��/�1�
<�
<�
>�F��V�#��?�@�@�P�Prc��t|jjdddgt��}t	|j
dz|�|jdk7rtd|j����d|jvrtd	��d
gS)N�tasksz--limit�5r�zruntime_tasks.jsonrz`mermaid tasks` failed: zMermaid runtime tasksz8runtime task output did not include the expected headingz#runtime tasks command exits cleanly)
r�rrrrgr�rJrrr r)r��
_workspace�_beforer�r�s     r�check_runtime_smokers}���#�(�(�.�.���C�H�i�
X�F��#�+�+� 4�4�f�=�
���A���2�6�=�=�/�B�C�C��f�m�m�3��R�S�S�1�2�2rc��|jdd��t|jjd|dddddd	g	t�
�}t|jdz|�|jdk7rtd
|j����t|j�}|jd�durtd|����t|jd�xsd�dkrtd��t|jd�xsd�dkrtd��t|jd�xsd�dkrtd��dD]?}|j|�}|rt|�j�r�0td|�d|����gd�S)NTrzr��qaz
compact-smokez--turns�6z--formatr�r�zcompact_smoke_command.jsonrz#`mermaid qa compact-smoke` failed: r2z compact-smoke reported failure: �archived_messagesz"compact-smoke archived no messages�preserved_messagesz#compact-smoke preserved no messages�replacement_messages�z3compact-smoke produced too few replacement messages)�conversation_path�archive_pathzcompact-smoke missing r�)z#compact smoke command exits cleanlyzarchives and preserves messagesz$conversation and archive files exist)r�r�rrrrgr�rJrrr r�rrdrrr�)r�r6rr�r��payload�keyr�s        r�check_compact_smoker#s���O�O�D�4�O�0�
��H�H� � ���������
	
�
�
�F��#�+�+� <�<�f�E�
���A���=�f�m�m�_�M�N�N� ����/�G��{�{�4���$��:�7�)�D�E�E�
�7�;�;�*�+�0�q�1�Q�6��<�=�=�
�7�;�;�+�,�1��2�a�7��=�>�>�
�7�;�;�-�.�3�!�4�q�8��M�N�N�4���{�{�3����4��:�,�,�.��4�S�E��D�6�B�C�C�5��r�
compact_smokerZ)r0rBrCrDrE�
runtime_smoke�read_only_project_scanr[r�z�
            Inspect this small Python project. Do not modify any files.
            Report the project purpose, important files, the validation command,
            and one possible next improvement.
        �fix_failing_testr�z�
            Run `python3 -m unittest discover -s tests`, fix the implementation
            bug that causes the failure, rerun the same command, and report the
            result. Do not edit tests.
        )r0rBrCrDrErF�add_small_featurer�z�
            Run `python3 -m unittest discover -s tests`, implement the missing
            calculator feature needed by the tests, rerun the same command, and
            report the result. Do not edit tests.
        )rrrrrzdict[str, Scenario]rWc���|dk(rttj��Stj�D��cgc]\}}|j|k(s�|��c}}Scc}}w)Nr\)r>rWrjr�rB)rBr0r�s   rr�r��sK���u�}��I�N�N�$�%�%�'0���'8�R�'8�^�T�8�H�M�M�T�<Q�D�'8�R�R��Rs�A�Ac���|D�cgc]
}t|���}}tj|t|�dd|d��}t|t|�|j|j
|j��Scc}w)NTF)r�text�capture_outputr��check)rrrrr )r�
subprocessr�rrrr )rrr��arg�argv�	completeds      rr�r��sy��
!%�%���C��H��D�%�������H�
����
�I��
���H��'�'����������&s�A4c	���	tj|�}t	|t
�std��|S#tj$r}td|�d|dd���|�d}~wwxYw)Nz#Mermaid stdout was not valid JSON: r�i�z%Mermaid JSON output was not an object)r��loads�JSONDecodeErrorr�
isinstancer,)r�valuer�s   rr�r��so��_��
�
�6�"���e�T�"��?�@�@��L��	���_��=�c�U�"�V�E�T�]�O�T�U�[^�^��_�s�4�A!�A�A!c���i}|j�s|Std�|jd�D��D];}|j|�j	�}t|�r�.t
|�||<�=|S)Nc3�BK�|]}|j�s�|���y�wr"��is_file�r��ps  rr�zmanifest.<locals>.<genexpr>������A�/�Q�Q�Y�Y�[�q�/�����*)r�ri�rglob�relative_to�as_posix�
should_ignore�sha256_file��root�outr�r�s    rr�r��sl���C��;�;�=��
��A�$�*�*�S�/�A�A�����t�$�-�-�/�������t�$��C��	B�
�Jrc�b�tt|�j�}t|tz�Sr")�setr�partsr1�
IGNORED_PARTS)r�r;s  rr4r4�s$����S�	��� �E���
�%�&�&rc���tj�}|jd�5�t�fd�d�D]}|j	|��	ddd�|j�S#1swY|j�SxYw)N�rbc�&���jd�S)Ni)�read)�handles�r�<lambda>zsha256_file.<locals>.<lambda>�s���&�+�+�k�":rr)�hashlib�sha256�open�iterr��	hexdigest)r��digest�chunkrAs   @rr5r5�sh���
�^�^�
�F�	
���4��F��:�C�@�E��M�M�%� �A�
������
������s�&A&�&A>c��tt|�t|�z�}|D�cgc](}|j|�|j|�k7s�'|��*c}Scc}wr")rir:rd)r�r�rjrs    rr�r��sH���#�f�+��E�
�*�+�D��E�4�C�6�:�:�c�?�e�i�i��n�#D�C�4�E�E��Es�(A�Ac�X�|jtj|dd��dz�y�Nr�Tr�r�)r�r�r�)r��datas  rr�r��s ���O�O�D�J�J�t�A��>��E�Frc�t�|jtj|j�dd��dz�yrL)r�r�r�r()r�r�s  rr�r��s'���O�O�D�J�J�v�~�~�/��T�J�T�Q�Rrc
���g}t|�}t|�}tt|�t|�z�D]l}|j|g�}|j|g�}||k(r�-|j	tj||d|��d|��d���|jd��n|jdj|�j�|r	dz�ydz�y)Nzbefore/zafter/r�)�fromfile�tofile�linetermr�)�
text_filesrir:rd�extend�difflib�unified_diffrVr��join�rstrip)	r�r�r��lines�before_files�after_filesr��old�news	         rr�r��s����E��f�%�L��U�#�K��c�,�'�#�k�*:�:�;�����s�B�'���o�o�c�2�&���#�:��
���� � ���"�3�%����u�~��
�	
�	���R��<�	�O�O�D�I�I�e�$�+�+�-���G�H�B�G�Hrc�>�i}|j�s|Std�|jd�D��D]O}|j|�j	�}t|�r�.	|j
�j�||<�Q|S#t$r	dg||<Y�ewxYw)Nc3�BK�|]}|j�s�|���y�wr"r*r,s  rr�ztext_files.<locals>.<genexpr>�r.r/r0z<binary>)	r�rir1r2r3r4r��
splitlines�UnicodeDecodeErrorr6s    rrSrS�s��� "�C��;�;�=��
��A�$�*�*�S�/�A�A�����t�$�-�-�/������	$��~�~�'�2�2�4�C��H�B��J��"�	$�"�|�C��H�	$�s�%!B
�
B�Bc�j�|j�rt|�ndtj||�yr"�r�r�r��copytree)r��dsts  rr�r��s#���
�
��K���$��
�O�O�C��rc�j�|j�rt|�ndtj||�yr"rc)r�r6s  rr�r��s&��'�.�.�0�K�	��d��
�O�O�H�i�(rc�`�tjj�|z
j�Sr")r�r�r��
total_seconds)r�s rr�r�s!���K�K�O�O���%�4�4�6�6rc	��td�td|���td|d���td|d���t�|jdg�D]�}|jd�rd	nd
}t|�d|d�d
|dd�d��|jd�r|dD]}td|����|jd�rtdt|d����|jd�s��td|d�����|jd�rt�td|d���t�t|jd�rd	�yd
�y)NrwzReport: zModel: rqz
Test env: rsrur2�PASSry� r0z (r4z.1fzs)r:z  - r9z"  - mermaid tool errors observed: r;rtrx)r�rd�len)r�r��item�statusrs     rr�r�sL��	�
��	�H�[�M�
"�#�	�G�F�7�O�$�
%�&�	�J�v�j�)�*�
+�,�	�G��
�
�9�b�)���8�8�D�>��v��
����$�v�,��r�$�/A�*B�3�)G�r�J�K��8�8�H���h�����U�G�n�%�(��8�8�$�%��6�s�4�@P�;Q�7R�6S�T�U��8�8�I���D��i��)�*�+�*��z�z�-� �
��
���}�-�.�/�0�	�G�	�F�J�J�t�$�&�1�&�1r�__main__)r+rI)r+r)rsrr+�None)rsrrnr1r+rp)r�rr+rp)r�rHr�rAr+r/)r�rHr6rrDrr+r)r6rrCrr+rp)rCrr+�dict[str, str])
r�rHr6rr�r,r��CommandResult | Noner+r)
r�rHrrrr,r�rrr+r)
r�rHr6rrr,r�rrr+r)rBrr+r)�x)rzIterable[str | Path]rrr�rr+r)rrr+r,)r7rr+rq)r�rr+r1)r�rr+r)r�rqr�rqr+r)r�rrMrqr+rp)r�rr�rr+rp)r�rr�rr�rr+rp)r7rr+zdict[str, list[str]])r�rrerr+rp)r�rr6rr+rp)r�zdt.datetimer+r3)r�r,r�rr+rp)D�__doc__�
__future__rr_r$r�r�rUrCr�rbr�r�sysr��pathlibr�typingrr�__file__r�r{rgrerfr�r<�RuntimeErrorr�	dataclassrr/rArHrkr�r�r�r�r�r�r�r�r�rrrrrWr-r�r�r�r�r4r5r�r�r�r�rSr�r�r�r�r�exitrrr�<module>r}s����#�������	�
��
���%�
��N�"�"�$�,�,�Q�/�	��4�5�=�=�?��$�
��	��
�	��	�
���(�(��(�
���(�(��(�����d�#�'�'�$�'�
�������7�tJ$�Zd�01�%�=�@�$;�z�z	#�
�	#��	#�
�	#�#�		#�
�	#�N�
�N��N�
�N�#�	N�
�N�&Q�
�Q��Q�
�Q�#�	Q�
�Q�&3�	�3��3��3�#�	3�
�3�)�	�)��)��)�#�	)�
�)�Z�
�
���#���
�
���#��'�
%�
���
 �
�!�
�
���
'�!��"�
 �
�"��
(�!��M2"�	��2�jS���
��	
�����	�.�	�'�
�F�
G�S�I�,��
)�
7�2�.�z���C�H�H�T�V��r