Repository navigation
Conversation
A gate fed an empty or all-errored result read it as green. Each one now exits 1 with an "incomplete" line and the counts: - repo tasks check / repo run: an export with no task is refused (repo run crashed with IndexError on one); tasks check exits 1 when no task passed the self-check, even with --allow-unsupported; repo run exits 1 when no cell has a result, and counts unsupported cells in its summary line. - eval judge-wording: a condition with no scored pair is NOT MEASURED (errored-pair counts printed), not "No rewrite moves any variant"; --strict exits 1 on it. - eval cross-judge: an arm no voting measure compared is NOT MEASURED, not NO DETECTABLE EFFECT; --strict exits 1 on it or on no arm. - run --strict: exits 1 when no document was measured. Partial errors change no threshold. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
==========================================
+ Coverage 91.97% 92.02% +0.04%
==========================================
Files 223 223
Lines 27709 27745 +36
Branches 4553 4564 +11
==========================================
+ Hits 25486 25532 +46
+ Misses 1574 1569 -5
+ Partials 649 644 -5
🚀 New features to boost your workflow:
|
antonwolfy
left a comment
There was a problem hiding this comment.
Review at edcf045. The fixes read right: each gate now exits 1 with an incomplete line when nothing was measured, and no threshold moves. Two test gaps would let a plausible edit of the new conditions through, and one doc is missing.
What I ran, on a Linux review host at edcf045:
make ci-local: 20 passed, 8 failed, 7 skipped. All 8 failures areexit 127: ruff, mypy, zizmor, pre-commit, bandit, deptry, mkdocs and pip-audit are missing from my venv, becausemake devstops at the tools install on this base, which #179 fixed onmain. Static checks, mypy and the strict docs build pass on GitHub's CI at this head. 7074 tests passed, 21 skipped; changed-line coverage 100%.- Mutation runs on a copy of the head tree for the new conditions (details inline): 3 mutants of the new conditions, all of which pass the full
test_judge_reliability.py.
Checked, no issues
load_tasks: the only non-test callers arerepo_run.py:145and:193, and both catchPrepError, so the new "no task" refusal prints a✗line and exits 1.repo run/tasks check: removing each new guard (workspace.pyno-task,repo_run.pyincomplete exits,run.pyzero docs) fails a test. A resumed batch (cells skipped) still exits 0.label():Measure.versusalways setsn, so ther.get("n", 1)default is never used for real rows.
Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
…ED verdicts Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…rowth baseline On main, the growth ratchet fails this branch: cmd_eval_cross_judge went from 32 to 33 complexity and tests/test_judge_reliability.py from 1695 to 1830 lines. Move the strict exit into _strict_cross_judge_exit and the new tests into tests/test_judge_not_measured.py; behaviour is unchanged. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
label() returns NOT MEASURED for an empty voter set (every judge FAILed, or --require-validated with no passing validity), and cross-judge --strict exits 1 on it. No test reached that branch: `if rows and not any(...)` passed the whole suite. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
…ts 1 tasks check now exits 1 as incomplete when every task checked is unsupported, but the --allow-unsupported help still promised exit 0 for that case. State the exception in the help and in the contract sentence. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
|
antonwolfy
left a comment
There was a problem hiding this comment.
Review at 9ab2184. The three threads from my earlier review are addressed, and the gates now exit 1 when nothing was measured. Two things are worth fixing before merge, both inline: a judge-wording report that prints NOT MEASURED and FRAGILE together, and an untested --strict guard on the new wording exit.
@xaleryb's question on the Merge Danger line for eval cross-judge --require-validated --strict (was exit 0 with NO DETECTABLE EFFECT, now NOT MEASURED and exit 1) waits for the author.
What I ran, on a Linux review host at 9ab2184:
make ci-local: 27 passed, 1 failed, 7 skipped. The failure ispip-auditon the lock files, which this PR does not touch. Tests, ruff, mypy, bandit, schema-compat and the strict docs build pass. Changed-line coverage 97%.- Reproductions for the code findings, with the LLM transport mocked.
- A mutation run on the new conditions: 39 mutants, 8 of which pass the full test files; the two that matter are inline.
Checked, no issues
repo tasks check/repo run:len(bad) == len(results)is reached only when every bad result is an allowed unsupported one.load_tasksrefuses an empty export first. A resumed batch still exits 0, because done cells count asskipped.run --strict: the zero-document exit sits after the hard-gate and critical-band exits, andsummary["docs"]is always set.cross_judge.label: everyMeasure.versusrow carriesn. One voter withn=0does not hide another withn>0, andanytoallnow fails a test.- Schemas and docs: no schema under
dokimi/dokimi/schemas/covers cross-judge or judge-wording output, so the new label and keys need no version bump. The flags and the summary line in the docs match the code.
| + ", ".join(s["fragile_variants"]) | ||
| ) | ||
| else: | ||
| elif s["measured"]: |
There was a problem hiding this comment.
A condition with no scored pair prints NOT MEASURED and FRAGILE in the same report. fragile_variants is still computed from the errored pairs, and measured does not suppress it.
Case: 20 bases, original scored 20 pairs, persona errored on all 20 (ThrottlingException). summary() gives measured: False and fragile_variants: ['wrong_numbers'], and format_summary() ends with:
NOT MEASURED — no pair scored under: persona
FRAGILE — a rewrite moves these on the same pairs (paired sign test, Holm): wrong_numbers
The --output JSON carries the same contradiction. A throttled run reads as wording sensitivity. --strict exits 1 either way, so the exit code is right; the report text and the JSON are not. With 19 of 20 pairs errored the old code already printed FRAGILE; the new errored pairs row shows the count but the flag still reads as a finding.
Suggestion: compute fragile as false for a variant when its condition is in unmeasured, or print FRAGILE only when s["measured"]. Add a format_summary() assertion for the one-condition-errored case.
There was a problem hiding this comment.
Fixed in 1983d7d: fragile is now false for every variant unless the report is measured, so a condition with no scored pair prints NOT MEASURED without FRAGILE, in the text and in the --output JSON. Test: test_judge_wording_strict_exits_1_when_one_condition_scored_and_another_did_not (8 pairs, persona errored; asserts no FRAGILE in the text, empty fragile_variants; fails on the old code).
| print(f"\n✅ Wording report saved to {out}") | ||
| if args.strict and report.summary()["fragile_variants"]: | ||
| summary = report.summary() | ||
| if args.strict and not summary["measured"]: |
There was a problem hiding this comment.
Nothing pins the new judge-wording exit to --strict. Without the flag the new exit must not fire, and no test checks that.
Mutation check: replacing if args.strict and not summary["measured"]: with if not summary["measured"]: passes test_judge_reliability.py and test_judge_not_measured.py in full (135 tests). Dropping args.strict and from the FRAGILE line below passes too. Either edit makes a non-strict judge-wording run exit 1 on an errored condition or a fragile variant and breaks pipelines that rely on the report-only default.
This predates the PR for the FRAGILE line and for the JUDGE-DEPENDENT branch of _strict_cross_judge_exit (if any(...) replaced by if False: also passes all 135), but the PR moved or extended both.
Suggestion: in test_judge_wording_strict_exits_1_when_a_condition_scored_no_pair, run the same argv without --strict and assert exit 0 with the NOT MEASURED line printed. Add a cross-judge --strict case with a JUDGE-DEPENDENT arm that expects exit 1, and the same run without --strict that expects 0.
There was a problem hiding this comment.
Fixed in 1983d7d: tests in test_judge_not_measured.py. The errored-condition judge-wording run without --strict exits 0 and prints NOT MEASURED; test_judge_wording_fragile_variant_exits_1_only_with_strict pins the FRAGILE line to --strict; test_cross_judge_judge_dependent_exits_1_only_with_strict covers the JUDGE-DEPENDENT branch (0 without, 1 with --strict).
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Merge with intel/main in 55d2d08 (one conflict in the |
…; pin --strict on judge-wording and cross-judge exits Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Summary
Some gates read an empty or all-errored result as a pass. Each one now exits 1 with an
incompleteline and the counts. The fix reuses the existing "not measured" andincompleteterms. Partial errors are reported as counts, and no threshold changes.The checks are in
repos/workspace.load_tasks(no task),commands/repo_run(tasks check and run),eval/judge_wording.WordingReport.summary(unmeasured_conditions,measured,n_errors),eval/cross_judge.label(NOT MEASUREDwhen no voting row hasn > 0) andcommands/run.cmd_run.Not fixed here: report-only sites that print a reassuring line on empty input but set no exit code. They are follow-ups:
baseline compareprints "No notable changes" on empty or unscored input.compare(snapshots) prints "No regressions" on 0 docs.tasks runexits 0 when every cell errored.runraises a KeyError when a discovered doc fails to load.Evidence
Each fixed site has one test that feeds empty and all-errored (or all-unsupported) input. All of them fail with the source changes stashed and pass now:
tests/test_repo_host.py::test_tasks_check_with_no_task_checked_is_not_a_pass: no task, and every task unsupported with--allow-unsupported.tests/test_repo_host.py::test_a_run_with_no_cell_result_is_not_a_pass: no task (IndexError on main), and every cell unsupported.tests/test_judge_reliability.py::test_judge_wording_strict_exits_1_when_a_condition_scored_no_pair: 0 pairs, and 4 pairs that all errored.tests/test_judge_reliability.py::test_cross_judge_strict_exits_1_when_no_arm_was_measured: a judge whose every call errors, and an arms file with no scored treatment arm.tests/test_gate_call_sites.py::test_strict_exit_1_when_no_document_was_measured: 0 docs with the hard gate at 0, and with no gate.I updated two existing tests that ran only unsupported cells or tasks. Those runs now exit 1, so the tests expect
SystemExit. One assertion on the summary line now includes the unsupported count.Local checks:
ruff check .clean andmypyclean (222 files). The import-architecture test andaudit_test_quality.pypass. The docs review triggers report no stale page, and the changelog fragment check passes. The CLI surface diff is empty: only help text changed. Changed-line coverage is 96%. The one uncovered line is the existing FRAGILE exit, which moved.Merge Danger
Door: two-way. Every change is an exit code or a label added for input that measured nothing, and reverting it restores the old behaviour.
Blast Radius: gates
repo tasks check --allow-unsupportedorrepo runon a host where every task or cell is unsupported now fails. Before, it passed with nothing checked.eval cross-judgegains a label,NOT MEASURED. Thecross_judge.v0JSONlabelfield can now hold it, so readers that switch on the label need a case for it.eval judge-wordingJSONsummarygains three optional keys:n_errors,unmeasured_conditionsandmeasured. The existing keys are unchanged.repo runsummary line now reads…, N not started (batch budget), M unsupported; $X. Any scraper of that line needs updating.eval cross-judge --require-validated --strictwith no passing validity report wasNO DETECTABLE EFFECTand exit 0; it is nowNOT MEASUREDand exit 1.eval judge-wordingno longer lists a variant asfragile(report text and JSON) when a condition scored no pair;--strictstill exits 1 for the unmeasured condition.run --strictover a tree with no markdown underdocs/now exits 1.Checklist
pytestpassesruff,mypy, and schema checks pass.github/.licenserc.yaml)🤖 Generated with Claude Code