Completed reviewer lease pinned to superseded PR head stays active with no canonical non-owner cleanup path #691
Closed
opened 2026-07-12 21:54:33 -05:00 by jcwalker3
·
5 comments
No Branch/Tag Specified
master
fix/issue-709-decision-lock-cross-profile
fix/issue-695-native-transport-quarantine
fix/issue-698-report-validator-schema
fix/issue-702-stale-binding-lease-recovery
fix/issue-699-structured-auth-mcp-errors
fix/issue-695-native-quarantine-v2
fix/issue-693-review-decision-lock-recovery
fix/issue-691-obsolete-reviewer-lease-cleanup
feat/issue-687-reconciler-branch-delete
fix/issue-683-workflow-guard-hardening
chore/issue-681-preserve-review-session-wip
feat/issue-604-anti-stomp-preflight
feat/issue-606-sentry-observability
fix/issue-671-block-stable-branch-push
fix/issue-675-residual-preflight-remediation
fix/issue-673-remediate-regressions-part2
fix/issue-673-remediate-regressions
feat/issue-603-lifecycle-labels
fix/issue-627-set-issue-labels-pagination
feat/issue-601-first-class-leases
feat/issue-612-incident-bridge
feat/issue-600-controller-allocator-api
fix/issue-620-head-scoped-review-locks
feat/issue-613-allocator-db-substrate
docs/mcp-stable-control-runtime-policy
feat/issue-609-prepared-review-verdict-resume
feat/issue-610-live-remote-parity
feat/issue-503-reviewer-active-worktree
feat/issue-470-preflight-contract
feat/issue-440-lock-recovery
feat/issue-440-branch-recovery
feat/issue-458-queue-fail-closed-copy
feat/issue-400-early-duplicate-work-gate
feat/issue-308-reconcile-inventory-pagination
feat/issue-308-reconcile-pagination-proof
docs/issue-261-agent-temp-artifact-cleanup
feat/issue-262-map-commit-files
fix/infra-stop-conflict-marker-false-positive
feat/issue-139-role-aware-task-routing
feat/issue-188-continuation-selection-wall
feat/issue-189-continuation-mode-proofs
feat/issue-232-refresh-wiki-proof-heads
feat/issue-210-block-workspace-edits
feat/issue-204-exact-issue-lock
docs/issue-80-label-taxonomy
docs/issue-79-safety-boundary-updates
v1.1.0
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
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#691
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.
A completed reviewer lease pinned to an obsolete PR head remains active after a formal REQUEST_CHANGES verdict and an author push, preventing review of the replacement head, with no canonical non-owner cleanup path.
Observed incident (PR #688 / issue #687)
master, remains in open state.sysadminat headc7a444eb4b41cf916fdbd20a4999ffd78af496d0(2026-07-12T21:24:01-05:00). That review is complete and finalized; the prior owning review session60615-d92824cff1bdposted its terminalphase: releasedlease marker (PR comment 10747).25883-7d4c6e6ebd53, profileprgs-reviewer,phase: claimed,candidate_head: c7a444eb…, worktreebranches/review-pr688-feat-issue-687-reconciler-branch-delete,expires_at: 2026-07-13T04:23:00Z.4a6357800364718a27a36ebc73578d4b929ff4aa(2026-07-12T21:36-05:00).gitea_get_pr_review_feedbackreportsreview_feedback_stale: trueandauthor_pushed_after_request_changes: true.phase=claimed, freshnessactive, pinned to the superseded head. Its worktree is clean atc7a444eand was never advanced to the new head. No lease phase progress since claim time.instructed_lease_missing_with_replacementwith prescribed actionwait; a live re-run ofgitea_diagnose_reviewer_pr_lease_handoff(2026-07-13T02:52Z, instructed_session_id=25883-7d4c6e6ebd53, instructed_comment_id=10749) classifiesforeign_activewithnext_action: wait. Both terminate in indefinitewait.Non-owner recovery inventory (all inapplicable)
gitea_release_reviewer_pr_lease— owner-session only; current controller session is not the owner.gitea_cleanup_post_merge_moot_lease— requires the PR to have landed on master or be in closed state; PR #688 remains open.gitea_expire_workflow_leases/gitea_reclaim_expired_workflow_lease/gitea_abandon_workflow_lease— operate on control-plane DB leases only. Comment lease 10749 has nolease_idin the DB (gitea_list_workflow_leasesshows no entry for PR #688). Foreign abandon proof is unsatisfiable by design here: owner PID 25883 is alive (anmcp_server.pyprocess — PID equality was NOT treated as ownership), the lease worktree exists, the PR is open, and no operator authorization was given.The current controller session performed no lease mutation, no takeover, no adoption, no repoint of the lease or its worktree, and had no authorized release path. Prescribed and followed action:
waitforexpires_at.Defect
A lease whose formal review verdict is already recorded and whose pinned head is superseded is provably obsolete, yet the diagnostic prescribes only indefinite
waitand no guarded non-owner cleanup path exists for an open PR.Acceptance criteria
waitwhen the lease is provably obsolete.Related
waitfor this case)Canonical Issue State
STATE:
blocked — superseded-head reviewer lease remains active after recorded expiry
CANONICAL_ITEM:
Issue #691 tracking the missing guarded cleanup path for obsolete reviewer lease comment 10749 on PR #688.
SUPERSEDED_ITEM:
PR #688 reviewer lease comment 10749, session 25883-7d4c6e6ebd53, pinned to obsolete head
c7a444eb4bwith recorded expires_at 2026-07-13T04:23:00Z.WHO_IS_NEXT:
controller
NEXT_ACTION:
Implement or authorize a guarded cleanup path for expired/superseded reviewer comment leases, or have the exact owner session release lease 10749; then restart PR #688 review from scratch.
NEXT_PROMPT:
WHAT_HAPPENED:
A fresh prgs-reviewer session rechecked PR #688 after the recorded expiry. gitea_assess_reviewer_pr_lease still returned lease comment 10749 as active with freshness stale_warning, session 25883-7d4c6e6ebd53, pinned to obsolete head
c7a444eb4b. gitea_diagnose_reviewer_pr_lease_handoff again returned classification instructed_lease_missing_with_replacement, next_action wait, mutation_allowed false, and forbade stealing, repointing, manual deletion, mtime manipulation, or direct session seeding.WHY:
The comment lease remains authoritative after its recorded expiry, so a new lease for current PR head
4a63578003cannot be acquired through the supported workflow.RELATED_PRS:
4a63578003BLOCKERS:
Lease 10749 remains foreign-active/stale_warning after expires_at; no supported non-owner cleanup path is available.
VALIDATION:
Read-only preflight only. Identity sysadmin / prgs-reviewer, workflow boundary clean, runtime/master parity in parity, PR #688 open and mergeable at expected current head. No new worktree, tests, lease mutation, review decision, or merge occurred.
LAST_UPDATED_BY:
sysadmin / prgs-reviewer / REVIEWER / 2026-07-12
Issue claim heartbeat
Canonical Issue State
STATE: author-complete — PR open; waiting independent review
WHO_IS_NEXT: reviewer
NEXT_ACTION: Independent REVIEWER validates PR #692 against #691 ACs; do not self-review or merge; do not manually clean lease 10749 in this product PR
NEXT_PROMPT:
WHAT_HAPPENED:
AUTHOR claimed #691, locked branch fix/issue-691-obsolete-reviewer-lease-cleanup, implemented only #691 in branches/issue-691-obsolete-lease-cleanup, opened PR #692 (Closes #691).
Implementation design
reviewer_pr_lease.assess_obsolete_reviewer_comment_lease_cleanup— pure eligibility assessorreviewer_pr_lease.diagnose_reviewer_pr_lease_handoff— extended classifications + cleanup next_actiongitea_cleanup_obsolete_reviewer_comment_lease— MCP tool (read-first; apply with confirmation + controller_recovery_authorized)phase: releasedmarker + durable audit comment; comment-backed (no DB lease_id)Cleanup eligibility matrix
Exact audit behavior
On successful apply: posts terminal lease body (blocker: obsolete-superseded-or-expired-lease) preserving old candidate_head; posts canonical audit comment with PR, lease_comment_id, session, heads, expiry, classification, tool name; does not seed _SESSION_LEASE; does not delete prior lease comments.
Test results
6d86db7: 2636 passed, 6 skippedRemaining risks
owner_process_alive); MCP leaves it unset unless provided — fail-closed for current-head expired orphan path without explicit evidenceWHY: #691 ACs require a precise guarded cleanup instead of indefinite wait when a lease is provably obsolete after terminal review + head move.
RELATED_PRS: PR #692 (this); incident PR #688 / lease 10749 / session 25883-7d4c6e6ebd53 (reproduction only — not modified)
BLOCKERS: none for independent review
VALIDATION:
6d86db793bLAST_UPDATED_BY: jcwalker3 / prgs-author / AUTHOR / 2026-07-13
Canonical Issue State
STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: Merger executes the merge sequence for PR #692.
NEXT_PROMPT:
WHY: PR #692 successfully verified and approved. Obsolete lease cleanup functionality fully validated and tested.
BLOCKERS: none
VALIDATION: 2636 passed, 6 skipped on commit
6d86db7.RELATED_PRS: #692
LAST_UPDATED_BY: reviewer
Canonical Issue State
STATE:
closed by PR #692 merge — lease-side product fix done; related decision-lock recovery defect tracked on #693
WHO_IS_NEXT:
author
NEXT_ACTION:
Implement decision-lock recovery on issue #693 (orthogonal to this closed issue’s lease cleanup)
NEXT_PROMPT:
WHAT_HAPPENED:
While reviewing the PR that closed this issue (#692 @
6d86db7…), formal decision marking required non-canonical recovery (stale review-decision lock + cleanup refuse + operator correction authorization) before APPROVE (review_id 426). Product work for #691 is merged (2376567…). Durable follow-up is #693 so the recovery failure remains traceable.WHY:
#691 closed on product acceptance must not erase the concurrent decision-lock recovery failure observed during independent review.
RELATED_PRS:
#692, #693, #688
BLOCKERS:
none for this closed issue; #693 is the open handoff
VALIDATION:
LAST_UPDATED_BY:
traceability cross-link / 2026-07-13