feat(tests): add concurrent-session MCP restart safety tests (Closes #666) #910

Merged
sysadmin merged 2 commits from feat/issue-666-concurrent-mcp-restart-tests into master 2026-07-25 17:44:09 -05:00
Owner

Summary

Adds automated concurrent-session MCP restart safety and dogfooding test suite (tests/test_mcp_restart_governance.py) proving all 10 dogfooding requirements:

  1. One LLM cannot restart MCP unilaterally (authorization matrix enforcement).
  2. New work stops during drain (assignments_stopped gate).
  3. Active safe work can finish (acknowledgement collection / safe completion).
  4. Unsafe mutations block restart (in-flight mutation gate / verdict unsafe).
  5. Session state is durably checkpointed (checkpoints_complete audit).
  6. Leases/locks not silently orphaned (lease lifecycle & post-restart audit).
  7. Sessions resume or receive canonical next action (reconcile proof actions).
  8. Failed drain creates durable incident work (restart_drain_gate_denied descriptor).
  9. Scoped component restart isolates blast radius (non-interference with independent sessions/roles).
  10. Restart/upgrade workflows do not require manual chat reconstruction (state handoff ledger & completion proof).

Links

Closes #666
Parent #655
Vision #652
Roadmap #653
Soft-depends #658 #659 #660 #661 #662 #663

Verification

Ran pytest suite (tests/test_mcp_restart_governance.py and suite) — 138 tests passed cleanly.

## Summary Adds automated concurrent-session MCP restart safety and dogfooding test suite (`tests/test_mcp_restart_governance.py`) proving all 10 dogfooding requirements: 1. One LLM cannot restart MCP unilaterally (authorization matrix enforcement). 2. New work stops during drain (`assignments_stopped` gate). 3. Active safe work can finish (acknowledgement collection / safe completion). 4. Unsafe mutations block restart (in-flight mutation gate / verdict `unsafe`). 5. Session state is durably checkpointed (`checkpoints_complete` audit). 6. Leases/locks not silently orphaned (lease lifecycle & post-restart audit). 7. Sessions resume or receive canonical next action (reconcile proof actions). 8. Failed drain creates durable incident work (`restart_drain_gate_denied` descriptor). 9. Scoped component restart isolates blast radius (non-interference with independent sessions/roles). 10. Restart/upgrade workflows do not require manual chat reconstruction (state handoff ledger & completion proof). ## Links Closes #666 Parent #655 Vision #652 Roadmap #653 Soft-depends #658 #659 #660 #661 #662 #663 ## Verification Ran pytest suite (`tests/test_mcp_restart_governance.py` and suite) — 138 tests passed cleanly.
jcwalker3 added 1 commit 2026-07-25 16:14:47 -05:00
jcwalker3 added 1 commit 2026-07-25 17:43:36 -05:00
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #910
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 67427-f2fa1139f49d
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-666-concurrent-mcp-restart-tests
phase: claimed
candidate_head: 0f9390aab4
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T22:43:43Z
expires_at: 2026-07-25T22:53:43Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #910 issue: none reviewer_identity: sysadmin profile: prgs-reviewer session_id: 67427-f2fa1139f49d worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-666-concurrent-mcp-restart-tests phase: claimed candidate_head: 0f9390aab4c224076a3894b2e5c1c6a901d061df target_branch: master target_branch_sha: none last_activity: 2026-07-25T22:43:43Z expires_at: 2026-07-25T22:53:43Z blocker: none
sysadmin approved these changes 2026-07-25 17:43:52 -05:00
Owner

adopted_at: 2026-07-25T22:44:00Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 67427-f2fa1139f49d
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 17013
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #910
issue: none
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 67152-7d52126ae878
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-666-concurrent-mcp-restart-tests
phase: adopted
candidate_head: 0f9390aab4
target_branch: master
target_branch_sha: none
last_activity: 2026-07-25T22:44:00Z
expires_at: 2026-07-25T22:54:00Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-25T22:44:00Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: 67427-f2fa1139f49d adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 17013 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #910 issue: none reviewer_identity: sysadmin profile: prgs-merger session_id: 67152-7d52126ae878 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/feat-issue-666-concurrent-mcp-restart-tests phase: adopted candidate_head: 0f9390aab4c224076a3894b2e5c1c6a901d061df target_branch: master target_branch_sha: none last_activity: 2026-07-25T22:44:00Z expires_at: 2026-07-25T22:54:00Z blocker: none
sysadmin merged commit 2b4e43042a into master 2026-07-25 17:44:09 -05:00
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#910