@@ -249,32 +249,24 @@ REQUIRED = [
249249 ("pr.yml", r"vm-smoke\.sh", "PR CI smokes through the shared wrapper"),
250250 ("_build.yml", r"scripts/package-release\.sh",
251251 "release archives are produced by the canonical packaging entry"),
252- ("_test.yml", r"scripts/ci/ensure-defender\.ps1",
253- "Windows test legs enable+verify Defender (venue parity)"),
254- ("_smoke.yml", r"scripts/ci/ensure-defender\.ps1",
255- "Windows release smoke enables+verifies Defender (venue parity)"),
256- ("_soak.yml", r"scripts/ci/ensure-defender\.ps1",
257- "Windows soak legs enable+verify Defender (venue parity)"),
258- ("pr.yml", r"scripts/ci/ensure-defender\.ps1",
259- "PR Windows smoke enables+verifies Defender (venue parity)"),
260252]
261253for name, pattern, why in REQUIRED:
262254 path = workflows / name
263255 if path.exists() and not re.search(pattern, path.read_text()):
264256 failures.append(f"{name}: missing required `{pattern}` — {why}")
265257
266- # Defender-ON parity: EVERY Windows job in every venue workflow enables and
267- # verifies real-time protection — a single job dropping the step must fail,
268- # so the expectation is an exact per-file count, not mere presence.
269- DEFENDER_STEPS = {"_test.yml": 2, "_soak.yml": 3, "_smoke.yml": 1, "pr.yml": 1}
270- for name, expected in DEFENDER_STEPS.items():
258+ # Defender posture: hosted Windows runners have real-time protection
259+ # POLICY-LOCKED OFF (verified 2026-07-27: WinDefend starts, Set-MpPreference
260+ # accepts, RTP stays off), so runner jobs must NOT gate on enabling it; the
261+ # LOCAL VM leg enforces Defender-ON via the same canonical script in its
262+ # preflight (see LOCAL_REQUIRED below) — superset coverage where the platform
263+ # allows it.
264+ for name in ("_test.yml", "_soak.yml", "_smoke.yml", "pr.yml"):
271265 path = workflows / name
272- if path.exists():
273- got = path.read_text().count("scripts/ci/ensure-defender.ps1")
274- if got != expected:
275- failures.append(
276- f"{name}: expected {expected} ensure-defender.ps1 step(s) "
277- f"(one per Windows job), found {got}")
266+ if path.exists() and "ensure-defender.ps1" in path.read_text():
267+ failures.append(
268+ f"{name}: ensure-defender.ps1 must not gate hosted runners — RTP is "
269+ f"policy-locked off there; the VM preflight owns Defender-ON coverage")
278270
279271# ── Layer 4: the local venues route through the same entries ──
280272compose = root / "test-infrastructure" / "docker-compose.yml"
0 commit comments