Fix ready/list UX regressions#3481
Merged
maphew merged 6 commits intogastownhall:mainfrom Apr 27, 2026
Merged
Conversation
The --exclude-type CLI flag was silently ignored by bd ready. The CLI correctly populated filter.ExcludeTypes, and the type's godoc promised that values are "Appended to the default exclusion list", but the no-Type branch of GetReadyWorkInTx built the NOT IN clause from the hardcoded defaults only. Merge user-supplied ExcludeTypes into the default exclusion list (with dedup against defaults and empties) before building the placeholders. This matches the pattern already used by issueops/filters.go and dolt/queries.go for bd list. Fixes GH#3397.
…ren only (GH#3396) The SQL clause in GetReadyWorkInTx's ParentID branch was a one-hop join against the parent-child dependency table, so only direct children surfaced. The --parent help text in cmd/bd/ready.go:672 and the WorkFilter.ParentID godoc (internal/types/types.go:1295) both promise "descendants (recursive)". Add a BFS helper GetDescendantIDsInTx alongside GetChildrenOfIssuesInTx in blocked.go — BFS rather than a recursive CTE because the existing children helper already iterates across both dependencies and wisp_dependencies tables, and composing that inside a single CTE gets ugly. The visited set breaks cycles and a depth cap (default 100, matching the cycle-detection CTE elsewhere in issueops) guards against malformed data. Rewrite the ParentID branch in GetReadyWorkInTx to resolve descendants via the new helper and OR that with the prior dotted-ID prefix match (for implicit-parent IDs with no explicit parent-child dep), preserving the original semantics for dotted IDs. MoleculeID is deliberately left as one-hop — its inline comment explicitly scopes it to "direct children" unlike ParentID. Fixes GH#3396.
This was referenced Apr 25, 2026
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
… (GH#3478) bd list --ready previously only filtered by status=open, showing issues that bd ready correctly excluded as blocked. Now both commands use the same GetReadyWork path, ensuring consistent results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bd ready --exclude-typeby honoringWorkFilter.ExcludeTypesin ready-work filtering.bd ready --parentto return transitive descendants while preserving dotted-ID descendants.bd readylimit from 10 to 100 and emits a JSON-mode stderr truncation hint while keeping stdout as a JSON array.bd list --longinclude issue descriptions.Upstream context
--exclude-label) is already merged and present on this branch base.main.bd list --jsononly when truncated would create a variable JSON schema; that needs a separate schema decision.Fixes #3397.
Fixes #3396.
Fixes #3409.
Fixes #3285.
Tests
CGO_ENABLED=1 go test -tags gms_pure_go ./internal/storage/dolt -run 'TestGetReadyWork_(ExcludeTypeFilter|ParentFilterReturnsDescendants)$'CGO_ENABLED=1 BEADS_TEST_EMBEDDED_DOLT=1 go test -tags gms_pure_go ./cmd/bd -run '^(TestEmbeddedReady|TestEmbeddedList)$/^(ready_json_truncation_hint|ready_exclude_label|long_format)$'make test