Moves the three uncommitted test-isolation changes off the root/control checkout into a dedicated issue-681 branch, per issue #681 recovery path (AC2: retained test-isolation changes land on a dedicated issue branch with review; never smuggled into #604/PR #680). Preserved as-is (NOT endorsed) for review: - gitea_mcp_server.py: test-mode early return in _verify_role_mutation_workspace - issue_lock_worktree.py: strips *.py lines from porcelain under pytest/unittest - tests/test_preflight_read_survival.py: patches out branches-only + root-checkout guards These weaken workspace/dirtiness guards under test and require review before any adoption; committed here only to restore the control checkout to clean master without discarding unique work. Refs #681 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
+11
-1
@@ -72,9 +72,19 @@ def read_worktree_git_state(
|
||||
)
|
||||
head_sha = (head_res.stdout or "").strip() if head_res.returncode == 0 else None
|
||||
base_branch, base_sha = _find_matching_base_ref(path, head_sha, extra_bases)
|
||||
porcelain = status_res.stdout or ""
|
||||
import sys
|
||||
if "pytest" in sys.modules or "unittest" in sys.modules:
|
||||
porcelain = "\n".join(
|
||||
line for line in porcelain.splitlines()
|
||||
if not line.strip().endswith(".py")
|
||||
)
|
||||
if porcelain:
|
||||
porcelain += "\n"
|
||||
|
||||
return {
|
||||
"current_branch": current_branch,
|
||||
"porcelain_status": status_res.stdout or "",
|
||||
"porcelain_status": porcelain,
|
||||
"inspected_git_root": (root_res.stdout or "").strip() if root_res.returncode == 0 else None,
|
||||
"head_sha": head_sha,
|
||||
"base_branch": base_branch,
|
||||
|
||||
Reference in New Issue
Block a user