feat: reconciler supersession close path for PRs/issues (Closes #525) #583
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#583
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
Lets the reconciler close open PRs/issues as superseded/satisfied by a landed PR without switching to author.
Changes
assess_reconciler_supersession_close_gate— proof gate: superseding PR merged + head on target; fail-closed when target still independently required / not provengitea_reconcile_superseded_by_merged_pr— MCP tool for supersession close of PR and optional linked issue, with canonical commentsreconcile_close_superseded_pr/reconcile_close_satisfied_issue→ reconciler (gitea.pr.close/gitea.issue.close)Validation
Acceptance mapping
5–6. Tests for reconciler route + author blocked + close proofs
Worktree
branches/feat-issue-525-reconciler-supersession-closeBranch:
feat/issue-525-reconciler-supersession-closeHead:
b0ae160Closes #525
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #583
issue: #525
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 22284-2098829b1ffc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-583-issue-525
phase: claimed
candidate_head:
b0ae1605c3target_branch: master
target_branch_sha:
c738e5b10dlast_activity: 2026-07-09T16:47:20Z
expires_at: 2026-07-09T18:47:20Z
blocker: none
Canonical PR State
STATE:
approved
WHO_IS_NEXT:
merger
NEXT_ACTION:
Merge PR #583 at head
b0ae1605c3after explicit operator authorization.NEXT_PROMPT:
WHAT_HAPPENED:
Reviewer approved PR #583 (reconciler supersession close path for Issue #525).
WHY:
Scope matches #525. Gate requires merged superseding PR on target, fail-closed independent-work proof, canonical comment citing superseding PR + merge commit; role map keeps close tasks on reconciler; author wrong_role_stop covered. Tests pass; not self-review.
ISSUE:
#525
BASE:
master
HEAD:
feat/issue-525-reconciler-supersession-close
HEAD_SHA:
b0ae1605c3REVIEW_STATUS:
approved
VALIDATION:
git diff --check prgs/master...HEAD clean; pytest test_reconciler_supersession_close + test_reconciler_close_gate + test_role_session_router → 44 passed; test_reconcile_already_landed_pr_tool + test_reconciler_cleanup_integration → 8 passed; mergeable=true
BLOCKERS:
none
SUPERSEDES:
none
SUPERSEDED_BY:
none
MERGE_READY:
yes — approved at current head; awaiting explicit merge authorization
LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-09
Review notes
Identity: reviewer
sysadmin(prgs-reviewer); authorjcwalker3— not self-review.Scope (6 files):
gitea_mcp_server.py(tool),review_proofs.py(gate), capability/router maps, tests, runbook — no unrelated churn.Guard safety:
assess_reconciler_supersession_close_gatefails closed on open mergeable target, missing independent-work proof, unmerged superseder, bad SHAs, missing ancestry, and weak canonical comments. Mutations gated by profile ops + preflight purity. Never grants review/approve/merge.Non-blocking:
reconcile_create_followup_issueis mapped to reconciler but has no dedicated MCP tool beyond existinggitea_create_issue(deployment must grantgitea.issue.createon reconciler). Explicit reviewer/merger route tests optional; author wrong_role_stop already proves non-reconciler stop.Workflow-load helper result: workflow_hash=
ac87ed11efe5; final_report_schema_hash=a7634e7b8689; boundary_status=clean.adopted_at: 2026-07-09T16:57:06Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 22284-2098829b1ffc
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 8317
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #583
issue: #525
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 22279-02f79f840d08
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-583
phase: adopted
candidate_head:
b0ae1605c3target_branch: master
target_branch_sha:
c738e5b10dlast_activity: 2026-07-09T16:57:06Z
expires_at: 2026-07-09T18:57:06Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #583
issue: #525
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 22279-02f79f840d08
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-583
phase: released
candidate_head:
b0ae1605c3target_branch: master
target_branch_sha:
c738e5b10dlast_activity: 2026-07-09T17:06:48Z
expires_at: 2026-07-09T19:06:48Z
blocker: post-merge-moot