fix: accept canonical reviewer lease preflight order (Closes #763) #764
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#764
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
review_prcapability as the single directed predecessor forgitea_acquire_reviewer_pr_lease.Closes #763
Files changed
gitea_mcp_server.pytask_capability_map.pytests/test_issue_763_reviewer_lease_preflight_order.pyValidation
review_pr->acquire_reviewer_pr_leasetask mismatch.python3 -m pytest tests/test_issue_763_reviewer_lease_preflight_order.py tests/test_preflight_read_survival.py tests/test_resolve_task_capability.py tests/test_review_workflow_load.py tests/test_merger_lease_acquire.py tests/test_reviewer_pr_lease.py tests/test_anti_stomp_preflight.py -q— 127 passed, 16 subtests passed.python3 -m pytest -q --tb=line— 3684 passed, 6 skipped, 431 subtests, 2 failures.8a851eb87e63fc236d8897ed67f67cbe295bc3ae, using the identical full-suite command — 3672 passed, 6 skipped, 431 subtests, the identical 2 out-of-scope failure signatures (test_removed_worktree_recovers_before_probe,test_tool_posts_comment_and_closes_superseded_pr_issue). The 12-pass delta is the new #763 regression file.git diff --check— passed.Risk
Low and fail-closed: the compatibility edge is one-way and reviewer-specific. It does not authorize review submission, merger lease acquisition, approval, request-changes, or merge. Denied identity/profile results are explicitly non-consumable, and reviewer lease acquisition now participates in workflow-load proof checks.
Worktree and head
/Users/jasonwalker/Development/Gitea-Tools/branches/fix-issue-763-reviewer-lease-preflight-orderfix/issue-763-reviewer-lease-preflight-order6b568d8805fe62e343e3edb2689c42030931b6f5masterat8a851eb87e63fc236d8897ed67f67cbe295bc3aeKnown limitations
PR #762 remains unreviewed and blocked. It must wait for this fix to land, master to advance, MCP daemons to restart, and a fresh independent
prgs-reviewersession to rerun the canonical reviewer workflow.[CONTROLLER HANDOFF] PR #764 / Issue #763 — CTH Author Handoff
CTH: Author Handoff
Status: implementation_complete_pending_independent_review
Next owner: reviewer
Current blocker: none
Decision: Publish the narrow #763 fix at commit
6b568d8805and end the author phase.Proof: PR #764 points to the pushed commit; focused tests passed; the two full-suite failures reproduce unchanged at authorized base
8a851eb87e.Next action: A fresh independent prgs-reviewer session reviews PR #764 at the pinned head.
Prompt for next session: Review PR #764 for issue #763 as an independent prgs-reviewer; pin head
6b568d8805before any mutation and do not review PR #762.Purpose:
This comment is the operational author handoff for the next independent reviewer session.
Identity/profile:
Target:
6b568d8805Work performed:
Files touched or reviewed:
Validation:
Server-side mutation ledger:
6b568d8805pushed to prgs.Local-only changes:
Blockers:
Controller prompt for next session:
Canonical Issue State
STATE: implementation_complete_pending_independent_review
WHO_IS_NEXT: reviewer
NEXT_ACTION: Start a fresh prgs-reviewer session and review PR #764 at the pinned head while leaving PR #762 untouched.
NEXT_PROMPT: Use prgs-reviewer to review PR #764 for issue #763 at head 6b568d8805fe62e343e3edb2689c42030931b6f5; do not review PR #762.
WHAT_HAPPENED: The author implemented, tested, committed, pushed, and opened PR #764 for issue #763.
WHY: The documented reviewer preflight capability and reviewer-lease acquisition names were compared as unequal raw task strings.
RELATED_PRS: PR #764 is the fix; PR #762 remains unreviewed pending this fix, master advancement, and MCP daemon restart.
BLOCKERS: none
VALIDATION: 12 regression tests and 127 focused tests passed; the same two full-suite failures reproduced at the authorized base.
LAST_UPDATED_BY: jcwalker3 using prgs-author
[THREAD STATE LEDGER] PR #764 / Issue #763 — implementation complete; independent review is next
What is true now:
6b568d88058a851eb87e.What changed:
What is blocked:
Who/what acts next:
6b568d8805.Canonical Issue State
STATE: implementation_complete_pending_independent_review
WHO_IS_NEXT: reviewer
NEXT_ACTION: Start a fresh prgs-reviewer session and review PR #764 at the pinned head while leaving PR #762 untouched.
NEXT_PROMPT: Use prgs-reviewer to review PR #764 for issue #763 at head 6b568d8805fe62e343e3edb2689c42030931b6f5; do not review PR #762.
WHAT_HAPPENED: PR #764 contains the authored #763 fix and its regression tests.
WHY: Independent review is the required next lifecycle phase after author publication.
RELATED_PRS: PR #764 is the fix; PR #762 remains unreviewed pending this fix, master advancement, and MCP daemon restart.
BLOCKERS: none
VALIDATION: 12 regression tests and 127 focused tests passed; the same two full-suite failures reproduced at the authorized base.
LAST_UPDATED_BY: jcwalker3 using prgs-author
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #764
issue: #763
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 90676-b26ce3073627
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-764-bootstrap-lease
phase: claimed
candidate_head:
6b568d8805target_branch: master
target_branch_sha:
8a851eb87elast_activity: 2026-07-19T22:39:57Z
expires_at: 2026-07-19T22:49:57Z
blocker: none
Independent Review — PR #764 / Issue #763
Reviewed head SHA:
6b568d8805fe62e343e3edb2689c42030931b6f5Reviewer: sysadmin / prgs-reviewer (identity_match=true)
Author: jcwalker3 (distinct; author-safety passed)
Base: master @
8a851eb87e63fc236d8897ed67f67cbe295bc3aeRoot-cause assessment
The live pre-fix master compares the resolved preflight task string against the mutation task with raw equality. The documented workflow resolves
review_prthen acquires the reviewer lease (acquire_reviewer_pr_lease), so the strings differ and purity fails closed incorrectly. That matches the #762 bootstrap deadlock diagnosis.Safety-gate assessment
_PREFLIGHT_TASK_TRANSITIONSis exactly{("review_pr", "acquire_reviewer_pr_lease")}— directed, narrow, reviewer-specific.preflight_task_matches+_canonical_preflight_tasknormalize declaredgitea_aliases without inventing open-ended synonyms.acquire_reviewer_pr_lease/gitea_acquire_reviewer_pr_leasenow participate in anti-stomp workflow-hash checks and resolver workflow_load_proof.acquire → review_pr), merger lease fromreview_pr, and unrelated tasks remain rejected.gitea_mcp_server.py,task_capability_map.py,tests/test_issue_763_reviewer_lease_preflight_order.py).Tests run (worktree
branches/review-pr-764-bootstrap-lease)tests/test_issue_763_reviewer_lease_preflight_order.pypytest -q --tb=line8a851ebgit diff --checkPre-existing failures (not introduced by this PR):
test_removed_worktree_recovers_before_probetest_tool_posts_comment_and_closes_superseded_pr_issueFindings
none
Decision
APPROVE at pinned head
6b568d8805fe62e343e3edb2689c42030931b6f5.No merge performed. PR #762 was not reviewed or mutated.
Next phase: fresh
prgs-mergersession to merge PR #764, then restart MCP daemons so live reviewer runtimes load the fix.Canonical PR State
STATE: approved_pending_merge
WHO_IS_NEXT: merger
NEXT_ACTION: Start a fresh prgs-merger session and merge PR #764 at the approved pinned head after standard merger preflight.
NEXT_PROMPT:
WHAT_HAPPENED: Independent prgs-reviewer (sysadmin) approved PR #764 at the pinned head after bootstrap raw-capability lease acquisition, full-diff review, and validation.
WHY: The #763 fix correctly maps documented review_pr capability one-way to acquire_reviewer_pr_lease while keeping safety gates fail-closed; tests and scope check out.
ISSUE: #763
HEAD_SHA:
6b568d8805REVIEW_STATUS: APPROVED
MERGE_READY: true
BLOCKERS: none
VALIDATION: 12/12 #763 regressions; 127 focused + 16 subtests; full suite 3684 passed / 6 skipped / 2 pre-existing failures matching authorized base
8a851ebNATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; token_fingerprint=a139de609a518c0a; pid=90676; profile=prgs-reviewer; identity=sysadmin
LAST_UPDATED_BY: sysadmin using prgs-reviewer
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #764
issue: #763
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 5647-e369115711d5
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-764-6b568d8
phase: claimed
candidate_head:
6b568d8805target_branch: master
target_branch_sha:
8a851eb87elast_activity: 2026-07-19T22:52:06Z
expires_at: 2026-07-19T23:02:06Z
blocker: none
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-merger2026-07-19T22:53:01.551757+00:00approveon PR fix: accept canonical reviewer lease preflight order (Closes #763) (#764)closed(merged=True)b7a5284b984d1d810123a23fe7adb7eb5ba6eb991prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.