Skip to content

feat(cli): one spelling each for the spend and dry-run flags (part of #94) - #955

Merged
napetrov merged 5 commits into
intel:mainfrom
napetrov:feat/cli-f1b-spend
Nov 19, 2026
Merged

napetrov merged 5 commits into
intel:mainfrom
napetrov:feat/cli-f1b-spend

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Part of #94 (F1b, spend + dry-run concepts).

Summary

Two flag concepts get one spelling each, and the old spellings are tombstoned:

Concept Canonical Old spellings (exit 2, print the new command)
spend, whole command --max-usd tools preference --max-cost-usd, repo run --max-batch-usd
spend, per agent run --max-usd-per-cell repo run --budget, repo reach --budget, repo skill-reach --budget
dry_run (estimate, no paid call) --dry-run catalog routing --estimate-only, skill routing --estimate-only, skill novelty analyze --estimate-only
  • FLAG_MOVES gains the tombstones. Allowlist rows for the moved spellings are deleted; the CLI snapshot is regenerated (only the moved rows change).
  • tools preference: dest is now max_usd (only commands/tools.py read it).
  • repo run --budget and --max-batch-usd are not the same thing: --budget caps one agent run, so it maps to --max-usd-per-cell.
  • Tests, docs and examples use the canonical spellings. The new tests/test_cli_f1b_spend.py covers the tombstones and the parse equivalence.

Not in this PR

  • subjects run --work-dry-run is kept. It gates only the executable-task agents; the other phases of subjects run still call models, so it is not the dry_run concept. It stays on the allowlist with that reason (CLI API: the evaluation loop at the top level, subject and eval groups below, one enforced flag vocabulary (proposal v2.1) #94 F1b).
  • scripts/reach_conformance.py --budget and scripts/mutate_changed.py --budget are their own scripts' flags and are unchanged.
  • catalog granularity's paid hint now prints --max-usd. That leaf is not on main, so the hint was already a stale command; only its spelling changed.
  • Historical changelog entries and the decision record that name the old spellings are not edited.

Evidence

  • Full suite on the pushed head: 23769 passed, 33 skipped, 4 failed. The 4 failures are tests/test_repo_typecheck_grader.py and are environmental (they also fail on intel/main).
  • ruff check clean; mypy clean on the touched modules; CLI snapshot current; comment-block, growth, duplicate and changelog-fragment checks pass.
  • pre-push (make ci-local): 16 passed, 3 skipped, 0 failed.
  • Self-review: one fresh-context pass on the final head, verdict clean.

Merge danger

  • Scripts and CI jobs that still pass the old spellings now fail with exit 2 (the tombstone prints the replacement). repo run --budget changes meaning only in name: it was already the per-run cap.
  • The subjects run --dry-run spelling is not used; keep it that way until the held decision on --work-dry-run is made.

🤖 Generated with Claude Code

Part of intel#94 (F1b, spend + dry-run concepts).

A cap on the whole command is --max-usd. A cap per agent run is
--max-usd-per-cell. An estimate that makes no paid call is --dry-run.

- tools preference: --max-cost-usd -> --max-usd (dest max_usd)
- repo run: --max-batch-usd -> --max-usd; --budget -> --max-usd-per-cell
- repo reach, repo skill-reach: --budget -> --max-usd-per-cell
- catalog routing, skill routing, skill novelty analyze: --estimate-only -> --dry-run
- subjects run: --work-dry-run -> --dry-run

The old spellings are tombstoned in FLAG_MOVES (exit 2, print the new
argv). Their allowlist rows are deleted and the CLI snapshot is
regenerated; the only changed rows are the moved ones.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner November 19, 2026 05:13
@napetrov napetrov added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 19, 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 catalog routing` parameters changed:
    - removed option `--estimate-only`
    + added option `--dry-run`
~ `dokimi repo reach` parameters changed:
    - removed option `--budget`
    + added option `--max-usd-per-cell`
~ `dokimi repo run` parameters changed:
    - removed option `--budget`
    - removed option `--max-batch-usd`
    + added option `--max-usd`
    + added option `--max-usd-per-cell`
~ `dokimi repo skill-reach` parameters changed:
    - removed option `--budget`
    + added option `--max-usd-per-cell`
~ `dokimi skill novelty analyze` parameters changed:
    - removed option `--estimate-only`
    + added option `--dry-run`
~ `dokimi skill routing` parameters changed:
    - removed option `--estimate-only`
    + added option `--dry-run`
~ `dokimi tools preference` parameters changed:
    - removed option `--max-cost-usd`
    + added option `--max-usd`

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

@exai-bot

exai-bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

CI at fd49e38: 30 passing, 3 skipped.

Review details
  • Commit reviewed: fd49e38 against merge base d2790e1
  • Coverage: 53 files in 8 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 938k tokens (646k from cache), 40s
  • Tool calls: 81 (61 file_read, 13 code_search, 5 file_read_diff, 2 local_check_results)
  • Shared CLI flags, interface contract, and spend regression tests: 8 files
  • Novelty commands, documentation, and behavioral tests: 9 files
  • Novelty routing estimates, tiers, and routing tests: 8 files
  • Repository execution, runner, and lifecycle tests: 9 files
  • Repository conformance and skill reach: 6 files
  • Tool preference command, schema, documentation, and tests: 4 files
  • Skill commands and catalog granularity: 4 files
  • Evaluation workflows, review guidance, and journey outcomes: 5 files

@codecov-commenter

codecov-commenter commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.86%. Comparing base (d2790e1) to head (fd49e38).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
dokimi/dokimi/commands/novelty.py 0.00% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #955   +/-   ##
=======================================
  Coverage   95.86%   95.86%           
=======================================
  Files         444      444           
  Lines       59101    59103    +2     
  Branches    10198    10198           
=======================================
+ Hits        56655    56659    +4     
+ Misses       1521     1520    -1     
+ Partials      925      924    -1     
Files with missing lines Coverage Δ
dokimi/dokimi/cli_flags.py 100.00% <ø> (ø)
dokimi/dokimi/commands/novelty_run.py 97.43% <100.00%> (ø)
dokimi/dokimi/commands/repo.py 98.98% <100.00%> (+<0.01%) ⬆️
dokimi/dokimi/commands/repo_run.py 96.22% <100.00%> (ø)
dokimi/dokimi/commands/repo_skill_reach.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/routing_parser.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/skill.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/tools.py 97.31% <100.00%> (ø)
dokimi/dokimi/external/granularity.py 98.67% <ø> (ø)
dokimi/dokimi/novelty/routing_estimate.py 100.00% <ø> (ø)
... and 5 more

... and 1 file with indirect coverage changes

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

@napetrov

Copy link
Copy Markdown
Contributor Author

The CLI diff is intended: the spend and dry-run spellings move as listed in the description, and the cli-interface-change label stays on.

subjects run --work-dry-run is deliberately not moved and stays on the allowlist with its reason. OpenCodeReview's 0 findings are noted; the one open point is the held --work-dry-run decision.

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

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

I checked fd49e38. The moves are right: each old spelling exits 2 with the new command on the listed leaves only, the new flags keep their old dests, so values and JSON keys do not change.

Merge: safe now: it merges cleanly into current main, 2 commits behind, and its CLI tests and the tests main changed pass on the merge. Once it is in, #954, #957 and #958 conflict with it (cli_flags.py, cli_flags_allowlist.txt, cli-interface.json, test_repo_host.py) and need a rebase.

What I ran, at fd49e38:

  • make ci-local --offline: 0 failed, 25 passed, 20 skipped; the test suite 23,743 passed, 72 skipped; coverage of changed lines passes.
  • parse_args checks: novelty routing --estim still moves in one step to skill routing --dry-run; repo run --max-u is refused as ambiguous; --max-usd and --max-usd-per-cell parse to the old dests.
  • On the merge with main: test_cli_f1b_spend.py, test_cli_types.py, test_repo_budget.py, test_repo_batch_lifecycle.py, test_near_duplicate_blocking.py: 184 passed.

Checked, no issues

  • Callers that spawn dokimi: repos/conformance.py now passes --max-usd-per-cell to repo reach; no workflow, script or Makefile passes an old spelling to dokimi.
  • Schemas and stored keys: tool_preference.v1.json changes only descriptions; max_cost_usd stays the stored key.
  • Docs and changelog: the docs, journeys and cli-interface.json use the new spellings; the fragment is under Changed and says what to type now.

Fixed in this branch, up to fd49e38:

  • repo reach --from named --out when refusing --out-dir, a spelling that is itself moved: 65b0bbd names --out-dir; the probe-only flags test covers it.
  • Help showed the old dests as metavars (--max-usd-per-cell BUDGET, --max-usd MAX_BATCH_USD): afcc326 passes metavar="X" on repo run, repo reach, repo skill-reach and tools preference, and fd49e38 does the same in add_spend_cap, so every --max-usd reads X in help; a usage-line test covers each leaf.
  • The changelog did not say that repo run --max-usd counts earlier invocations of the batch: 5699a53 says so.

Each new test fails when the code it covers is broken.

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