Skip to content

Remove tests that assert on markdown file content - #239

Merged
masenf merged 2 commits into
mainfrom
chore/remove-markdown-tests
Jul 24, 2026
Merged

Remove tests that assert on markdown file content#239
masenf merged 2 commits into
mainfrom
chore/remove-markdown-tests

Conversation

@Alek99

@Alek99 Alek99 commented Jul 24, 2026

Copy link
Copy Markdown
Member

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 and make shortcuts. That turned main itself 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

  • Delete tests/test_docs_examples.py wholesale — all 25 tests read a repo .md file (README/API/spec prose and executable code fences).
  • Strip only the markdown-reading functions from mixed suites, keeping their non-markdown coverage:
    • test_verify_local.py — drop the 10 test_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, 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).
  • Update the gate runners so they stop referencing the deleted file: scripts/verify_local.py (examples / security_export gates) and the REQUIRED_FILES sdist manifest in scripts/verify_sdist.py.

Synthetic-fixture tests that write their own tmp_path markdown 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

  • Full suite: 2107 passed, 69 skipped, 0 failed (previously 20 failed on this base).
  • verify_local.py gates security_export, claim_guardrails, benchmark_harness, api_surface all pass; examples gate now resolves to test_example_apps.py only.
  • ruff check + ruff format --check clean 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.

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-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes tests and gate references that asserted on repository markdown content. The main changes are:

  • Deleted tests/test_docs_examples.py.
  • Removed markdown-reading assertions from mixed test suites.
  • Updated verify_local gate selections after deleting the docs examples suite.
  • Removed the deleted test file from the sdist required-file manifest.

Confidence Score: 4/5

The 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. scripts/verify_sdist.py still checks exact markdown markers, so docs wording changes can still break release verification.

scripts/verify_sdist.py; tests/test_verify_sdist.py

T-Rex T-Rex Logs

What T-Rex did

  • I reproduced the Markdown coupling check by running a generated repro harness that builds a real sdist, edits the packaged spec/api/api-examples.md prose marker from Chart Family Quick Reference to Chart Family Overview, and then repacks it and runs verify_sdist, which failed because spec/api/api-examples.md was missing the expected marker Chart Family Quick Reference.
  • After updating the verification workflow, the local run completed successfully: the verify_local gate reported OK: 5 check(s) passed, Ruff lint and Ruff format checks also passed, and the gate list included the examples example-app checks.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
scripts/verify_local.py Removes the deleted docs example suite from the examples and security_export local gates.
scripts/verify_sdist.py Removes the deleted test file from required sdist contents, but retains markdown content assertions that still couple release verification to docs prose.
tests/test_docs_examples.py Deletes the markdown-coupled docs examples test suite.
tests/test_verify_local.py Updates verify_local expectations after removing docs example tests and drops markdown shortcut assertions.
tests/test_verify_sdist.py Removes the deleted docs example guard test, though other sdist tests continue asserting markdown content markers.
tests/test_verify_wheel.py Replaces the deleted test file in the sdist-only wheel rejection parameterization with another test file.

Comments Outside Diff (1)

  1. scripts/verify_sdist.py, line 360-368 (link)

    P1 Markdown coupling remains
    verify_sdist still reads packaged markdown and requires prose markers such as Chart Family Quick Reference, Small Business Chart, and Revenue vs pipeline. Any docs wording change that alters these strings will still fail the release/sdist gate, so this path keeps markdown content coupled to verification.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

    Artifacts

    Repro: harness that builds, edits packaged markdown prose, repacks, and invokes verify_sdist

    • Evidence file captured while the check ran.

    Repro: verifier failure output for markdown-prose-altered sdist

    • The full command output behind this check.

    Repro: excerpt of altered packaged markdown showing the prose marker replacement

    • Evidence file captured while the check ran.

    View artifacts

    T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Update verify-gate meta-tests for the re..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jul 24, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 26.36%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 101 untouched benchmarks
⏩ 1 skipped benchmark1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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.
@masenf

masenf commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

how tf did this regress a benchmark 😩 merging because my branch be red and these tests need to go!

@masenf
masenf merged commit 960e132 into main Jul 24, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants