From 086f2643355d36b62ccf74cbdac6200ca31a498f Mon Sep 17 00:00:00 2001 From: "duanjialing.777" Date: Thu, 1 Oct 2026 04:45:48 +0800 Subject: [PATCH] test(ci): isolate semantic probe coverage Signed-off-by: duanjialing.777 --- tests/architecture/test_semantic_development_probe.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/architecture/test_semantic_development_probe.py b/tests/architecture/test_semantic_development_probe.py index 94987444c4..c58a2d2555 100644 --- a/tests/architecture/test_semantic_development_probe.py +++ b/tests/architecture/test_semantic_development_probe.py @@ -2,6 +2,7 @@ from __future__ import annotations +import os from pathlib import Path import subprocess import sys @@ -344,6 +345,13 @@ def probe_cli(repository: Path) -> Path: def _run_probe_cli(repository: Path) -> subprocess.CompletedProcess[str]: + # pytest-cov injects subprocess startup variables. The synthetic checkout + # must not contribute temporary source paths to real CI. + env = { + key: value + for key, value in os.environ.items() + if not key.startswith(("PYTEST", "COVERAGE", "COV_CORE")) + } return subprocess.run( [ sys.executable, @@ -352,6 +360,7 @@ def _run_probe_cli(repository: Path) -> subprocess.CompletedProcess[str]: "HEAD", ], cwd=repository, + env=env, capture_output=True, text=True, check=False,