* fix(storage): include custom active-category statuses in bd ready (#5831) (#5918) bd ready pins WorkFilter.Status to StatusOpen. BuildReadyWorkWhere treated that pin as an exact match, so issues in a custom status with category active never appeared — even though bd statuses --help, the ready_issues view (migration 0025), and ClaimableSourceStatusesInTx all treat that category as ready-eligible. Widen the singular StatusOpen clause to the same predicate the view uses: status = ? OR status IN (SELECT name FROM custom_statuses WHERE category = 'active') Non-open singular statuses stay exact. Built-in open still matches. Custom wip/done/frozen/unspecified statuses stay out, matching claim's GH-3570 anti-steal set. Reported by Justin Clemens (@justin-candor). Addresses #5831 (cherry picked from commit66aa73bb99) * fix(cli): `bd list --wisp-type` cannot match a row — register the plane knob it needs (#6098) `bd list --wisp-type heartbeat` returns an empty listing for EVERY input, and `bd list` exposes no flag that changes that. ListRequest.WispType is a predicate, not a plane selector — its own doc says so, and RunReaderListWispTypeNarrowsTheAdmittedPlaneRatherThanAdmittingIt pins it. That contract is right and this does not touch it. The doc also names the way out: The combination that answers with rows is IncludeEphemeral (or IncludeInfra) plus this, and it is lawful rather than refused. `bd list` registers neither `--include-ephemeral` nor `--all-types`. So of the two combinations the doc names, the CLI can express only IncludeInfra — which admits the plane AND lifts the infra-type exclusions AND changes the template treatment, three decisions a caller who wanted one classification did not ask for. The narrow knob the doc names FIRST has no flag at all. That is the whole defect: the API composes correctly, and the CLI is missing the other half of the pair. ## What this does 1. Registers `--include-ephemeral` on `bd list`, wired to `ListRequest.IncludeEphemeral` — the plane knob alone, off by default, so the default listing is byte-identical. 2. Refuses `--wisp-type` when no plane is admitted, with the fix in the hint, instead of printing an empty listing. The refusal is at the CLI layer ONLY. At the API layer the combination stays lawful and still composes to an empty page: that is the pinned contract, and a programmatic caller composing filters may legitimately land on it. A human typing `--wisp-type heartbeat` cannot have meant "prove to me that durable rows carry no classification", so the CLI is where the guess is safe to make. An explicit `--type` is deliberately left alone: an infra type routes to the plane by itself, so the request may well be satisfiable, and this layer cannot tell which types those are without loading the workspace's infra vocabulary. Refusing there would reject lawful, answerable requests. ## Verification --- PASS: TestListRegistersIncludeEphemeral --- PASS: TestGatherListInput_WispTypeWithoutAPlaneIsRefused --- PASS: TestGatherListInput_WispTypeWithAPlaneIsAccepted (3 subtests) --- PASS: TestGatherListInput_IncludeEphemeralReachesTheRequest The pair discriminates rather than being trivially green: a guard that refused every `--wisp-type` would pass the refusal test and fail all three acceptance subtests, one per route that admits the plane. `ok github.com/steveyegge/beads/cmd/bd`, `ok github.com/steveyegge/beads/internal/workapi`, `go build ./...` and `go vet` clean. `internal/workapi/list.go` and the golden corpus are untouched. docs/CLI_REFERENCE.md is not regenerated here: the docs pipeline builds from the release tag in docs/cli-docs.pin (v1.2.2), not from this checkout, so the new flag appears at the next release bump. Claude-Session: https://claude.ai/code/session_01X1jMLQTSrCwtzFRS1xeUC6 (cherry picked from commitcbf84cb1c0) * fix(list): honor --status when combined with --ready (#5924) * fix(list): honor --status when combined with --ready (#5832) `bd list --status X --ready` silently dropped --status and returned the unfiltered ready set (typically open issues). BuildListFilter pinned StatusOpen whenever ReadyFlag was set, and ReadyFilterFromIssueFilter hard-coded the same pin, so a custom status or in_progress selector never reached GetReadyWork. --ready without --status still defaults to open. An explicit --status is now the ready-work status selector, matching how other list filters already compose with --ready. `--status all` remains the no-filter spelling and keeps the open default. * fix(list): status-aware --ready footer and honor-path contract docs (#5832) The query intersection from the prior commit is unchanged. Round-1 review asked the ReadyFlag/Statuses contract comments and the text footer to describe the honor path: default --ready is still open, an explicit --status is named instead of "excludes in_progress". (cherry picked from commitf5a20fb66b) * fix(doctor): ignore the generated dolt-server-config.yaml (#5978) doltserver.Start() writes .beads/dolt-server-config.yaml when the resolved dolt binary supports auto_gc_behavior.archive_level. Its own doc comment says the file "lives alongside the other gitignored server state files in beadsDir", but the hyphenated name falls outside the "dolt-server." prefix shared by the other five entries, so both GitignoreTemplate and requiredPatterns missed it. The file holds an absolute cfg_dir and a per-machine port, so committing it breaks every other clone -- the same reason the template already gives for 'redirect'. It shows up as untracked in every consumer repo whose dolt supports archive_level. This repo does not see it because its own root .gitignore has a blanket .beads/* rule. Add the pattern to requiredPatterns as well as the template: the template only helps repos initialised after this change, while requiredPatterns is what missingGitignorePatterns() iterates, so it is what lets bd doctor --fix append the rule to an existing .beads/.gitignore. Co-authored-by: Adam Spiers <ai@adamspiers.org> (cherry picked from commit671db6560d) * fix(storage): stop recommending an inert config.yaml key for a missing prefix (#5936) ReadConfigPrefix gates on the database's config table row `issue_prefix`. When that row is absent its error told the operator that, "if using config.yaml, use key 'issue-prefix', not 'issue_prefix'" — but this gate never consults config.yaml. The YAML value is read one line above the error solely to populate a debug.Logf diagnostic; it is discarded, so setting `issue-prefix` in config.yaml leaves the gate failing exactly as before. Following the advice produces a tracked config field that changes nothing and misleads the next reader. Point the message at what actually writes the row — `bd init --prefix` or `bd bootstrap`, both of which it already named — and say plainly that the check reads the database's config table so the config.yaml key does not satisfy it. No resolution behavior changes; this is the error text only. Reported-by: @ncljesus Closes #5916 (cherry picked from commit61ec85181f) * fix(create): say --file is one issue per ## heading (#5921) bd create --file/-f is a batch-import route: it creates one issue per H2 ("##") heading, and ### subsections attach fields to that issue. The old Usage was "Create multiple issues from markdown file", which never named those semantics or --body-file. Callers who wanted "one issue, description loaded from a file" reached for the shortest flag and got a silent bulk import instead -- reported by @seanmartinsmith with a 3-section briefing file (## Problem / ## Context / ## Acceptance Criteria) that became 3 issues instead of one. gatherCreateInput already rejects a positional title combined with --file. That is the reporter's literal repro, so this keeps the rejection and adds a --body-file hint on the error they actually see. The remaining trap -- --file used alone on a section-headed file -- is unchanged, because bd cannot tell that apart from a genuine batch file by content. Tests: parseMarkdownFile reproduces the trap file; gatherCreateInput locks in the title+--file rejection and --body-file hint; flag Usage names the per-heading behavior. The existing TestCreateFromMarkdownFile binary path already covers well-formed --file creates. (cherry picked from commit67b066b58e) * fix(list): stop truncation hint padding a blank TTY line (#5927) printTruncationHint fed surrounding newlines through ui.RenderWarn. lipgloss treats that as a block, pads the blank lines to the widest-line width (alignTextHorizontal shortAmount = widestLine - lineWidth), and drops the trailing newline (GH#5685). The next shell prompt then prints on the same line as a run of spaces. Keep the newlines outside RenderWarn so the hint is one colored line with a real trailing newline. Tests construct an explicitly styled lipgloss Style so the padded blank-line shape fails if the helper is reverted. Fixes #5685. (cherry picked from commit766c0bd15a) * fix(setup/claude): keep settings.json's trailing newline and skip no-op rewrites (#5944) * fix(setup/claude): keep settings.json's trailing newline and skip no-op rewrites (#5693) bd setup claude (and bd init, which calls it) marshalled the Claude settings map with json.MarshalIndent and wrote it unconditionally. MarshalIndent emits no trailing newline, so every run stripped the one Claude Code's own writes leave behind, and re-wrote the file even when no hook changed. Because bd init git-adds .claude/settings.json, that surfaced as a staged diff with no semantic content. The same marshal-then-write pattern appears at four call sites in claude.go: installClaude's settings write and its settings.local.json migration, and removeClaude's settings write and its settings.local.json cleanup. Fixing one would have left the bug live in the other three, so both halves are now shared helpers -- marshalSettings appends the newline, writeSettingsIfChanged compares against the bytes already on disk and returns early when they match -- and all four sites go through them. Reported by @maphew. * chore(setup/claude): use the repo spelling "marshaled" in the new comments The misspell linter flags British "marshalled"; CI pins golangci-lint v2.10.1 and runs it with --new-from-merge-base, so both new comment lines are in scope. Comment text only, no behaviour change. (cherry picked from commitcad7e17d70) * fix(gate): evaluate cross-rig bead gates via prefix routes (#5859) * fix(gate): route cross-rig bead checks (#5857) Evaluate historical rig:bead gate targets through the current read-only prefix routing seam in direct and proxied-server modes. Preserve local bead gates, reject malformed cross-rig values, and cover the real two-store route with a Dolt integration test. Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of Klas Hesselman * fix(gate): address cross-rig review feedback (#5857) Preserve the original local not-found error when prefix routing is unavailable, document the user-visible behavior, and lock the proxied error contract with a regression test. Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of Klas Hesselman (cherry picked from commitcbfc505e39) * fix(storage/uow): retry transient ping failures during openDB bootstrap (#6003) * test(uow): red — pingWithRetry does not exist yet for openDB's boot-time ping Adds TestPingWithRetryRecoversFromATransientBadConn (be-x49l6): a fake pinger exercising three cases — transient error retries then recovers, non-transient error fails without retrying, and an already-cancelled context fails promptly. Fails to compile until pingWithRetry/pinger are added to dolt_sql_provider.go. * feat: green — Fix: unretried ping in uow openDB turns a transient Dolt connection drop into a hard CI failure (refs be-x49l6) * refactor: drop what-comment on pingWithRetry (self-review, refs be-x49l6) Self-review flagged it as restating the function's own signature/behavior rather than explaining a non-obvious why; the pinger and isTransientPingError comments stay since they carry rationale the code doesn't otherwise convey. * test(uow): red — a hung boot ping is not bounded per attempt Adds the two behaviours review #6003 asked for, both failing: - a_hung_ping_is_capped_per_attempt_and_retried: blockingPinger stalls until its context is cancelled. backoff.Retry bounds only the gap between attempts, so with the caller's context handed straight to PingContext the call never returns at all. The subtest runs the call off-goroutine so this reports as "never returned" instead of a package timeout. - connection-level_net_error_retries_then_recovers: a *net.OpError (connection refused / reset / broken pipe) is currently classified non-transient and fails the boot ping outright. the_caller's_own_deadline_fails_without_retrying passes already and is kept as the regression guard for the trap #6000 fell into: making context.DeadlineExceeded retryable must not make the caller's own expiry retryable too. pingWithRetry takes attemptTimeout here but does not honour it yet, so the red is behavioural rather than a compile error. Refs be-g1i7n. * fix(uow): bound each boot ping attempt and widen the transient classifier Review #6003, point 1. backoff.Retry bounds the gap between attempts but cannot interrupt one in flight, and the DSN sets a dial Timeout (5s) with no ReadTimeout — so a server that accepts TCP and then stalls mid-handshake blocked for the caller's entire context, which is the exact scenario the PR summary claims to fix. Each attempt now runs under its own context.WithTimeout (pingAttemptTimeout, 10s — above the 5s dial timeout so a real dial timeout still surfaces as itself), and context.DeadlineExceeded is classified transient so the retry loop actually continues. pingWithRetry checks the caller's context *before* classifying. That is what keeps the retryable DeadlineExceeded from swallowing the caller's own expiry — the inverse of the regression #6000 introduced by capping each attempt and then treating the resulting DeadlineExceeded as permanent. Covered from both sides: a_hung_ping_is_capped_per_attempt_and_retried and the_caller's_own_deadline_fails_without_retrying. Review #6003, point 2. isTransientPingError stays separate from internal/storage/dolt's isRetryableError, and now says why in full: that one is a query-time classifier matching on error text, admitting migration-lock, read-only and MySQL-1105 shapes a boot ping cannot be in because nothing has executed on the connection yet. The coverage gap the review named is closed on this side instead — *net.OpError is transient, which is refused/reset/broken-pipe portably and by type rather than by substring, with permanent DNS failures excluded so an unresolvable host still fails fast instead of spending the whole budget. Refs be-g1i7n. (cherry picked from commitc0d8da42de) * fix(deps): bump dolt/go past upstream manifest-missing-chunk defense (#4070) (#5931) * fix(deps): bump dolt/go past upstream manifest-missing-chunk defense (#4070) Pin github.com/dolthub/dolt/go to 796d074977417da931df65202a79e0a7f532a3db. That hop includes: - 23ccbf9442275166f168939277a5b4a348a63c9d — reject a file manifest update that references a missing table file (the defense itself) - 796d074977417da931df65202a79e0a7f532a3db — doc/test follow-up to the defense commit (no production-semantics change) A non-atomic backup sync can leave the backup manifest ahead of chunk files; subsequent syncs then fail with "table file not found" and stay broken. The upstream defense turns that silent corruption into a loud failed sync. Beads' previous pin (a6690826d767, 2026-07-15) predates both commits. Minimal-churn pin: do not bump to today's dolt tip. go mod tidy did not force a later version. This is a mitigation, not a root-cause fix: backup file+manifest publish remains non-atomic, and backups already in the manifest-ahead state are not repaired by this change. Mitigates #4070 * fix(nix): update vendorHash for the dolt/go bump The go.mod/go.sum bump in this PR invalidates the pinned vendorHash, so `nix build .#default` fails with a fixed-output hash mismatch. Update it to the value CI computed: specified: sha256-D+KDoLFJHpt9D9rCrtE3NMfL4fgK7UxpdKlCxp5yz5Y= got: sha256-wDU1tw/4t2CetwQl4+zUhlDI70dSasLLI2Gy66ZyhQQ= The repo documents this coupling in .github/dependabot.yml; the existing "Update vendorHash for dependabot Go bumps" workflow only fires for dependabot PRs, so a manual bump is needed here. (cherry picked from commit851aa2f20a) * docs(changelog): record the 1.3.1 cherry-pick behaviour deltas Documents all eleven picks under the existing `## [1.3.1]` heading. The six behaviour deltas go under Changed, including the two that are not pure wins and that a user is most likely to hit without knowing why: - bd doctor now warns on every pre-existing workspace until --fix appends the new .beads/dolt-server-config.yaml gitignore rule. - opening a store against a dead server takes up to ~30s to fail instead of failing instantly, because the boot ping is retried. Also called out as non-obvious: the ready set grows where custom active-category statuses exist, bare --wisp-type becomes a refusal rather than an empty success, and the Dolt bump converts a quietly corrupting backup sync into a loud failing one without repairing backups already in that state. The dated `## [1.3.0]` section is shipped and is left byte-identical: the diff is 165 insertions and 0 deletions, and the [1.3.0]-to-EOF region still hashes to 798a2ee0b0f0b7a3f0fc017ae01c919807740348a34f5ea8719b82a008533d00. The `## [1.3.1]` date is left for a later release prep to restamp. * fix(nix): recompute vendorHash for the release-branch dependency set The #5931 cherry-pick (510675948) bumps four dolt module pins, which invalidates the pinned vendorHash. Neither side's value was usable: the release branch already carried its own dependency bump (d594092eb), so this pick lands on a vendor set that has existed on neither release/1.3.0 nor main, and #5931's own hash was computed against main's graph. Taken from the `got:` value the nix-build lane reported for this branch: specified: sha256-wDU1tw/4t2CetwQl4+zUhlDI70dSasLLI2Gy66ZyhQQ= got: sha256-DQdauEx5g48Xbxrz4wGLx4vkrQoYQX3FUx+7N/Y6YV4= go mod tidy after the pick was a no-op, and the dependency delta against the release tip is exactly the four intended pins, so this hash covers that change and nothing else. * docs(changelog): scope the #6003 open-latency entry and correct its bound The 1.3.1 entry for the openDB bootstrap-ping retry said "up to ~30s" and named no topology. Both were misleading: - 30s is the retry BUDGET, not the wall-clock bound. backoff stops scheduling new attempts at 30s (MaxElapsedTime, dolt_sql_provider.go) but cannot cancel one in flight, and pingAttemptTimeout caps an attempt at 10s — so a single open can take ~40s. openAndInitSchema pings twice, each with a fresh budget, so the narrow case where the backend satisfies the first ping and the schema init and is then unreachable for the second reaches ~80s. - Only unit-of-work provider construction takes that ping, which is a minority of topologies: proxied-server (local and external) on every command, plus `bd serve` in server/external-server/shared-server workspaces, which funnels through newSQLServerUOWProvider. Embedded never reaches it (bd serve refuses embedded outright), and an ordinary CLI command in a server or shared-server workspace opens a DoltStore that takes no such ping. An embedded reader of the old entry would have triaged a slowdown that cannot affect them. CHANGELOG only; the dated [1.3.0] section is unchanged (verified byte-identical, sha256 798a2ee0…, 9169 lines). --------- Co-authored-by: Vishnu J <vishnuj81093@gmail.com> Co-authored-by: Karel Bourgois <karel@voxist.com> Co-authored-by: Adam Spiers <github@adamspiers.org> Co-authored-by: Adam Spiers <ai@adamspiers.org> Co-authored-by: swedeinasia-flow <klas@flownetworks.io> Co-authored-by: Jim Wordelman <jim@wordelman.name>
156 lines
6.5 KiB
Go
156 lines
6.5 KiB
Go
package workapi
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/steveyegge/beads/internal/types"
|
|
"github.com/steveyegge/beads/internal/utils"
|
|
"github.com/steveyegge/beads/issueops"
|
|
)
|
|
|
|
// DefaultReadyLimit is the default number of rows a ready-work query returns
|
|
// when the caller does not ask for a specific limit. Every frontend registers
|
|
// its limit knob from this constant so the surfaces cannot drift apart; 0
|
|
// still means unlimited.
|
|
const DefaultReadyLimit = 100
|
|
|
|
// LimitOr resolves a request's optional limit: nil takes the surface's shared
|
|
// default, and an explicit 0 stays 0, which means unlimited at both storage
|
|
// seams. The pointer is what keeps "unset" and "explicitly unlimited"
|
|
// distinguishable — collapsing them would make one constant unable to serve
|
|
// both surfaces.
|
|
func LimitOr(limit *int, fallback int) int {
|
|
if limit == nil {
|
|
return fallback
|
|
}
|
|
return *limit
|
|
}
|
|
|
|
// BuildReadyFilter turns a ready request into the storage-level work filter.
|
|
// It is the single definition of what `bd ready` means: open issues only (an
|
|
// empty WorkFilter would default to open plus in_progress), issue-type alias
|
|
// expansion, label and exclude-type normalization, limit defaulting, and the
|
|
// assignee rule that lets Unassigned win over a stale Assignee.
|
|
//
|
|
// Labels, LabelsAny and ExcludeLabels are normalized here, so a caller can
|
|
// pass raw user input. A caller that has to decide something from the label
|
|
// sets - the CLI's directory-label default is the one such case - reads them
|
|
// back off the returned filter, where they are already normalized, rather than
|
|
// normalizing its own copy: a value it then puts on the filter itself is its
|
|
// own to shape, and running it through here would change it.
|
|
func BuildReadyFilter(in issueops.ReadyRequest) (types.WorkFilter, error) {
|
|
filter := types.WorkFilter{
|
|
// Open only, not in_progress - the same set `bd list --ready` shows
|
|
// when --status is omitted (an explicit --status is an intersection;
|
|
// GH#5832).
|
|
Status: types.StatusOpen,
|
|
Type: utils.NormalizeIssueType(in.IssueType),
|
|
Limit: LimitOr(in.Limit, DefaultReadyLimit),
|
|
// Carried for the callers that consume this filter as a VALUE and run
|
|
// their own query (cmd/bd's proxied `bd ready`), where the seam beneath
|
|
// them renders it. Both implementations of issueops.Reader take it back
|
|
// off and skip in the shared page epilogue; see BuildListFilter and
|
|
// FinishPageAt.
|
|
Offset: in.Offset,
|
|
Unassigned: in.Unassigned,
|
|
SortPolicy: types.SortPolicy(in.Sort),
|
|
Labels: utils.NormalizeLabels(in.Labels),
|
|
LabelsAny: utils.NormalizeLabels(in.LabelsAny),
|
|
ExcludeLabels: utils.NormalizeLabels(in.ExcludeLabels),
|
|
LabelPattern: in.LabelPattern,
|
|
LabelRegex: in.LabelRegex,
|
|
IncludeDeferred: in.IncludeDeferred,
|
|
IncludeEphemeral: in.IncludeEphemeral,
|
|
ExcludeTypes: normalizeExcludeTypes(in.ExcludeTypes),
|
|
HasMetadataKey: in.HasMetadataKey,
|
|
Lite: in.Brief,
|
|
}
|
|
|
|
if in.Priority != nil {
|
|
p := *in.Priority
|
|
filter.Priority = &p
|
|
}
|
|
if in.Assignee != "" && !in.Unassigned {
|
|
a := in.Assignee
|
|
filter.Assignee = &a
|
|
}
|
|
if in.ParentID != "" {
|
|
pid := in.ParentID
|
|
filter.ParentID = &pid
|
|
}
|
|
if in.MolType != nil {
|
|
filter.MolType = in.MolType
|
|
}
|
|
if len(in.MetadataFields) > 0 {
|
|
filter.MetadataFields = in.MetadataFields
|
|
}
|
|
|
|
if err := ValidateMetadataFilters(in.MetadataFields, in.HasMetadataKey); err != nil {
|
|
return filter, err
|
|
}
|
|
|
|
if !filter.SortPolicy.IsValid() {
|
|
// A deterministic request-validation failure, so it matches
|
|
// ErrValidation: every role whose filter vocabulary this builds —
|
|
// Reader.Ready, ReadyClaimer.ClaimNext and BatchCloser's ClaimNext —
|
|
// promises a caller can classify one with errors.Is rather than by
|
|
// reading prose. The wrap is %.0w rather than a "%w: " prefix because
|
|
// this text is what `bd ready --sort bogus` prints verbatim behind
|
|
// "Error: "; prefixing it would change user-visible copy to say
|
|
// something the reader already knows.
|
|
return filter, fmt.Errorf("invalid sort policy '%s'. Valid values: hybrid, priority, oldest%.0w", in.Sort, issueops.ErrValidation)
|
|
}
|
|
return filter, nil
|
|
}
|
|
|
|
// BuildReadyCountFilter turns a ready request into the storage-level filter a
|
|
// COUNT of the ready set runs against: BuildReadyFilter's filter with the page
|
|
// removed, and the single definition of what `bd ready`'s published total means.
|
|
//
|
|
// It refuses a request carrying a page. issueops.ReadyCounter.CountReady
|
|
// promises its answer equals len(Reader.Ready(r with Limit=0).Items), and a
|
|
// Limit would make that "how many of the first N" while an Offset would
|
|
// subtract the rows it skipped from the size of a set that still holds them.
|
|
//
|
|
// The zeroed limit is set on a LOCAL copy: a nil Limit means the shared ready
|
|
// default at BuildReadyFilter, so an unlimited count has to say so explicitly.
|
|
func BuildReadyCountFilter(in issueops.ReadyRequest) (types.WorkFilter, error) {
|
|
if in.Limit != nil {
|
|
return types.WorkFilter{}, fmt.Errorf("%w: a ready count does not take a limit", issueops.ErrValidation)
|
|
}
|
|
if in.Offset != 0 {
|
|
return types.WorkFilter{}, fmt.Errorf("%w: a ready count does not take an offset", issueops.ErrValidation)
|
|
}
|
|
unlimited := 0
|
|
counted := in
|
|
counted.Limit = &unlimited
|
|
// Brief is CARRIED, not refused and not cleared, which is the opposite of
|
|
// what ClaimNext does with it. A count reads no field of any row, so the
|
|
// projection cannot make the number wrong; and the count is not always
|
|
// cheap enough for that to be the end of it. The unit-of-work seam has no
|
|
// COUNT(*) over the ready predicate and sizes the set by running the
|
|
// unbounded page and taking its length (uow/ready_counter.go), so clearing
|
|
// the field here would hydrate every heavy column of the whole ready set to
|
|
// answer `bd ready --brief`, which is the cost the projection exists to
|
|
// avoid and larger than the page it was asked for. Carrying it also keeps
|
|
// the count filter what this builder says it is: the listing's filter with
|
|
// the PAGE removed, and nothing else removed.
|
|
return BuildReadyFilter(counted)
|
|
}
|
|
|
|
// normalizeExcludeTypes splits comma-separated exclusions and expands type
|
|
// aliases, so --exclude-type=mr,epic and --exclude-type mr --exclude-type epic
|
|
// mean the same thing.
|
|
func normalizeExcludeTypes(raw []string) []types.IssueType {
|
|
var out []types.IssueType
|
|
for _, group := range raw {
|
|
for _, t := range strings.Split(group, ",") {
|
|
t = strings.TrimSpace(t)
|
|
if t != "" {
|
|
out = append(out, types.IssueType(utils.NormalizeIssueType(t)))
|
|
}
|
|
}
|
|
}
|
|
return out
|
|
}
|