Repository navigation
test: the docs tests read what a reader sees, and each arm can fail (#1339) - #1658
Merged
Merged
Conversation
…1339) Fixes the eleven #1339 entries in the four docs tests. Each was shown green under its defect first, then red by name after the fix. test_docs_join_clustering.py - :38 [mislabelled] The file and heading checks lose "premise:". Renaming the heading reddened "premise: the star-schema join heading is present", so a docs change reddens them (#1236). - :41 [weak] "and it names the join key as the clustering column" now needs a sentence that says to cluster ON the join key, read with HTML comments removed. "Cluster" in one sentence and "join key" in another passed, and so did the phrase inside an HTML comment. - :52 [weak] "best-practices names clustering on the join key": the same rule. With the page clustering on the timestamp, "join key" elsewhere passed. test_docs_stripe_floor.py - :90 [vacuous] "and names what lowering past it costs" reads FSST in the section that gives the advice and states the floor. Page-wide, it passed with FSST removed from that section, because the compression section names it throughout. test_docs_cross_database_query.py - :19 [weak] It reads every SQL fence tag and shell blocks, matching case-insensitively. The forbidden query passed in a ```sh psql -c block, under ```postgresql, and spelled PG_DATABASE/PG_EXTENSION. test_docs_cover_the_corpus.py - :55 [weak] A name counts only as a whole word. 22 test names are prefixes of another's, so with `test_whole_row`'s own entry removed, its `test_whole_row_var_on_off` neighbour kept the arm green. - :208 [weak] One duplicate rule, _duplicated_names, is used by the real arm and by the fixture. The fixture carried a copy, and stayed green with the real arm's rule broken (count > 2). - :278 [vacuous] "each file counted once" compares the sweep with an independent listing of the directory. It compared a dict with its own keys. With the glob narrowed to test_d*.py it now names every file it missed. - :320 [vacuous] The fixture drives the no-totals arm's predicate, totals_line_refused, and checks that it refuses a stated total. It compared two tuples both already pinned, and stayed green with the real arm reading nothing. - :407 [weak] Every "N refused" README.md states must be the counted number. "128 refused" and a second, contradicting "30 refused" both passed. - :1172 [weak] One empty-section reader, _empty_sections, serves the real arm and its control. The control carried a copy, and stayed green with the real reader counting blank lines as a body. No test function is renamed, so TESTS.md and guard_tests do not move. Check names change only in the two relabelled join-clustering premises and the :320 arm, and none has a ledger or lossy_arms row. test/docs_style.sh's arm of the same name keeps reading only ```sql blocks. #1653 rewrites that file, so its parity is a follow-up there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdatcmd
approved these changes
Oct 22, 2026
jdatcmd
left a comment
Collaborator
There was a problem hiding this comment.
Approved at 9c90c4d. I reran your :407 plant (README's "28 refused" made "128 refused" in test/pytest/README.md): main's test_docs_cover_the_corpus.py 40 passed; this head 1 failed, "README.md quotes the number of modes actually named as refused: got '128' want '28'". Clean, the four files: 46 passed in 2.93s. CI 15/15. Agreed that the shell arm's ```sql-only reading belongs with #1653.
87 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@jdatcmd This fixes my eleven open #1339 entries in the four docs tests (batch B4 of my a–m triage). Each was shown green under its defect, then fixed and shown red by name. No cluster is needed; all four files are in
NO_CLUSTER.test_docs_join_clustering.py:38[mislabelled]premise: the star-schema join heading is presentred: a docs change reddens a premise (#1236)premise:; the same plant redsthe star-schema join heading is presenttest_docs_join_clustering.py:41[weak]and it names the join key as the clustering column: got 0, wanted at least 1, both plantstest_docs_join_clustering.py:52[weak]best-practices names clustering on the join key: got 0test_docs_stripe_floor.py:90[vacuous]and names what lowering past it costs: 'fsst' is absenttest_docs_cross_database_query.py:19[weak]```shpsql -cblock; under```postgresql; spelledPG_DATABASE/PG_EXTENSIONgot 1 want 0, all threetest_docs_cover_the_corpus.py:55[weak]test_whole_row's own TESTS.md entry removed (its name is a prefix oftest_whole_row_var_on_off's)got 'test_whole_row' want 'none':208[weak]count(n) > 2_duplicated_names; the fixture reds:278[vacuous]test_d*.pyeach file counted oncepassed (dict keys against themselves):320[vacuous]totals_line_refused:got 'none' want 'refused: 9 tests in 4 files':407[weak]got '128' want '28';got '28, 30' want '28':1172[weak]_empty_sections;control … got '' want '999. planted.py'guard_testsdon't move. None of the changed check names has a ledger orlossy_arms.tsvrow.undocumented()now tokenizes the document once (whole words, plusx.pynames), so the corpus file stays around 3 s.test/docs_style.sh's arm of the same name still reads only```sqlblocks, case-sensitively. test: docs_style gains its pytest twin, and a sentence no reader sees no longer passes (#1341) #1653 rewrites that file, so I'll bring the shell arm level there rather than conflict with it.The plants and harness are in
~/pgc-tools/i1339d/on my side.🤖 Generated with Claude Code