Skip to content

feat(novelty): --cli-preset claude for a valid judge setup on signed-in CLIs - #1578

Merged
vchamarthi merged 5 commits into
intel:mainfrom
vchamarthi:novelty-cli-preset
Dec 4, 2026
Merged

vchamarthi merged 5 commits into
intel:mainfrom
vchamarthi:novelty-cli-preset

Conversation

@vchamarthi

@vchamarthi vchamarthi commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

One flag sets up a fair novelty run when you only have Claude and Codex command-line tools signed in: three different models, an outside grader when one is available, and a plain list of what is still not ideal.

Why

  • With an OAuth token for claude-cli and no API key, only Claude models are reachable. Measured with Dokimi, skill novelty analyze on claude-cli: a plain run warns that the extractor and the judge are one vendor and that the judge shares the answerer's vendor.
  • Getting even three different Claude models took six provider/model flags, and the user still had to work out which warnings were avoidable.
  • A signed-in Codex CLI gives a judge of another vendor, but nothing used it.

What changes

  • New --cli-preset claude on skill novelty analyze and skill novelty probe; catalog novelty refuses it, because claude-cli replies have no price for its required --max-usd cap.: answerer claude-cli/haiku, extractor claude-cli/opus, judge claude-cli/sonnet.
  • When codex login status reports a sign-in (llm_cli.detect, no model call), the judge runs on codex-cli with the model in Codex's own config.toml, provided it sets no profile and no model_provider other than openai. ($CODEX_HOME, else ~/.codex); dokimi names no Codex model itself. With no model set, the judge stays sonnet and the run says why.
  • The run prints the chosen roles and each validity warning that remains, with its reason (or none).
  • --model (even at its default), --judge, --judge-model, --judge-provider, --extract-model, or --judge2 without --judge2-provider, beside the preset are refused., so no flag is silently ignored.
  • New module dokimi/novelty/cli_preset.py; one call each in novelty.py and catalog_novelty.py; flag in novelty_flags.py; docs, changelog, allowlist row and CLI snapshot.

Evidence

Setup on claude-cli Flags Distinct role models Warnings left
Before, plain run 1 2 (judge = extractor) extractor/judge one model, answerer/judge one vendor
Before, hand-tuned 6 3 extractor/judge one vendor, answerer/judge one vendor
--cli-preset claude, Codex not signed in 1 3 same two, each named with its reason
--cli-preset claude, Codex signed in 1 3, judge of another vendor none

How to test

cd dokimi
python -m pytest -q tests/test_novelty_cli_preset.py tests/test_cli_flags.py   # preset tests: 24 passed
make ci-local CI_LOCAL_ARGS='--offline'

Tests stub the CLIs with a fake process runner (signed in, signed out, not installed) and Codex's config with a temporary CODEX_HOME; no model is called.

Full offline CI on the current main: 34229 passed, 33 skipped, 1 failed (test_repo_compare_interval::test_the_row_p_places_zero..., a known failure on unchanged main). schema_compat against the fresh base passes.

Not in this PR

  • Auto-detection without the flag: the preset changes the answerer, so it stays opt-in.
  • Only the claude preset; other CLI combinations can be added to PRESETS.

References

… judge when signed in

Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
@vchamarthi
vchamarthi requested a review from a team as a code owner December 3, 2026 08:06
Copilot AI balanced review requested due to automatic review settings December 3, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Fresh catalog measurements with the Claude preset cannot complete because replies lack cost data and trigger the mandatory spend cap’s no_price stop.

3 open issues
What changed in this PR

3 new findings.

Adds an opt-in CLI preset to simplify model selection for Dokimi novelty evaluations using signed-in Claude and Codex tools.

Changes:

  • Assigns distinct Claude models to each role, optionally selecting a configured Codex judge.
  • Reports remaining validity warnings and rejects conflicting role flags.
  • Adds command integration, tests, documentation and CLI metadata.
File Description
dokimi/​tests/​test_novelty_cli_preset.py Tests role selection, fallbacks and conflicts.
dokimi/​tests/​data/​cli_flags_allowlist.txt Allows the new preset flag.
dokimi/​dokimi/​novelty/​cli_preset.py Resolves and applies presets and warnings.
dokimi/​dokimi/​commands/​novelty.py Applies presets to analyze and probe.
dokimi/​dokimi/​commands/​novelty_flags.py Registers the preset option.
dokimi/​dokimi/​commands/​catalog_novelty.py Applies presets to catalog sweeps.
dokimi/​docs/​skill-novelty.md Documents preset behavior and restrictions.
dokimi/​docs/​reference/​cli-interface.json Updates the CLI snapshot.
dokimi/​changelog.d/​20261202_160000_novelty-cli-preset.md Records the new feature.

Review effort: Balanced

Comment thread dokimi/dokimi/commands/novelty.py Outdated
from dokimi.commands.novelty_budget import save_probe_measure
from dokimi.novelty import cli_preset

cli_preset.apply(args)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 3be7c05: probe still applies the roles first, but prints the validity warnings after loading the atoms, with the extractor named in the saved atoms (or a note when it names none), so a Codex-written key now shows the shared-vendor warning. tests/test_novelty_cli_preset.py::test_probe_warnings_name_the_model_that_wrote_the_saved_atoms failed before the fix and passes now.

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 72be762: for probe, the --cli-preset summary now also warns when the saved atoms were extracted by the answerer, so it matches the later warn_answer_key() warning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was already fixed in 3be7c05: probe prints the validity warnings after loading the saved atoms and names the extractor they record; tests/test_novelty_cli_preset.py::test_probe_warnings_name_the_model_that_wrote_the_saved_atoms covers it and passes.

Comment thread dokimi/dokimi/novelty/cli_preset.py Resolved
@exai-bot

exai-bot commented Dec 3, 2026 •

Copy link
Copy Markdown

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

CI at 72be762: 21 passing, 4 skipped.

Review details
  • Commit reviewed: 72be762 against merge base 3be7c05
  • Coverage: 2 files in 1 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 183k tokens (151k from cache), 26s
  • Tool calls: 12 (9 file_read, 2 code_search, 1 local_check_results)
  • small change set: 2 files

@github-actions github-actions Bot added the cli-interface-change Changes dokimi's user-facing CLI surface label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

CLI interface change detected

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

~ `dokimi catalog novelty` parameters changed:
    + added option `--cli-preset`
~ `dokimi skill novelty analyze` parameters changed:
    + added option `--cli-preset`
~ `dokimi skill novelty probe` parameters changed:
    + added option `--cli-preset`

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

@codecov-commenter

codecov-commenter commented Dec 3, 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 97.34513% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.47%. Comparing base (69264e1) to head (72be762).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
dokimi/dokimi/commands/novelty.py 57.14% 2 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    #1578    +/-   ##
========================================
  Coverage   96.47%   96.47%            
========================================
  Files         558      562     +4     
  Lines       73923    74458   +535     
  Branches    12769    12859    +90     
========================================
+ Hits        71314    71831   +517     
- Misses       1593     1605    +12     
- Partials     1016     1022     +6     
Files with missing lines Coverage Δ
dokimi/dokimi/commands/catalog_novelty.py 94.53% <100.00%> (+0.02%) ⬆️
dokimi/dokimi/commands/novelty_flags.py 100.00% <100.00%> (ø)
dokimi/dokimi/novelty/cli_preset.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/novelty.py 98.28% <57.14%> (-1.02%) ⬇️

... and 20 files with indirect coverage changes

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

@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 d3244c1

To fix: two flags beside the preset are still taken or follow the machine's Codex state, and a Codex config the judge cannot use is reported as a clean setup (line comments). Also answer the @Copilot threads below.

✅ make ci-local --offline: 34,143 passed · ⚠️ 1 failed (eval score ragas fault test), fails on the base too · ✅ tests/test_novelty_cli_preset.py 24 passed · ✅ parsed --cli-preset claude --judge2 opus with Codex signed in: judge2 is codex-cli/opus

One flag that gives each role its own model is a real help on signed-in CLIs, and no model is called to pick the judge.

Agreed with @Copilot: catalog sweeps stop on no_price until #1565 is in (replied in its thread); probe warnings name the wrong answer-key model; an explicit default --model is not refused.

Comment thread dokimi/dokimi/novelty/cli_preset.py Resolved
Comment thread dokimi/dokimi/novelty/cli_preset.py Resolved
Comment thread dokimi/dokimi/commands/novelty_flags.py Resolved
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
- catalog novelty refuses the preset: claude-cli replies carry no price,
  so the required --max-usd cap stops the sweep at the first reply
- probe prints its validity warnings from the extractor that wrote the
  saved atoms, not the preset's extractor
- an explicit --model equal to the default is refused with the preset
- --judge2 needs --judge2-provider beside the preset
- the Codex config model is used only without a profile and with no
  model_provider other than openai, since codex exec ignores the rest
- the flag choices and resolve() read cli_preset.PRESETS
- import InputError and same_model from dokimi.files and
  dokimi.model_names, where main moved them
- the preset-names test adds a name to PRESETS and checks the flag and
  resolve() accept it

Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
@vchamarthi

Copy link
Copy Markdown
Contributor Author

@vlad-perevezentsev, this is ready for another look: 3 commits on novelty-cli-preset (d3244c1..3be7c05) answers 3 of your threads and your comment.

PR description updated:

  • New --cli-preset claude on skill novelty analyze and skill novelty probe; catalog novelty refuses it, because claude-cli replies have no price for its required --max-usd cap.
  • the judge runs on codex-cli with the model in Codex's own config.toml, provided it sets no profile and no model_provider other than openai.
  • --model (even at its default), --judge, --judge-model, --judge-provider, --extract-model, or --judge2 without --judge2-provider, beside the preset are refused.

Your comment:

Threads:

  • I answered each one in its thread: 6 fixed.

What I checked on the new commit:

  • 1 test removed or renamed.
  • All 6 new tests fail before the fix and pass after it.
  • The full test suite passes with main merged in (35,867 tests), apart from 1 failure main has too.
What each test shows
  • catalog novelty refuses the preset: fails before, passes after.
  • probe warnings use the saved extractor: fails before, passes after.
  • explicit default --model refused: fails before, passes after.
  • --judge2 needs its provider: fails before, passes after.
  • unusable codex config model not used: fails before, passes after.
  • flag choices and resolve share PRESETS: fails before, passes after.
  • Removed or renamed tests: test_catalog_novelty_applies_the_preset_before_it_reads_the_roles.

Comment thread dokimi/dokimi/novelty/cli_preset.py Outdated
Comment on lines +177 to +179
remaining = tuple((_key_warnings(key_extractor, preset.judge[1]) if key_extractor else [
"the saved atoms name no extractor, so whether the judge shares its vendor is not checked"])
+ _answerer_warnings(preset.answerer[1], preset.judge[1])) + preset.notes

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
The saved-key summary still misses the answerer writing its own key.

Trigger: run probe --cli-preset claude against atoms whose extractor is haiku (or its full Claude model ID), with a signed-in/configured GPT Codex judge.

Evidence: this branch checks extractor–judge and answerer–judge relations only, so it prints “Validity warnings that remain: none”; warn_answer_key() later explicitly warns that Haiku wrote its own answer key.

Impact: the advertised validity summary contradicts the actual run's provenance. Include the saved extractor–answerer identity check here and add a regression for this case.

Workaround: regenerate the atoms with a different extractor or inspect the later warning manually.

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

Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)

python proof_c1.py

What the proof does: Calls print_report with a saved key written by haiku, the answerer, and asserts the summary names that warning.

The problem shows as the output summary misses answerer-wrote-own-key.

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

--cli-preset claude: answerer claude-cli/haiku, extractor haiku, judge codex-cli/gpt-5
Validity warnings that remain: none

summary misses answerer-wrote-own-key

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 72be762: the probe summary now checks the saved extractor against the answerer, and two unknown vendors are no longer reported as one vendor. Tests cover haiku, its full model ID, and deepseek-v4 with o4-mini.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was already fixed in 72be762: the saved-key summary now warns when the answerer wrote the key, and two unknown vendors are no longer read as one; tests/test_novelty_cli_preset.py::test_probe_warns_when_the_answerer_wrote_the_saved_atoms and test_two_unknown_vendors_are_not_read_as_one cover it and pass.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Mutation of changed lines

⚠️ Tests miss 2 of 80 small breaks of the lines this PR changes, and not every break was tried

At 72be762: 78 caught · 2 missed

Each row is a small deliberate break (a mutant) of a line this PR changes that every test reaching that line still passes. Add a test that fails on it or, if it cannot change behaviour, put # mutation-ok[<operator>]: <reason> at the end of the line or alone on the line above.

Where Operator Change no test notices Tests reaching the line
dokimi/dokimi/commands/novelty.py:171 flip-bool False → True 9
dokimi/dokimi/novelty/cli_preset.py:148 drop-clause getattr(args, "model_named", False) or (args.model, args.provider) != ( → (getattr(args, "model_named", False)) 16

Not checked:

  • 45 more breaks of covered changed lines were over the limit and not tried
  • 19 changed lines were not mutated

Warning only: a missed break does not fail the job. Updated on every push; the full report is in the ci run summary.

The probe summary of --cli-preset now flags a saved answer key written by the answerer, and no longer reads two unknown vendors as one vendor.

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 · checked 72be762 · nothing required from @vchamarthi

🔀 Merge: safe now · merges cleanly into current main, 6 commits behind; its tests pass on the merge · after it, #1600 needs a rebase (commands/novelty.py)

✅ GitHub CI on 3be7c05: 22 jobs pass · ✅ make ci-local --offline on 72be762: 35,087 passed, ⚠️ 1 local eval score ragas fault test fails on the base too · ✅ the two new tests fail on 3be7c05 · ✅ preset, CLI and import tests on the merge with main: 142 passed

The earlier points are fixed; the preset now reports every validity warning the run will print.

Fixed in this branch, up to 72be762:

  • The probe summary missed a key the answerer wrote and read two unknown vendors as one: 72be762 checks the saved extractor against the answerer and skips unknown vendors; tests cover haiku, claude-haiku-4-5 and deepseek-v4 with o4-mini.

@vchamarthi
vchamarthi merged commit 3cf65d7 into intel:main Dec 4, 2026
25 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.

5 participants