Skip to content

chore: catch an edit made in only one of the two copies - #104

Merged
SebConejo merged 1 commit into
mainfrom
chore/twin-guard
Sep 21, 2026
Merged

SebConejo merged 1 commit into
mainfrom
chore/twin-guard

Conversation

@SebConejo

Copy link
Copy Markdown
Member

Why

Every page exists twice: autofix.mdx at the repo root, which Mintlify publishes, and llm-gateway/docs/autofix.mdx, its dead twin. Correcting the wrong one changes nothing on the site, and nothing warns you.

Deleting either set takes the whole site down, so the duplication stays for now. This guards against the trap it creates.

What changed

  • scripts/check-coherence.mjs compares the twins. It fails when they differ, when a page has no twin, and when a twin has no published root copy.
  • A GitHub Action runs the check on every pull request and on every push to main. It is not a scheduled job: it blocks the mistake when it is made.
  • CLAUDE.md states which of the two files is published.

Check

GREEN on the current tree, 98 pages. Verified it turns RED on a one-sided edit and on a page added without its twin.

Every page exists twice, and Mintlify publishes the root copy, so a
correction made under llm-gateway/docs/ alone changes nothing on the site
and nothing says so. The coherence check now compares the twins, and a
GitHub Action runs it on every pull request.
@SebConejo
SebConejo merged commit 44fdcdf into main Sep 21, 2026
2 checks passed
@SebConejo
SebConejo deleted the chore/twin-guard branch September 21, 2026 22:41
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.

1 participant