fix: residual preflight/worktree/test-isolation remediations after #673 #675

Closed
opened 2026-07-11 18:49:12 -05:00 by jcwalker3 · 1 comment
Owner

Context

Issue #673 (repository-wide master test-suite regression) was remediated and merged via PR #674 (fix/issue-673-remediate-regressionsmaster at bee24e2).

After that merge, residual local follow-up work remained in an isolated worktree (fix/issue-673-remediate-regressions-part2) that was never published because the MCP session hit EOF mid-workflow. This issue tracks that residual remediation only.

Residual defects (part2)

  1. Review worktree regex inconsistency — multiple modules use divergent patterns for review worktree path recognition (reviewer_worktree.py, reviewer_worktree_ownership.py, worktree_cleanup_audit.py, MCP preflight paths).
  2. Web UI NameError on /worktreeswebui/worktree_scanner.py still references an unbound/mismatched REVIEW_WORKTREE_RE symbol in some code paths.
  3. Test isolation gaps — workspace-guard alignment tests and root-checkout guard tests still leak host workspace state / real subprocess calls without proper mocks; tests/conftest.py needs stronger isolation defaults for preflight paths.
  4. Test-mode workspace bypass — preflight must bypass host workspace checks under pytest so suite results stay deterministic.

Scope (files)

  • gitea_mcp_server.py
  • reviewer_worktree.py
  • reviewer_worktree_ownership.py
  • worktree_cleanup_audit.py
  • webui/worktree_scanner.py
  • tests/conftest.py
  • tests/test_root_checkout_guard.py
  • tests/test_workspace_guard_alignment.py

Acceptance

  • Residual part2 fixes land on a dedicated branch/PR linked to this issue.
  • Targeted preflight/worktree/guard tests pass from the author worktree.
  • PR body includes Closes #<this-issue>.
  • No reuse of closed #673 / merged #674 branch for new work.

Related

## Context Issue #673 (repository-wide master test-suite regression) was remediated and merged via PR #674 (`fix/issue-673-remediate-regressions` → `master` at `bee24e2`). After that merge, residual local follow-up work remained in an isolated worktree (`fix/issue-673-remediate-regressions-part2`) that was never published because the MCP session hit EOF mid-workflow. This issue tracks that residual remediation only. ## Residual defects (part2) 1. **Review worktree regex inconsistency** — multiple modules use divergent patterns for review worktree path recognition (`reviewer_worktree.py`, `reviewer_worktree_ownership.py`, `worktree_cleanup_audit.py`, MCP preflight paths). 2. **Web UI NameError on `/worktrees`** — `webui/worktree_scanner.py` still references an unbound/mismatched `REVIEW_WORKTREE_RE` symbol in some code paths. 3. **Test isolation gaps** — workspace-guard alignment tests and root-checkout guard tests still leak host workspace state / real subprocess calls without proper mocks; `tests/conftest.py` needs stronger isolation defaults for preflight paths. 4. **Test-mode workspace bypass** — preflight must bypass host workspace checks under pytest so suite results stay deterministic. ## Scope (files) - `gitea_mcp_server.py` - `reviewer_worktree.py` - `reviewer_worktree_ownership.py` - `worktree_cleanup_audit.py` - `webui/worktree_scanner.py` - `tests/conftest.py` - `tests/test_root_checkout_guard.py` - `tests/test_workspace_guard_alignment.py` ## Acceptance - Residual part2 fixes land on a dedicated branch/PR linked to this issue. - Targeted preflight/worktree/guard tests pass from the author worktree. - PR body includes `Closes #<this-issue>`. - No reuse of closed #673 / merged #674 branch for new work. ## Related - Parent incident: #673 - Already merged remediation: PR #674
jcwalker3 added the type:bugstatus:in-progress labels 2026-07-11 18:49:55 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #675 - branch: fix/issue-675-residual-preflight-remediation - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
jcwalker3 added status:pr-open and removed status:in-progress labels 2026-07-11 18:50:16 -05:00
sysadmin removed the status:pr-open label 2026-07-11 19:20:54 -05:00
Sign in to join this conversation.
No labels type:bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#675