You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ce69f8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pipeline): resolve nav entries to real files before reading or writing them
A gap's `path` is a docs.json nav entry. Nav entries carry no file extension,
and a page can share its name with the directory holding its children
(docs/resources/breaking-changes-change-notices is both a page and that
folder). generate.py used those paths as filesystem paths, which broke every
page-editing gap in three different ways:
- Directory collision: open() got the directory and raised
"[Errno 21] Is a directory", recorded as a generation error (PR #447).
- Otherwise load_file() swallowed FileNotFoundError and returned "", so the
model was told to expand a page whose current content was empty and wrote a
replacement from scratch. Existing content would have been discarded.
- The output path had no extension, so the draft was named `docs--a--b` and
promote.py, which collects only *.mdx, dropped it silently. The page was
reported as generated but never shipped -- which is why PR #447 lists an
expanded page that isn't in its diff.
So thin_page, missing_code_examples and missing_description have never
produced a shipped page.
- detect_gaps.page_file() is now the one way to turn a nav entry into a file,
using is_file() so a directory can never masquerade as the page.
- generate.load_existing_page() raises rather than returning nothing, so a
failed read can't become "write this page from scratch".
- determine_output_path() and apply_description() resolve through page_file(),
so drafts keep their .mdx and promote picks them up. This also makes
open-PR path matching work for these gaps, since PR file lists carry
extensions.
Also stops flagging hub pages as thin. breaking-changes-change-notices is
short because its content is on its child pages; padding it out is the wrong
fix, so pages with children are exempt.
The Anthropic SDK is now imported lazily, so gap detection, --dry-run and the
tests run without it. CI installs only pyyaml for the pipeline tests.
Tests: pipeline/test_gap_paths.py (17), against a temp docs tree.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments