Repository navigation
feat(cli): one spelling for the network, timeout and cache flags (part of #94, F1b) - #1192
Conversation
CLI interface change detectedThis 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 |
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 23 selected item(s). CI at Review limit reached. This PR has had 6 reviews, so it will only be reviewed again when you ask. Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
7793497 to
9cda693
Compare
9cda693 to
9201d8f
Compare
…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>
9201d8f to
d53a7ab
Compare
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 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 · 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.
vchamarthi
left a comment
There was a problem hiding this comment.
@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 noPHASE=, is refused withthe 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--networkhelp.
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.
…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>
|
Re: review by vlad-perevezentsev
|
|
|
|
Merging this as it is would turn main red: |
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'.
|
Merged main into the branch (e6cf634) and changed the |
xaleryb
left a comment
There was a problem hiding this comment.
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.
Part of #94 (F1b, network + timeout + cache).
Summary
One spelling per concept for three flag groups, as the registry's F1b move plans them:
Banned spellings that move (leaf, old, new):
--build-timeout N--timeout build=N--grade-timeout N--timeout verify=N--build-timeout N--timeout build=N--grade-timeout N--timeout verify=Ntasks run --network [PHASE=]MODE[:hosts]accepts barenoneorpublicto set every phase.Use
--network solve,verify=allowlist:HOSTSfor both runtime phases, since the image build cannotuse an allowlist. The
--cachemetavar and diagnostic onrepo runandeval checkuseNAME=DIR.The old timeout spellings exit 2 and print
moved: dokimi ...with the new argv (the tombstone). Avalue-aware rewrite (
FlagMove.prefix) turns--build-timeout 5into--timeout build=5, with or without=.Not in this PR (each keeps its allowlist row with a
# whyreason):--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 validatecomments, and the text of the oracle patch that carries one, now nameeval check --schema-only. The--timeoutregistry still checks numeric validators, includingthe 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
make cli-snapshotregenerateddocs/reference/cli-interface.json. Static checks, mypy, deptry and the CLI snapshot check passed.Merge danger
--build-timeoutor--grade-timeoutnow stop with exit 2 and the new command. This is the intended tombstone, not a silent change.eval checkgains--timeoutwith phase values only. A bare SEC there is refused withbuild=SECandverify=SECguidance.--schema-onlyrefuses explicit phase timeouts, including values equal to their defaults. On intel/maineval checkhad no--timeoutat all.tasks run --network none(no PHASE=) is accepted now; on intel/main it was refused. It sets every phase.repo run --timeout SECis unchanged.🤖 Generated with Claude Code