Skip to content

fix: filter tombstoned issues from beads-rust tracker#297

Merged
subsy merged 4 commits intosubsy:mainfrom
thunter009:fix/beads-rust-tombstone-filtering
Feb 13, 2026
Merged

fix: filter tombstoned issues from beads-rust tracker#297
subsy merged 4 commits intosubsy:mainfrom
thunter009:fix/beads-rust-tombstone-filtering

Conversation

@thunter009
Copy link
Copy Markdown
Contributor

@thunter009 thunter009 commented Feb 12, 2026

Summary

  • Add tombstonecancelled mapping in mapStatus()
  • Add isTombstone() helper to filter soft-deleted issues
  • Filter tombstones in getTasks(), getEpics(), getNextTask() before conversion
  • Exclude tombstones from getPrdContext() child completion counts
  • 4 new tests covering all filtering paths

Fixes #296

Test plan

  • bun run typecheck passes
  • bun run build passes
  • bun test — all 39 tests pass (4 new)
  • Manual: create tombstoned issues with br delete, verify they don't appear in TUI

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Soft-deleted (tombstoned) issues and epics are now consistently excluded from task lists, epic lists, next-task selection and project/PRD completion counts and dependent child counts.
  • Tests

    • Added comprehensive tests verifying tombstoned items are filtered across all retrievals and next-task logic, including mixed and all-tombstoned edge cases and PRD context scenarios.

mapStatus() falls through to 'open' for tombstone status, causing
soft-deleted issues to appear as open tasks in the TUI. Add tombstone
mapping and filter tombstoned issues in getTasks, getEpics, getNextTask,
and exclude them from getPrdContext completion counts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

@thunter009 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
Copy Markdown
Contributor

coderabbitai bot commented Feb 12, 2026

Walkthrough

Detects beads-rust "tombstone" statuses and filters tombstoned items in-memory: tombstones map to cancelled and are excluded from task/epic listings, next-task selection, and PRD context dependent counts. Tests added to validate tombstone behaviour.

Changes

Cohort / File(s) Summary
Implementation
src/plugins/trackers/builtin/beads-rust/index.ts
Added isTombstone() and mapped tombstonecancelled; applied pre-conversion tombstone filtering across getTasks, getEpics, getTask, getNextTask and getPrdContext; excluded tombstoned dependents when computing counts.
Tests
src/plugins/trackers/builtin/beads-rust/index.test.ts
Added tests covering tombstone handling: getTask returns undefined for tombstoned task; getTasks/getEpics exclude tombstoned items; getNextTask excludes tombstones and returns undefined when all are tombstoned; PRD context tests ensure tombstoned dependents are not counted.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarises the main change: filtering tombstoned issues from the beads-rust tracker to prevent soft-deleted issues appearing as open tasks.
Linked Issues check ✅ Passed All coding requirements from issue #296 are met: tombstone status mapping added, isTombstone() helper implemented, filtering applied across getTasks/getEpics/getNextTask/getPrdContext, and comprehensive tests added.
Out of Scope Changes check ✅ Passed All changes directly address the linked issue #296; no out-of-scope modifications detected beyond tombstone filtering requirements.
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
Copy Markdown

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 13, 2026 10:39pm

Request Review

@subsy
Copy link
Copy Markdown
Owner

subsy commented Feb 13, 2026

Thanks @thunter009 nice focused fix

Copy link
Copy Markdown
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 1057-1143: Add a unit test in the tombstone filtering suite that
verifies BeadsRustTrackerPlugin.getPrdContext excludes dependents with status:
'tombstone' from child-completion counts: instantiate BeadsRustTrackerPlugin,
initialize it (initialize({ workingDir: '/test' })), mock the spawn response
JSON to include a PRD with dependents where one dependent has status 'tombstone'
and others are completed/not completed, then call getPrdContext and assert that
completedCount and totalCount do not include the tombstoned dependent (use
unique IDs to assert expected counts and dependent inclusion/exclusion).

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 58.82353% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.47%. Comparing base (f85ce9c) to head (77a5bf5).
⚠️ Report is 5 commits behind head on main.

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

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #297   +/-   ##
=======================================
  Coverage   44.47%   44.47%           
=======================================
  Files          96       96           
  Lines       30132    30148   +16     
=======================================
+ Hits        13400    13409    +9     
- Misses      16732    16739    +7     
Files with missing lines Coverage Δ
src/plugins/trackers/builtin/beads-rust/index.ts 69.83% <58.82%> (-0.37%) ⬇️
🚀 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.

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.

beads-rust: tombstoned issues appear as open tasks in TUI

2 participants