Skip to content

fix(docs): a new doc counts only if it adds a line the deleted docs lack (#1365) - #1402

Merged
devsuitup merged 1 commit into
mainfrom
fix/1365-docs-split-merge
Nov 29, 2026
Merged

devsuitup merged 1 commit into
mainfrom
fix/1365-docs-split-merge

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Closes #1365

Summary

scripts/check-docs.js compared a doc with no previous version (git D + A, not a rename) against the whole visible body of each doc deleted in the PR, so splitting one owner doc into two, or merging two into one, passed the docs gate without any new prose. A doc with no previous version now qualifies only if at least one nonempty normalized body line (front matter stripped, visible normalisation: whitespace, Unicode control and format characters removed) appears in none of the docs the PR deletes. Docs with a previous version (including renames) keep the whole-body comparison. Limit, documented: rewrapping existing words across lines can produce a qualifying line.

Tests

test/check-docs.test.js: split A+B → A, B fails; merge A, B → A+B fails; a moved doc with one new line passes; a new doc with no deleted docs still qualifies; renames unchanged; blank-only, whitespace-only, control/format-only, metadata-only and lines taken from a deleted non-owner doc do not qualify. RED before the change: 7 assertion failures (not ok 119 - … split A+B into A and B …, true !== false). Four mutations caught. 147/147 pass.

Docs

.ai/contexts/fast-check.md describes the rule and its limit.

@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Nov 29, 2026
@devsuitup
devsuitup merged commit 4d26edf into main Nov 29, 2026
15 checks passed
@devsuitup
devsuitup deleted the fix/1365-docs-split-merge branch November 29, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(docs): docs check misses split or merged docs without new prose

1 participant