Validate Trail Finding API and CLI

Validate that e.g. this trail https://entire.io/gh/entirehq/entire.io/trails/1402/ returns all findings on the API/CLI via "entire trail finding" properly. I can see 23 in the UI.
Validated. The API does return 23 findings for trail #1402, but the CLI was dropping them because it omitted stale=any from the request. The API defaults omitted stale to current, and all 23 findings on that trail are currently stale.
Fixed in:
cmd/entire/cli/trail_review_cmd.gocmd/entire/cli/trail_review_cmd_test.go
Validation with rebuilt CLI:
Result:
Also ran:
Passing.
Implemented the CLI fix.
Changed:
-
cmd/entire/cli/trail_review_cmd.go- Now sends
stale=anyexplicitly when requested. - Added comment documenting that omitting
staledefaults server-side to current-only.
- Now sends
-
cmd/entire/cli/trail_review_cmd_test.go- Updated regression expectation so
stale=anyremains in the request URL.
- Updated regression expectation so
Validated:
Result: passing.
The rebuilt CLI now returns all 23 findings for trail 1402 with:
I used a small temporary Go helper that imports the local CLI’s auth/client code, so it reuses your existing Entire login token:
That calls the same data API origin/auth flow as the CLI, but lets us hit the exact endpoint directly.
Key endpoint:
For trail 1402, I first resolved the UI trail number to its API trail id via:
which showed:
Then the direct API call returned 23 comments. The important detail was that stale=any must be sent explicitly. Without it, the API defaulted to current-only findings, returning 0.
Created the trail:
https://entire.io/gh/entireio/cli/trails/610/
Branch pushed:
Also committed the fix:
Validation before push:
passed.