Skip to content

feat(novelty): skill novelty retest, a noise floor from two analyze runs - #841

Merged
napetrov merged 41 commits into
intel:mainfrom
napetrov:feat/gs-noise
Nov 24, 2026
Merged

napetrov merged 41 commits into
intel:mainfrom
napetrov:feat/gs-noise

Conversation

@napetrov

@napetrov napetrov commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New dokimi skill novelty retest --baseline DIR --retest DIR [--scoring lenient|strict] [--out-dir OUT]: pairs two skill novelty analyze runs by artifact ref and reports a test-retest noise floor for the headline k0 score — floor (1.96 × SD of the per-item difference), Pearson r, mean |diff|, mean shift, and the item pairs whose gap is below the floor. No model calls. Opt-in, per decision D2 (noise floor is not a default cost).

Warnings: same seed, different model, replayed calls (cost.replayed_calls > 0, e.g. reused DOKIMI_RESPONSE_CACHE), any run_config drift besides seed, unmatched/unscored refs (named), n < 10.
When both runs record different content digests for an artifact, retest lists the ref in unscored and excludes it from every statistic.

Evidence

GitSkills corpus S2 retest (10 skills, Haiku 5.5 measured / Sonnet 5.5 judge, seed 2, fresh cache): r 0.86, mean |diff| 0.10, shift +0.067, floor ≈ 0.21; 26 of 45 S2 pair gaps fall below it. Pinned in tests.
--max-tokens: #452 already set the default to 16384, no change needed.

Decisions

  • No analyze --noise-floor N: N extra analyses of one artifact give no r; two-run retest is cheaper and more informative.
  • --retest name kept (vs --candidate used elsewhere for a changed artifact; here the artifact is the same).

Follow-ups (not in this PR)

  • Gate/scorecard/report don't read the floor yet (D1); retest.json describes two runs and is saved under the novelty_retest.v1 schema.
  • Nits from self-review pass 2: drift warning names tier when only atom-cap forfeits differ; no test for nested tier comparison.

Merge danger

Low: new subcommand and module; shared pearson moved to eval/stats (callers updated). Local self-review: 2 passes (lenses + verify), 0 blocking. make ci-local on the reviewed head: 0 failed, 36 passed, 14 skipped.

🤖 Generated with Claude Code

The novelty score has a per-run noise floor (the no_artifact_repeat arm), but none for
the headline k0 score across whole runs. The S2 test-retest (10 skills, another seed and a
fresh cache) was computed by hand. `skill novelty retest --baseline DIR --retest DIR`
pairs the two runs by artifact ref and reports the floor (1.96 x the spread of second minus
first on k0.lenient or strict), Pearson r, mean |diff|, mean shift, and the item pairs whose
first-run scores differ by less than the floor. It makes no model call. It warns on a retest
with the same seed or another model, and names items that are unmatched, partial or unscored.

Corpus check against the S2 retest (REPORT.md S3m): r 0.86, mean |diff| 0.10, shift +0.067,
floor about 0.21. The floor is not a default: a retest costs one full run per item.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
- pair_runs warns when either run replayed calls from the response cache
  (cost.replayed_calls > 0) and when run_config differs beyond the seed.
- Unmatched and unscored refs are named in the warnings, first five.
- A retest of fewer than 10 items carries a small-sample caveat in the
  report and on stdout.
- Non-object novelty files and non-finite k0 scores are refused or
  unscored, not a traceback.
- _pearson is one shared dokimi.eval.stats.pearson (measure.py uses it).
- Docs: run 2 disables DOKIMI_RESPONSE_CACHE; --cache-dir is the retention
  verdict cache and is not counted in replayed_calls; only novelty.json
  files are read. Corpus numbers cite the 2026-11-09 retest and the pinned
  S2_RETEST pairs.
- Test pins the 26-of-45 count and the gap-equal-to-floor boundary.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner November 16, 2026 21:41
@github-actions github-actions Bot added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

CLI interface change detected

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

+ added command `dokimi skill novelty retest`
    + option `--baseline`
    + option `--help/-h`
    + option `--out-dir`
    + option `--retest`
    + option `--scoring`
~ `dokimi runs list` parameters changed:
    ~ changed option `--kind`: choices: ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"] -> ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"]

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

@exai-bot

exai-bot commented Nov 16, 2026 •

Copy link
Copy Markdown

OpenCodeReview: Commit a1cf854 was not reviewed. This PR has reached its review limit (6 reviews).

CI at `a1cf854`: 10 still running, 2 passing, 2 skipped
Check Status
Build docs (strict) still running
CLI interface diff still running
CodeQL (actions) still running
CodeQL (python) still running
External catalog smoke test (uxlfoundation/skills) still running
Platforms and Python versions still running
Static checks (ruff, schema, zizmor, licenses, pre-commit, bandit, secrets, changelog, schema com... still running
Windows smoke test (py3.13) still running
benchmark still running
mypy still running

To review this commit: re-request review from exai-bot in the Reviewers list.

<details><summary>Last review (e177656): no findings</summary>

Open threads from the bot: 0

</details>

Comment thread dokimi/dokimi/commands/novelty.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
@codecov-commenter

codecov-commenter commented Nov 16, 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 98.98990% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.06%. Comparing base (055b5e3) to head (a1cf854).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dokimi/dokimi/eval/correlation.py 84.61% 1 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     #841      +/-   ##
==========================================
- Coverage   96.09%   96.06%   -0.04%     
==========================================
  Files         472      478       +6     
  Lines       62278    63076     +798     
  Branches    10784    10931     +147     
==========================================
+ Hits        59849    60595     +746     
- Misses       1497     1530      +33     
- Partials      932      951      +19     
Files with missing lines Coverage Δ
dokimi/dokimi/artifacts.py 96.07% <ø> (ø)
dokimi/dokimi/cli_routes.py 97.89% <ø> (ø)
dokimi/dokimi/commands/novelty_retest.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/skill.py 100.00% <100.00%> (ø)
dokimi/dokimi/novelty/measure.py 98.78% <100.00%> (-0.03%) ⬇️
dokimi/dokimi/novelty/retest.py 100.00% <100.00%> (ø)
dokimi/dokimi/runs/kinds.py 100.00% <ø> (ø)
dokimi/dokimi/eval/correlation.py 84.61% <84.61%> (ø)

... and 8 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.

Review at 257277c. The statistics are right: the floor uses the spread of the paired differences, which is the same noise as a difference between two single-run scores of different items. The gaps are in what pair_runs accepts as a retest: a changed skill, a changed judge and an unmeasured k0 pass without a warning, and a tier run can warn when nothing changed.

Agreed with @exai-bot: the ref_digest check, the judge_model check, k0 = 0.0 with nothing probed, the warnings lost when no item pairs, and the non-string ref traceback (with a wider fix in its thread).

What I ran, at 257277c:

  • make ci-local --offline: 22,214 passed, 0 failed, 72 skipped; every check passed.
  • A repro on pair_runs and the CLI for each finding: a digest drift and a judge drift give no warning, a run with n_paired == 0 is paired as 0.0, tier_record(sampled=False) against sampled=True warns "other settings (tier)", no shared item prints no unmatched refs, a list ref exits 5 with a TypeError, and pearson([0.1] * 3, ...) is -0.0.

Checked, no issues

  • The floor: 1.96 × the sd of second − first; a gap equal to the floor is not counted as below it, and the S2 test pins the numbers quoted in the docs and the changelog.
  • The pearson move: measure.confidence_correlation keeps the same result through the shared helper.
  • CLI surface and changelog: the leaf is FREE (no model calls), the CLI snapshot and the flags allowlist are updated, and the fragment says what to run.

Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/eval/stats.py Resolved
Comment thread dokimi/dokimi/commands/novelty.py Resolved
Comment thread dokimi/docs/skill-novelty.md 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.

🟡 Not approved yet · reviewed 257277c

Next: @napetrov: answer 4 open threads from vlad-perevezentsev and settle 1 open question (below). 1 nit optional.

Blocking

  • Open, not looked at in this review: thread by @vlad-perevezentsev.
  • Open, not looked at in this review: thread by @vlad-perevezentsev.
  • Open, not looked at in this review: thread by @vlad-perevezentsev.
  • Still holds on this head: thread by @vlad-perevezentsev – A file passed by path is read under any name, while the doc at this line says a run saved under another name is not read.
  • Open question for @napetrov: load_runs reads a file given by path under any name (dokimi/novelty/retest.py:54), while docs/skill-novelty.md says a run saved under another name is not read. Refuse a path whose file is not named novelty.json, or state in the docs and the --baseline help that a file given by path is read as is.

Verified on 257277c: ✅ changed tests: 24 passed, fail on main · ❌ full suite on the head fails at ci.yml:static / schema_compat vs the PR base · ⚠️ conflicts with main · ⚠️ 12 broken variants of the changed code: 11 caught by the tests, 1 not · 2 mutations tried

5 checks behind it, each with its evidence
Area What holds How
Floor and pairing The S2 retest pins r 0.86, mean |diff| 0.10, mean shift +0.067, floor about 0.21, 26 of 45 pairs below it, and a gap equal to the floor is not below it tests on the head
Pair warnings Same seed, another model, replayed calls, a run_config key other than seed, and unmatched or unscored refs each give a named warning, as the changed tests pin tests on the head
Refused input An empty directory, a repeated ref, a file that is not an object, a file with no ref, and a run saved under another name are refused or not read, as the changed tests pin tests on the head
Report files --out-dir receives retest.json and retest.md, and the report has the floor line and the comparisons line, as the changed tests pin tests on the head
Floor branch Inverting if floor is not None: in retest_summary (retest.py:161) fails tests/test_novelty_retest.py broke the code, tests caught it

Comment thread dokimi/dokimi/novelty/measure.py Resolved
…ules

Main has grown commands/novelty.py to 794 lines and eval/stats.py to 782;
with the PR's additions both pass the 800-line growth cap once merged.
cmd_novelty_retest moves to commands/novelty_retest.py and pearson to
eval/correlation.py; no behaviour changes.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
A retest graded by another judge_model, or by a judge panel with other
judges or another aggregation rule, paired with no warning, so the
grading change was reported as noise. Compare judge_model and the
panel's judges and rule; measured panel values may vary between seeds.

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

xaleryb commented Nov 18, 2026

Copy link
Copy Markdown
Contributor
  • Ran: the head with both commits below, merged with current main: ruff, mypy, bandit -ll, the full test suite, docs check --strict, scripts/check_growth.py.
  • Merged with main, the head goes over the 800-line growth cap: commands/novelty.py reaches 825 lines and eval/stats.py 801. check_growth.py fails, but the expected result is green after the rebase.
  • When two runs differ only in judge_panel ([j1,j2]/median vs [j1,j3]/majority) or in judge_model, pair_runs returns no warnings, so the grading change is reported as noise. It should warn and name the key.
  • Pushed:
    • a8f0abfe8: moves cmd_novelty_retest to commands/novelty_retest.py and pearson to eval/correlation.py, so the code stays under the cap after the merge.
    • 8d79a31b4: warns when judge_model, or judges/rule in judge_panel, differ between the runs. Covered by tests.
  • Left for the author: rebase and resolve novelty/measure.py by dropping main's trailing _pearson. Then answer the open inline threads: zero-pairs warnings, non-string ref, ref_digest, unprobed runs, tier, -0.0, the retest.json schema, and a file given by path.

Comment thread dokimi/tests/test_novelty_retest.py Resolved
Fixes in `skill novelty retest`:
- print the pairing warnings before the no-pairs refusal, so the
  excluded refs are named
- refuse a non-string artifact ref as bad input instead of a TypeError
- warn when `artifact.ref_digest` differs between the two runs
- leave a run with no probed atom out as unscored instead of k0 0.0
- compare `run_config.tier` by name and overrides, not by forfeits
- `pearson` returns None for a constant side
- docs and `--baseline` help: a file passed directly is read by any name
- pin `confidence_correlation` with a known-value test

Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
@vchamarthi

Copy link
Copy Markdown
Contributor

🟡 Waiting on @napetrov · 2 commits on feat/gs-noise (8d79a31..aa9faa0)

Next: @napetrov: answer the 1 question below.

Changes

  • _judging no longer reads judge_panel, which no novelty artifact has; the doc bullet is gone too (commit aa9faa0).

Needs @napetrov

  1. Should retest.json get a versioned novelty_retest.v1 schema and be saved with save_artifact, or be documented as a report with no stable format? (dokimi/dokimi/commands/novelty_retest.py)
    retest.json is written with json.dumps and has no schema_version; AGENTS.md wants persisted formats versioned, but a schema adds a new file and the save path.
    • A: Add novelty_retest.v1.json and save with save_artifact: schema_compat guards floor and below_floor.
    • B: Say in docs/skill-novelty.md that retest.json is a report, not a stable format: no new schema.

Threads and comments

  • 9 fixed; each answered in its thread.
  • Already fixed: dokimi/dokimi/novelty/retest.py:89 (exai-bot) – Fixed on 8d79a31: _judging compares judge_model and test_another_judge_model_is_not_read_as_noise pins the warning.
1 thread left as it is, and why
  • dokimi/dokimi/novelty/measure.py:240 (@vchamarthi) – confidence_correlation already returned the right value on main; ….

Verified on the new head: ✅ 7/7 tests fail before the fix, pass after · ✅ full suite with main merged in: 23779 passed · ✅ second reader: nothing raised · ⚠️ 13 tests removed or renamed

What each test shows
  • test_a_constant_side_has_no_correlation_even_when_its_mean_does_not_round: fails before, passes after.
  • test_a_ref_that_is_not_a_string_is_refused_as_bad_input: fails before, passes after.
  • test_a_run_with_no_probed_atom_is_unscored_not_a_zero: fails before, passes after.
  • test_changed_content_between_the_runs_is_not_read_as_noise: fails before, passes after.
  • test_confidence_correlation_is_the_pearson_r_of_confidence_and_correctness: passes.
  • test_the_zero_pair_refusal_names_the_excluded_items_on_stderr: fails before, passes after.
  • test_the_zero_pair_refusal_names_unscored_items_on_stderr: fails before, passes after.
  • test_tier_forfeits_that_follow_the_atom_count_are_not_a_settings_change: fails before, passes after.
  • Removed or renamed tests: test_a_word_count_or_fraction_that_is_not_a_number_is_refused_by_the_parser, test_cli_json_with_no_trace_read_is_failed_with_no_data, test_cli_missing_trace_exits_1, test_cross_judge_judge_dependent_exits_1_only_with_strict, test_cross_judge_strict_exits_1_when_one_of_several_arms_is_judge_dependent, test_cross_judge_strict_exits_1_when_only_one_of_several_arms_was_measured, test_cross_judge_strict_exits_1_when_require_validated_leaves_no_voter, test_cross_judge_strict_fails_when_no_arm_was_measured.
  • Left to GitHub's own checks: agent-quality.yml:external-catalog-smoke, ci.yml:static / pre-commit, ci.yml:static / Install gitleaks, ci.yml:static / Scan commits, ci.yml:fidelity / Install the pinned Claude Code, ci.yml:test-latest, ci.yml:package-smoke, ci.yml:windows-smoke.

Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/dokimi/novelty/retest.py Resolved
…loors

- a run whose baseline grades all errored has no no_artifact mean in
  arms[scoring]; it is now unscored instead of paired as k0 0.0
- scores whose difference overflows no longer give a nan noise floor
- a test pins the refusal of a non-UTF-8 novelty.json

Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
@vchamarthi

Copy link
Copy Markdown
Contributor

🟡 Waiting on @napetrov · 1 commit on feat/gs-noise (aa9faa0..620ffdd)

Next: @napetrov: answer the 1 question below.

Changes

  • A run whose baseline grades all errored is unscored in pair_runs.
  • A non-finite difference gives no floor.
  • Two runs with the same first judge but another panel or rule warn (620ffdd).
  • A novelty.json with non-UTF-8 bytes is refused as InputError (620ffdd).
  • The doc names eval/correlation.py for pearson (620ffdd).

Needs @napetrov

  1. Should retest.json get a novelty_retest.v1.json schema and be saved with save_artifact, or stay an unversioned report? (dokimi/dokimi/commands/novelty_retest.py:40)
    cmd_novelty_retest writes retest.json with json.dumps; AGENTS.md wants every artifact format as a versioned schema in dokimi/dokimi/schemas/, and the PR text lists the missing schema_version as a follow-up. A schema plus snapshot and registry entries is a design choice for the author.
    • A: Add novelty_retest.v1.json and write through save_artifact: schema_compat then guards floor and below_floor.
    • B: Keep the plain write and state in docs/skill-novelty.md that retest.json is a report, not a stable format.

Threads and comments

  • 3 fixed; each answered in its thread.
2 threads left as they are, and why
  • dokimi/dokimi/novelty/retest.py:101 (exai-bot) – _judging compares judge_model since 8d79a31b; ….
  • dokimi/dokimi/novelty/measure.py:243 (@vchamarthi) – tests/test_novelty_retest.py::test_confidence_correlation_is_the_pearson_r_of_confidence_and_correctness ….

Verified on the new head: ✅ 4/4 tests fail before the fix, pass after · ✅ full suite with main merged in: 24264 passed · ✅ second reader: nothing raised

What each test shows
  • errored baseline is unscored: fails before, passes after.
  • no nan floor: fails before, passes after.
  • non-UTF-8 refused: fails before, passes after.
  • panel or rule drift warns: fails before, passes after.
  • Left to GitHub's own checks: agent-quality.yml:external-catalog-smoke, ci.yml:static / pre-commit, ci.yml:static / Install gitleaks, ci.yml:static / Scan commits, ci.yml:fidelity / Install the pinned Claude Code, ci.yml:test-latest, ci.yml:package-smoke, ci.yml:windows-smoke.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g864Zq4F
Thread: IC_kwDOVBg7g88AAAABoSJ--A
Thread: IC_kwDOVBg7g88AAAABpA8F4w
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g866bntk
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

@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: fix the 4 new must-fix items in the line comments and settle 1 open question, then push for a re-review. 1 nit in line comments is optional.

Open threads and questions:

  • Open question for napetrov: An item whose ref_digest differs between the two runs gets the content warning and still enters the floor (dokimi/dokimi/novelty/retest.py:116-119, paired in pair_runs). Decide whether such an item is kept or left out, and say so in docs/skill-novelty.md next to the warning list, which now says only that the runs measured different text.

Re-reviewed at e177656: changed tests: 235 passed, fail on main; full suite with main merged in: 24576 passed, its only failures are main's too; merges onto main; 12 broken variants of the changed code, all caught by the tests; 1 mutation and 10 edge inputs tried.

Comment thread dokimi/dokimi/novelty/retest.py Resolved
Comment thread dokimi/tests/test_novelty_retest.py Resolved
Comment thread dokimi/tests/test_novelty_retest.py Resolved
Comment thread dokimi/tests/test_novelty_retest.py Resolved
napetrov and others added 3 commits November 21, 2026 18:56
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
Fixes the below-floor check using sd and floor rounded to 4 places, so a
gap of 0.1999 under a true floor of 0.1999896 was not flagged. The sd and
floor are rounded only where reported.

Shows Pearson r as not measured below 3 items, and as not defined when a run is constant, on stdout and in retest.md
instead of None.

Refuses an --out-dir that is an existing file as bad input, with a test.

Fixes the mypy errors in test_novelty_retest.py (SimpleNamespace rows and
the pair_runs star call).

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

Copy link
Copy Markdown
Contributor

Ready for re-review: 2 commits on feat/gs-noise (0135cbd..0bff315). Napetrov has nothing to do.

Changes:

  • Rounded sd and floor no longer decide the below-floor check.
  • A strict retest reads the strict scores, pinned by the strict test.
  • An --out-dir that is an existing file is refused as bad input, now with a test.
  • A k0 of 0.0 pairs, pinned by the zero-score test.
  • Pearson r says 'not defined' when a run's scores are constant, instead of 'needs 3 items'.

Threads and comments:

  • 5 fixed; each answered in its thread.

Checked on the new head:

  • Not passed: 3 answered as fixed without a test that shows it
  • Not passed: 1 test removed or renamed
  • 4 of 4 tests fail before the fix and pass after
  • Full suite with main merged in: 30917 passed, 1 failure that main has too
What each test shows
  • gap under the unrounded floor is flagged: fails before, passes after.
  • Pearson r shown as not measured below 3 items: fails before, passes after.
  • out-dir that is a file exits as bad input: fails before, passes after.
  • test file type-checks: passes.
  • strict scores are read for --scoring strict: passes.
  • zero k0 pairs: passes.
  • constant run is not reported as too few items: fails before, passes after.
  • Removed or renamed tests: test_a_gap_exactly_at_the_floor_is_not_below_it.

@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: settle 1 open question.
Approval waits on that.

Open threads and questions:

  • Open question for napetrov: An item whose artifact.ref_digest differs between the two runs gets the content warning and still enters the floor (dokimi/dokimi/novelty/retest.py:116-119, paired in pair_runs). Decide whether such an item is kept in the floor or left out, and state it in dokimi/docs/skill-novelty.md next to the warning list.

Re-reviewed at 0bff315: changed tests: 242 passed, fail on main; full suite with main merged in: 30917 passed, its only failures are main's too; merges onto main; 12 broken variants of the changed code, all caught by the tests; 5 mutations and 7 edge inputs tried.

…oise

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

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

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

fix the 4 new must-fix items in the line comments
Already fixed on head (e177656, 0bff315); threads resolved. Named in 004a116. Its question: see PRR_kwDOVBg7g88AAAABZnIYgA.

@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

Open question: an item whose ref_digest differs between the runs still enters the floor.
Waiting on a decision before I change this: keep it in the floor, or leave it out? My recommendation: leave it out of the floor and state it in docs/skill-novelty.md next to the warning list, since the warning already says the runs measured different text.

@napetrov

Copy link
Copy Markdown
Contributor Author

Re: comment by vchamarthi

Removed test: test_a_gap_exactly_at_the_floor_is_not_below_it.
Not restored: it passed only against the rounded floor (0.1999). Unrounded, the floor is 0.199920, so the 0.1999 gap is below it and the test fails here. Boundary covered by test_a_gap_under_the_unrounded_floor_is_below_it_and_one_over_it_is_not.

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

🟡 Open questions · re-checked 004a116

To answer: the open question of @vchamarthi below; nothing else is left from my side.

✅ make ci-local --offline: 26,001 passed, 0 failed (the warn-only mutation step ran past 10 min here and was stopped) · ✅ mkdocs build --strict · ✅ a panel change ([j1, j2]/median to [j1, j3]/majority) warns · ✅ a gap of 0.1999 under the unrounded floor 0.19999 is counted below it

The floor statistics and the retest checks are right; the earlier points are fixed, and retest.json is now a versioned artifact.

Agreed with @vchamarthi on the changed-content item: it warns but still enters the floor, and since the warning says the runs measure different items, leaving it out as unscored fits it.

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

Copy link
Copy Markdown
Contributor Author

Re: review by vlad-perevezentsev

Leaving it out as unscored fits it.
Waiting on a decision before I change this: should a changed digest exclude the item from the floor or keep it with a warning? I recommend exclusion because the two scores measure different text.

@napetrov

Copy link
Copy Markdown
Contributor Author

The floor and output changes have been rechecked. The outstanding decision is whether an item whose content changed belongs in the noise estimate.

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

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

An item whose artifact.ref_digest differs between the two runs gets the content warning and still enters the floor.
Excluded in d35fb50. The warning names the edited ref and the report lists it in unscored. The CLI regression reproduces a floor of 0.8487 before the fix and zero from the two unchanged items after it.

@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vlad-perevezentsev

Leaving it out as unscored fits it.
Implemented and documented in d35fb50. Two differing recorded digests exclude the item from all retest statistics. Legacy artifacts still pair by ref, with a warning when only one run records a digest.

@napetrov

Copy link
Copy Markdown
Contributor Author

The digest decision is implemented. Edited artifacts are listed in unscored and excluded from the noise floor and comparisons. Both review questions are answered, and the change is ready for re-review.

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

🔴 Changes needed: 2 must-fixes · re-reviewed d35fb50

Next: @napetrov: fix the 2 must-fix findings and settle 1 open question; then push for a re-review.

Blocking

  • Open question for @napetrov: when every shared item has a changed digest, the refusal says no item scored in both runs, though each of those items was scored in both runs. Name the content change in the refusal, or say in docs/skill-novelty.md that the refusal also follows exclusions for changed content.

Verified on d35fb50: ✅ changed tests: 244 passed, fail on main · ✅ full suite with main merged in: 31934 passed · ✅ merges onto main · ✅ 12 broken variants of the changed code: 12 caught by the tests · 3 mutations tried · 10 edge inputs tried

15 checks behind it, each with its evidence
Area What holds How
Changed tests the changed test files pass on the head: 244 passed, 1 skipped tests on the head
Changed tests on main the same test files do not collect on main, where the retest command is absent same tests on main
Full run with main merged in, the full test and static-check run passes: 31934 passed, no failing step full suite, main merged in
Merge the PR merges onto main with no conflict merge onto main
Digest exclusion an item whose ref_digest differs between the runs is unscored, left out of the pairs, and out of the floor: two stable items and one edited item give floor 0 ran it
Digest types ref_digest values that are objects or lists are compared and excluded, with no error ran it, edge input (structured)
One-sided digest a digest on one run only pairs by ref with the one run has no ref_digest warning, as docs/skill-novelty.md says ran it, edge input (structured)
Non-ascii ref a ref with ß is named in its exclusion warning ran it, edge input (text)
Excluded refs seven excluded refs are all named in sorted order, with no cap at five ran it, edge input (collections)
Non-finite scores nan and inf scores are unscored, not paired, and raise no error ran it, edge input (numbers)
Missing baseline a baseline directory with no novelty.json is refused as bad input naming the directory ran it, edge input (paths)
Out-dir created a missing --out-dir with its parents is created, and retest.json is stamped novelty_retest.v1 ran it, edge input (paths)
Cli refusal skill novelty retest with a directory named retest.md under --out-dir exits 2 and names it on stderr ran it, edge input (cli)
Model sdks the retest command and module load no LLM SDK module ran it
Digest comparison breaking the digest comparison at dokimi/dokimi/novelty/retest.py:164 (!= to ==) is caught by the changed tests: 6 failed broke the code, tests caught it

Comment thread dokimi/tests/test_novelty_retest.py Resolved
Comment thread dokimi/tests/test_novelty_retest.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g867MVml
Thread: PRRT_kwDOVBg7g867MVmx
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABZ6JmrQ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

Say in docs/skill-novelty.md that the refusal also follows exclusions for changed content.
Documented in a1cf854.

@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 a1cf854 · nothing required from @napetrov

🔀 Merge: safe now · merges cleanly into current main, 12 commits behind, and its tests pass on the merge · after it, #1132, #1131, #1129 and #1082 need a rebase (docs/reference/cli-interface.json)

✅ make ci-local --offline: 27,136 passed, 0 failed · ✅ on the merge with main: retest, artifact, schema and runs tests 511 passed

The earlier points are fixed; an edited item is now left out of the floor, and the docs say so.

@napetrov
napetrov merged commit 4aa9596 into intel:main Nov 24, 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.

6 participants