@@ -95,7 +95,8 @@ def refuses(call: Callable[[], object]) -> str | None:
9595
9696T0_FROZEN = "# T0\n \n ```text\n Status:\n FROZEN.\n collection_authorized: true\n ```\n "
9797T0_OPEN = "# T0\n \n ```text\n Status:\n NOT_FROZEN.\n collection_authorized: false\n ```\n "
98- T0_FROZEN_UNAUTHORIZED = "# T0\n \n ```text\n Status:\n FROZEN.\n collection_authorized: false\n ```\n "
98+ T0_FROZEN_UNAUTHORIZED = ("# T0\n \n ```text\n Status:\n FROZEN.\n "
99+ " collection_authorized: false\n ```\n " )
99100T0_OPEN_AUTHORIZED = "# T0\n \n ```text\n Status:\n NOT_FROZEN.\n collection_authorized: true\n ```\n "
100101
101102# A compliant Windows snapshot, used as a fixture on every platform so the
@@ -201,7 +202,7 @@ def qualification(stratum: str = "linux", t0: dict | None = None, **overrides) -
201202 "environment_manifest" : {"sha256" : "1" * 64 },
202203 "qualification_tool" : {"sha256" : "2" * 64 },
203204 "power_snapshot" : dict (COMPLIANT_POWER ),
204- "predicate" : { k : "pass" for k in hq . PREDICATE_KEYS } ,
205+ "predicate" : dict . fromkeys ( hq . PREDICATE_KEYS , "pass" ) ,
205206 "memory_metric" : hq .STRATUM_METRIC [stratum ],
206207 "qualified" : True , "qualified_at" : "2026-09-16T00:00:00+00:00" }
207208 doc .update (overrides )
@@ -368,8 +369,8 @@ def control_artifact_boundary() -> None:
368369 qual = path if slot == "qual" else good_q
369370 fresh = path if slot == "manifest" else good_m
370371 with fixed_power (COMPLIANT_POWER ):
371- message = refuses (lambda : hq .session_eligibility (
372- binding , qual , fresh , good_d , cand , good_link , crepo ,
372+ message = refuses (lambda b = binding , q = qual , f = fresh : hq .session_eligibility (
373+ b , q , f , good_d , cand , good_link , crepo ,
373374 quiesce_result = quiet ))
374375 if message is None :
375376 fail ("hostqual-artifact-boundary" , f"{ label } was consumed as a real artifact" )
@@ -621,7 +622,7 @@ def control_candidate_at_start() -> None:
621622def control_postflight () -> None :
622623 with tempfile .TemporaryDirectory () as raw :
623624 tmp = Path (raw )
624- pre , (bpath , qpath , mpath , dpath , cpath , lpath , crepo ) = session_fixture (tmp )
625+ pre , (bpath , qpath , mpath , _dpath , cpath , lpath , crepo ) = session_fixture (tmp )
625626 ppath = write (tmp , "pre.json" , pre )
626627 probe = tmp / "probe.json"
627628 probe .write_text ("{}" , encoding = "utf-8" )
@@ -658,14 +659,15 @@ def control_postflight() -> None:
658659def control_one_binding () -> None :
659660 with tempfile .TemporaryDirectory () as raw :
660661 tmp = Path (raw )
661- pre , (bpath , qpath , mpath , dpath , cpath , lpath , crepo ) = session_fixture (tmp )
662+ pre , (bpath , qpath , mpath , _dpath , cpath , lpath , crepo ) = session_fixture (tmp )
662663 ppath = write (tmp , "pre.json" , pre )
663664 probe = tmp / "probe.json"
664665 probe .write_text ("{}" , encoding = "utf-8" )
665666 original = json .loads (bpath .read_text (encoding = "utf-8" ))
666667 second = write (tmp , "b2.json" , {** original , "bound_at" : "a later moment" })
667668 with fixed_power (COMPLIANT_POWER ):
668- mixed = hq .session_admissibility (second , qpath , ppath , mpath , cpath , probe , lpath , crepo )
669+ mixed = hq .session_admissibility (second , qpath , ppath , mpath , cpath ,
670+ probe , lpath , crepo )
669671 if mixed ["admissible" ]:
670672 fail ("hostqual-one-binding" ,
671673 "a preflight from one binding and a postflight from another were admissible" )
@@ -975,7 +977,8 @@ def qualify_cli(name: str, prov: dict) -> tuple[int, Path]:
975977 record = hq .session_eligibility (bpath , qpath , mpath , dpath , cpath , lpath , crepo ,
976978 quiesce_result = quiet )
977979 if record ["eligible" ]:
978- fail ("hostqual-negative-evidence" , "a declared prohibited job left the session eligible" )
980+ fail ("hostqual-negative-evidence" ,
981+ "a declared prohibited job left the session eligible" )
979982 return
980983 if not any ("declaration" in r for r in record ["reasons" ]):
981984 fail ("hostqual-negative-evidence" ,
@@ -1019,7 +1022,7 @@ def control_campaign_link() -> None:
10191022 "a D7 payload edited after the campaign was linked to it was accepted" )
10201023 return
10211024
1022- pre , (bpath , qpath , mpath , dpath , cpath , lpath , crepo ) = session_fixture (tmp )
1025+ pre , (bpath , qpath , mpath , _dpath , cpath , _lpath , _crepo ) = session_fixture (tmp )
10231026 ppath = write (tmp , "pre.json" , pre )
10241027 probe = tmp / "probe.json"
10251028 probe .write_text ("{}" , encoding = "utf-8" )
0 commit comments