Skip to content

fix: engine delegates to tracker.getNextTask() for dependency ordering#116

Merged
subsy merged 1 commit intomainfrom
fix/ralph-tui-ux-bugs
Jan 17, 2026
Merged

fix: engine delegates to tracker.getNextTask() for dependency ordering#116
subsy merged 1 commit intomainfrom
fix/ralph-tui-ux-bugs

Conversation

@subsy
Copy link
Copy Markdown
Owner

@subsy subsy commented Jan 17, 2026

Summary

Root Cause

The engine's getNextAvailableTask() was doing its own loop:

  1. Call getTasks() (returns tasks in reverse ID order from beads)
  2. Loop through checking isTaskReady() on each
  3. Return first ready task found

This bypassed the getNextTask() method that uses bd ready for proper dependency ordering.

Changes

  • src/plugins/trackers/types.ts - Add excludeIds to TaskFilter
  • src/plugins/trackers/base.ts - Handle excludeIds in filterTasks()
  • src/plugins/trackers/builtin/beads.ts - Filter excluded IDs in getNextTask()
  • src/engine/index.ts - Delegate to tracker.getNextTask() with excludeIds
  • Tests updated for new behavior

Test plan

  • bun run typecheck passes
  • bun run build passes
  • bun test passes (993 pass, 7 todo, 0 fail)
  • Manual testing with chained dependencies confirms correct ordering

Fixes #97

The PR #109 fix added getNextTask() to BeadsTrackerPlugin but the engine
never called it. The engine was doing its own getTasks() + isTaskReady()
loop which returned tasks in wrong order since bd list doesn't include
dependency data.

Changes:
- Add excludeIds to TaskFilter for skipped task handling
- Update engine's getNextAvailableTask() to delegate to tracker.getNextTask()
- Add tests for delegation and excludeIds filter

Fixes #97
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
ralph-tui Ignored Ignored Jan 17, 2026 0:32am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 17, 2026

Warning

Rate limit exceeded

@subsy has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 54 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 8e08c1a and 8ee22a2.

📒 Files selected for processing (7)
  • src/engine/index.ts
  • src/plugins/trackers/base.ts
  • src/plugins/trackers/builtin/beads.ts
  • src/plugins/trackers/types.ts
  • tests/engine/execution-engine.test.ts
  • tests/engine/integration.test.ts
  • tests/plugins/beads-tracker.test.ts

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.

@subsy subsy merged commit 8a5b30a into main Jan 17, 2026
7 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.61%. Comparing base (5b713cb) to head (8ee22a2).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   41.58%   41.61%   +0.02%     
==========================================
  Files          57       57              
  Lines       12600    12606       +6     
==========================================
+ Hits         5240     5246       +6     
  Misses       7360     7360              
Files with missing lines Coverage Δ
src/engine/index.ts 64.89% <100.00%> (-0.16%) ⬇️
src/plugins/trackers/base.ts 31.06% <100.00%> (+1.36%) ⬆️
src/plugins/trackers/builtin/beads.ts 60.80% <100.00%> (+0.62%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

sakaman pushed a commit to sakaman/ralph-tui that referenced this pull request Feb 15, 2026
fix: engine delegates to tracker.getNextTask() for dependency ordering
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.

Task ordering ignores beads dependencies

1 participant