Skip to content

fix: correct dependency field names in beads tracker#131

Closed
roberto-mello wants to merge 4 commits intosubsy:mainfrom
roberto-mello:fix/beads-dependency-parsing
Closed

fix: correct dependency field names in beads tracker#131
roberto-mello wants to merge 4 commits intosubsy:mainfrom
roberto-mello:fix/beads-dependency-parsing

Conversation

@roberto-mello
Copy link

@roberto-mello roberto-mello commented Jan 17, 2026

Summary

  • Fixed BeadJson interface field names to match actual bd list --json output
  • Fixed beadToTask function to use correct field names for dependency parsing

Problem

The BeadJson interface had incorrect field names for dependencies that didn't match the actual bd output:

  • dependencies[].id should be dependencies[].depends_on_id
  • dependencies[].dependency_type should be dependencies[].type

This caused dependsOn to never be populated, making all tasks appear as "actionable" instead of properly detecting blocked tasks. The TUI would show blocked tasks as ready to work on.

Tests ran

  • bun run typecheck passes
  • bun run build passes
  • Run ralph-tui run --epic <epic-id> with tasks that have blocking dependencies
  • Verify blocked tasks show red "blocked" indicator instead of green "actionable"
  • Verify task list sorts correctly (actionable tasks before blocked tasks)

Summary by CodeRabbit

  • Refactor
    • Updated internal dependency tracking data structure for improved system efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

The BeadJson interface had incorrect field names for dependencies that
didn't match the actual bd list --json output:

- dependencies[].id -> dependencies[].depends_on_id
- dependencies[].dependency_type -> dependencies[].type

This caused dependsOn to never be populated, making all tasks appear as
"actionable" instead of properly detecting blocked tasks.
@vercel
Copy link

vercel bot commented Jan 17, 2026

@roberto-mello 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 Jan 17, 2026

Walkthrough

The Beads tracker plugin's dependency object structure is refactored, renaming fields (idissue_id, dependency_typetype), removing title and status, and introducing an optional created_at field. Function references are updated accordingly.

Changes

Cohort / File(s) Summary
Beads Tracker Dependency Schema
src/plugins/trackers/builtin/beads/index.ts
BeadJson dependency item interface restructured: id renamed to issue_id, dependency_type renamed to type, title and status fields removed, created_at field added as optional. Updated beadToTask function to reference dep.type and dep.depends_on_id.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop through the schema, fields dance and reorganise,
Dependencies reshape in logical disguise,
From id to issue_id we swiftly transform,
New fields arrive whilst old ones reform—
A tidy tracker, clean and wise! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the main change: correcting dependency field names in the beads tracker component to match the actual API output.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/plugins/trackers/builtin/beads/index.ts (1)

48-53: Both dependencies and dependents should be simple string arrays of issue IDs, not objects.

According to bd CLI documentation, both dependencies and dependents fields should contain arrays of issue ID strings (e.g., ["bd-xxxx", "bd-yyyy"]), not arrays of objects with id, title, status, and dependency_type fields. Update the type definitions for both fields to match the actual bd CLI output structure: dependencies?: string[] and dependents?: string[].

@subsy
Copy link
Owner

subsy commented Jan 17, 2026

@roberto-mello

This PR changes the field names to match the raw storage format in issues.jsonl, but the code actually parses bd show --json output, which returns a different (expanded) format:

  • Raw storage: depends_on_id, type
  • bd show --json: id, dependency_type

The current code on main is correct I think. Merging this would break dependency parsing since dep.depends_on_id and dep.type would be undefined in the actual CLI output.Let me know if you think I'm missing something here.

@subsy subsy closed this Jan 19, 2026
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