feat(bugs): support priority in list, show, and a new prioritize command - #331
Merged
Conversation
Current Aviator status
This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
tjdammann
changed the base branch from
main
to
tjdammann/bump-h2-rustsec-2026-0258
August 20, 2026 01:10
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 01:10
8e6f8c8 to
421a93a
Compare
tjdammann
marked this pull request as ready for review
August 20, 2026 01:10
tjdammann
force-pushed
the
tjdammann/bump-h2-rustsec-2026-0258
branch
from
August 20, 2026 01:23
4bc67f9 to
618ea7f
Compare
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 01:23
421a93a to
c0ff2ef
Compare
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 01:28
c0ff2ef to
1c8c2ea
Compare
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 01:37
1c8c2ea to
db504bb
Compare
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 01:40
db504bb to
5f05aff
Compare
tjdammann
force-pushed
the
tjdammann/cli-bug-priority
branch
from
August 20, 2026 02:05
5f05aff to
edd6619
Compare
tjdammann
changed the base branch from
tjdammann/bump-h2-rustsec-2026-0258
to
main
August 20, 2026 02:05
|
Review closed.
2 CI checks failed on |
Merged
tjdammann
added a commit
that referenced
this pull request
Aug 20, 2026
Bumps the version so `release.yml` tags `v0.2.10` and cargo-dist builds and publishes the platform artifacts. Patch bump per the `cut-release` skill, which specifies patch unless a minor or major is explicitly requested. ### Since v0.2.9 - `feat(bugs): support priority in list, show, and a new prioritize command` (#331) — `--priority` and `--sort` on `bugs list`, priority and its rationale on `bugs show`, and a new `bugs prioritize` subcommand. Also carried the `h2` 0.4.17 bump for RUSTSEC-2026-0258. - `fix: address all four open CLI issues (#323, #326, #328, #329)` (#330) - `docs: note jj fallback in repo inference review convention` (#327) ### Testing `cargo build`, `cargo fmt --check`, `cargo clippy -- -D warnings`, `cargo test` (324 lib + 18 integration), and `cargo xtask check` all clean. `detail --version` reports `0.2.10`. <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/usedetail/cli/pull/333" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end -->
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.
Brings bug priority into the CLI: filtering and sorting on
bugs list, priority and its rationale onbugs show, and a newbugs prioritizefor overriding Detail's assessment.Also carries a
h2security bump, folded in from a separate PR — see the last section for why.detail bugs list--priority p1|p2|p3|none— comma-separate or repeat. Applied by the API, so unlike--vulnsor--introduced-byit shrinks the fetch instead of forcing a full one.--sort newest|oldest|priority— defaultnewest, which is the existing behavior.noneselects bugs Detail never scored. It has to exist: priorities are only assigned at scan time and the feature is recent, so most bugs in an established repo carry no priority — a filter that could only name P1/P2/P3 would silently hide them.Cards now show a
Priorityrow when the bug has one.detail bugs showAdds
Priority(with its severity word) andRationale— Detail's own reasoning, which only the single-bug endpoint returns. If someone has since overridden the score, anOverrideline reports what Detail originally assigned and why it was changed:detail bugs prioritize <BUG_ID>Sets a priority and records the change on the bug's timeline. Prompts for
--priorityin a TTY, requires the flag otherwise — same shape asbugs close.--commentis worth passing: it's what a laterbugs showreports as the override reason. Re-sending the priority a bug already has reports "no change" rather than implying an edit, because the API writes nothing in that case.Multi-status ordering
The bugs API takes one status per request, so
--status pending,resolvedis two calls that get concatenated — each block ordered, the whole not. Before this, that only affectednewest; with--sort priorityit would have shown every pending bug P1-first and then started over at P1 for the resolved ones.sort_bugsre-applies the ordering to the merged list, using the same rank rules as the server (unscored last,createdAtthen id as tiebreakers). Single-status queries skip it — the server already ordered them.Testing
cargo fmt --check,cargo clippy -- -D warnings, andcargo checkare clean.docs/HELP.mdis regenerated and passes its check.priority_querycasing / dedup /nonesentinel / empty selection, andsort_bugsfor severity order, tie-breaking, newest-vs-oldest symmetry, and stability across equal timestamps.none(994, none scored), level +none(995, both buckets), all three levels (15, none unscored), and an empty match set returning cleanly rather than erroring.--priority p4is rejected by clap with the valid values listed and never reaches the API.--sort priority --allreturned exactlyP1×1, P2×4, P3×10, unscored×994: four clean runs, no interleaving.newest/oldestmonotonic in opposite directions, default identical tonewest,--sort severityrejected.--status pending,resolved --sort prioritycame back globally ordered rather than as two per-status blocks, with the total equal to the sum of both statuses;newestandoldestlikewise globally monotonic; the paged variant's window is ordered and starts at P1.--priorityholds alongside--all,--vulns,--since, and--sort.sort=priority: no duplicates, and the concatenation matches the single-page result exactly.bugs show— priority and rationale present in both JSON and table for a scored bug, both absent for an unscored one (with the rest of the report intact), and the list card showing the bare level whileshowshowsP1 (High).bugs prioritize— set / no-op / JSON / restore, theOverrideline rendering with the comment, the reprioritized bug moving into its new filter bucket, and the >2000-char comment rejected client-side before any request goes out.openapi.jsonwas generated from that local backend, then confirmed byte-identical to whatcargo xtask generate-openapiitself produces (ran xtask against the local URL and diffed). So the post-deploy regeneration should be a no-op — if it isn't, the backend spec changed after this branch was cut.Also included:
h20.4.17 (RUSTSEC-2026-0258)cargo auditfails onmainwith RUSTSEC-2026-0258 —h2accepts and queues empty DATA frames without limit, so a stream that isn't actively drained can grow memory unboundedly or panic on length overflow. Low severity, denial-of-service category, advisory published 2026-08-17. Produced withcargo update -p h2(0.4.15 → 0.4.17; the advisory needs ≥ 0.4.16).h2is not a direct dependency — it arrives viareqwest→hyper→hyper-rustls, and again throughaxoupdater→axoasset→reqwest. There is no manifest entry to bump, and bumpingreqwestwould not help:hyper 1.11.0declaresh2 = "0.4.14", so every 0.4.x at or above 0.4.14 already satisfies it. Only the lockfile was pinning 0.4.15 — which is also exactly whatcargo auditreads.The diff also moves six
windows-sysedges from 0.61.2 to 0.52.0. That is expected re-resolution, not collateral damage:rustixandtempfiledeclarewindows-sys = ">=0.52, <0.62", a range satisfied by both, so cargo consolidates them onto 0.52.0 (already in the lockfile), whilemio(0.61) andsocket2(>=0.60, <0.62) cannot use 0.52 and stay put. Both versions remain in the tree, as before, andwindows-sysis acfg(windows)target dependency so only the Windows artifact is affected. It reproduces from a clean clone pluscargo update -p h2.Why it is in this PR rather than its own. It started as a separate PR.
mainis currently failing two required checks at once —Security Audit(this advisory) andVendored Artifacts(its vendoredopenapi.jsonwent stale the moment the priority endpoints deployed). The spec refresh cannot be split from the client code that consumes it: dropping the newopenapi.jsononto a branch without the updated call sites fails to compile, because the regeneratedlist_public_bugstakes seven arguments instead of five. So no PR that fixes only one of the two can go green, and the split PR was unmergeable on its own.