Skip to content

docs/models.md: drop the stale second copy of the effect-record section - #4855

Open
paratustra wants to merge 1 commit into
ItsNotRexed:mainfrom
paratustra:docs-models-drop-stale-copy
Open

paratustra wants to merge 1 commit into
ItsNotRexed:mainfrom
paratustra:docs-models-drop-stale-copy

Conversation

@paratustra

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new docs item (claim in #4816, no ID yet)

What and why

docs/models.md had the "Material shader hashes and the carved programs" section twice. On main af70fc7, lines 537-621 were repeated at 622-691, in three identical runs of 16, 45 and 6 lines. The second copy is the older wording:

first copy (kept) second copy (removed)
the u32 after an effect's name its formula, "reproduced from the record's fields" (@jeremygold02) "u32 whose meaning is not known"
the open-questions bullet "how the runtime uses it is still unknown" "What it means is still unknown"

So a reader, or an agent reading the docs before the code, saw the question as answered, then as open again a page later. The copy came back when #2519 was merged a second time (749a125, then 266a33b). The pattern behind it, PRs merged more than once, is reported for the maintainers in #4816.

Change: delete lines 622-691, the stale copy. Only two non-blank lines existed solely in the removed copy, and they are exactly the two older sentences in the table. Nothing current is lost.

Tested

macOS, Python 3.15.2, docs only, no game files.

  • A scan for repeated runs of 5 or more consecutive lines in docs/models.md finds 3 runs on main and 0 here.
  • | stock rim | (a row of the repeated table) now appears once, not twice.
  • Every tests/test_docs_*.py passes. git diff --check is clean.
  • Not overlapping: docs: lines merges left twice, two wrong test counts; test_docs_repeated_lines #4490 removes other doubled lines in this file (its hunk is near the end of the file), and no other open PR touching docs/models.md edits this section.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Docs cleanup only.)

AI-assisted (Claude Code).

@DenRakEiw

Copy link
Copy Markdown
Contributor

Trial-merged head 916e9c4ebcb8aa30da3052a18968e457c802cb38 onto origin/main cleanly with git diff --cached --check passing (Windows 11, Python 3.12.10).

  • python -I -m pytest tests/test_docs_links.py tests/test_docs_table_rows.py: 8 passed (6 in test_docs_links.py, 2 in test_docs_table_rows.py).
  • Code read: Removes the stale duplicate 70-line copy of the shaders.rpf effect-record section in docs/models.md, keeping the first copy that includes the derived formula for the post-name u32.

AI-assisted review (Gemini 4 Neon).

@tupacfan04

Copy link
Copy Markdown
Contributor

VERIFIED GOOD. The duplicate at docs/models.md:622-691 on main is removed; the kept copy at :537-621 is the newer one. A line-set diff shows only two unique non-blank lines lost, both older sentences ("u32 whose meaning is not known", "What it means is still unknown"), and the longest repeated block goes from 46 lines to 0.

32 docs tests pass, git diff --check and merge-tree clean. No test detects the original duplication, so main is the effective negative control.

Nit: the body's "three runs of 16, 45, 6" is one 46-line run by my measure; immaterial.

Approve. AI-assisted review, docs only.

@kapitche

kapitche commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Tested 916e9c4 merged with main 3faac55 on Linux (WSL2, Ubuntu), CPython 3.12.16, -I, CPU only: pass.

Docs only (docs/models.md, -70 lines). tests/test_docs_*.py: 10 files, 30 tests run, 30 passed, 0 failed. On main the section ("So a material leads to its effect" through "Until both are settled") appears twice (lines 537-621 and 622-691); after the PR once. The removed copy is the older one: a diff of the two shows the kept copy additionally has the u32 size formula and the updated "Two things are still open" bullet, and the rest is word for word the same. The three-record table ("windshield wiper mask") now occurs once.

Negative control: not applicable to a docs removal; the docs tests also pass with the file from main.

@memorypressure

Copy link
Copy Markdown

Verified against main 3faac55: the effect-record passage really does appear twice on current main (verified: 2 occurrences in docs/models.md) and exactly once after this change — the retained copy is the one wired to the surrounding tables. All docs guards pass. This branch reports no CI checks. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Main's two copies are now identical (a merge left the passage twice), so
this deletes the second one; no line is lost.
@paratustra
paratustra force-pushed the docs-models-drop-stale-copy branch from 916e9c4 to e81814b Compare November 23, 2026 14:28
@paratustra

Copy link
Copy Markdown
Contributor Author

Rebuilt on main 1cc6e3c1 (head e81814b9): after later edits, main's two copies of the passage are now identical (docs/models.md:568-651 = :653-736), so this now deletes the second copy plus the blank line before it, 85 lines, with nothing lost. tests/test_docs_*.py pass, git diff --check clean, one copy left.

Note for whoever merges: #5598 is the same diff, byte for byte. Merge either and close the other. #5483 removes only 12 of the 85 lines.

AI-assisted (Claude Code).

@kapitche

Copy link
Copy Markdown
Contributor

Tested e81814b merged with main 8575d36 on Linux (WSL2), CPython 3.12.16: pass
Merge is clean; the PR only deletes 85 lines of docs/models.md. I diffed the removed block against the first copy on the merged tree (lines 568-652 vs 653-737 of the pre-PR file): byte-identical, and the section still appears once after the PR.
Ran all tests/test_docs_*.py with -I: all OK except test_docs_cli_flags.py and test_docs_links.py (1 failure each), which fail identically on main without this PR, so they are not caused by it.
Negative control: restoring docs/models.md to main gives the same results, so no test here discriminates the duplicate (test_docs_repeated_lines.py passes either way).
Same fix is also in the newer open PRs #5598 and #5483.

@sds-228 sds-228 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.

Re-reviewed at the current head. The duplicate effect-record passage is removed and the retained copy is the current one. Simulating the merge onto current main applies cleanly, keeps the newer placement section and leaves one copy of the passage; the repeated-line scan drops to zero for this file. Docs only, no game data added; no-game-data check clean.

Overlap to note at merge time: #5598 carries a byte-identical patch and #5483 removes only part of the block. Merge one and close the others.

AI-assisted (OpenCode).

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.

6 participants