Skip to content

docs: lines merges left twice, two wrong test counts; test_docs_repeated_lines - #4490

Open
kapitche wants to merge 1 commit into
ItsNotRexed:mainfrom
kapitche:docs-leftovers-counts
Open

kapitche wants to merge 1 commit into
ItsNotRexed:mainfrom
kapitche:docs-leftovers-counts

Conversation

@kapitche

Copy link
Copy Markdown
Contributor

What was wrong (all on current main):

  • Lines left twice by merges, the older wording directly above or below the current one: docs/d3d12_vulkan.md (three places: "the one left needs buffer_store_short", with and without rdna2spirv: 8/16-bit MUBUF loads and stores (buffer_load_ubyte/ushort/d16, buffer_store_byte/short) #1864), docs/character_models.md (the fragment exporter's "25-vertex bounds cube" and its newer "flat 25-vertex / 32-triangle bounds grid"), docs/animation.md (the full export is 350,251 models in one line and 382,781 in the next; docs/models.md says 382,781 at e293917), docs/models.md (the skinned-GLB test file "runs 10" and "runs 15" tests), docs/design.md (the "No-op SOPP/SMEM" contract row three times, with different op lists).
  • docs/models.md kept an older paragraph saying a material does not lead to the draw programs and the VS/PS table is "presumably in the executable", directly above the newer one that says they are reachable through the effect records.
  • Test counts the code does not have: python -I tests/test_skinned_glb.py prints Ran 19 tests (docs said 10 and 15); python -I tests/test_first_light.py prints Ran 19 tests ... OK (skipped=4) (docs/first_light.md said 14 tests, 11 passed, 3 skipped; the fourth skip is test_harness_rejects_wrapped_tsharp_va_overflow, which needs a built vk_harness).

Fix: keep the current line of each pair (the later commit, or the one that agrees with the code), delete the other, correct the counts. New tests/test_docs_repeated_lines.py fails when two prose lines within 3 lines of each other begin with the same 40 characters (list items, table rows, headings and code fences are left to test_docs_list_items.py / test_docs_table_rows.py).

Not touched, to stay clear of open PRs: the repeated milestone table rows in docs/d3d12_vulkan.md (#3634), seven repeated design rows (#3637), the duplicated section in docs/testing.md and the repeated table in docs/embedded_shaders.md (#3857), the README "four fallback flags" sentence (#3154).

Tested on Linux, Python 3.12.16: all eight tests/test_docs_*.py pass; test_first_light.py and test_skinned_glb.py run as quoted above. Negative control: with the four doc files taken back from upstream/main, test_docs_repeated_lines.py fails and names docs/animation.md:960 and :961; docs/character_models.md:15 and :18; docs/d3d12_vulkan.md:2745 and :2747; docs/d3d12_vulkan.md:2758 and :2759; docs/d3d12_vulkan.md:3259 and :3260; docs/models.md:650 and :651. The checker's own unit test shows a flagged pair, a pair four lines apart, list items, table rows, a code fence and short lines that are not flagged.

AI-assisted.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 405458fb on Windows 11: test_docs_repeated_lines.py 2 OK, test_docs_links.py 6 OK, test_docs_design_rows.py 2 OK; git diff --check clean.

The duplicate lines left by earlier merges are removed across six docs, and the new guard test checks for repeated lines. No blocking issue.

@mrbean56

Copy link
Copy Markdown

Tested 405458fb6d on Linux (Debian 13), Python 3.13.5: pass.

  • pytest tests/test_docs_repeated_lines.py tests/test_docs_links.py -q: 8 passed.
  • Negative control: restoring docs/ from main while keeping the new test makes it fail on exactly the six pairs the PR removes — docs/animation.md:960/961, docs/character_models.md:15/18, docs/d3d12_vulkan.md:2745/2747, :2758/2759, :3259/3260, docs/models.md:650/651.
  • The docs/models.md edit is a real merge repeat, not lost content: "So a material leads to its effect" occurs twice on main and once after the PR.
  • The corrected count checks out: python -I tests/test_first_light.py -v runs 19 tests, 15 passed and 4 skipped, which is what the new line says.
  • The new checker's exemptions match the existing split (test_docs_list_items.py owns list items, test_docs_table_rows.py table rows, code fences skipped), and it passes over the whole tree, so no false positive today. The git ls-files fallback covers a run outside a checkout.

No GPU, no game data. AI-assisted.

@Atomic258

Copy link
Copy Markdown

Tested 405458fb on Linux, Python 3.10, CPU only, no game files: pass.

  • python -I tests/test_docs_repeated_lines.py → 2/2 pass; on main it fails, listing exactly the six duplicated lines the PR merges (animation.md:960/961, character_models.md:15/18, d3d12_vulkan.md:2745/2747, 2758/2759, 3259/3260, models.md:650/651).
  • The corrected first_light.md count is right: python -I tests/test_first_light.py -v here runs 19 tests, 15 passed and 4 skipped (3 LEONIDA_FIRST_LIGHT_DIR-gated + the vk_harness one), matching the new wording.
  • The model-count corrections (350,251 → 382,781 at e293917) match docs/design.md.
  • git diff --check and check_no_game_data.py clean.

AI-assisted (Devin).

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.

4 participants