Skip to content

fix(list): deduplicate issues with multiple blocks dependencies (GH#3567)#3673

Merged
harry-miller-trimble merged 1 commit into
gastownhall:mainfrom
kevglynn:fix/3567-list-duplicate-blockers
May 4, 2026
Merged

fix(list): deduplicate issues with multiple blocks dependencies (GH#3567)#3673
harry-miller-trimble merged 1 commit into
gastownhall:mainfrom
kevglynn:fix/3567-list-duplicate-blockers

Conversation

@kevglynn

@kevglynn kevglynn commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes bd list showing issues multiple times when they have more than one blocks dependency
  • Adds Go-side deduplication in searchTableInTx to ensure SearchIssues never returns the same issue ID twice, regardless of how the underlying SQL engine evaluates dependency-related subqueries
  • Adds regression test TestSearchIssues_NoDuplicatesWithMultipleBlockers covering the epic parent + two blockers scenario

Closes #3567

Test plan

  • make build succeeds
  • make test passes (pre-existing cmd/bd timeout unrelated to this change)
  • Race detection passes on internal/storage/issueops
  • Regression test covers issue with parent-child dep + two blocks deps appearing exactly once

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

…567)

Add Go-side dedup in searchTableInTx to ensure SearchIssues never
returns the same issue ID twice, regardless of how many dependency
subqueries match. This prevents bd list from showing issues multiple
times when they have more than one blocks dependency.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/storage/issueops/search.go 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@harry-miller-trimble harry-miller-trimble left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM — targeted dedup fix for GH#3567, CI green, focused 2-file diff with a thorough regression test.

@harry-miller-trimble

Copy link
Copy Markdown
Collaborator

Automated Review Summary

Classification: Easy-win
Recommendation: Approve ✅

What it does: Fixes bd list returning duplicate issues when an issue has multiple blocks dependencies (GH#3567). Adds a seen map in searchTableInTx to deduplicate rows produced by dependency-related subqueries.

Review notes:

  • 2 files changed: issueops/search.go (fix) + dolt/queries_test.go (regression test)
  • +84 lines, −0 lines — purely additive
  • CI: all 39 checks green (Linux, macOS, Windows, embedded Dolt, lint, format, nix)
  • No .beads/ files, no merge conflicts, merge state CLEAN
  • Test creates the exact multi-blocker scenario and asserts no duplicates
  • Author: @kevglynn (external contributor)

No issues found. Ready to merge.


Automated review by gh-pr-review formula

@harry-miller-trimble harry-miller-trimble merged commit 7e3c7fb into gastownhall:main May 4, 2026
39 checks passed
@kevglynn

kevglynn commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! Go side dedup felt like the safest fix here... the SQL path has enough moving parts that a DISTINCT might've had unintended side effects.

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.

bd list duplicates issues with multiple blocks dependencies

3 participants