Repository navigation
test: pin checks the reviews of #157, #187, #188, #213, #246 asked for - #269
Conversation
…l#213, intel#246 asked for Each test below fails on a code change the reviews' mutation runs found no test catching. Tests only: no code changes. - intel#213 (network policy): the allowlist NO_PROXY value is asserted next to HTTPS_PROXY; a task network_mode of "Public" or "No-Network" is read case-insensitively; allowed_hosts or environment.egress given as one string is one host, not its letters. - intel#213 (SWE-bench grader): a bare status-word line is skipped by parse_pytest, parse_pytest_options and parse_pytest_v2, as it already was tested for parse_seaborn. - intel#246: _apply_correction is checked on [0.01, 0.02, 0.03], where BH (0.03, 0.03, 0.03) and Holm (0.03, 0.04, 0.04) differ. - intel#157: a read that only the second guidance glob matches counts as guidance, and an agent that left no trace gets no "process metrics failed" line in trace_errors. - intel#188: a cached usage with "model": null is a cache miss. - intel#187: the dry run prints the skipped-factor lines in --factors order. Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
|
@exai-bot /review |
exai-bot
left a comment
There was a problem hiding this comment.
Note
AI-generated review of 9e5dc10f4f34, requested by @antonwolfy, using the default review skill. It can be wrong: verify a finding before acting on it. React with a thumbs up or down on a finding to tell the bot whether it helped.
Model us.anthropic.claude-sonnet-5-5, effort default, 11 of 80 turns, 0.8 of 40 minutes, 205k in / 3k out tokens.
Tests-only change that pins ten mutations the earlier reviews found uncaught: NO_PROXY under an allowlist, mode case folding, single-string host lists, the bare-status-word guard in the three pytest parsers, the BH/Holm choice, the second guidance glob, the no-trace agent, a null usage.model, and skipped-factor order. I checked each new test against the code it targets and found no defects. Where I could check the code, the tests would fail on the mutation they name. I could not run the suite here.
No issues found.
Not verified
I could not run pytest because the sandbox has no network to install it. The claims from reading the code:
- The
silentaction exists intests/repo_eval_fixture.py. runner.py:306gates_process_or_nullonevents is not None, so anif Truemutant would append the "process metrics failed" line the new test forbids.- The BH and Holm expectations are float-exact. I checked the products in Python, and
correct_familyrounds to 4 decimals anyway.
I did not run theNO_PROXYandresolveassertions againstnetwork_policy.py.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #269 +/- ##
==========================================
+ Coverage 92.83% 92.85% +0.02%
==========================================
Files 262 262
Lines 33016 33016
Branches 5510 5510
==========================================
+ Hits 30649 30656 +7
+ Misses 1571 1570 -1
+ Partials 796 790 -6 🚀 New features to boost your workflow:
|
Summary
Follow-up to the reviews of #213 (network policy, SWE-bench grader), #246 (review), #157 (review), #188 (review) and #187 (review). In each one, the reviewer's mutation run found a code change that no test catches. Each review point is a test gap, not a bug: the code is right, and nothing pins it.
On
maintoday, each of these changes to the code still passes the test files that cover it:mainproxy_env_flags:NO_PROXY/no_proxyunder an allowlist get the sidecar URL instead oflocalhost,127.0.0.1,::1test_network_policy.pypolicy(): no.lower()on the mode (either call, or both), sonetwork_mode = "Public"is refusedtest_network_policy.py_declared():allowed_hosts = "pypi.org"taken aslist(hosts), one host per lettertest_network_policy.pyresolve():egress = "huggingface.co"iterated the same way (same branch,network_policy.py:157)test_network_policy.pyparse_pytest,parse_pytest_options,parse_pytest_v2: thelen(parts)guard removed, so a bareFAILEDline raisesIndexErrortest_swebench_tasks.py_apply_correction:method="holm"whatevercorrectionsaystest_stats_correction.pyrun_process_metrics: only the firstguidance_globsentry honouredtest_repo_process_metrics.py,test_repo_run.py,test_repo_manifest.py,test_repo_builtin_graders.pyif events is not Nonereplaced byif True, so an agent that left no trace gets aprocess metrics failed (TypeError)line intrace_errors_usage_value_fits:Noneaccepted for astrfield, so{"usage": {"model": null}}replaystest_caching.pyskipped_factors: factors walked in reverse, so the dry run prints the skipped-factor lines out of--factorsordertest_tool_preference.pyChanges
tests/test_network_policy.py:test_an_allowlisted_verifier_goes_through_its_own_sidecaralso assertsNO_PROXY=localhost,127.0.0.1,::1andno_proxy=...in the verifier'sdocker exec. Newtest_a_task_network_mode_is_read_whatever_its_casechecks that"Public"(a mode) resolves topublicand"No-Network"(an alias) tonone. Newtest_a_single_host_given_as_a_string_is_one_host_not_its_letterscoversallowed_hosts = "pypi.org"andegress = "huggingface.co".tests/test_swebench_tasks.py: the bare-status-word test forparse_seabornis now parametrized overparse_seaborn,parse_pytest,parse_pytest_optionsandparse_pytest_v2. Each must skipFAILED,PASSEDandPASSEDwithout raising, and still readPASSED t.py::ffrom the same log.tests/test_stats_correction.py:test_apply_correction_uses_the_requested_methoduses[0.01, 0.02, 0.03], where the two methods differ. It is parametrized: BH gives[0.03, 0.03, 0.03]and Holm[0.03, 0.04, 0.04]. The arithmetic is in the comment.tests/test_repo_process_metrics.py: newtest_a_read_that_only_the_second_guidance_glob_matches_is_guidancechecks that.github/instructions/c.mdcounts as guidance.tests/test_repo_run.py: newtest_an_agent_that_left_no_trace_is_not_given_a_process_metrics_errorruns the fake harness'ssilentagent and checks thatprocessis null with noprocess metrics failedline intrace_errors.tests/test_caching.py:{"usage": {"model": null}}is added to the wrong-shape cases, which must be a cache miss.tests/test_tool_preference.py:test_dry_run_names_the_groups_a_factor_is_skipped_forcompares the printed skipped-factor lines as an ordered list. With--factors assertive,exclusion,long_desc,exclusioncomes beforelong_desc, unlikeFACTORS. This also replaces the twonot in outchecks.dokimi/dokimi/changes.Risk
None. Only tests change, and the package and its output are unchanged.
Testing
On a Linux review host, at
9e5dc10(onmain3a1f287):make ci-local: 28 passed, 0 failed, 7 skipped (external-catalog-smoke, which needs docker and network;test-latest,docs.yml:deployandpip-audit.yml:report, whose job conditions are false on a PR; the cli-surface "Package the result" step, which uses an expression ci-local cannot evaluate; conda-forge-deps, since micromamba is not installed; semgrep secrets, since semgrep is not installed). 9308 tests passed, 4 skipped; changed-line coverage 100% (0 lines of package code changed).test_docs_code_refs.py,test_growth_ratchet.py,test_audit_test_quality.pyandtest_import_architecture.py: 664 passed, 1 skipped.ruff checkis clean on the touched files..lower()mutant was run three ways: the alias lookup only, the fallback name only, and both. Forcingmethod="bh"was also run; it fails the Holm case here, and onmainthe existing Holm tests already catch it. The unmutated copy passes: 377 passed, 1 skipped.main3a1f287:pytest -n auto9321 passed, 4 skipped;mypyandruff check .clean.Revert
A plain revert. It removes tests only and leaves nothing behind.
Checklist
pytestpassesruff,mypy, and schema checks passAGENTS.md.github/.licenserc.yaml)