Repository navigation
Clarify CLI help and render accurate command usage - #145
Conversation
Changes: - Organize root help into task-oriented sections and remove the notes block. - Group subcommand options, expose required arguments, and show accurate timeout rules and parameter bounds. - Wrap help at 80 columns and provide shell-quoted, executable examples while preserving JSON argument arrays. - Preserve command names, validation, authorization, and runtime behavior; retain a 24-line default report budget and allow 40-line root help. - Add regression coverage for all 25 command help pages and 47 shell examples. Validation: - rebar3 eunit: 945 tests passed, 0 failures. - sh scripts/escript-smoke.sh: passed, including help aliases, 25 page layouts, 47 shell argument round-trips, and isolated TUI EOF handling. - python3 scripts/generate-cli-schema.py --check: passed. - rebar3 as ci compile: passed. - rebar3 fmt -c on all changed Erlang files: passed. - git diff --check and git diff --cached --check: passed. - Compared all 23 command descriptors: contracts unchanged except descriptions, examples, and explanatory default rules. - Inspected built help output; no user runtime nodes or real tracing were used for example validation.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
+ Coverage 95.02% 95.13% +0.11%
==========================================
Files 34 35 +1
Lines 9451 9586 +135
==========================================
+ Hits 8981 9120 +139
+ Misses 470 466 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Changes: - Gate JSON discovery and the JSON-backed help audit on the tested CLI controller's OTP major version. - Assert the documented exit code and error for both JSON flag forms on OTP 26 instead of requiring unsupported output. - Exercise text and Erlang-term discovery on every supported controller while preserving help, preflight, and TUI smoke checks. - Document the help-audit script's OTP 27+ prerequisite without changing application behavior or weakening runtime validation. Validation: - sh scripts/escript-smoke.sh on real OTP 26.2.5.2 in an isolated source/build directory: passed, including both JSON rejection checks and TUI EOF handling. - sh scripts/escript-smoke.sh on OTP 29.1.1: passed, including all 25 help pages and 47 shell example round-trips. - OTP 26 rebar3 eunit --module=observer_cli_command_help_test,observer_cli_input_test: 41 tests passed, 0 failures. - sh -n scripts/escript-smoke.sh: passed. - git diff --check: passed. - The full CI matrix will rerun after pushing this fix; no application source changed.
Changes: - Replace eight separate spawn-and-monitor pairs for immediately exiting fixtures with atomic spawn_monitor calls. - Preserve assertions that expect a normal DOWN message instead of allowing a late monitor to report noproc and hang the test. - Keep production tracing, timeout budgets, and cleanup assertions unchanged. Validation: - Reproduced delayed monitor attachment on OTP 29: all 100 separate-monitor trials reported noproc, while all 100 atomic-monitor trials reported normal. - rebar3 eunit --module=observer_cli_trace_test: 72 tests passed, 0 failures. - rebar3 fmt -c test/observer_cli_trace_test.erl: passed. - git diff --check: passed. - GitHub CI confirmed the prior OTP 26 smoke fix; this change addresses the newly exposed OTP 29 trace fixture timeout.
Summary
Compatibility and scope
Validation
rebar3 eunit: 945 tests, 0 failures.sh scripts/escript-smoke.sh: passed, including all 25 help pages, 47 shell example round-trips, help aliases, preflight checks, and isolated TUI EOF handling.python3 scripts/generate-cli-schema.py --check: passed.rebar3 as ci compile: passed.rebar3 fmt -con every changed Erlang file: passed.git diff --checkand staged diff checks: passed.