Skip to content

fix(cli): next-step hints name the dokimi command; drop dead cmd_report - #252

Merged
antonwolfy merged 1 commit into
intel:mainfrom
napetrov:fix/cli-stale-hints
Oct 27, 2026
Merged

antonwolfy merged 1 commit into
intel:mainfrom
napetrov:fix/cli-stale-hints

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Summary

Item A3 of #94 §5 (hygiene), stage A. Refs #94.

hints printed to users
  personas discover   → "3. Approve: python cli.py personas approve …"   becomes  dokimi personas approve …
  personas approve    → "python cli.py questions generate …"            becomes  dokimi questions generate …
  baseline list       → "Run: python cli.py baseline save …"            becomes  dokimi baseline save …
  baseline compare    → "python cli.py baseline save …"                 becomes  dokimi baseline save …
report text (baseline-only limitation block)
  "python cli.py arms run --arms … [other parameters]"   becomes   dokimi arms run --product oneTBB --questions … --arms … --judge --judge-model …
commands/report.py
  cmd_report   removed (never registered with a parser; read args no parser defines); its import removed

The four hints already parsed with build_parser(); only the program name was stale, so flags are unchanged.
The arms run example did not parse (required --product/--questions missing, [other parameters] placeholder), so it gets concrete values.
The golden tests/fixtures/model_compare_sections.json is re-recorded; the diff is the four hint entries.

Numbers do not change.

Evidence

  • Before: the new test fails on the parent commit, one failure per hint site:
$ pytest tests/test_printed_hints_parse.py
FAILED test_personas_discover_next_step_parses
FAILED test_personas_approve_next_step_parses
FAILED test_baseline_list_hint_parses
FAILED test_baseline_compare_hint_parses
FAILED test_baseline_only_report_hint_parses
E  AssertionError: hint names 'python', not the console script: python cli.py arms run --arms baseline,docs --judge --judge-model claude-sonnet-5-5 [other parameters]
E  assert 'python' == 'dokimi'
5 failed in 2.95s
  • After: the same file passes, and the wider suite is green:
$ pytest tests/test_printed_hints_parse.py tests/test_runner_and_report.py tests/test_report_cli_inputs.py tests/test_baseline_compare.py tests/test_personas_approve.py tests/test_personas_discover_output.py tests/test_cli_help.py tests/test_cli_surface.py
240 passed in 14.02s

$ pytest            # full suite
9034 passed, 5 skipped in 333.57s

$ make ci-local CI_LOCAL_ARGS='--offline --jobs static,typecheck'
0 failed, 12 passed, 3 skipped   (ruff, schema, registry drift, growth, fragment, mypy, deptry, …)

Merge Danger

Door: two-way. Text-only change in printed hints and one unregistered function. Revert restores the old strings.

Blast radius: CLI output text (four hints, one report paragraph). No exit codes, flags, or artifact fields change. cmd_report had no caller, so removing it changes nothing reachable from the command line.

Anyone who copies an old hint from a log into a shell gets python cli.py …, which works only inside a source checkout. After this PR the hint prints the installed dokimi command.

Changelog fragment: changelog.d/20261026_130000_napetrov_cli-stale-hints.md (Fixed).

🤖 Generated with Claude Code

- personas discover/approve and baseline list/compare printed
  `python cli.py ...`; they now print `dokimi ...`, the console script.
- The `arms run` example in the baseline-only model comparison report
  lacked the required --product and --questions and ended in a
  `[other parameters]` placeholder; it now parses as written.
- cmd_report (commands/report.py) was never registered with a parser and
  read args no parser defines; removed with the import only it used.
- tests/test_printed_hints_parse.py: every hint captured from its printing
  code names `dokimi` and parses with parse_args.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.75%. Comparing base (b69b15f) to head (1984856).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   92.69%   92.75%   +0.05%     
==========================================
  Files         256      256              
  Lines       32421    32414       -7     
  Branches     5422     5421       -1     
==========================================
+ Hits        30054    30066      +12     
+ Misses       1579     1562      -17     
+ Partials      788      786       -2     
Files with missing lines Coverage Δ
dokimi/dokimi/commands/baseline.py 93.05% <100.00%> (+3.70%) ⬆️
dokimi/dokimi/commands/personas.py 82.97% <100.00%> (+6.38%) ⬆️
dokimi/dokimi/commands/report.py 81.25% <ø> (+2.73%) ⬆️
dokimi/dokimi/report/model_compare.py 93.03% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The four hints and the baseline-only arms run example now name the dokimi console script, and the example parses. Removing cmd_report is safe.

What I ran, on Linux at 1984856:

  • make ci-local: 26 passed, 2 failed, 7 skipped. The two failures are the gitleaks download (the proxy returned 504) and the commit scan that needs it, not this PR. Run by hand, gitleaks reports no leaks in the PR's commit.
  • 9,036 tests passed, 3 skipped. Changed-line coverage is 100% (4 lines).
  • Mutation run on the new test file, 16 mutants, 13 killed. Killed: each of the 5 sites reverted to python cli.py, a subcommand typo, --product dropped from the arms run example, [other parameters] restored, a wrong flag. The 3 survivors are abbreviated flags (--fil, --persona) and dropping the optional --product from baseline save; the hint still works when copied.
  • With the base versions of baseline.py, personas.py and model_compare.py, all 5 new tests fail.

Checked, no issues

  • cmd_report: no caller, registration, string dispatch or entry point refers to it. write_run_report and write_compare_report are imported from dokimi.report.markdown_report by their other users, not via commands/report.py. Ruff passes.
  • arms run example: parsed with parse_args; it gives product=oneTBB, questions=questions/oneTBB.json, judge=True.
  • Changelog fragment: present, one ### Fixed section, in the repo's format.

@antonwolfy
antonwolfy merged commit b226dba into intel:main Oct 27, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants