Allow canonical cleanup or override of stale #332 review decision locks after merged PRs #594
Closed
opened 2026-07-09 14:08:51 -05:00 by jcwalker3
·
3 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#594
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.
Problem
#332 correctly hard-stops a reviewer session after a terminal live review mutation (
approve/request_changes). That protection must remain for active, unmerged, or ambiguous terminal review state.After #559, review-decision locks are durable on disk under
~/.cache/gitea-tools/session-state/(e.g.review_decision_lock-prgs-reviewer.json). That durability can outlive the work the lock was meant to protect: if the referenced PR is already merged or closed, no merge sequence remains for that PR, yet the durable ledger still blocks unrelated new terminal reviews forever.Manual deletion of session-state files is not an acceptable normal workflow.
Live evidence (PR #592 review blocked by merged PR #586)
A reviewer completed technical review of PR #592 (Issue #590) and intended formal APPROVE, but formal submission was blocked:
Facts at block time:
~/.cache/gitea-tools/session-state/review_decision_lock-prgs-reviewer.jsonlive_mutationsreferenced prior terminal approvals including PR #5866913ac9(merge_commit_sha / master tip)git diff --checkcleantests/test_mcp_server.py: 207 passedRelated (not duplicates)
Required behavior
rmsession-state files as the normal path.Non-goals
Acceptance criteria
Suggested implementation notes (non-binding)
gitea_authorize_review_correctionfor mistaken reviews; do not overload it as the only path for post-merge stale locks unless semantics stay fail-closed and clearly documented.Source pointers
gitea_mark_final_review_decisionfail-closed under #332 after prior approve of merged #586~/.cache/gitea-tools/session-state/review_decision_lock-prgs-reviewer.jsonterminal_review_hard_stop_reasons/_load_review_decision_lock/_save_review_decision_lockingitea_mcp_server.py; durable store inmcp_session_state.pyCanonical Issue State
STATE: OPEN
WHO_IS_NEXT: author
NEXT_ACTION: Implement canonical MCP-safe stale review-decision lock cleanup/reset for merged or closed prior PRs without weakening active #332 hard-stop.
NEXT_PROMPT:
WHAT_HAPPENED: Duplicate search confirmed this issue already tracks the work. No new issue created. This comment appends the latest PR #592 formal-review block evidence from a second independent reviewer pass.
WHY: Keep one durable tracker (#594) for stale #332+#559 decision-lock cleanup; avoid duplicate issues for the same root cause.
RELATED_PRS: #592 (blocked formal APPROVE), #590 (isolation fix under review), prior terminal mutations referenced in durable lock for #589 / #585 / #586
BLOCKERS: none for this issue body update; formal APPROVE of PR #592 remains blocked until this issue lands or operator clears the stale lock manually
VALIDATION:
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
Additional PR #592 evidence (second pass)
Live PR #592
b810e512fd9f50b7c0106305914ad79553faee12jcwalker3sysadmin/prgs-reviewer(not self)tests/conftest.pytests/test_mcp_server.pytests/test_session_state_isolation.pyValidation (isolated
branches/review-pr-592-issue-590)git diff --check prgs/master...HEAD: cleanpython3 -m pytest tests/test_mcp_server.py -q: 207 passedtest_unknown_profile_blocks+ env-clear regression: 2 passedFormal review block
gitea_mark_final_review_decisionfail-closed:~/.cache/gitea-tools/session-state/review_decision_lock-prgs-reviewer.jsonlive_mutationsincluded terminal approves for PRs #589, #585, #586 (last terminal: #586)Durable tracking comments from that blocked review
#8472#8479Required fix reminder (unchanged scope)
Canonical MCP-safe cleanup/override only when prior lock target is terminal (merged/closed/no merge sequence remains). Must preserve #332 for active/unmerged/ambiguous locks. Require identity/profile/capability proof + live Gitea verification + durable audit trail. Tests and workflow docs as listed in the issue acceptance criteria.
Issue claim heartbeat
Canonical Issue State
STATE: BLOCKED
WHO_IS_NEXT: user
NEXT_ACTION: Free durable prgs-reviewer decision lock (stale terminal approve on merged PR #586), then formal APPROVE PR #595 @
b98e8dfa1a.NEXT_PROMPT:
WHAT_HAPPENED: Reviewer re-validated PR #595 against #594 acceptance criteria. Implementation is correct and tested. Formal Gitea APPROVE could not be submitted because durable #332 hard-stop still holds prior approve on merged PR #586; the cleanup tool that would clear it is introduced by this PR and is not yet in the running MCP process.
WHY: Bootstrap chicken-egg: formal approval of the fix is blocked by the bug the fix addresses. Not a defect in the PR #595 patch.
RELATED_PRS: #595
BLOCKERS: UNBLOCK when review_decision_lock-prgs-reviewer no longer hard-stops mark_final_review_decision for PR #595 (clear stale terminal approve on merged #586 for this profile).
VALIDATION:
LAST_UPDATED_BY: sysadmin (prgs-reviewer)