-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add /runners-check command for quick queue health diagnostics #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| description: Quick health check of supervisor batch queue, workers, PRs, and system resources | ||
| agent: Build+ | ||
| mode: subagent | ||
| --- | ||
|
|
||
| Quick diagnostic of the supervisor queue. Shows batch status, stuck tasks, open PRs, and issues. | ||
|
|
||
| Arguments: $ARGUMENTS | ||
|
|
||
| ## Steps | ||
|
|
||
| Run these commands in parallel and present a unified report: | ||
|
|
||
| ```bash | ||
| # 1. Active batch status | ||
| ~/.aidevops/agents/scripts/supervisor-helper.sh status 2>&1 | ||
|
|
||
| # 2. Open PRs from workers (need merge/review) | ||
| gh pr list --state open --json number,title,headRefName,createdAt,statusCheckRollup \ | ||
| --jq '.[] | "\(.number) [\(.headRefName)] \(.title) checks:\(.statusCheckRollup | map(.conclusion // .state) | join(","))"' 2>/dev/null | ||
|
|
||
| # 3. Active worktrees (worker sessions) | ||
| git worktree list 2>/dev/null | ||
|
|
||
| # 4. System resources | ||
| ~/.aidevops/agents/scripts/supervisor-helper.sh db \ | ||
| "SELECT id, state, retries FROM tasks WHERE state NOT IN ('deployed','cancelled','failed') ORDER BY state;" 2>/dev/null | ||
| ``` | ||
|
|
||
| ## Report Format | ||
|
|
||
| Present results as a concise dashboard: | ||
|
|
||
| ### Batch Status | ||
| - Batch name, total/completed/queued/running/failed counts | ||
| - Any tasks stuck in retrying or evaluating for >10 minutes | ||
|
|
||
| ### Action Items | ||
| Flag these for the user (most important first): | ||
| 1. **PRs ready to merge** — all CI green, no review comments | ||
| 2. **PRs with CI failures** — need investigation | ||
| 3. **Tasks stuck** — in retrying/evaluating too long | ||
| 4. **Tasks at max retries** — need manual intervention or re-queue | ||
| 5. **Stale worktrees** — for tasks already deployed/merged | ||
|
|
||
| ### System Health | ||
| - Load, memory, worker count | ||
| - Cron pulse status: `~/.aidevops/agents/scripts/supervisor-helper.sh cron status 2>&1` | ||
|
|
||
| ## Arguments | ||
|
|
||
| - No arguments: check the most recent active batch | ||
| - `--batch <id>`: check a specific batch | ||
| - `--all`: show all batches including completed | ||
| - `--fix`: auto-fix simple issues (merge green PRs, clean stale worktrees, reset stuck tasks) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix markdown heading format (MD022 violations).
Headings should be surrounded by blank lines. Add a blank line before each of these h3 headings:
📝 Proposed fix for markdown formatting
Also applies to: 39-39, 47-47
🧰 Tools
🪛 GitHub Check: Codacy Static Code Analysis
[notice] 35-35: .agents/scripts/commands/runners-check.md#L35
Expected: 1; Actual: 0; Below
🪛 markdownlint-cli2 (0.20.0)
[warning] 35-35: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🤖 Prompt for AI Agents