feat(mcp): enforce scoped recovery playbook before full restart (Closes #669) #914

Merged
sysadmin merged 1 commits from feat/issue-669-scoped-component-recovery into master 2026-07-25 17:14:22 -05:00
Owner

Summary

Implements #669: Replace full-server MCP resets with scoped component recovery.

  • Adds recovery_playbook.py with the narrow-to-broad recovery ladder, symptom routing, attempt-log helpers, and escalation metrics.
  • Wire the attempt-log gate into restart_coordinator so rolling/full/host restarts require prior insufficient narrower attempts (or break-glass).
  • Documents the ladder in docs/mcp-recovery-playbook.md and updates gitea_request_mcp_restart for prior_recovery_attempts_json.
  • Includes unit tests in tests/test_recovery_playbook.py (35 passed, 45 subtests passed).

Links

Closes #669
Parent #655
Vision #652
Roadmap #653

Worktree / branch / head

  • Worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery
  • Branch: feat/issue-669-scoped-component-recovery
  • Commit SHA: 461e1dac78a54c7d30851d05ae8e5983fdcc659b
  • Base: master

Validation

Ran pytest tests/test_recovery_playbook.py tests/test_issue_886_apply_authorization_conjunction.py -q — 35 passed, 45 subtests passed.

## Summary Implements **#669**: Replace full-server MCP resets with scoped component recovery. - Adds `recovery_playbook.py` with the narrow-to-broad recovery ladder, symptom routing, attempt-log helpers, and escalation metrics. - Wire the attempt-log gate into `restart_coordinator` so rolling/full/host restarts require prior insufficient narrower attempts (or break-glass). - Documents the ladder in `docs/mcp-recovery-playbook.md` and updates `gitea_request_mcp_restart` for `prior_recovery_attempts_json`. - Includes unit tests in `tests/test_recovery_playbook.py` (35 passed, 45 subtests passed). ## Links Closes #669 Parent #655 Vision #652 Roadmap #653 ## Worktree / branch / head - Worktree: `/Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery` - Branch: `feat/issue-669-scoped-component-recovery` - Commit SHA: `461e1dac78a54c7d30851d05ae8e5983fdcc659b` - Base: `master` ## Validation Ran `pytest tests/test_recovery_playbook.py tests/test_issue_886_apply_authorization_conjunction.py -q` — 35 passed, 45 subtests passed.
jcwalker3 added 1 commit 2026-07-25 16:41:45 -05:00
Add recovery_playbook.py with the narrow-to-broad recovery ladder, symptom
routing, attempt-log helpers, and escalation metrics. Wire the attempt-log
gate into restart_coordinator so rolling/full/host restarts require prior
insufficient narrower attempts (or break-glass). Document the ladder and
update gitea_request_mcp_restart for prior_recovery_attempts_json.

Co-Authored-By: Grok 4.5 <[email protected]>
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #914
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 20691-687b30654e85
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery
phase: claimed
candidate_head: 461e1dac78
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T22:12:53Z
expires_at: 2026-07-25T22:22:53Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #914 issue: none reviewer_identity: sysadmin profile: prgs-reviewer session_id: 20691-687b30654e85 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery phase: claimed candidate_head: 461e1dac78a54c7d30851d05ae8e5983fdcc659b target_branch: master target_branch_sha: none last_activity: 2026-07-25T22:12:53Z expires_at: 2026-07-25T22:22:53Z blocker: none
sysadmin approved these changes 2026-07-25 17:13:02 -05:00
sysadmin left a comment
Owner

Canonical PR State

STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #914 at head 461e1dac78 after sync gates pass.
NEXT_PROMPT:

Act as merger on prgs/Scaled-Tech-Consulting/Gitea-Tools PR #914. Pin expected_head_sha=461e1dac78a54c7d30851d05ae8e5983fdcc659b. Confirm APPROVED at current head via gitea_get_pr_review_feedback, assess sync status, adopt/acquire merger lease, then gitea_merge_pr when recommended_next_action is merge_now.

WHAT_HAPPENED: Reviewed PR #914 at head 461e1dac78. All 35 tests (45 subtests) and coordinator suite passed cleanly in session worktree.
WHY: Implementation is complete, tested, and satisfies Issue #669 requirements cleanly.
ISSUE: 669
HEAD_SHA: 461e1dac78
REVIEW_STATUS: APPROVED
MERGE_READY: true
BLOCKERS: none
VALIDATION: pytest tests/test_recovery_playbook.py tests/test_restart_coordinator.py -q (35 passed, 45 subtests passed)
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
NATIVE_REVIEW_PROOF: gitea_submit_pr_review via gitea-reviewer, sysadmin, expected_head_sha 461e1dac78.

APPROVE at pinned head 461e1dac78.

## Canonical PR State STATE: approved WHO_IS_NEXT: merger NEXT_ACTION: Merge PR #914 at head 461e1dac78a54c7d30851d05ae8e5983fdcc659b after sync gates pass. NEXT_PROMPT: ```text Act as merger on prgs/Scaled-Tech-Consulting/Gitea-Tools PR #914. Pin expected_head_sha=461e1dac78a54c7d30851d05ae8e5983fdcc659b. Confirm APPROVED at current head via gitea_get_pr_review_feedback, assess sync status, adopt/acquire merger lease, then gitea_merge_pr when recommended_next_action is merge_now. ``` WHAT_HAPPENED: Reviewed PR #914 at head 461e1dac78a54c7d30851d05ae8e5983fdcc659b. All 35 tests (45 subtests) and coordinator suite passed cleanly in session worktree. WHY: Implementation is complete, tested, and satisfies Issue #669 requirements cleanly. ISSUE: 669 HEAD_SHA: 461e1dac78a54c7d30851d05ae8e5983fdcc659b REVIEW_STATUS: APPROVED MERGE_READY: true BLOCKERS: none VALIDATION: pytest tests/test_recovery_playbook.py tests/test_restart_coordinator.py -q (35 passed, 45 subtests passed) LAST_UPDATED_BY: sysadmin (prgs-reviewer) NATIVE_REVIEW_PROOF: gitea_submit_pr_review via gitea-reviewer, sysadmin, expected_head_sha 461e1dac78a54c7d30851d05ae8e5983fdcc659b. **APPROVE** at pinned head 461e1dac78a54c7d30851d05ae8e5983fdcc659b.
Owner

adopted_at: 2026-07-25T22:14:14Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 20691-687b30654e85
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 16914
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #914
issue: none
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 20697-817c43105c98
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery
phase: adopted
candidate_head: 461e1dac78
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T22:14:14Z
expires_at: 2026-07-25T22:24:14Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-25T22:14:14Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: 20691-687b30654e85 adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 16914 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #914 issue: none reviewer_identity: sysadmin profile: prgs-merger session_id: 20697-817c43105c98 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-669-scoped-component-recovery phase: adopted candidate_head: 461e1dac78a54c7d30851d05ae8e5983fdcc659b target_branch: master target_branch_sha: none last_activity: 2026-07-25T22:14:14Z expires_at: 2026-07-25T22:24:14Z blocker: none
sysadmin merged commit 26f54851d1 into master 2026-07-25 17:14:22 -05:00
Owner

Stale #332 review-decision lock cleanup (#594)

Status: APPLIED

Manual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.

## Stale #332 review-decision lock cleanup (#594) Status: **APPLIED** - actor: `sysadmin` - profile: `prgs-merger` - timestamp: `2026-07-25T22:14:23.800746+00:00` - last terminal: `approve` on PR #914 - PR state: `closed` (merged=True) - merge_commit_sha: `26f54851d1d20eff92c339e778125f31c09fa95f` - prior live_mutations_count: `8` - prior profile_identity: `prgs-reviewer` Manual deletion of session-state files is **not** the workflow. This path only clears a lock when the referenced PR is merged/closed.
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#914