fix: residual preflight/worktree/test-isolation remediations after #673 #676
Merged
sysadmin
merged 2 commits from 2026-07-11 19:15:56 -05:00
fix/issue-675-residual-preflight-remediation into master
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#676
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Residual preflight / review-worktree / test-isolation fixes that remained after #673 landed via PR #674. Recovered from a local worktree after MCP EOF interrupted the original publish path.
Closes #675
Changes
reviewer_worktree.py, ownership, cleanup audit, and preflight paths/worktreesNameError inwebui/worktree_scanner.pytests/conftest.py, root-checkout guard tests, and workspace-guard alignment testsContext
Validation
From worktree
/Users/jasonwalker/Development/Gitea-Tools/branches/fix-issue-673-remediate-regressions:Head
72b18143f83a060de4b38138cf4da940bc543206repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #676
issue: #675
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 96813-f79bd8ac52fe
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-676
phase: claimed
candidate_head:
72b18143f8target_branch: master
target_branch_sha:
bee24e2b10last_activity: 2026-07-11T23:55:58Z
expires_at: 2026-07-12T01:55:58Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #676
issue: #675
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 96813-f79bd8ac52fe
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-676
phase: claimed
candidate_head:
72b18143f8target_branch: master
target_branch_sha:
bee24e2b10last_activity: 2026-07-12T00:06:42Z
expires_at: 2026-07-12T02:06:42Z
blocker: none
Reviewer decision: APPROVE
PR #676 (Closes #675) reviewed at head
72b18143f83a060de4b38138cf4da940bc543206in isolated worktreebranches/review-pr-676.Scope
Exactly the 8 expected files, no unrelated changes:
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.Findings
reviewer_worktree.REVIEW_WORKTREE_RE(+is_review_worktree_path()helper); ownership, webui scanner, and cleanup audit now import the single source. Shared-by-identity confirmed at runtime; no circular import.tests/conftest.pyclears allGITEA_*_WORKTREEenv vars → hermetic isolation from host-environment leakage.subprocess.run/os.pathmocks; webui/worktreesNameError resolved.gitea_mcp_server.pychange is a blank line only — no functional edit; the #510 role-mutation workspace guard gains no test-mode bypass.test_root_checkout_guard.py. No whitespace errors (git diff --checkclean).Validation (reviewer-reproduced, isolated worktree)
pytest tests/test_root_checkout_guard.py tests/test_workspace_guard_alignment.py tests/test_reviewer_worktree*.py tests/test_worktree_cleanup*.py -q→ 86 passed, 13 subtests passed (matches author).pytest -k "scanner or worktree_ownership"→ 15 passed.git diff --check→ clean. Core-module import-cycle check → OK.Canonical PR State
STATE: approved-ready-for-merge
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #676 into master via sanctioned Gitea merge tooling under explicit operator authorization.
NEXT_PROMPT:
WHAT_HAPPENED: Reviewer sysadmin/prgs-reviewer reviewed PR #676 at head
72b18143in isolated worktree branches/review-pr-676. Scope limited to 8 expected files; canonical worktree regex consolidated; hermetic test isolation added; webui NameError fixed; no new test-mode bypass of the #510 workspace guard. A moot prior-session #332 lock on merged PR #674 was cleared via the sanctioned cleanup tool under operator authorization before this verdict. Parent incident #673 was closed by PR #674 (merge commitbee24e2b).WHY: Change is confined to the stated #675 residual remediation, removes duplicate regex definitions in favor of one source of truth, and fixes host-env test leakage; all reviewer-reproduced validation passes.
ISSUE: #675
HEAD_SHA:
72b18143f8REVIEW_STATUS: approve verdict posted at head
72b18143MERGE_READY: yes — clean and merge-authorizing at head
72b18143(pending explicit operator authorization for the merger)BLOCKERS: none.
VALIDATION: focused pytest 86 passed + 13 subtests; scanner/ownership 15 passed; git diff --check clean; import-cycle check OK.
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
[THREAD STATE LEDGER]
What is true now: PR #676 open, mergeable, head
72b18143(matches expected), base master atbee24e2b. No prior reviews before this verdict.72b18143.What changed: Reviewer validated scope and reproduced author validation in isolated worktree; moot #332 lock on merged PR #674 cleared under operator authorization; approve verdict posted.
What is blocked:
Who/what acts next:
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
adopted_at: 2026-07-12T00:15:48Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 96813-f79bd8ac52fe
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 10378
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #676
issue: #675
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 39922-9fc6e9bfede9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-676
phase: adopted
candidate_head:
72b18143f8target_branch: master
target_branch_sha:
bee24e2b10last_activity: 2026-07-12T00:15:48Z
expires_at: 2026-07-12T02:15:48Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #676
issue: #675
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 39922-9fc6e9bfede9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-676
phase: released
candidate_head:
72b18143f8target_branch: master
target_branch_sha:
bee24e2b10last_activity: 2026-07-12T00:16:29Z
expires_at: 2026-07-12T02:16:29Z
blocker: post-merge-moot
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-reviewer2026-07-12T00:19:06.548188+00:00approveon PR fix: residual preflight/worktree/test-isolation remediations after #673 (#676)closed(merged=True)de27053f741bdc90f29b3748f627fc6b39894ee11prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.