Repository navigation
v27 A1: a test file leaves the test count only when its condition is established, and every file v27 removes is named - #621
Conversation
…; seven over-matches; conftest.py leaves test_to_source_ratio unmoved Item A: v27's A1 note and evidence name each file the conftest, run-wide skip or every-test-skipped rule rates hollow, with the rule, bounded by the note length. Item B: adversarial fixtures per rule; seven over-matched before this change (python_files collecting conftest.py, a hook with no items parameter, a clear refilled by a helper, a skip inside a pytestmark parametrize (plain and in a list), python_functions, -p no:skipping). Item C: test_to_source_ratio is v17's for a conftest.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rule claims where its condition is not read; conftest.py leaves test_to_source_ratio unmoved Item A: under witan-rubric-v27 A1's note and evidence name each file the conftest, run-wide skip or every-test-skipped rule rates hollow, with the rule (the hook's or pytestmark's file for a run-wide skip), the note bounded by its 1000-character limit with the unlisted count, the evidence by eight. Item B: seven over-matches fixed. A conftest.py is not excluded where python_files is set; the Python per-test reader makes no claim where python_functions or python_classes is set; no skip mark is read as applied where no:skipping appears (pytest configuration files and CI workflows); a hook without an items parameter is not read; a clear is not read where the hook hands the list itself to other code; a skip inside another mark's arguments in pytestmark is not a module skip. Item C: test_to_source_ratio is measured over v17's test list under v27 too: a conftest.py is test surface. Where conftest.py files are the only test-shaped files the note says so. The declaration in rubric-version.ts says the same. Three v27 pins of the old ratio move (v27 only), and the no-rise harness reads the conftest-only premise from A1's evidence instead of a v27 ratio of 0. v17 and every other rubric: unchanged (every change is behind the v27 gate or a default argument). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-hollow list still names its first file; stage the lesson seed The base note now leaves room for the rated-hollow sentence with its first file named whole, shortening the unresolved-coverage note through its own machinery; only where even one path cannot fit is the list counted alone. Test: four 200-character unresolved workflows beside 30 skipped files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ped file exists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review at head bb7b6f3This is an independent adversarial pass: 31 probe repos scored at this head, at the merge base 206074f and at current What "withhold" means here. A withheld rule falls back to v17's reading of the file: full credit, not an abstention, and no disclosure. On a hook that skips every test, A1 goes from 1.7 critical to 2.3 verified. So every withhold below is a silent credit. Blockers
Should-fix (over-matches checked against pytest; they predate this PR, which leaves them)
Nits
Holds
Follow-ups filed
Merging is the operator's call. I'd hold this PR for the two blockers. |
|
Held for the two blockers in the review; superseded by goal_cejel_v27_a1_test_count_overmatch_v2_2026-11-02, which starts from this branch. |
Goal card:
goal_cejel_v27_a1_test_count_overmatch_2026-11-01.md(propose-only; land with a merge commit).CONSTRAINTS-VERSION: 2026-08-01.5
Done: A. Name every removed file
Done: B. Find the over-matches
Done: C. Ratio consistency
Everything here is behind the v27 gate (
usesV27FalseAssuranceClosure) or a default argument. v17 and every other rubric are unchanged.A. Every file a v27 rule rates hollow is named
Under
witan-rubric-v27-prospective-2026-10-19, A1's note gets one sentence that names each file a v27 rule moved from non-hollow to hollow, with the rule. For example:conftest,run-wide skip: hook in <conftest.py>,run-wide skip: pytestmark in <file>,every test skipped., and N more not listed. Beside a long unresolved-coverage note, that note shortens through its own machinery so that the first named file still fits.Rated hollow under this rubric: runs no test (<rule>). Forevery test skippedthe citation is at the line of the first skip.pytestmarkskip produced no finding and no citation at all.B. Over-matches found
These are synthetic fixtures in
src/witan/__tests__/fixtures/v27-a1-removal-fixtures.ts. Before this change, v27 rated a file hollow (or a whole suite skipped) in each of these, though the condition did not hold:python_filesnamesconftest.py, so pytest collects its tests. The conftest.py was still removed and rated hollow.pytest_collection_modifyitems(session, config)takes noitemsparameter and loops over a module-levelitems = []. The whole suite was read as skipped, and A1 went critical.items.clear()and thenrestore_sorted(items, saved), a helper that puts the items back. The whole suite was read as removed, and A1 went critical.pytestmark = pytest.mark.parametrize("backend", [pytest.param("redis", marks=pytest.mark.skip), "memory"])skips one parameter only. The file was rated hollow.test_*is skipped, butpython_functions = ["test_*", "check_*"]also collects a livecheck_get. The file was rated hollow.addopts = "-p no:skipping"disables the skip marks. The file was rated hollow.Fixes:
python_files,python_functions/python_classes, orno:skipping. These are read frompytest.ini,.pytest.ini,pyproject.toml,tox.ini,setup.cfgor a CI workflow, and only where a Python test-shaped file exists.itemsparameter on itsdefline.itemsthat is not subscripted, a method call,in items, or the keyword nameitems=).pytestmarkcounts only as the value itself or as an item of the list or tuple the value opens with. A skip inside another mark's arguments does not count.Already handled before this change, kept as regression tests:
test_conftest.py,conftest_test.py,tests/conftest/test_x.py. A non-rootconftest.pythat definestest_functions under the defaultpython_filesis correctly rated hollow, and is now named.sys.platform,os.environor an option (bothif … returnandrun_all or …); askipifmarker; an autouse fixture that skips conditionally.skipif, askipifon a name, a skip inside a class, parametrize ids containing "skip".python_classesalone.describe.skipbeside a live suite;it.skipbeside a localit(helper or an imported helper;it.eachwith a case named skip.The hook regression fixtures did differ from v17 before this change, but only in
test_to_source_ratio, through their conftest.py. That difference is item C, not the hook rule.Left open (not a v27 rule): a JS file holding a
describe.skipbeside a livedescribeis rated hollow by v17'sSUITE_LEVEL_SKIP_PATTERN, under every rubric. The constraints keep v17 byte-identical and do not let v27 rise above v17, so this card cannot fix it. I tried to file alater:issue for it, but the harness needed approval forgh issue create, so the issue was not filed. It needs an issue opened by the operator.C. Ratio consistency
The only rule that can lower
test_to_source_ratiois the conftest exclusion: the other two rules touch only the non-hollow share. The operator ruled that both real-world ratio drops were wrong, so I concluded the ratio should not move for a conftest.py.rubric-version.tsnow says the same thing, and a test checks that it does.This is my reading of the ruling, and the operator can reverse it: reverting the metric line to
allTestFiles.lengthrestores the old drop.v27 pins that moved (v27 only)
false-assurance-v27.test.ts, three tests pinned v27's old conftest ratio: the ratio without the conftest, or 0. They now pin v17's ratio. The conftest-only test also pins the new note sentence.v27-no-rise.ts,lostFindingsexempted A1's "Test suite files are present" finding using "v27 ratio is 0" as a stand-in for "the only test-shaped files are conftest.py". Item C made that stand-in false. The exemption now reads the same premise from v27's A1 evidence: noDetected test filecitation, and apytest configuration (conftest.py), not a test filecitation. The exemption is no broader than before.rubric-behaviour-fingerprint.test.tspassed unchanged.Verification
pnpm run typecheckis clean.pnpm run buildsucceeds.package.jsonand no lint step in CI, so lint was not run.src/witan/__tests__/v27-a1-removals.test.ts(85 tests) failed first. The red commite7b1e4f86had 25 failing, then the fix made them pass.pnpm exec vitest run) onbb7b6f3f8: 6165 passed, 1 skipped, 2 failed. Neither failure touches A1:src/__tests__/maeve-lesson-delivery.test.ts: a seed already on main,PENDING_cejel_name_the_repo_on_external_commits_in_preregistrations_2026-10-23.json, is 8 days old against the 7-day bound. That is the courier-stopped condition, and it needs a manual harvest.src/witan/__tests__/ingest.test.ts("rejects a non-regular explicit ingest candidate"): on this hosttmpdir()is/tmp, a symlink, so the scan refuses with "symlinked ingest directory" before the non-regular check runs. It is host-specific.Lesson
Staged as
docs/orchestration/maeve-unanchored-lessons/PENDING_cejel_a-rule-that-removes-from-a-count-must-name-what-it-removed_2026-11-01.json(the pre-commit validator accepted it). A rule that removes items from a count cannot be checked until it names what it removed. A rule that reads a tool's default must withhold wherever the repository may set that default.No
testsmember: this repository has no turbo pipeline and noci-full.ymlJUnit record, and its one package's suite is the full suite, so no matching record exists to declare.🤖 Generated with Claude Code