Skip to content

feat(cli): one spelling for the arms, harness and baseline flags (F1b, #94) - #1193

Merged
napetrov merged 6 commits into
intel:mainfrom
napetrov:feat/cli-f1b-arms
Nov 25, 2026
Merged

napetrov merged 6 commits into
intel:mainfrom
napetrov:feat/cli-f1b-arms

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Part of #94 (F1b, arms + cells + baseline + harness)

Summary

Four flags move to one spelling each. The old spellings tombstone: they exit 2 and print the new command.

Leaf Old New
arms run, arms matrix-run, explore run --arms --arm (repeatable; --arm a,b still works)
tasks run --harnesses --harness (repeatable; --harness a,b still works)
arms plugin-delta --baseline-json --baseline
docs compare --base --baseline

A repeated --arm or --harness joins with commas (new cli_flags.JoinedValues action), so the downstream value is the same as the old comma list.

Not in this PR

  • --arms on eval score, skill novelty and judge commands stays. It names a score or measurement arm, not a treatment, so it has no --arm meaning.
  • --matrix-cells stays: it names one cell of a matrix file. The canonical --cell k=v is not on the tree yet.
  • --plugin-json stays: it is the candidate artifact, with no canonical spelling.
  • --work-harnesses stays: it is the work-scoped harness list of subjects run.
  • schema_compat --base stays: it is a git revision, outside the CLI tree.

Evidence

  • pytest tests: 28309 passed, 22 skipped.
  • ruff check, mypy on the changed modules: clean.
  • check_changelog_fragment, check_comment_blocks, check_growth: pass against intel/main.
  • docs/reference/cli-interface.json regenerated with make cli-snapshot.

Merge danger

Scripts and CI that pass the old spellings fail with exit 2 until they change the flag. The repo's own callers (CI workflow, Makefile, replay script, bundled skill docs, docs) are updated in this PR. Outside callers are not visible from here.

🤖 Generated with Claude Code

…intel#94)

--arms on arms run, arms matrix-run and explore run becomes --arm (repeatable,
joined with commas, so the old comma list still gives the same value).
--harnesses on tasks run becomes --harness. --baseline-json on arms plugin-delta
and --base on docs compare become --baseline. The old spellings tombstone and
exit 2 with the new argv. --arms stays on eval and novelty commands, where it
names a score or measurement arm. --matrix-cells, --plugin-json and
--work-harnesses stay for now: no same-meaning canonical yet.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner November 25, 2026 07:53
@napetrov napetrov added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 25, 2026
@github-actions

Copy link
Copy Markdown

CLI interface change detected

This PR changes dokimi's user-facing CLI surface (commands and/or options):

~ `dokimi arms matrix-run` parameters changed:
    - removed option `--arms`
    + added option `--arm`
~ `dokimi arms plugin-delta` parameters changed:
    - removed option `--baseline-json`
    + added option `--baseline`
~ `dokimi arms run` parameters changed:
    - removed option `--arms`
    + added option `--arm`
~ `dokimi docs compare` parameters changed:
    - removed option `--base`
    + added option `--baseline`
~ `dokimi explore run` parameters changed:
    - removed option `--arms`
    + added option `--arm`
~ `dokimi tasks run` parameters changed:
    - removed option `--harnesses`
    + added option `--harness`

Updated on every push; the cli-interface-change label is on while the diff is non-empty.

@exai-bot

exai-bot commented Nov 25, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 71 selected item(s).

CI at 2bb3e6c: 22 passing, 4 skipped.

Test notes (1)
  • dokimi/dokimi/commands/run.py:197: With cli_flags.add(cmp_p, "baseline", "--baseline", required=True, dest="base", metavar="FILE", help="The snapshot to compare against (the baseline)") changed to pass, the tests still pass: dokimi/tests/test_arm_runner.py, dokimi/tests/test_arm_runner_float_range.py, dokimi/tests/test_arm_runner_incremental.py, dokimi/tests/test_arms_adapter.py, dokimi/tests/test_arms_matrix_cells_input.py, dokimi/tests/test_arms_output_errors.py. If this condition matters, a test should pin it.
Review details
  • Commit reviewed: 2bb3e6c against merge base 5205a07
  • Coverage: 71 files in 9 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 923k tokens (584k from cache), 41s
  • Tool calls: 84 (62 file_read, 10 code_search, 9 file_read_diff, 2 local_check_results, 1 ci_status)
  • CLI arms flag migration, interface reference, and compatibility tests: 10 files
  • Arm execution, configuration, and matrix regression tests: 9 files
  • Explore and task commands, task documentation, and tests: 7 files
  • Run entry point, treatment configuration, and execution defaults: 10 files
  • Comparison reports, record readers, and artifact writers: 8 files
  • Evaluation, benchmarking, and review documentation: 6 files
  • Bundled evaluation skills and skill-loading tests: 5 files
  • External integrations, knowledge runs, and experiment replay: 8 files
  • Project workflow, release notes, overview documentation, and journey checks: 8 files

Comment thread dokimi/dokimi/commands/explore.py Outdated
raise InputError("No tasks selected. Pass --tasks <id[,id]> or --all.")

specs = [s.strip() for s in args.arms.split(",") if s.strip()]
specs = [s.strip() for s in (args.arms or "oracle,empty").split(",") if s.strip()]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · should fix
Preserve the explicit-empty-arm refusal.

Trigger: python cli.py explore run --all --arm "" (also possible when a script expands an empty variable).

Evidence: JoinedValues stores "", but this or replaces it with oracle,empty, bypassing the existing No arms selected check; previously an explicit empty list was refused.

Impact: the command now runs synthetic ceiling/floor arms and writes a successful artifact instead of reporting invalid input.

Workaround: validate the variable before invoking the CLI.

Should fix: A run shows it; it was not judged to be met in ordinary use.

Check run: inconclusive, the result is not shown as a pass.

Shown by running: exit 1 (at the head) · exit 0 (at the merge base) · exit 0 (at the head with the fix)

python proof_c1.py

What the proof does: Calls cmd_explore_run with arms="" and a stubbed task list and arm builder, and checks that it raises InputError instead of building the default arms.

The problem shows as the output EMPTY ARM NOT REFUSED.

Script: dokimi/proof_c1.py (28 lines).

EMPTY ARM NOT REFUSED: built default arms ['oracle', 'empty']

Suggestion:

Suggested change
specs = [s.strip() for s in (args.arms or "oracle,empty").split(",") if s.strip()]
specs = [s.strip() for s in ("oracle,empty" if args.arms is None else args.arms).split(",") if s.strip()]

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.

Fixed in 742f732: explore run falls back to oracle,empty only when --arm is not given, so --arm '' stops with "No arms selected" again; the refusal parity test covers it.

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

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 96.08%. Comparing base (5205a07) to head (2bb3e6c).
⚠️ Report is 3 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1193      +/-   ##
==========================================
- Coverage   96.10%   96.08%   -0.02%     
==========================================
  Files         491      493       +2     
  Lines       64882    64977      +95     
  Branches    11266    11280      +14     
==========================================
+ Hits        62352    62434      +82     
- Misses       1560     1568       +8     
- Partials      970      975       +5     
Files with missing lines Coverage Δ
dokimi/dokimi/cli_flags.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/arms.py 97.71% <100.00%> (+<0.01%) ⬆️
dokimi/dokimi/commands/explore.py 91.26% <100.00%> (+0.08%) ⬆️
dokimi/dokimi/commands/run.py 97.18% <100.00%> (ø)
dokimi/dokimi/commands/tasks.py 96.82% <100.00%> (ø)
dokimi/dokimi/report/compare_limits.py 100.00% <ø> (ø)
dokimi/dokimi/report/model_compare.py 95.67% <ø> (ø)
dokimi/dokimi/report/task_runs_report.py 93.50% <ø> (ø)
dokimi/dokimi/treatments/factory.py 100.00% <ø> (ø)
dokimi/dokimi/treatments/specs.py 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>

@vlad-perevezentsev vlad-perevezentsev 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 · re-checked 2bb3e6c · nothing required from @napetrov

🔀 Merge: safe now · merges cleanly into current main, 2 commits behind · after it, #1197, #1192 and #1195 need a rebase (cli_flags.py, commands/arms.py, test_cli_flags.py, docs); the new tests of #1158 (test_judge_context_mode.py) still pass --arms and will fail, with no textual conflict

✅ make ci-local --offline: 28,255 passed, 0 failed · ✅ changed lines: 9/9 mutants killed · ✅ the two new tests fail with the fixes reverted

The renames are complete, and the @exai-bot point on the empty --arm is fixed.

Fixed in this branch, up to 2bb3e6c:

  • explore run --arm '' ran the default arms: 742f732 falls back only when --arm is not given; a refusal-parity case covers it.
  • --arm [NAME=]REF in the arms run help, a form it rejects: 30af9d4 shows --arm SPEC.
  • --baseline BASE / BASELINE_JSON in the help: 61d178d shows --baseline FILE.
  • The changelog missed catalog novelty --arms: 10edf93.
  • The --arms refusal test could not fail: 2bb3e6c passes --arm x and checks the unrecognized-flag error.

@napetrov
napetrov merged commit 1b24ab3 into intel:main Nov 25, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli-interface-change Changes dokimi's user-facing CLI surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants