Skip to content

Fix ready/list UX regressions#3481

Merged
maphew merged 6 commits intogastownhall:mainfrom
maphew:fix/ready-list-regressions-bd-main-typ
Apr 27, 2026
Merged

Fix ready/list UX regressions#3481
maphew merged 6 commits intogastownhall:mainfrom
maphew:fix/ready-list-regressions-bd-main-typ

Conversation

@maphew
Copy link
Copy Markdown
Collaborator

@maphew maphew commented Apr 25, 2026

Summary

Upstream context

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

daniel-jasinski and others added 3 commits April 25, 2026 12:14
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.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 25, 2026

Codecov Report

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

Files with missing lines Patch % Lines
internal/storage/issueops/blocked.go 0.00% 57 Missing ⚠️
cmd/bd/list.go 1.96% 50 Missing ⚠️
internal/storage/issueops/ready_work.go 0.00% 20 Missing ⚠️
cmd/bd/ready.go 8.33% 11 Missing ⚠️
cmd/bd/list_format.go 0.00% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

kevglynn and others added 3 commits April 25, 2026 14:23
… (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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants