feat(profiles): support reconciler cleanup capability and migration (Closes #687) #688
Open
jcwalker3
wants to merge 3 commits from
feat/issue-687-reconciler-branch-delete into master
pull from: feat/issue-687-reconciler-branch-delete
merge into: :master
: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
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#688
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.
Support gitea.branch.delete capability in reconciler profile and migration helper.
Closes #687.
Changes
reconciler_profile.py: addgitea.branch.deleteto recommended operations.migrate_profiles.py: add support for thereconcilerrole defaults and schema mapping.tests/test_migrate_profiles.py: added unit tests validating reconciler migration.Validation
c7a444eb4b41cf916fdbd20a4999ffd78af496d0.Canonical Issue State
STATE: ready-for-review
WHO_IS_NEXT: reviewer
NEXT_ACTION: A distinct reviewer must validate least privilege and the guarded cleanup path.
NEXT_PROMPT:
WHY: The configuration PR needs to be reviewed and approved by a distinct reviewer.
BLOCKERS: none
VALIDATION: 2621 passed, 6 skipped on commit
c7a444e.RELATED_PRS: #688
LAST_UPDATED_BY: author
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: #687
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60615-d92824cff1bd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-687-reconciler-branch-delete
phase: claimed
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha:
56f1230a10last_activity: 2026-07-13T01:38:25Z
expires_at: 2026-07-13T03:38:25Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: #687
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60615-d92824cff1bd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-687-reconciler-branch-delete
phase: before-validation
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha:
56f1230a10last_activity: 2026-07-13T01:38:54Z
expires_at: 2026-07-13T03:38:54Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: #687
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60615-d92824cff1bd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-687-reconciler-branch-delete
phase: after-validation-request-changes
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha:
56f1230a10last_activity: 2026-07-13T01:43:14Z
expires_at: 2026-07-13T03:43:14Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: #687
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60615-d92824cff1bd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-687-reconciler-branch-delete
phase: before-review-mutation-request-changes
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha:
56f1230a10last_activity: 2026-07-13T01:43:48Z
expires_at: 2026-07-13T03:43:48Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: #687
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60615-d92824cff1bd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-687-reconciler-branch-delete
phase: released
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha:
56f1230a10last_activity: 2026-07-13T02:22:52Z
expires_at: 2026-07-13T04:22:52Z
blocker: manual-release
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #688
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 25883-7d4c6e6ebd53
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr688-feat-issue-687-reconciler-branch-delete
phase: claimed
candidate_head:
c7a444eb4btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-13T02:23:00Z
expires_at: 2026-07-13T04:23:00Z
blocker: none
Canonical PR State
STATE: request-changes
WHO_IS_NEXT: author
NEXT_ACTION: Author must correct the migrated reconciler defaults shorthand operations and limit delete scope.
NEXT_PROMPT:
WHAT_HAPPENED: PR review completed with REQUEST_CHANGES due to three findings:
WHY: Migrated reconciler defaults use invalid operations and lose required permissions. Branch delete capability exposes raw deletion.
ISSUE: 687
HEAD_SHA:
c7a444eb4bREVIEW_STATUS: request_changes
MERGE_READY: false
BLOCKERS: unresolved findings in validation report
VALIDATION: 57 tests passed in review worktree on head
c7a444e.LAST_UPDATED_BY: reviewer
Canonical Issue State
STATE:
ready-for-review — REQUEST_CHANGES addressed at new head; independent re-review required
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Independent REVIEWER (must differ from author jcwalker3 / prgs-author) re-validates all three prior blockers at pinned head
4a6357800364718a27a36ebc73578d4b929ff4aa; do not self-review or mergeNEXT_PROMPT:
WHAT_HAPPENED:
AUTHOR addressed formal REQUEST_CHANGES (reviewed head
c7a444e) on existing branch feat/issue-687-reconciler-branch-delete without opening a replacement PR.New head SHA:
4a6357800364718a27a36ebc73578d4b929ff4aaExact fix per blocker
Blocker 1 — valid canonical reconciler operations
migrate_profiles.RECONCILER_DEFAULT_ALLOWED/FORBIDDENnow fully qualified (gitea.pr.close,gitea.issue.close, …) — nopr.close/issue.close/ barepr.comment.canonicalize_operation/canonicalize_operationsmap loader aliases + migration-only shorthands; unknown ops fail visibly.gitea.read+gitea.pr.close(fail closed if missing).Canonical migrated reconciler example:
Blocker 2 — prevent arbitrary branch deletion
gitea_delete_branch: reconciler denied even withgitea.branch.delete; non-author roles denied; preservation/protected branches fail closed before any API call.gitea_cleanup_merged_pr_branch: requires reconciler role only;branch_cleanup_guardrejects preservation/evidence branches (incl.chore/issue-681-preserve-review-session-wip); unmerged/open/protected still refused.cleanup_merged_pr_branch/reconciliation_cleanupadded to role-exclusive tasks in the resolver.Blocker 3 — operational procedure docs
docs/gitea-execution-profiles.mdrunbook: exactpython3 migrate_profiles.py -i …dry-run/-w/--backup; inspect identity; validate canonical names + least privilege; merge of #688 does not change live profile; apply path; backup; client reconnect; whoami/parity/capability re-verify; guarded cleanup usage; prohibitions on raw git delete / arbitrary delete / ad hoc edits.Profile-switch provenance (not absorbed)
Canonical #688 comments do not prove full reviewer re-preflight after any mid-run author activation. Filed separate #690 (workflow-hardening). Not part of #687 product scope.
Validation (from final immutable head
4a63578)compileallon changed modules: OKRemaining risks
prgs-reconcilerstill lacksgitea.branch.deleteuntil operator runs documented migrate/apply + reconnect (by design).WHY:
Prior migration defaults used invalid shorthand that the production normalizer drops, so reconciler lost
gitea.pr.close. Grantinggitea.branch.deletewithout role gating would have made raw delete reachable for reconciler.RELATED_PRS:
#688 (this); #684 source branch untouched; #690 separate workflow guardrail
BLOCKERS:
none for independent re-review
VALIDATION:
4a6357800364718a27a36ebc73578d4b929ff4aapushed tofeat/issue-687-reconciler-branch-deleteLAST_UPDATED_BY:
jcwalker3 / prgs-author / AUTHOR / 2026-07-12
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.