t1276: Subtask-aware queue analysis, fix auto-pickup head-50 limit, orphan issue intake#2026
Conversation
…rphan issue intake - Fix auto-pickup Strategy 4 head -50 limit that silently skipped subtask inheritance for parents beyond the 50th (only 2 of 242 parents have open subtasks, but they were beyond position 50). Now scans only open parents with no arbitrary limit. - Enhance runners-check to report subtask-aware queue depth: total open items (parents + subtasks), dispatchable count (tagged + inherited from parent), blocked count, and claimed/in-progress count. - Add TODO entries for 3 orphan user-reported GitHub issues: GH#1791 (setup.sh unbound variable), GH#1975 (skill discovery CLI), GH#1991 (wp-helper.sh CONFIG_FILE bug). - Re-add completed task entries for t1260, t1261, t1273 with pr: refs so issue-sync can close their stale open GitHub issues.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the task dispatching and monitoring capabilities of the system. It rectifies a critical bug that prevented subtasks from being processed due to an arbitrary limit, ensuring all relevant tasks are now considered for auto-dispatch. Additionally, it enhances visibility into the task queue by providing a more comprehensive, subtask-aware analysis, allowing for better understanding of work distribution and potential bottlenecks. The PR also incorporates several user-reported issues into the task tracking system and cleans up stale entries. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Caution Review failedThe pull request is closed. WalkthroughThis PR introduces subtask-aware queue analysis to the supervisor dashboard and dispatch system. Changes include replacing the runners-check.md "Open PRs" section with a new queue depth analysis, refining cron.sh's parent task collection logic to only consider OPEN parents, and adding new task entries to TODO.md covering queue stalls, dispatch safety, and subtask governance enhancements. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 20 19:34:31 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Code Review
This pull request improves the auto-pickup logic by removing the arbitrary head -50 limit and refining the parent task selection to only include open tasks. It also enhances the runners-check command with subtask-aware queue depth reporting, providing a more accurate view of dispatchable work units. I have provided feedback on optimizing the queue analysis logic for better performance and ensuring consistency between the reporting and pickup logic, along with improvements regarding error suppression, adhering to the repository's guidelines on 2>/dev/null usage.
| # Count ALL open items including subtasks — subtasks are the actual dispatchable units | ||
| TODO_FILE="$(git rev-parse --show-toplevel 2>/dev/null)/TODO.md" | ||
| if [[ -f "$TODO_FILE" ]]; then | ||
| total_open=$(grep -c '^[[:space:]]*- \[ \]' "$TODO_FILE" 2>/dev/null || echo 0) |
There was a problem hiding this comment.
Avoid using 2>/dev/null for blanket suppression of errors on file operations when the file's existence has already been verified (as done on line 22). This practice is redundant for 'file not found' errors and can mask other important issues like permissions problems. This applies to multiple grep calls in this file (lines 23, 24, 27, 47, 49, 50).
References
- 2>/dev/null is acceptable ONLY when redirecting to log files, not blanket suppression. (link)
- Avoid using
2>/dev/nullto suppress errors on file operations if the file's existence has already been verified by a preceding check (e.g.,[[ -f "$file" ]]or an early return). This practice is redundant for 'file not found' errors and can mask other important issues like permissions problems.
| inherited=0 | ||
| while IFS= read -r line; do | ||
| task_id=$(echo "$line" | grep -oE 't[0-9]+\.[0-9]+' | head -1) | ||
| if [[ -n "$task_id" ]]; then | ||
| parent_id=$(echo "$task_id" | sed 's/\.[0-9]*$//') | ||
| if grep -qE "^- \[.\] ${parent_id} .*#auto-dispatch" "$TODO_FILE" 2>/dev/null; then | ||
| # Check not blocked or claimed | ||
| if ! echo "$line" | grep -qE 'assignee:|started:'; then | ||
| if ! echo "$line" | grep -qE 'blocked-by:'; then | ||
| inherited=$((inherited + 1)) | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
| done < <(grep -E '^[[:space:]]+- \[ \] t[0-9]+\.[0-9]+' "$TODO_FILE" 2>/dev/null | grep -v '#auto-dispatch') |
There was a problem hiding this comment.
The while loop with nested grep calls is inefficient, especially as TODO.md grows. It performs an O(N*M) operation where N is the number of subtasks and M is the number of lines in the file. This can be optimized to a single pass by pre-calculating the list of auto-dispatch parents. Additionally, the parent check should use [ ] instead of [.] to be consistent with the updated logic in cron.sh, which now only considers open parents for subtask inheritance.
| inherited=0 | |
| while IFS= read -r line; do | |
| task_id=$(echo "$line" | grep -oE 't[0-9]+\.[0-9]+' | head -1) | |
| if [[ -n "$task_id" ]]; then | |
| parent_id=$(echo "$task_id" | sed 's/\.[0-9]*$//') | |
| if grep -qE "^- \[.\] ${parent_id} .*#auto-dispatch" "$TODO_FILE" 2>/dev/null; then | |
| # Check not blocked or claimed | |
| if ! echo "$line" | grep -qE 'assignee:|started:'; then | |
| if ! echo "$line" | grep -qE 'blocked-by:'; then | |
| inherited=$((inherited + 1)) | |
| fi | |
| fi | |
| fi | |
| fi | |
| done < <(grep -E '^[[:space:]]+- \[ \] t[0-9]+\.[0-9]+' "$TODO_FILE" 2>/dev/null | grep -v '#auto-dispatch') | |
| # Subtasks whose parent has #auto-dispatch (inherited dispatchability) | |
| auto_parents=$(grep -E '^- \[ \] t[0-9]+ .*#auto-dispatch' "$TODO_FILE" | grep -oE 't[0-9]+' | sort -u) | |
| inherited=0 | |
| if [[ -n "$auto_parents" ]]; then | |
| parent_pattern="^($(echo "$auto_parents" | tr '\n' '|' | sed 's/|$//'))$" | |
| inherited=$(grep -E '^[[:space:]]+- \[ \] t[0-9]+\.[0-9]+' "$TODO_FILE" | \ | |
| grep -v '#auto-dispatch' | \ | |
| grep -vE 'assignee:|started:|blocked-by:' | \ | |
| sed -E 's/^[[:space:]]*- \[ \] (t[0-9]+).*/\1/' | \ | |
| grep -Ec "$parent_pattern" || echo 0) | |
| fi |
| parent_ids=$(grep -E '^[[:space:]]*- \[ \] (t[0-9]+) .*#auto-dispatch' "$todo_file" 2>/dev/null | | ||
| grep -oE 't[0-9]+' | sort -u || true) |
There was a problem hiding this comment.
The grep pattern ^[[:space:]]*- [ ] matches indented subtasks. If a subtask has #auto-dispatch, grep -oE 't[0-9]+' will extract the root parent ID, causing Strategy 4 to pick up all its siblings even if the parent itself is not tagged. To strictly implement 'Subtasks whose parent has #auto-dispatch', the grep should be restricted to top-level tasks. Also, remove the redundant 2>/dev/null since the file existence is verified at line 722.
| parent_ids=$(grep -E '^[[:space:]]*- \[ \] (t[0-9]+) .*#auto-dispatch' "$todo_file" 2>/dev/null | | |
| grep -oE 't[0-9]+' | sort -u || true) | |
| parent_ids=$(grep -E '^- \[ \] (t[0-9]+) .*#auto-dispatch' "$todo_file" | | |
| grep -oE 't[0-9]+' | sort -u || true) |
References
- Avoid using 2>/dev/null to suppress errors on file operations if the file's existence has already been verified by a preceding check. (link)
- Avoid using
2>/dev/nullto suppress errors on file operations if the file's existence has already been verified by a preceding check (e.g.,[[ -f "$file" ]]or an early return). This practice is redundant for 'file not found' errors and can mask other important issues like permissions problems.



Summary
head -50limit — silently skipped subtask inheritance for parents beyond the 50th position. Only 2 of 242#auto-dispatchparents have open subtasks, but both were beyond position 50. Now scans only open[ ]parents with no arbitrary limit.pr:refs so issue-sync can close their stale open GitHub issuesRoot Cause
cmd_auto_pickup()Strategy 4 collected parent IDs withhead -50 | sort -u. With 242#auto-dispatchparents in TODO.md (mostly completed), the open parents with subtasks (t1120, t1264) were beyond position 50 and never processed. Their subtasks (t1120.1, t1120.2, t1120.4, t1264.2) were invisible to the dispatcher despite the parent having#auto-dispatch.Files Changed
.agents/scripts/supervisor/cron.sh— Removehead -50, filter to open parents only.agents/scripts/commands/runners-check.md— Subtask-aware queue depth reportingTODO.md— 3 new tasks (t1277-t1279), 3 restored completed tasks (t1260, t1261, t1273), t1276 entryCloses #2024
Summary by CodeRabbit
New Features
Bug Fixes
Documentation