The repository-docs checks format paths with the platform separator, so their own tests fail on Windows

Open
#429 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@Luckyou-d is already working on this.

Since Nov 24, 2026.

  • #430 by @Luckyou-d — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
20/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

The two messages are built in check_document_reviews (the document.relative_to(root) path, around line 38) and check_document_links (the Broken link: f-string, around line 234) in the repository-docs checker that tests/test_repository_docs.py exercises. Run that test file on Windows to see the backslash paths in the failing regex matches. Done means .as_posix() is applied to both relative paths and the suite passes on Windows. PR #430 is already open against this issue, so review or test it rather than starting a second fix.

Written by the indexing model from the issue text.

Description

Problem

tests/test_repository_docs.py is red on Windows (8 of 29), because the checkers build their messages from a Path while their own assertions match repository-style paths:

E  AssertionError: Regex pattern did not match.
E    Expected regex: 'examples/demo/guide\.md'
E    Actual message: 'examples\demo\guide.md: missing leading knowledge metadata with last_checked'

Two places do it:

  • check_document_reviews -> path = document.relative_to(root) (line ~38) and uses it in every message
  • check_document_links -> f"Broken link: {document.relative_to(root)}:{number}: {destination}" (line ~234)

On POSIX the two render identically, which is why CI does not see it.

Expected

The message reads as a repository path on every platform, so pytest tests/test_repository_docs.py is green on Windows as it is on Linux - a contributor running the suite there should not have to wonder whether the failure is theirs.

Fix

.as_posix() on the two relative paths. PR to follow.

Dominant language
Python
Stars
90
Forks
47
Avg merge
3d 23h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/graphon

All issues in langgenius/graphon

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.