Conversation
Audited each command empirically rather than by reading: version, auth status, config list and config get ignored the output flag entirely, and bulk update/close/delete printed progress to stdout with no structured result. Those are exactly the commands a script or agent needs most. - version gains structured build details. - auth status reports the unauthenticated case as data (authenticated: false) while still exiting non-zero — it is a state, not a crash. - config list and get emit structured values, with the credential redaction from #46/#47 applied before rendering so no format can route around it. config get emits a bare value, since it asks for one setting. - field set/clear report which field was resolved, closing a gap I left in #44. - bulk operations return per-task results with failure reasons. Progress lines are suppressed outside table output, where they would interleave with the structured document on stdout and make it unparseable. Table output is byte-identical; verified by diffing against v0.2.1. Note a breaking change for anyone parsing `bulk delete -o json`: it emitted a bare array of deleted ids and now returns the same summary object as the other bulk commands. The deleted ids are still there as results[].task_id where ok is true. version switches Run to RunE so a formatting failure exits non-zero rather than being swallowed; its test asserted on Run specifically and now checks the command is runnable. Addresses #18. Structured *errors* and a --jq filter remain open. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aqbmccWm1tqttmBUCR5rv ClickUp: 86dxbeqyt
This branch has not been deployed
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.
Summary
Partially addresses #18 — the consistency half. I audited every command empirically (running each with
-o json) rather than by reading the source, which is how the gaps showed up:cu versioncu auth statuscu config listkey=valueonlycu config getcu bulk update/close/deletecu field set/clearAll of these now honour
-o json|yaml|csv.Decisions worth reviewing
auth statusreports being unauthenticated as data ("authenticated": false) while still exiting non-zero. For a scripted caller that is a state to branch on, not a failure to parse out of stderr.bulkprinted✓ taskidto stdout as it went; leaving that in would interleave with the JSON document and make it unparseable. The information is preserved asresults[], with failure reasons per task.-o jsoncannot route around the credential redaction added in fix(config): refuse plaintext credentials and redact them in config list #46/fix(config): --config help advertised a filename the code never writes #47. Verified.config getemits a bare value ("json", not{"output":"json"}) — it asks for one setting, so the answer should be directly usable.Breaking change
cu bulk delete -o jsonpreviously emitted a bare array of deleted task ids. It now returns the same summary object as the other bulk commands, for consistency — which is the point of the issue, but it will break anyone parsing that array. The ids are still available asresults[]entries whereokis true.Not included
Two items from the issue remain open, so this does not close it:
os.Exit(1)path, which is its own change.--jqfiltering, and the top-level--jsonalias.Tests
TestBulkSummaryRecordcovers the accounting and that failure reasons survive into structured output.version's existing test asserted oncmd.Run; the command now usesRunEso a formatting failure exits non-zero instead of being swallowed, and the test checks runnability rather than which field holds the closure.Checklist
./scripts/ci.shpasses locally — excepterrcheck, which reports the same pre-existing findings onmain, none in files this PR touches