2.7 KiB
2.7 KiB
Implementation report: yoi-ticket-cli-parity
Worktree / branch
- Worktree:
/home/hare/Projects/yoi/.worktree/yoi-ticket-cli-parity - Branch:
work/yoi-ticket-cli-parity
Commit
4d5068b feat: add yoi ticket CLI
Summary
Added yoi ticket ... subcommands to the product yoi binary crate, backed directly by the Rust Ticket backend APIs.
The implementation does not shell out to tickets.sh. Active storage remains unchanged for this ticket: when .yoi/ticket.config.toml is absent, the CLI uses the current default <workspace>/work-items.
Implemented command surface
yoi ticket create --title <title> [--slug <slug>] [--kind <kind>] [--priority P2] [--label a,b]yoi ticket list [--status open|pending|closed|all]yoi ticket show <id-or-slug>yoi ticket comment <id-or-slug> [--role comment|plan|decision|implementation_report] (--file <path>|--message <text>)yoi ticket review <id-or-slug> (--approve|--request-changes) (--file <path>|--message <text>)yoi ticket status <id-or-slug> <open|pending|closed>yoi ticket close <id-or-slug> (--resolution <text>|--file <path>)yoi ticket doctor
yoi ticket status ... closed is intentionally rejected with guidance to use yoi ticket close, because status-only close would not write resolution.md.
Backend behavior
- Uses
ticket::config::TicketConfig::load_workspace(<cwd>)to resolve backend root. - Missing
.yoi/ticket.config.tomldefaults to<cwd>/work-items. - Relative configured roots resolve against the workspace.
- Malformed config fails through the existing config loader.
- No storage migration to
.yoi/ticketsis included.
Changed files
Cargo.lockcrates/ticket/src/lib.rscrates/yoi/Cargo.tomlcrates/yoi/src/main.rscrates/yoi/src/ticket_cli.rspackage.nix
Review status
External sibling reviewer approved with no blockers.
Non-blocker follow-ups:
yoi ticket doctorcurrently hides warning-only diagnostics because it printsdoctor: okwhenerror_count() == 0.show,list, and doctor diagnostic output are not explicitly bounded.- Body-source error text is generic and can mention
--resolutionfor comment/review commands.
Validation
Coder-reported validation passed:
cargo test -p yoi ticketcargo test -p ticketcargo check --workspace --all-targetscargo fmt --checkgit diff --checkgit diff --cached --check./tickets.sh doctorcargo build -p yoitarget/debug/yoi ticket doctornix build .#yoi --no-link
Reviewer-rerun validation passed:
git diff --check develop...HEAD./tickets.sh doctor- production CLI grep found no shell-out to
tickets.sh.
Ready for merge
Yes.