Remove tests that assert on markdown file content - #239
Conversation
CI was coupled to prose in README.md, CONTRIBUTING.md, SECURITY.md, and the spec/docs markdown trees: a docs refresh (#230) that reworded the README turned every downstream branch red without any code change. Drop the markdown-content tests so doc edits can no longer break CI. - Delete tests/test_docs_examples.py wholesale (every test read a repo .md file — README/API/spec prose and executable code fences). - Strip the markdown-reading test functions from the mixed suites, keeping their non-markdown coverage: - test_verify_local.py: drop the 10 'docs name <shortcut>' tests and the README/CONTRIBUTING assertion in the setup test (the Makefile setup-recipe check stays); remove the now-unused SPEC_DOCS constant. - test_benchmark_environment.py: drop the benchmarks/README.md runbook reads, keeping the pyproject/CI/script assertions. - test_claim_guardrails.py: drop the two tests that scan the real repo docs; the 12 synthetic-fixture scanner tests stay. - test_lod.py / test_check_regressions.py / test_static_client_security.py / test_type_surface.py: drop the single doc-content test/assertion in each (plus a now-unused import). - Update the verify_local.py 'examples'/'security_export' gates and the verify_sdist.py REQUIRED_FILES manifest to stop referencing the deleted file. Synthetic-fixture tests that write their own tmp_path markdown to exercise script logic are kept: they are not coupled to repo docs.
Greptile SummaryThis PR removes tests and gate references that asserted on repository markdown content. The main changes are:
Confidence Score: 4/5The PR is close, but one markdown-content verification path still needs to be fixed before merging. Most changes are straightforward test removals and gate updates.
What T-Rex did
Important Files Changed
|
Merging this PR will degrade performance by 26.36%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_select_lasso_message_1m |
88.9 ms | 120.7 ms | -26.36% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing chore/remove-markdown-tests (5c203bb) with main (3377a3f)
Footnotes
-
1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩
The markdown-test removal dropped tests/test_docs_examples.py and the verify_local.py/verify_sdist.py references to it, but three meta-tests still asserted the old gate/manifest shape and turned CI red: - test_example_checks_are_known_as_targeted_gate: the examples gate now runs only test_example_apps.py. - test_dry_run_includes_examples_gate: drop the test_docs_examples.py dry-run assertion. - test_verify_sdist_rejects_missing_docs_example_guard: obsolete once the file left REQUIRED_FILES; the example-app guard already covers sdist test inclusion. Removed. Also repoint the wheel sdist-only-files parametrization from the deleted test_docs_examples.py to an existing tests/ path (behavior unchanged; it matches on the tests/ prefix). Full suite: 2106 passed, 0 failed.
|
how tf did this regress a benchmark 😩 merging because my branch be red and these tests need to go! |
What
Remove every test that asserts on the content of a markdown file, so documentation edits can no longer break CI.
The trigger: #230 ("Refresh README for adoption") reworded
README.md, and a set of tests still assert on the old prose andmakeshortcuts. That turnedmainitself red (and every branch cut from it) with no code change — see #236 for the same diagnosis. Rather than re-couple the tests to the new wording, this drops the markdown-content coupling entirely.Changes
tests/test_docs_examples.pywholesale — all 25 tests read a repo.mdfile (README/API/spec prose and executable code fences).test_verify_local.py— drop the 10test_docs_name_*_shortcuttests and the README/CONTRIBUTING assertion in the setup test (the Makefile setup-recipe check stays); remove the now-unusedSPEC_DOCSconstant.test_benchmark_environment.py— drop thebenchmarks/README.mdrunbook reads, keep the pyproject/CI/script assertions.test_claim_guardrails.py— drop the 2 tests that scan the real repo docs; the 12 synthetic-fixture scanner tests stay.test_lod.py,test_check_regressions.py,test_static_client_security.py,test_type_surface.py— drop the single doc-content test/assertion in each (plus one now-unused import).scripts/verify_local.py(examples/security_exportgates) and theREQUIRED_FILESsdist manifest inscripts/verify_sdist.py.Synthetic-fixture tests that write their own
tmp_pathmarkdown to exercise script logic (test_python_floor.py,test_check_release_version.py, and the kept claim-guardrail tests) are not coupled to repo docs, so they stay.Verification
verify_local.pygatessecurity_export,claim_guardrails,benchmark_harness,api_surfaceall pass;examplesgate now resolves totest_example_apps.pyonly.ruff check+ruff format --checkclean on all touched files.Relation to #236
#236 ("Decouple CI tests from README") fixes the same breakage by rewording the tests to survive doc churn. This PR takes the stronger stance requested — no tests that read markdown at all — and supersedes it. If this merges, #236 can be closed.