Repository navigation
feat(novelty): --cli-preset claude for a valid judge setup on signed-in CLIs - #1578
Conversation
… judge when signed in Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
There was a problem hiding this comment.
🟡 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
| from dokimi.commands.novelty_budget import save_probe_measure | ||
| from dokimi.novelty import cli_preset | ||
|
|
||
| cli_preset.apply(args) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). CI at Review details
|
CLI interface change detectedThis 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 |
|
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 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 · 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.
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>
|
@vlad-perevezentsev, this is ready for another look: 3 commits on PR description updated:
Your comment:
Threads:
What I checked on the new commit:
What each test shows
|
| 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Mutation of changed linesAt 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
Not checked:
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
left a comment
There was a problem hiding this comment.
🟢 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, 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
probesummary missed a key the answerer wrote and read two unknown vendors as one: 72be762 checks the saved extractor against the answerer and skipsunknownvendors; tests coverhaiku,claude-haiku-4-5anddeepseek-v4witho4-mini.


Why
claude-cliand no API key, only Claude models are reachable. Measured with Dokimi,skill novelty analyzeon claude-cli: a plain run warns that the extractor and the judge are one vendor and that the judge shares the answerer's vendor.What changes
--cli-preset claudeonskill novelty analyzeandskill novelty probe;catalog noveltyrefuses it, becauseclaude-clireplies have no price for its required--max-usdcap.: answererclaude-cli/haiku, extractorclaude-cli/opus, judgeclaude-cli/sonnet.codex login statusreports a sign-in (llm_cli.detect, no model call), the judge runs oncodex-cliwith themodelin Codex's ownconfig.toml, provided it sets noprofileand nomodel_providerother thanopenai. ($CODEX_HOME, else~/.codex); dokimi names no Codex model itself. With nomodelset, the judge stayssonnetand the run says why.none).--model(even at its default),--judge,--judge-model,--judge-provider,--extract-model, or--judge2without--judge2-provider, beside the preset are refused., so no flag is silently ignored.dokimi/novelty/cli_preset.py; one call each innovelty.pyandcatalog_novelty.py; flag innovelty_flags.py; docs, changelog, allowlist row and CLI snapshot.Evidence
--cli-preset claude, Codex not signed in--cli-preset claude, Codex signed inHow to test
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_compatagainst the fresh base passes.Not in this PR
claudepreset; other CLI combinations can be added toPRESETS.References
--max-callsfor novelty commands); this change stays out of the files it edits exceptcatalog_novelty.py(one line) and the CLI snapshot.docs/skill-novelty.md, "Choosing the extractor and the judge".