Review Trail Finding Command Design

Review the "entire trail finding" command. Can a finding be updated with apply and why is there stale AND status while both are doing effectively very similar things? Also, the "entire trail finding" print is inconsistent to other commands? WDYT?
Implemented the trail/finding UX cleanup.
Changed:
cmd/entire/cli/trail_cmd.go- Updated
entire traillong help to your phrasing.
- Updated
cmd/entire/cli/trail_review_cmd.go- Clarified
--statusas lifecycle status. - Clarified
--staleas code-version freshness. - Clarified
apply: by default it only changes files;--resolveupdates lifecycle status after successful apply. - Changed apply output from generic “Updated finding …” to “Resolved finding … after apply …”.
- Made
entire trail findingprinting more consistent with list-style output:- indented header
- shared tabular findings printer
- added
FRESHNESScolumn instead of a confusing stale/status pairing shownow printsFreshness:too.
- Clarified
- Updated tests accordingly.
My take:
- A finding should not be “updated with apply” in the generic sense.
applyshould apply code changes;--resolveis a convenience lifecycle transition. statusandstaleare worth keeping separate: status is human workflow state, freshness/staleness is whether the finding still applies to the current code version.- The previous default print was indeed inconsistent; the new table format is closer to other CLI list outputs.
Validation:
mise exec -- go test ./cmd/entire/climise run lint
Good catch: before this, you effectively couldn’t update finding metadata from the CLI — only lifecycle status via resolve/dismiss/reopen, or apply --resolve.
I added:
Also supports trail selection:
What stays separate:
update= metadata/content: title, body, severity, confidenceresolve/dismiss/reopen= lifecycle statusapply= apply code suggestion;apply --resolveis just a convenience after successful apply
Changed files:
cmd/entire/cli/trail_review_cmd.gocmd/entire/cli/trail_review_cmd_test.go
Validation:
mise exec -- go test ./cmd/entire/climise run lint
Review everything once again critically and make me a very concise and simple analysis of all finding sub-commands and parameters.
Here’s the finding command surface after review:
Target selection
Most commands accept either:
<trail> = number, id, or branch. If omitted, current branch’s trail is used.
Commands
| Command | Purpose | Key params |
|---|---|---|
finding | Dashboard for findings | --status, --severity, --stale, --include-dismissed, --limit, --offset, --json |
list | Plain table list | same filters as dashboard |
show | Full finding detail | <finding-id> |
add | Create finding | --body/-m required, --severity, --confidence, location flags, suggested-change flags |
update | Update finding metadata | --title, --body/-m, --severity, --confidence, --json |
apply | Apply unified-diff suggestion to worktree | --check, --resolve |
resolve | Mark lifecycle resolved | --message/-m |
dismiss | Mark lifecycle dismissed | --message/-m |
reopen | Mark lifecycle open | --message/-m |
watch | Stream finding events | --json, --show-pings, --once |
Filters
--status: lifecycle state:open,resolved,dismissed,any--stale: code-version freshness:current,stale,any--severity:high,medium,low- default view:
open+current
Critical take
The split now makes sense:
updatechanges finding content/metadata.resolve/dismiss/reopenchange lifecycle.applychanges files only;apply --resolveis a convenience.staleis not lifecycle status; it is “does this finding still match current code?”
Remaining rough edges:
--staleis still a slightly awkward flag name; “freshness” is clearer, but changing the flag may be disruptive.updatecannot change location or suggested changes yet.addsupports body but not explicit title.
Yes — they are effectively the same today.
Both stream the trail-scoped review/finding SSE endpoint:
Difference is mostly command shape:
-
entire trail watch [<number>]- older/top-level trail subcommand
- only accepts trail number or defaults to current branch
- name suggests “all trail events”, but it actually prints finding/review events
-
entire trail finding watch [<trail>]- lives under the finding noun, which is more accurate
- accepts number/id/branch or
--trail - same output/flags:
--json,--show-pings,--once
My take: this is duplicate and confusing.
Best cleanup:
- Make
entire trail finding watchthe canonical command. - Hide or deprecate
entire trail watch, or make it an alias that points users totrail finding watch. - If we keep
trail watch, it should eventually stream broader trail lifecycle events, not just finding events.
watch is supposed to be for more then just finding events, remove the "finding watch" one instead.
what are better names for "--stale" then?
update is probably fine without updating location since a new finding could be created?
add: there is no title on a finding, also not on the API, why would we need that?
Agreed on all points. I updated the CLI accordingly.
Decisions
-
entire trail watch- keep as canonical watch command
- intended for broader trail events over time
-
entire trail finding watch- removed
- duplicate/confusing
-
--stale- best replacement:
--freshness - now canonical:
--staleremains as deprecated alias for compatibility.
- best replacement:
-
update- no location update
- no title update
- now only:
-
add- no title
- correct: finding body is the primary content.
Current finding commands
Validation:
mise exec -- go test ./cmd/entire/clipasses.
Done.
Changes made:
- Removed
entire trail finding watch. - Kept
entire trail watchas the canonical watch command. - Added canonical
--freshness current|stale|any. - Kept
--staleonly as deprecated alias for compatibility. - Removed finding
--titlefromupdate. - Removed title-style display from findings; table now uses
SUMMARY. updatenow supports only:--body/-m--severity--confidence--json
Validation:
mise exec -- go test ./cmd/entire/clipasses.golangci-lint --new-from-rev=HEAD ./cmd/entire/clipasses.
Cleaned up.
- Removed
--staleentirely. - Kept only:
- Renamed internal list option from
StaletoFreshness. - Updated errors to say
invalid freshness filter. - Kept API query param as
stalebecause that’s the server contract.
Validation:
mise exec -- go test ./cmd/entire/cligolangci-lint --new-from-rev=HEAD ./cmd/entire/cli
Created PR: https://github.com/entireio/cli/pull/1477
Added the before/after snapshot to both:
- PR body: https://github.com/entireio/cli/pull/1477
- Trail #619 body for
trail-finding-command-cleanup
There's a finding on the trail which might be worth a look. Address/resolve if applicable, dismiss if not.
Addressed and resolved the trail finding.
Change:
- Added
trailReviewFreshnessStale = "stale". - Replaced hardcoded
"stale"usage in validation/counting with the constant.
Pushed commit:
0ecbd07e7 Use freshness constant for stale findings
Validated:
mise exec -- go test ./cmd/entire/cligolangci-lint --new-from-rev=HEAD ./cmd/entire/cli
Finding is now resolved.