fix: remove duplicate verify_preflight_purity in gitea_adopt_merger_pr_lease (closes #548) #550
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#550
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
Fixes the duplicate
verify_preflight_puritycall insidegitea_adopt_merger_pr_lease(and the resulting_clear_preflight_capability_state) that was discovered and temporarily worked around during PR #542 / Issue #517 post-merge cleanup by the reconciler.Closes #548.
Root cause
_verify_role_mutation_workspace(...)(added for namespace/worktree binding) internally callsverify_preflight_purity(..., worktree_path=...).verify_preflight_purity(remote, task=...)immediately after.verify_preflight_purityalways ends with_clear_preflight_capability_state(), so capability proofs accumulated fromrecord_preflight_check/ prior whoami+resolve were cleared between (or by the duplicate) checks.Fix (minimal)
verify_preflight_puritycall. The_verify_role...path is the single, correct one (and passes the worktree_path).Tests
TestAdoptTool.setUpand addedtest_adopt_preserves_preflight_capability_state_no_duplicate_clear.git diff --check prgs/master: clean.See #542, #517, controller record #549, handoff comments on #542 (#7164 etc). Fresh reviewer pass requested.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T19:08:58Z
expires_at: 2026-07-08T21:08:58Z
blocker: none
Reconciler Audit & Status Update — PR #550
📝 Review & Deadlock Context
APPROVEDreview submission failed and remains blocked due to the known Issue #546 preflight capability/lease deadlock.99504-f3d005731a2b) remains active/orphaned on this open PR. Release is blocked because no canonical MCP tool exists to release reviewer leases on open PRs (capability limit).🧪 Validation Details & Wording Correction
🗳️ Merge Eligibility Status
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: #548
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T19:38:19Z
expires_at: 2026-07-08T21:38:19Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: #548
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T19:57:08Z
expires_at: 2026-07-08T21:57:08Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T20:14:20Z
expires_at: 2026-07-08T22:14:20Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: released
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T20:14:34Z
expires_at: 2026-07-08T22:14:34Z
blocker: manual-release
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 99504-f3d005731a2b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-08T20:15:53Z
expires_at: 2026-07-08T22:15:53Z
blocker: none
APPROVED
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: #548
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 13040-53c1ba160f8a
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550-fresh
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha:
78fce0dbb6last_activity: 2026-07-09T01:44:07Z
expires_at: 2026-07-09T03:44:07Z
blocker: none
Review PR #550 / Issue #548
Verdict: APPROVE
Scope
verify_preflight_purityingitea_adopt_merger_pr_lease_verify_role_mutation_workspacegitea_mcp_server.py,tests/test_merger_lease_adoption.pyonlyCorrectness
_verify_role_mutation_workspacealready callsverify_preflight_purity(remote, worktree_path=resolved, task=task)Validation
git diff --check prgs/master...HEAD: cleantests/test_merger_lease_adoption.py— 10 passed78fce0d(pre-existing/environment):test_verify_preflight_blocks_control_checkout_with_test_porcelaintest_pr487_style_merge_binds_clean_merger_workspaceEligibility / identity
sysadmin/prgs-reviewerjcwalker3(not self-review)a4e014e62b0a424c88b0cbf9111d9c5f81273672No REQUEST_CHANGES findings.
Next: merger session may merge after formal approval is visible at this head.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: #548
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 13040-53c1ba160f8a
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr550-lease-reconcile-215322
phase: claimed
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha:
78fce0dbb6last_activity: 2026-07-09T01:54:26Z
expires_at: 2026-07-09T03:54:26Z
blocker: none
adopted_at: 2026-07-09T01:54:28Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 13040-53c1ba160f8a
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 7309
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #550
issue: #548
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 33810-53d3541f8480
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr550
phase: adopted
candidate_head:
a4e014e62btarget_branch: master
target_branch_sha:
78fce0dbb6last_activity: 2026-07-09T01:54:28Z
expires_at: 2026-07-09T03:54:28Z
blocker: none