You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.7 KiB
1.7 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| nbd ready command | completed | feature | high | 2026-03-10T23:30:31Z | 2026-03-10T23:30:31Z |
Add nbd ready subcommand that lists tickets which are actionable right now: not yet done and with all dependencies completed.
Motivation
Agent workflows need to know which tickets are unblocked. nbd list shows everything; nbd ready narrows to what can actually be started immediately.
Approach
- Add
Readyvariant toCommandsenum inmain.rs. - Implement
cmd_ready(json: bool): a.list_tickets(root)to fetch all tickets. b. Build a set of IDs for tickets withstatus == Status::Done. c. Filter to tickets where:ticket.status != Status::Done(not already finished)- All IDs in
ticket.dependenciesare in the done-set (or the dep doesn't exist — treat missing deps as unresolved, not ready). d. Print the filtered slice using existingdisplay::print_list/print_list_json.
- No new store or display functions needed — reuse existing.
Edge cases
- A ticket with no dependencies and status
todo→ ready. - A ticket whose dep is
in_progress→ NOT ready. - Missing dep ID → NOT ready (treat conservatively).
- Empty store → returns empty list (not an error).
Tests
Unit-style integration tests:
- Three tickets: A (no deps, todo), B (dep A, todo), C (no deps, done).
nbd readyshould return only A. - After marking A done,
nbd readyshould return B. nbd ready --jsonreturns a JSON array of the ready tickets.
Files touched
src/main.rs— newReadyvariant andcmd_readyhandlertests/integration.rs— new integration tests