Skip to content

feat(admin): add decommission-workers and worker-status CLI commands#1165

Merged
nicoloboschi merged 1 commit intomainfrom
feat/admin-worker-status-decommission-all
Apr 20, 2026
Merged

feat(admin): add decommission-workers and worker-status CLI commands#1165
nicoloboschi merged 1 commit intomainfrom
feat/admin-worker-status-decommission-all

Conversation

@nicoloboschi
Copy link
Copy Markdown
Collaborator

Summary

  • Adds hindsight-admin decommission-workers command that resets ALL processing tasks back to pending regardless of worker_id — the "just fix everything" recovery button for Stale claimed_at not reclaimed after worker crash — operations stuck in 'processing' forever #991 scenarios where dead worker hostnames are unknown
  • Adds hindsight-admin worker-status command that shows all processing tasks grouped by worker with operation type, bank, runtime, and last update time — for diagnosing orphaned tasks before decommissioning

Test plan

  • 6 new tests in TestDecommissionAllWorkers and TestWorkerStatus cover core behavior, edge cases (no processing tasks, mixed statuses), and verify non-processing tasks are untouched
  • Existing TestWorkerDecommission tests still pass (single-worker decommission unchanged)
  • CI green

Adds two new admin CLI commands for diagnosing and recovering from
worker crashes (addresses #991):

- `decommission-workers`: resets ALL processing tasks back to pending
  regardless of worker_id (unlike existing `decommission-worker` which
  requires knowing the dead worker's ID)
- `worker-status`: shows all processing tasks grouped by worker with
  operation type, bank, runtime, and last update time
@nicoloboschi nicoloboschi merged commit c8b898b into main Apr 20, 2026
53 of 54 checks passed
r266-tech added a commit to r266-tech/hindsight that referenced this pull request Apr 20, 2026
PR vectorize-io#1165 added two new admin CLI commands (decommission-workers,
worker-status) but admin-cli.md was not updated. Readers scanning the
Commands section could only find the singular decommission-worker.

Added dedicated sections for each new command following the existing
style (Arguments/Options/Examples/When to Use). Pure docs, mirrors
behavior documented in typer command help strings.
nicoloboschi pushed a commit that referenced this pull request Apr 21, 2026
* docs(admin-cli): document decommission-workers and worker-status

PR #1165 added two new admin CLI commands (decommission-workers,
worker-status) but admin-cli.md was not updated. Readers scanning the
Commands section could only find the singular decommission-worker.

Added dedicated sections for each new command following the existing
style (Arguments/Options/Examples/When to Use). Pure docs, mirrors
behavior documented in typer command help strings.

* docs(admin-cli skill): sync decommission-workers and worker-status

Mirror change from hindsight-docs/docs/developer/admin-cli.md so the
docs skill reference stays in sync (matches the pattern set by #1137).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant