Skip to content

t1085.4: Subtask auto-dispatch with blocked-by checking and model propagation#1616

Merged
marcusquinn merged 3 commits intomainfrom
feature/t1085.4
Feb 18, 2026
Merged

t1085.4: Subtask auto-dispatch with blocked-by checking and model propagation#1616
marcusquinn merged 3 commits intomainfrom
feature/t1085.4

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 18, 2026

Summary

Enhances Phase 0 auto-pickup to handle subtask trees intelligently:

  • blocked-by dependency gate: All strategies now check blocked-by:tXXX fields against TODO.md completion state and supervisor DB terminal states. Tasks with unresolved blockers are skipped until dependencies are resolved.
  • Strategy 4 (new): Subtasks (tXXX.N) of #auto-dispatch parents are auto-eligible for pickup even without their own #auto-dispatch tag, with full blocked-by and assignee checks.
  • Model tier propagation: Subtasks without explicit model: field inherit the parent model tier via --model flag to cmd_add.

Changes

  • supervisor/cron.sh: Added is_task_blocked() helper, blocked-by checks in Strategy 1 and 2, new Strategy 4 for subtask inheritance
  • supervisor-helper.sh: Updated documentation to describe all 4 strategies and blocked-by behavior

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

  • New Features
    • Auto-dispatch batches now created with automatic timestamps for better session tracking
    • Subtasks automatically inherit parent model tier when not explicitly configured
    • Dependency blocking enforced; tasks with unresolved blockers are properly skipped
    • Batch concurrency intelligently scales based on CPU load for optimal performance

…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.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Walkthrough

These 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

Cohort / File(s) Summary
Documentation Updates
.agents/scripts/supervisor-helper.sh
Expanded Cron Integration & Auto-Pickup documentation to describe plan-based task eligibility, subtask inheritance of parent dispatch properties, blocker respect via dependencies, and auto-batch creation with adaptive concurrency scaling.
Auto-Pickup Strategy Enhancement
.agents/scripts/supervisor/cron.sh
Added pre-checks in cmd_auto_pickup to skip tasks with unresolved blocked-by dependencies. Introduced Strategy 4 to auto-dispatch subtasks (tXXX.N) under #auto-dispatch parents by inheriting parent model tier, with skip conditions for already-assigned, merged, or blocked subtasks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • t1085.4: Subtask auto-dispatch enhancement #1603: Directly addresses implementation of t1085.4's subtask auto-dispatch with parent model tier inheritance, blocker-aware dependency skipping, and supervisor integration for auto-picked subtasks.

Poem

🤖 Subtasks inherit from parents bold,
Model tiers passed down like gold,
Blockers halt the swift dispatch,
Auto-batches stitch and match,
Supervisors sing—work's on patrol! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically references the main feature (t1085.4), clearly describes the primary additions (subtask auto-dispatch, blocked-by checking, model propagation), and aligns perfectly with the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t1085.4

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 18 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 18 01:51:07 UTC 2026: Code review monitoring started
Wed Feb 18 01:51:07 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 18

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 18
  • VULNERABILITIES: 0

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.
@marcusquinn marcusquinn marked this pull request as ready for review February 18, 2026 01:51
@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Blocked-by Dependency Checking: All auto-pickup strategies now verify "blocked-by:tXXX" dependencies against TODO.md completion status and supervisor database terminal states, skipping tasks with unresolved blockers.
  • New Subtask Auto-Dispatch Strategy (Strategy 4): Introduced a new auto-dispatch strategy that makes subtasks (tXXX.N) eligible for pickup if their parent task (tXXX) has the "#auto-dispatch" tag, even if the subtask itself does not.
  • Model Tier Propagation: Subtasks without an explicit "model:" field now inherit the model tier from their "#auto-dispatch" parent task via the "--model" flag during task addition.
Changelog
  • .agents/scripts/supervisor-helper.sh
    • Updated the "Cron Integration & Auto-Pickup" documentation to include the new Strategy 4 and the "blocked-by" dependency checks.
    • Expanded the list of auto-pickup strategies from two to four.
  • .agents/scripts/supervisor/cron.sh
    • Integrated "blocked-by" dependency checks into existing auto-pickup strategies (Strategy 1 and 2) to prevent dispatch of blocked tasks.
    • Implemented a new auto-pickup Strategy 4 to identify and dispatch subtasks whose parents are tagged with "#auto-dispatch".
    • Added logic within Strategy 4 to propagate the parent task's model tier to subtasks if they lack an explicit "model:" field.
    • Included checks within Strategy 4 to skip subtasks that are already claimed, in progress, or completed.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 20 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 18 01:52:13 UTC 2026: Code review monitoring started
Wed Feb 18 01:52:14 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 20

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 20
  • VULNERABILITIES: 0

Generated on: Wed Feb 18 01:52:16 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

coderabbitai[bot]
coderabbitai bot previously requested changes Feb 18, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SC2086 suppression on line 526 for intentional word-splitting of $model_arg is 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).
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 20 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 18 01:59:42 UTC 2026: Code review monitoring started
Wed Feb 18 01:59:43 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 20

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 20
  • VULNERABILITIES: 0

Generated on: Wed Feb 18 01:59:45 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn dismissed coderabbitai[bot]’s stale review February 18, 2026 02:00

Auto-dismissed: bot review does not block autonomous pipeline

@marcusquinn marcusquinn merged commit eaeea0b into main Feb 18, 2026
15 checks passed
@marcusquinn marcusquinn deleted the feature/t1085.4 branch February 18, 2026 02:04
marcusquinn added a commit that referenced this pull request Feb 18, 2026
…lict markers

- t1093: AI-adaptive daily routine scheduling (blocked-by:t1085.5)
- Resolved conflict markers from concurrent runner TODO.md updates
- t1085.3 (PR #1612) and t1085.4 (PR #1616) both confirmed merged
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