Skip to content

Fix beads-rust epic filtering and parallel config loading#300

Merged
subsy merged 4 commits intosubsy:mainfrom
dvic:dvic/fix-beads-rust-epic-filter
Feb 14, 2026
Merged

Fix beads-rust epic filtering and parallel config loading#300
subsy merged 4 commits intosubsy:mainfrom
dvic:dvic/fix-beads-rust-epic-filter

Conversation

@dvic
Copy link
Contributor

@dvic dvic commented Feb 12, 2026

Summary

  • BeadsRustTrackerPlugin missing setEpicId(): When a user selected an epic via the TUI, the cached tracker instance never received the epic ID. This caused getTasks() and getNextTask() to return all tasks from every milestone instead of filtering to the selected epic's children.
  • mergeConfigs() drops parallel config: The [parallel] section from project config.toml was silently ignored because mergeConfigs() in config/index.ts never handled the parallel key. Setting mode = "never" had no effect.

Test plan

  • Run ralph-tui run, select an epic via TUI — verify only that epic's subtasks appear in the task list
  • Run ralph-tui run --epic <id> — verify same filtering
  • Set [parallel] mode = "never" in project config.toml — verify sequential execution
  • Existing beads-rust tracker tests pass (bun test src/plugins/trackers/builtin/beads-rust/index.test.ts — 35/35)

Summary by CodeRabbit

  • New Features

    • Project configuration merging now recognises and merges parallel settings so user-provided parallel options are applied.
    • Tracker plugin gains epic-ID filtering so users can set an epic identifier to filter tasks.
  • Tests

    • Added tests verifying merged parallel config behaviour and tracker filtering (including parent/child epic filtering scenarios).

Two bugs that caused ralph-tui to pick wrong tasks when using
beads-rust tracker with --epic or TUI epic selection:

1. BeadsRustTrackerPlugin was missing setEpicId() method. When user
   selected an epic via TUI, the cached tracker instance never got
   the epicId set, so getTasks/getNextTask returned all tasks from
   every milestone instead of filtering to the selected epic's children.

2. mergeConfigs() in config/index.ts did not handle the parallel key,
   so [parallel] config from project config.toml was silently dropped.
   This meant mode = "never" had no effect.
@vercel
Copy link

vercel bot commented Feb 12, 2026

@dvic is attempting to deploy a commit to the plgeek Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Walkthrough

Adds shallow-merge support for a top-level parallel nested field when merging project config into merged config; adds a setEpicId(epicId: string): void setter to BeadsRustTrackerPlugin (duplicated definition); and introduces tests for merged parallel behaviour and beads-rust parent-filtering/tombstone handling.

Changes

Cohort / File(s) Summary
Config merging
src/config/index.ts, src/config/index.test.ts
Treats project.parallel as a nested object merged into merged.parallel via shallow merge. Adds test verifying merged parallel fields (global provides mode/worktreeDir, project provides maxWorkers/directMerge).
Beads Rust tracker & tests
src/plugins/trackers/builtin/beads-rust/index.ts, src/plugins/trackers/builtin/beads-rust/index.test.ts
Adds setEpicId(epicId: string): void to BeadsRustTrackerPlugin (method present twice — duplicate). Adds tests exercising parent-based filtering using setEpicId and related tombstone/dependency expectations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main changes in the PR: adding setEpicId support for epic filtering in BeadsRustTrackerPlugin and fixing mergeConfigs to handle parallel config.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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.

@vercel
Copy link

vercel bot commented Feb 13, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ralph-tui Ignored Ignored Preview Feb 14, 2026 7:15am

Request Review

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.48%. Comparing base (f6e0f21) to head (d970aa8).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/trackers/builtin/beads-rust/index.ts 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #300   +/-   ##
=======================================
  Coverage   44.47%   44.48%           
=======================================
  Files          96       96           
  Lines       30148    30153    +5     
=======================================
+ Hits        13409    13414    +5     
  Misses      16739    16739           
Files with missing lines Coverage Δ
src/config/index.ts 56.55% <100.00%> (+0.18%) ⬆️
src/plugins/trackers/builtin/beads-rust/index.ts 69.93% <50.00%> (+0.09%) ⬆️
🚀 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.

@subsy
Copy link
Owner

subsy commented Feb 13, 2026

thanks @dvic good catch

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: 1

🤖 Fix all issues with AI agents
In `@src/plugins/trackers/builtin/beads-rust/index.test.ts`:
- Around line 1102-1141: Two nearly identical tests named "getPrdContext
excludes tombstoned dependents from child counts" duplicate coverage; remove one
to avoid redundancy. Delete the duplicate test block that constructs a
BeadsRustTrackerPlugin, initializes it with epicId 'epic-tombstone-assert' (or
the other similar epic id), sets up the same mockSpawnResponses/read content,
calls plugin.getPrdContext(), and asserts completedCount: 2 and totalCount: 3;
keep a single canonical test for this behaviour and ensure the remaining test
still references BeadsRustTrackerPlugin and getPrdContext so tombstone filtering
is covered once.

@subsy subsy merged commit 281b140 into subsy:main Feb 14, 2026
9 checks passed
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.

2 participants

Comments