Repository navigation
feat(arms): arms run --reps N with per-question paired deltas and a noise floor - #1560
Conversation
…oise floor; no verdict from one run Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
CLI interface change detectedThis PR changes dokimi's user-facing CLI surface (commands and/or options): ~ `dokimi arms run` parameters changed:
+ added option `--reps`
~ `dokimi runs list` parameters changed:
~ changed option `--kind`: choices: ["'agent_run'", "'answer_key'", "'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'delivery'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_controls'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'opportunities'", "'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'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"] -> ["'agent_run'", "'answer_key'", "'answers'", "'arms'", "'arms_reps'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'delivery'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_controls'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'opportunities'", "'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'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"]Updated on every push; the |
There was a problem hiding this comment.
🟡 Changes recommended
The pooled statistics mix ask and answer rubrics, which can reverse the reported answer effect. Reused judge context can discard skill context between repetitions and change the judging protocol; separately, reusing an output path can overwrite inputs still referenced by an existing pool. Verdicts can incorrectly report differs because of noise-floor rounding or inconsistent question populations across repeats, and cumulative judge counters overstate per-repetition usage.
6 open issues
Reset the judge context store for each repetition · New Preserve existing repetition files when rerunning with the same output path · New Exclude ask-rubric rows from pooled answer means and significance tests · New Reset judge usage counters between repetitions · New Use the unrounded noise floor when deciding verdicts · New Prevent pooled verdicts from reversing every repeat's effect · New
What changed in this PR
7 findings.
This PR adds repeated treatment comparisons to Dokimi, aiming to distinguish reproducible effects from run-to-run noise.
Changes:
- Adds
arms run --reps N, per-repeat artifacts, and pooled results. - Introduces per-question statistical tests, sign agreement, and noise-floor verdicts.
- Updates reports, artifact registration, documentation, and tests.
| File | Description |
|---|---|
dokimi/tests/test_runs_show.py |
Checks pooled artifact counts. |
dokimi/tests/test_runs_scan.py |
Checks pooled artifact discovery. |
dokimi/tests/test_arms_sign_flip.py |
Updates single-run report expectations. |
dokimi/tests/test_arms_reps.py |
Tests repetition execution, pooling, and reporting. |
dokimi/tests/test_arms_report.py |
Updates significance-cell assertions. |
dokimi/tests/fixtures/report_fmt.json |
Updates report snapshots. |
dokimi/tests/fixtures/artifacts/arms_reps.v1.json |
Adds a pooled artifact fixture. |
dokimi/dokimi/schemas/arms_reps.v1.json |
Defines the pooled artifact format. |
dokimi/dokimi/runs/kinds.py |
Registers pooled run metadata. |
dokimi/dokimi/report/arms_reps_report.py |
Renders pooled comparisons. |
dokimi/dokimi/report/arms_report.py |
Replaces single-run verdicts with 1 run. |
dokimi/dokimi/eval/arms_reps.py |
Computes pooled statistics and verdicts. |
dokimi/dokimi/commands/arms.py |
Adds the repetitions option and routing. |
dokimi/dokimi/commands/arms_reps.py |
Executes and saves repetitions. |
dokimi/dokimi/artifacts.py |
Registers the new schema version. |
dokimi/docs/reference/cli-interface.json |
Records the updated CLI interface. |
dokimi/docs/evaluating-treatments.md |
Documents repetition usage and interpretation. |
dokimi/changelog.d/20261202_120000_vchamarthi_arms-reps.md |
Describes repetition support and report changes. |
Review effort: Balanced
|
✅ OpenCodeReview: Found nothing that must be fixed in this commit. CI at Review limit reached. This PR has had 6 reviews, so it will only be reviewed again when you ask. Other findings not posted (1)1 should fix Test notes (2)
Review details
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
==========================================
- Coverage 96.44% 96.43% -0.02%
==========================================
Files 575 578 +3
Lines 75717 75952 +235
Branches 13046 13081 +35
==========================================
+ Hits 73022 73241 +219
- Misses 1646 1656 +10
- Partials 1049 1055 +6
🚀 New features to boost your workflow:
|
Mutation of changed linesAt 4814e14: 79 caught · 0 missed · 1 waived Not checked:
Marked harmless with
Warning only: a missed break does not fail the job. Updated on every push; the full report is in the ci run summary. |
napetrov
left a comment
There was a problem hiding this comment.
Change class: CONTRACT (head e353690)
- Contract: changed. errors dokimi/dokimi/commands/arms_reps.py:34; errors dokimi/dokimi/commands/arms_reps.py:37
- Responsibility: candidate (count signal only, no file:line)
- Dependency: none
- Review depth: check the changed surface: callers, docs, tests pin new behaviour
- Coverage gaps: none
2 new must-fix findings. The focused repeats tests pass. One unmeasured repeat is classified as within noise. A clean merge with #1541 rejects the pooled output schema.
| # | Finding | Severity | Provenance | Evidence |
|---|---|---|---|---|
| 1 | One scored repetition is reported as within noise | must-fix | introduced | Reproduced in an offline probe. |
| 2 | The pooled artifact cannot be saved with the new run envelope | must-fix | combined with #1541 | Reproduced in an offline probe. |
Checked the diff, input edges, and focused offline Linux tests (head: 268 passed, 1 skipped in 8.14s).
- Still open. Repetitions share judge context. Earlier thread
- Still open. The ask rubric is mixed into the pooled effect. Earlier thread
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Changes needed · reviewed e353690
To fix: the pooled verdict can say differs or within noise when the reps do not show it (the open threads); the smaller points in our line comments are optional. Also answer the @Copilot, @exai-bot and @napetrov threads below.
✅ make ci-local --offline: 34,050 passed · eval score ragas fault contract), schema_compat and the mutation step fail from the base, not from this PR · ✅ repros: ask rows +40 with answer delta 0 → pooled +20 differs; 10 reps at +0.5 → pooled -8.09 differs
Testing over question means rather than question x rep is the right unit, and refusing replayed reps is a good guard.
Agreed with @Copilot: ask rows in the pool; the pooled sign against every rep; the rounded floor; and 3 more.
Agreed with @exai-bot on the same points and on small deltas printed as 0.0.
Agreed with @napetrov: one measured rep reads as within noise; dokimi_commit after #1541.
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
- Pooled means and verdict leave out expected_outcome: ask rows. - The verdict compares the unrounded noise floor, needs two measured reps, and needs the pooled delta to have every rep's sign. - Each rep gets a fresh judge context store and its own judge usage. - --reps above 1 is refused without --judge and over repetition files left by an earlier run. - arms_reps.v1 accepts dokimi_commit; small deltas keep their digits in the report; the Sig. note no longer says p < 0.05 could be claimed. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
This is ready for another look: I've pushed 2 commits on
Napetrov's comment:
Vlad-perevezentsev's comment:
Threads:
What I checked on the new commit: all 10 new tests fail before the fix and pass after it; the full test suite passes with main merged in (41,298 tests), apart from 1 failure main has too. What each test shows
|
--out-md equal to a repetition's JSON path (e.g. run.rep1.json) overwrote that saved repetition with the Markdown report while the pool listed it as an input. Refuse any two equal output paths before the first repetition. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
This is ready for another look: I've pushed 1 commit on Changes:
Threads:
What I checked on the new commit: the new test fails before the fix and passes after it; the full test suite passes with main merged in (41,319 tests), apart from 1 failure main has too. What each test shows
|
refuse_colliding_outputs compared resolved paths, which differ for hard links to one inode, so --out-md could overwrite the pooled JSON. Existing paths are now compared by (device, inode); a test covers the hard link. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
This is ready for another look: I've pushed 1 commit on Threads:
What I checked on the new commit: the new test fails before the fix and passes after it; the full test suite passes with main merged in (41,340 tests), apart from 1 failure main has too. What each test shows
|
napetrov
left a comment
There was a problem hiding this comment.
Change class: CONTRACT (head 43e15e0)
- Contract: changed. errors dokimi/dokimi/commands/arms_reps.py:35; errors dokimi/dokimi/commands/arms_reps.py:38
- Responsibility: candidate (count signal only, no file:line)
- Dependency: none
- Review depth: check the changed surface: callers, docs, tests pin new behaviour
- Coverage gaps: none
No new blocking findings on 43e15e0b.
Reviewed the diff, edge cases and prior threads. Focused tests: 80 passed on head and 44 passed on merge base. Run and report tests used local fixtures. The full local suite was outside coverage.
antonwolfy
left a comment
There was a problem hiding this comment.
LGTM. Every point raised in the earlier rounds is fixed at this head: ask rows are left out of the pool, the verdict uses the unrounded floor and the pooled sign, one measured rep is inconclusive, each rep gets a fresh judge context and its own usage, stale and colliding outputs are refused before any answer, and the schema takes dokimi_commit. One nit inline.
What I ran, on a Linux review host at 43e15e0:
make ci-local: 38 passed, 0 failed, 16 skipped (matrix legs on other Pythons and semgrep are not run locally).- The docs build, the CLI surface diff, the schema and fixture checks, and the arms test files all pass.
- Read the code of all four new modules against the docs, schema and changelog; every flag the docs name (
--reps,--arm,--correction,--baseline-arm) exists inarms run.
Checked, no issues
- Pooling: the test runs over per-question means, the verdict needs the same sign in every measured rep and in the pooled delta, and the floor is compared unrounded.
- Guards:
--repsabove 1 is refused without--judge, with the response cache set, and over earlier.rep<k>files or colliding paths, all before the first answer. - Housekeeping: every commit has a
Signed-off-by, the changelog fragment is present, andarms_reps.v1is registered in the schema versions and run kinds.
The per-rep judge reset test never checked _redrawn_judgements, so dropping its reset left every suite green. Assert it starts at 0 in each rep. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
@antonwolfy, this is ready for another look: 1 commit on Changes:
Threads:
What I checked on the new commit: the 1 test of the fix pass; the full test suite passes with main merged in (41,548 tests), apart from 1 failure main has too. What each test shows
|
napetrov
left a comment
There was a problem hiding this comment.
Change class: CONTRACT (head 93800b4)
- Contract: changed. errors dokimi/dokimi/commands/arms_reps.py:35; errors dokimi/dokimi/commands/arms_reps.py:38
- Responsibility: candidate (count signal only, no file:line)
- Dependency: none
- Review depth: check the changed surface: callers, docs, tests pin new behaviour
- Coverage gaps: none
1 blocking, 1 minor, with a merge conflict on main.
arms run --reps stores one artifact per repetition and a pooled artifact. The pooled verdict needs to account for unscored repetitions, and invalid output paths should be refused before sampling calls.
The head also conflicts with current main in the checked-in CLI interface snapshot.
CI on head 93800b4: 0 failing Actions jobs; merge base 1bf62d3 is behind base tip 5225c2a.
Compared the change and input edges against the merge base and checked existing threads and GitHub Actions. Runtime checks used focused Linux tests and local fixtures. Focused tests on the head: head 36 passed in 1.45s.
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
An --reps comparison that any repetition left unscored is inconclusive, not differs, so sign agreement covers every repetition. The stale-output and collision checks now run before prepare_arms, so a refused rerun makes no provider call. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
@napetrov, this is ready for another look: 2 commits on Changes:
Your comment:
Threads:
What I checked on the new commit: all 2 new tests fail before the fix and pass after it; the full test suite passes with main merged in (41,766 tests), apart from 1 failure main has too. What each test shows
|
napetrov
left a comment
There was a problem hiding this comment.
Change class: CONTRACT (head 4814e14)
- Contract: changed. errors dokimi/dokimi/commands/arms_reps.py:35; errors dokimi/dokimi/commands/arms_reps.py:38
- Responsibility: candidate (count signal only, no file:line)
- Dependency: none
- Review depth: check the changed surface: callers, docs, tests pin new behaviour
- Coverage gaps: none
Ready for approval.
Both earlier regressions are fixed. Incomplete repetition thread and sampling-order thread.
CI on head 4814e14: 0 failing Actions jobs; merge base 5225c2a is behind base tip 60948d0.
Checked both regressions from the previous round, 82 focused tests, required CI, and a merge with current main. Test execution used local fixtures. The report still labels the measured repetitions as agreeing when one repetition has no score. Align that display and the documentation with the new inconclusive rule.


Why
arms runcompares answers with and without extra context, for example docs. It could not repeat a question set, and its report printed a significance verdict from one run.Measured with Dokimi on two question sets (Haiku answers, Sonnet judge), single runs called deltas significant that later repeats did not reproduce:
Repeats had to be pooled by hand.
What changes
arms run --reps Nanswers and judges the set N times.<out>.rep<k>.json(plainarms.v1, the fileseval headroomreads).--outholds a new pooledarms_reps.v1artifact, and--out-mdholds its report.dokimi/eval/arms_reps.py):differsonly when the effect is significant, has the same sign in every repeat and exceeds the noise floor. Otherwise it iswithin_noise,not_significantorinconclusive. One repeat is alwaysinconclusive.--seedadvances by one per repeat;--repsabove 1 is refused whileDOKIMI_RESPONSE_CACHEis set, because every repeat would replay the first;1 rununder Sig. instead of yes/no. p, adjusted p and the CI stay, and stored fields are unchanged.evaluating-treatments.md), changelog andcli-interface.jsonare updated.Evidence
within_noise(floor 5.1)How to test
Full offline CI: 34,142 passed, 1 failed. The failure (
test_repo_compare_interval::test_the_row_p_places_zero_where_large_deltas_round_p_at_zero_apart) fails the same way on unchanged main.Mutation
Tests added for the 21 survivors; changed-line mutation now 79 of 80 caught, 0 survived, 1 waived (the
TYPE_CHECKINGimport guard: type-only names under postponed annotations).References
arms run,eval headroom