t1085.4: Subtask auto-dispatch with blocked-by checking and model propagation#1616
t1085.4: Subtask auto-dispatch with blocked-by checking and model propagation#1616marcusquinn merged 3 commits intomainfrom
Conversation
…opagation (t1085.4) Phase 0 auto-pickup enhancements: - Add is_task_blocked() helper: checks blocked-by:tXXX dependencies against TODO.md completion state and supervisor DB terminal states - Strategy 1 & 2: add blocked-by dependency gate before pickup (prevents dispatching tasks whose blockers are not yet resolved) - Strategy 4 (new): subtask inheritance from #auto-dispatch parents — open subtasks (tXXX.N) of parents tagged #auto-dispatch are auto-eligible even without their own tag, with blocked-by and assignee checks - Model tier propagation: subtasks without explicit model: inherit parent model tier via --model flag to cmd_add - Update supervisor-helper.sh docs to describe all 4 strategies Unblocks t1081.1-t1081.4 and t1082.1-t1082.4 subtask trees.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThese changes implement subtask auto-dispatch support with parent model tier inheritance and enhanced blocking dependency validation in the supervisor's cron-based task pickup mechanism, expanding the documentation and introducing a new Strategy 4 for handling subtask propagation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: Wed Feb 18 01:51:10 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
The initial commit only added blocked-by checking to Strategy 4 (subtask inheritance). This adds the same is_task_blocked() gate to Strategy 1 (#auto-dispatch tagged tasks) and Strategy 2 (Dispatch Queue section), ensuring no task with unresolved blocked-by dependencies gets dispatched regardless of how it was discovered.
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 enhances the supervisor's auto-pickup mechanism by introducing intelligent handling of subtask dependencies and inheritance. It ensures that tasks are only dispatched when their prerequisites are met and streamlines the management of complex task hierarchies by automatically propagating dispatch eligibility and model configurations from parent tasks to their subtasks. Highlights
Changelog
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
|
🔍 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: Wed Feb 18 01:52:16 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request introduces an intelligent subtask handling mechanism for auto-dispatch, including blocked-by dependency checks and model tier propagation. The new "Strategy 4" for subtask inheritance is a significant enhancement. The changes in supervisor/cron.sh are logical and well-implemented, and the suggestion to refactor duplicated code for dependency checking into a helper function aligns with best practices for maintainability. The documentation update in supervisor-helper.sh clearly explains the new behaviors.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.agents/scripts/supervisor/cron.sh (1)
441-533: Strategy 4 subtask inheritance is well-structured — follows established patterns with clean model propagation.The implementation mirrors Strategies 1–3 for all guard checks (assignee, blocked-by, DB lookup, merged-PR pre-check) and adds a targeted model-propagation layer. The
SC2086suppression on line 526 for intentional word-splitting of$model_argis the correct idiom.One observation for future consideration: the guard-check sequence (assignee → blocked-by → DB → merged-PR) is now copy-pasted across four strategies. A shared helper (e.g.,
should_skip_task "$line" "$task_id" "$todo_file" "$repo") would eliminate ~60 lines of duplication and make it trivial to add a fifth strategy later. Not blocking — the repetition is readable and each strategy has slight context differences.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/scripts/supervisor/cron.sh around lines 441 - 533, Extract the repeated pre-pickup guard logic into a single helper function should_skip_task that accepts the todo line and task id (e.g., should_skip_task "$sub_line" "$sub_id" "$todo_file" "$repo") and returns a non-empty message or non-zero status when the task should be skipped; move the checks for assignee/started fields, is_task_blocked invocation, supervisor DB lookup (db "$SUPERVISOR_DB" ...), and check_task_already_done into it, preserving the existing log_info/log_success messages and behavior, and then call should_skip_task from Strategy 4 (and replace the duplicated blocks in Strategies 1–3) so the strategy code only handles strategy-specific logic like model propagation and cmd_add while keeping the existing SC2086 suppression around $model_arg.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.agents/scripts/supervisor/cron.sh:
- Around line 448-450: parent_ids extraction is grabbing every tNNN token in a
matching line (via grep -oE 't[0-9]+'), which pulls non-primary IDs from
descriptions; update the pipeline that builds parent_ids (the block using
parent_ids=$(grep -E '^[[:space:]]*- \[[ xX-]\] (t[0-9]+) .*#auto-dispatch'
"$todo_file" ... | grep -oE 't[0-9]+' | ...)) so it extracts only the leading
task id for each line (the first tNNN after the checklist prefix) — e.g.,
replace the second grep -oE with a targeted extraction (awk/sed) that captures
the first t[0-9]+ following the "- [ ]" pattern and then continue with head/sort
-u as before.
- Around line 278-283: Implement the missing is_task_blocked function used by
cron.sh: create a shell function named is_task_blocked that accepts a task line
and the todo_file, parses the task's "blocked-by" field (or dependency list)
from the task entry format used elsewhere, checks each blocker ID against
current tasks in todo_file (or state) to determine if they are unresolved, and
if any remain unresolved, echo a space-separated list of those blocker IDs and
return success (0); otherwise return non-zero (e.g., 1) to indicate not blocked.
Ensure the function name exactly matches is_task_blocked and that callers (in
cron.sh where task_id and todo_file are used) can capture its stdout into
unresolved_blockers as currently written. Use existing helper functions/parsers
where available to locate task fields to keep behavior consistent with other
scripts.
---
Nitpick comments:
In @.agents/scripts/supervisor/cron.sh:
- Around line 441-533: Extract the repeated pre-pickup guard logic into a single
helper function should_skip_task that accepts the todo line and task id (e.g.,
should_skip_task "$sub_line" "$sub_id" "$todo_file" "$repo") and returns a
non-empty message or non-zero status when the task should be skipped; move the
checks for assignee/started fields, is_task_blocked invocation, supervisor DB
lookup (db "$SUPERVISOR_DB" ...), and check_task_already_done into it,
preserving the existing log_info/log_success messages and behavior, and then
call should_skip_task from Strategy 4 (and replace the duplicated blocks in
Strategies 1–3) so the strategy code only handles strategy-specific logic like
model propagation and cmd_add while keeping the existing SC2086 suppression
around $model_arg.
Extract duplicated blocked-by dependency check into _check_and_skip_if_blocked() helper function, replacing 3 identical blocks in cmd_auto_pickup() (DRY refactor per PR review).
🔍 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: Wed Feb 18 01:59:45 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
Auto-dismissed: bot review does not block autonomous pipeline



Summary
Enhances Phase 0 auto-pickup to handle subtask trees intelligently:
Changes
Impact
Unblocks subtask trees like t1081.1-t1081.4 and t1082.1-t1082.4 that have blocked-by dependencies and inherit #auto-dispatch from their parent tasks.
Ref #1603
Summary by CodeRabbit