Skip to content

feat(cli): one spelling for the network, timeout and cache flags (part of #94, F1b) - #1192

Merged
xaleryb merged 15 commits into
intel:mainfrom
napetrov:feat/cli-f1b-net
Nov 27, 2026
Merged

xaleryb merged 15 commits into
intel:mainfrom
napetrov:feat/cli-f1b-net

Conversation

@napetrov

@napetrov napetrov commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Part of #94 (F1b, network + timeout + cache).

Summary

One spelling per concept for three flag groups, as the registry's F1b move plans them:

repo run, eval check   --build-timeout N            ->  --timeout build=N
repo run, eval check   --grade-timeout N            ->  --timeout verify=N
repo run               --timeout N                  ->  unchanged (bare N is the agent run's seconds)
tasks run              --network none|public       ->  applies to all phases, including build

Banned spellings that move (leaf, old, new):

Leaf Old New
repo run --build-timeout N --timeout build=N
repo run --grade-timeout N --timeout verify=N
eval check --build-timeout N --timeout build=N
eval check --grade-timeout N --timeout verify=N

tasks run --network [PHASE=]MODE[:hosts] accepts bare none or public to set every phase.
Use --network solve,verify=allowlist:HOSTS for both runtime phases, since the image build cannot
use an allowlist. The --cache metavar and diagnostic on repo run and eval check use NAME=DIR.

The old timeout spellings exit 2 and print moved: dokimi ... with the new argv (the tombstone). A
value-aware rewrite (FlagMove.prefix) turns --build-timeout 5 into --timeout build=5, with or without =.

Not in this PR (each keeps its allowlist row with a # why reason):

  • --agent-network: the agent container's docker network (host or bridge). Not the network policy modes.
  • --build-network: docker build --network NAME, a docker network name. Not the policy modes.
  • --cache-root: the parent directory of the per-name manifest caches, resolved at run time. Not --cache NAME=DIR.

Also: three stale repo validate comments, and the text of the oracle patch that carries one, now name
eval check --schema-only. The --timeout registry still checks numeric validators, including
the phase-aware validator and the existing fractional-seconds exception for catalog trigger-probe.
The two cache metavar rows and the tasks run network metavar row are removed.

Evidence

  • The full local pytest run with hash-verified dependencies passed 28,420 tests, with 23 skipped and 100% coverage of the 46 changed executable lines.
  • make cli-snapshot regenerated docs/reference/cli-interface.json. Static checks, mypy, deptry and the CLI snapshot check passed.
  • The review fix tests cover both schema-only timeout phases, numeric validator checks, and timeout rewrites that preserve the next flag.

Merge danger

  • Scripts that pass --build-timeout or --grade-timeout now stop with exit 2 and the new command. This is the intended tombstone, not a silent change.
  • eval check gains --timeout with phase values only. A bare SEC there is refused with build=SEC and verify=SEC guidance. --schema-only refuses explicit phase timeouts, including values equal to their defaults. On intel/main eval check had no --timeout at all.
  • tasks run --network none (no PHASE=) is accepted now; on intel/main it was refused. It sets every phase.
  • repo run --timeout SEC is unchanged.

🤖 Generated with Claude Code

@napetrov
napetrov requested a review from a team as a code owner November 25, 2026 07:23
@napetrov napetrov added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

CLI interface change detected

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

~ `dokimi eval check` parameters changed:
    - removed option `--build-timeout`
    - removed option `--grade-timeout`
    + added option `--timeout`
~ `dokimi repo run` parameters changed:
    - removed option `--build-timeout`
    - removed option `--grade-timeout`
    ~ changed option `--timeout`: type: 'dokimi.cli.build_parser.<locals>.positive_int#faf57db5ff9f' -> 'dokimi.commands.repo_run._timeout_flag.<locals>.phase_seconds#e985ebe24af9'; action: '_StoreAction' -> '_PhaseSeconds'

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 23 selected item(s).

CI at 536c5f6: 26 passing, 4 skipped.

Review limit reached. This PR has had 6 reviews, so it will only be reviewed again when you ask.
To ask: re-request review from exai-bot in the Reviewers list.

Review details
  • Commit reviewed: 536c5f6 against merge base 7bbf937
  • Coverage: 23 files in 3 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 480k tokens (289k from cache), 59s
  • Tool calls: 47 (29 file_read, 6 code_search, 5 file_read_diff, 4 pr_threads, 3 local_check_results)
  • CLI network options, interface contract, and validation: 8 files
  • Repository evaluation workflow, configuration, and tests: 8 files
  • Harness and container network policy: 7 files

Comment thread dokimi/tests/test_cli_f1b_net.py Resolved
@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.17%. Comparing base (7bbf937) to head (536c5f6).
⚠️ Report is 1 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    #1192      +/-   ##
==========================================
- Coverage   96.18%   96.17%   -0.01%     
==========================================
  Files         499      499              
  Lines       66281    66311      +30     
  Branches    11509    11515       +6     
==========================================
+ Hits        63751    63776      +25     
- Misses       1563     1565       +2     
- Partials      967      970       +3     
Files with missing lines Coverage Δ
dokimi/dokimi/cli_flags.py 100.00% <100.00%> (ø)
dokimi/dokimi/cli_routes.py 97.96% <100.00%> (+0.07%) ⬆️
dokimi/dokimi/commands/repo_run.py 97.30% <100.00%> (+0.49%) ⬆️
dokimi/dokimi/commands/tasks.py 96.83% <ø> (ø)
dokimi/dokimi/harnesses/docker_solver.py 97.83% <100.00%> (ø)
dokimi/dokimi/harnesses/network_policy.py 96.58% <100.00%> (+0.03%) ⬆️
dokimi/dokimi/harnesses/runner.py 99.22% <100.00%> (ø)
dokimi/dokimi/repos/container.py 96.35% <100.00%> (ø)

... and 4 files with indirect coverage changes

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

Comment thread dokimi/tests/test_cli_f1b_net.py Resolved
…t of intel#94, F1b)

The phase timeouts are one `--timeout [PHASE=]SEC`: `--build-timeout` is
`--timeout build=SEC`, `--grade-timeout` is `--timeout verify=SEC`, and a bare SEC
is the agent run's (repo run only; eval check refuses it). `tasks run --network`
takes `[PHASE=]MODE[:hosts]`; with no PHASE= it sets every phase.

The old timeout spellings tombstone (exit 2, print the new command). The
`--cache` metavar is NAME=DIR. `--agent-network`, `--build-network` and
`--cache-root` keep their names: their values are not the network policy modes
or a `--cache` entry, so they stay on the allowlist with a reason.

Also: `repo validate` in three stale comments and the oracle patch now names
`eval check --schema-only`.

Test-narrowed: the catalog trigger-probe --timeout float exception row and its parametrize case are gone:
--timeout is text now (a phase carries the value), so no float type case applies to it.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@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.

🟡 Changes needed · reviewed d53a7ab

To fix: the bare --network allowlist:HOSTS form that the new help shows is always refused (line comments); the docs, error texts and registry-check gaps there are smaller.

✅ make ci-local --offline: 28,256 passed, 20 seeds of the changed tests, 97% of changed lines covered (the mutation step did not finish in 10 min) · ✅ mkdocs build --strict · ✅ the timeout defaults stay 2700 / 10800 / 3600 s · ⚠️ "Docs pages to review" flags coding-harnesses.md

The timeout move is clean: each old spelling prints the right --timeout PHASE=SEC command and sets the same field as before.

Comment thread dokimi/tests/test_network_policy.py Resolved
Comment thread dokimi/dokimi/commands/tasks.py Resolved
Comment thread dokimi/dokimi/cli_flags.py Resolved
Comment thread dokimi/dokimi/commands/repo_run.py Resolved
Comment thread dokimi/dokimi/cli_routes.py Resolved
Comment thread dokimi/dokimi/commands/repo_run.py Resolved

@vchamarthi vchamarthi 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.

@napetrov, could you fix the problem I found and the small thing I've marked fix before merge (in the line comments) and answer my question below? Then push and I'll take another look.

My question before I approve:

  • tasks run --network allowlist:pypi.org, with no PHASE=, is refused with the image build takes none or public, because a bare form means every phase. Decide whether a bare allowlist should be refused on purpose or mean solve and verify only, then state the choice in the changelog fragment and the --network help.

What I checked on d53a7ab: the 274 changed tests pass, and fail on main as expected; the full test suite passes with main merged in (33,860 tests), apart from failures main has too; it merges cleanly onto main; when I broke the changed code on purpose, the tests caught all 12 breakages.

Comment thread dokimi/dokimi/commands/repo_run.py Resolved
Comment thread dokimi/dokimi/cli_routes.py Resolved
…ress-1192-7F0PIDPD

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

# Conflicts:
#	dokimi/dokimi/cli_flags.py
#	dokimi/tests/test_cli_flags.py
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2D
Thread: PRR_kwDOVBg7g88AAAABaP8PFg
Thread: PRR_kwDOVBg7g88AAAABaVz86g
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2P
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2W
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2b
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2p
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I2z
Thread: PRRT_kwDOVBg7g867yraC
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868CofT
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673I28
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868CofO
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vlad-perevezentsev

the bare --network allowlist:HOSTS form that the new help shows is always refused
7e6b2e2 gives the accepted phase syntax.

@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

Decide whether a bare allowlist should be refused on purpose or mean solve and verify only
7e6b2e2 documents the refusal.

@napetrov

Copy link
Copy Markdown
Contributor Author
  • Bare --network applies to every phase. Docker builds cannot use the allowlist sidecar, so 7e6b2e2 points to --network solve,verify=allowlist:HOSTS and documents the choice.
  • d0263d8 covers both timeout phases under --schema-only, including explicit values equal to their defaults.
  • 9d2ec29 verifies that a moved timeout flag leaves the next option intact.

@xaleryb

xaleryb commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Merging this as it is would turn main red: tests/test_cli_f1b_net.py:47 builds the repo run argv with --batch b, and #1195 made repo run require --name instead. On this head merged with main, 4 of the new tests fail with the following arguments are required: --name; CI is green only because it ran on the old base. Merging main and changing "--batch", "b" to "--name", "b" on that line makes the file pass (21 of 21); I did not push it because the rename only works once main is merged.
Combined with #1243 in both orders, the CLI snapshot regenerates cleanly and no flag is renamed by one PR and still used by the other.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
…quires

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>

intel#1195 replaced repo run's --batch with a required --name, so the merged tree failed 4 of these tests with 'the following arguments are required: --name'.
@xaleryb

xaleryb commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Merged main into the branch (e6cf634) and changed the repo run argv in tests/test_cli_f1b_net.py from --batch b to --name b (536c5f6), since #1195 made --name required. On the merged tree the full suite, ruff, mypy, bandit, growth, comment-block, test-narrowing and docs gates pass, the regenerated CLI snapshot matches, and no old timeout spelling is left outside the retired-flag table and the released changelog.

@xaleryb xaleryb 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.

Approved on 536c5f6. The network, timeout and cache flags have one spelling and the old ones point to the new; the last two commits are ours: main merged in, and the test's repo run argv moved from --batch to the --name that #1195 requires, so main stays green. The CLI snapshot regenerates without a diff; tests and gates are green. Windows smoke had not started (the hosted Windows queue was stuck); every other check passed.

@xaleryb
xaleryb merged commit 1e58f9d into intel:main Nov 27, 2026
30 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.

6 participants