o
    ÅÑj¯  ã                   @   sT  d Z ddlZddlZddlZddlZddlZg d¢Zdddddd	d
ddddœ
Ze ¡ Z	g Z
e ¡ D ]»\Z\ZZZZejdd�Zz¥eD ]Ze ej e	e¡e¡ qBeej ed¡dd� ¡ Zeev shJ de› �ƒ‚eej ed¡ddd� e eed¡¡ ejejdgeddd�Zdd„ ej  ¡ D ƒZ!eduože"dd„ e!D ƒƒZ#eduo§eej$v Z%dej$v o¯e% Z&e#p³e%Z'e#r¸dne%r¼d nd!Z(e)e'rÃd"nd#› d$ed%›d&e(› �e&rÑd'nd( ƒ e'sÜe
 *e¡ W ej+edd)� q1ej+edd)� w eej e	d¡dd� ¡ sþJ d*ƒ‚e)d+e,eƒe,e
ƒ › d,e,eƒ› d-�e
�rd.e
› �nd( ƒ e -e
�r%d¡ dS d¡ dS )/u]  Positive control for the fixtures (rewrite 3). Each mutation breaks ONE sealed policy in a throwaway copy, in a
dedicated temp directory restored/removed in `finally`. DETECTION IS THE GATE (Kairo, Nova): a mutation counts as
caught only if its NAMED fixture fails, or (where declared) the expected crash signature appears. Any mutation not
caught â†’ exit 1. Scope: shows THESE breaks are caught; not a proof of every property (e.g. of the bootstrap).
History kept on purpose: the rewrite-2 harness's first run let 'A/B independent indices' through (constant A/B).
Run from liberation/same-standard/drm/.é    N)údrm_repeat_run.pyúdrm_repeat_run_fixtures.pyzdrm_pertrial_rates.pyzdrm_armB_fences.py)z5    if d:
        raise Stop(f"{name}: duplicate keysz9    if False:
        raise Stop(f"{name}: duplicate keyszduplicate U keyN)z+if sha_text(r["note"]) != r["note_sha256"]:z	if False:zstale digestN)zP    if lu0: rr["recog_lure_unstudied_old"], rr["recog_lure_unstudied_n"] = 0, 1
Ú Nzunsupported operand type)zL    lu0, fill0 = r["recog_lure_unstudied_n"] == 0, r["recog_filler_n"] == 0
zh    lu0, fill0 = r["recog_lure_unstudied_n"] == 0 or r["recog_target_n"] == 0, r["recog_filler_n"] == 0
zTARGET denominator 0N)z%                if why: excl[k] = whyzz                why += ['recall'] if (k in kU and 'recall_raw' not in kU[k]) else []
                if why: excl[k] = whyzmissing recallN)z'mA, mB = A[idx].mean(1), B[idx].mean(1)zOmA, mB = A[idx].mean(1), B[rng.integers(0, len(valid), size=idx.shape)].mean(1)zshare ONE index arrayN)z${"A", "B", "C"}, None, log, "O-file"z{"B"}, None, log, "O-file"zoriginal A/C rowsN)z.        validate_types(r, f"{name} line {i}")
r   zSTOP malformed schemaN)z"        if "existing_set" in cell:z;        if "existing_set" in cell and cell["retained"] > 0:zcommon n = 0 STILL printsN)ze        if any(v == "MISSING" for v in vals.values()) or len(present) < 2: st = "missing/unavailable"z7        if len(present) < 0: st = "missing/unavailable"zmissing temperaturesN)
zduplicates allowedzown-digest check skippedzzero-LU placeholder removedzTARGET zero over-excludedzrecall used to excludezA/B independent indiceszA/C rows made fatalzschema check removedzn=0 hides sensitivityzmissing temp read as equalÚdrm_mut_)Úprefixr   zutf-8)Úencodingzmutation anchor missing: Úwé   r   T)ÚcwdÚcapture_outputÚtextc                 C   s   g | ]	}|  d ¡r|‘qS )ÚFAIL)Ú
startswith©Ú.0Úl© r   úmutation_test.pyÚ
<listcomp>)   s    r   c                 c   s   � | ]}t |v V  qd S )N)Úfixturer   r   r   r   Ú	<genexpr>*   s   € r   Ú	Tracebackznamed fixture FAILEDzexpected crashz
NOT CAUGHTzCAUGHT zMISSED ú Ú28u    â†’ z  (+ unrelated crash, reported)r   )Úignore_errorszsource unreadableÚ
ú/z mutations caughtu     â›” MISSED: ).Ú__doc__Ú
subprocessÚshutilÚtempfileÚosÚsysÚFILESÚMUTSÚgetcwdÚsrc_dirÚ
undetectedÚitemsÚnameÚaÚbr   ÚcrashÚmkdtempÚtmpÚfÚcopyÚpathÚjoinÚopenÚreadÚorigÚwriteÚreplaceÚrunÚ
executableÚpÚstdoutÚ
splitlinesÚfailsÚanyÚcaught_by_fixtureÚstderrÚcaught_by_crashÚunrelated_crashÚokÚhowÚprintÚappendÚrmtreeÚlenÚexitr   r   r   r   Ú<module>   sJ    (í (.€ ":