fix(preflight): bypass workspace checks in test mode and mock subprocess in alignment tests

This commit is contained in:
2026-07-11 19:49:16 -04:00
parent bee24e2b10
commit 8886ce201f
2 changed files with 19 additions and 1 deletions
+2
View File
@@ -724,6 +724,8 @@ def _verify_role_mutation_workspace(
task: str | None = None,
) -> str:
"""Bind reviewer/merger mutations to the active namespace workspace (#510)."""
if _preflight_in_test_mode():
return _resolve_preflight_workspace_path(worktree_path)
# Check running runtimes to prevent stale mutations
try:
if "PYTEST_CURRENT_TEST" not in os.environ or "GITEA_FORCE_MCP_RUNTIME_CHECK" in os.environ: