Web Console: Stale-runtime recovery, worktree rebinding, and reconciliation controls (Phase 2) #644

Open
opened 2026-07-10 14:40:56 -05:00 by jcwalker3 · 0 comments
Owner

Problem statement

Stale runtimes, unbound/missing worktrees, and incomplete reconciliation currently require expert shell recovery. The console needs canonical recovery controls: detect stale runtime, rebind worktrees, and trigger sanctioned reconciliation — with live revalidation.

User and operational impact

Workers fail mid-stage; humans babysit recovery; dirty/root worktrees violate branches-only rules.

Scope

  • Detect stale runtime and worktree mismatch via inventory/health APIs.
  • Gated actions: rebind session worktree, trigger reconciler cleanup preview/apply where allowed, mark blocked until healthy.
  • Always revalidate live Gitea/Git state after recovery.
  • Integrate contamination rules (#630) and master-parity resolver authority (#610).

Explicit non-goals

  • No root-checkout mutations for feature work.
  • No unsanctioned process kill.
  • No automatic destructive worktree deletion without confirmation.

Required implementation investigation

#641, #636, #634, #642, #610, #618, reconciler workflows, author_mutation_worktree.py, #631.

Proposed architecture or implementation direction

Recovery playbook DTOs + gated actions; UI wizard: diagnose → preview → confirm → verify.

Security and workflow-safety requirements

RBAC; confirmation; audit; fail closed; branches-only enforcement.

Acceptance criteria

  1. Diagnosis surfaces stale runtime and worktree binding errors.
  2. Rebind/reconcile actions gated and audited.
  3. Post-recovery verification required before clean status.
  4. Tests for diagnose/preview/apply/deny paths.
  5. Docs list sanctioned recovery only.

Required tests

Gated recovery tests; contamination interaction tests.

Observability and audit requirements

Full audit trail of recovery steps.

Dependencies and linkage

Canonical issue state

STATE: ready-for-author
WHO_IS_NEXT: author
NEXT_ACTION: Implement gated recovery controls after inventory+auth
NEXT_PROMPT: Author recovery gates; PR; stop

Required final evidence

PR with actions, UI, tests, docs.

Required final response and handoff expectations

Brief PR → reviewer.

## Problem statement Stale runtimes, unbound/missing worktrees, and incomplete reconciliation currently require expert shell recovery. The console needs **canonical recovery controls**: detect stale runtime, rebind worktrees, and trigger sanctioned reconciliation — with live revalidation. ## User and operational impact Workers fail mid-stage; humans babysit recovery; dirty/root worktrees violate branches-only rules. ## Scope * Detect stale runtime and worktree mismatch via inventory/health APIs. * Gated actions: rebind session worktree, trigger reconciler cleanup preview/apply where allowed, mark blocked until healthy. * Always revalidate live Gitea/Git state after recovery. * Integrate contamination rules (#630) and master-parity resolver authority (#610). ## Explicit non-goals * No root-checkout mutations for feature work. * No unsanctioned process kill. * No automatic destructive worktree deletion without confirmation. ## Required implementation investigation #641, #636, #634, #642, #610, #618, reconciler workflows, `author_mutation_worktree.py`, #631. ## Proposed architecture or implementation direction Recovery playbook DTOs + gated actions; UI wizard: diagnose → preview → confirm → verify. ## Security and workflow-safety requirements RBAC; confirmation; audit; fail closed; branches-only enforcement. ## Acceptance criteria 1. Diagnosis surfaces stale runtime and worktree binding errors. 2. Rebind/reconcile actions gated and audited. 3. Post-recovery verification required before clean status. 4. Tests for diagnose/preview/apply/deny paths. 5. Docs list sanctioned recovery only. ## Required tests Gated recovery tests; contamination interaction tests. ## Observability and audit requirements Full audit trail of recovery steps. ## Dependencies and linkage * Parent: #631 · Depends: #633, #636, #641 · Related: #642, #610, #618, #630 ## Canonical issue state ```text STATE: ready-for-author WHO_IS_NEXT: author NEXT_ACTION: Implement gated recovery controls after inventory+auth NEXT_PROMPT: Author recovery gates; PR; stop ``` ## Required final evidence PR with actions, UI, tests, docs. ## Required final response and handoff expectations Brief PR → reviewer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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