feat(webui): sanctioned restart and graceful reload controls (Closes #642) #863
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#863
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
Implements Phase 2 sanctioned restart and graceful reload controls for the MCP Control Plane Web Console. Namespace restarts now run through an authorized, confirmed, audited, capability-gated path instead of manual host process killing (#630).
Closes #642
Changes
webui/sanctioned_restart.py— restart/reload operation model for thesystem.restart_namespacegated action: dry-run intent preview, confirmation-string enforcement, audit emission, and post-restart health verification. Fails closed on unknown auth, missing capability, or ambiguous target namespace.webui/console_authz.py— RBAC entries for the restart capability, with secret redaction preserved.webui/gated_actions.py— registers the restart action in the gated action framework so it cannot be invoked without capability plus confirmation.task_capability_map.py— capability mapping for the restart operation.docs/sanctioned-restart-controls.md— operator documentation for the sanctioned path and the explicit prohibition on pkill recovery.docs/webui-authz-audit.md— audit model updated for restart events.tests/test_webui_sanctioned_restart.py— coverage for authorized preview, unauthorized deny, confirmation enforcement, contamination classification, and audit emission.Acceptance criteria
docs/sanctioned-restart-controls.mdplus the gatedsystem.restart_namespaceaction.Non-goals honored
pkill/kill -9surface.Tests
tests/test_webui_sanctioned_restart.py— 41 passed, 12 subtests passed.test_webui_console_authz_audit.py,test_webui_gated_actions.py,test_task_capability_role_invariants.py,test_resolve_task_capability.py,test_webui_architecture_docs.py) — 135 passed, 216 subtests passed.Canonical PR state
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #863
issue: #642
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 35152-7ef9bafcf3dd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr863-issue-642
phase: claimed
candidate_head:
2a5d6571ectarget_branch: master
target_branch_sha:
c33c69b3f3last_activity: 2026-07-24T11:26:27Z
expires_at: 2026-07-24T11:36:27Z
blocker: none
Canonical PR State
STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #863 at head
2a5d6571econto master c33c69b3f3f383f56b530def1789662ad26ea648; then reconcile branch/worktree cleanup for feat/issue-642-sanctioned-restart-controls.NEXT_PROMPT:
WHAT_HAPPENED: Independent review at exact PR head
2a5d6571ecin worktree branches/review-pr863-issue-642. Diff vs basec33c69b3is 7 files / +1304 / -2 additive (sanctioned_restart.py, console_authz, gated_actions, task_capability_map, docs, 41 tests). Multi-gate restart model: capability + namespace-bound confirmation + out-of-band operator env auth + contamination block + host hook required. execute_restart never spawns a process and always reports process_kill_executed=false. Manual pkill classified as contamination. Post-restart clean claims require live client_namespace probe proof. No app.py route yet; registry entries disabled (ACTIVE_PHASE=1, actions phase 2). tests/test_webui_sanctioned_restart.py → 41 passed, 12 subtests; related authz/gated/role suites 97 passed.WHY: All five #642 acceptance criteria satisfied; no-kill and no-fleet non-goals held; fail-closed on missing hook/auth/confirmation; scope limited to the sanctioned restart surface; focused and related suites green; commits_behind=0 and mergeable with no conflicts — eligible for merge.
ISSUE: 642
HEAD_SHA:
2a5d6571ecREVIEW_STATUS: approved
MERGE_READY: yes
BLOCKERS: none
VALIDATION: tests/test_webui_sanctioned_restart.py → 41 passed, 12 subtests; related suites (console_authz_audit, gated_actions, task_capability_role_invariants) → 97 passed; git diff --stat c33c69b3...2a5d6571 = 7 files / +1304 / -2; assess_pr_sync_status: behind=0, mergeable=true, has_conflicts=false; Workflow-load helper result: workflow_hash: 263d0a6cb8a6 boundary_status: clean; Live head SHA before approval: 2a5d6571ec905b34039f134ddffcb3b9b7cdf9c1; Pushes occurred during validation: no
LAST_UPDATED_BY: prgs-reviewer (sysadmin)
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=mcp_server; namespace=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; worktree=branches/review-pr863-issue-642 at 2a5d6571ec905b34039f134ddffcb3b9b7cdf9c1; pid=35152
[THREAD STATE LEDGER]
what is true now
Server-side decision state: formal APPROVE review verdict recorded for PR #863 at head
2a5d6571ecLocal verdict/state: approve decision marked final and posted via gitea_submit_pr_review
Next actor: merger (prgs-merger)
Required action: merge PR #863 at the exact reviewed head
Blocker classification: no blocker
Do not do: do not reuse this verdict if the PR head moves; do not fall back to pkill recovery; do not treat host_action_required as process-kill authorization
what changed
Independent current-head review completed for #642 sanctioned restart controls; 41 focused tests green; no code defects that block merge.
what is blocked
Nothing. PR is eligible for merger action at the pinned head.
who/what acts next
prgs-merger merges at head
2a5d6571ecafter confirming head unchanged.repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #863
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 38653-e955a0f42630
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr863-issue-642
phase: claimed
candidate_head: none
target_branch: master
target_branch_sha: none
last_activity: 2026-07-24T12:20:05Z
expires_at: 2026-07-24T12:30:05Z
blocker: none
adopted_at: 2026-07-24T12:21:02Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 38653-e955a0f42630
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 15869
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #863
issue: none
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 38641-6e9eee683da8
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr863-issue-642
phase: adopted
candidate_head:
205207abb0target_branch: master
target_branch_sha: none
last_activity: 2026-07-24T12:21:02Z
expires_at: 2026-07-24T12:31:02Z
blocker: none
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-merger2026-07-24T12:21:19.785613+00:00approveon PR feat(webui): sanctioned restart and graceful reload controls (Closes #642) (#863)closed(merged=True)103d0df28921d95673d4f375b00f01d306c70c705prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.