Skip to content

refactor(tests): align two sync helpers with error channel; share docs page-list - #2427

Merged
max-sixty merged 1 commit into
mainfrom
docs/static-output-for-gif-pages
Apr 26, 2026
Merged

max-sixty merged 1 commit into
mainfrom
docs/static-output-for-gif-pages

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Follow-up #1 from PR #2422 review: sync_well_known_skills and sync_llms_txt panicked on every failure, while every other step in test_docs_are_in_sync reports via (Vec<String>, Vec<String>). They now use the channel so a single sync run reports all problems together.

While in the file: dropped redundant .exists() prechecks before reads, collapsed the if exists() then read else String::new() pattern for skill_file to unwrap_or_default() (we write expected either way), and shared docs_content_page_names from convert_console_blocks_in_docs so the directory walk and underscore-prefix filter live in one place.

Net diff is shorter than baseline (-3 lines). Leaf TOCTOU reads stay as one-line panics — converting them to the channel was ceremony, not improvement.

This was written by Claude Code on behalf of Maximilian

…r channel; share docs page-list helper

Both functions previously panicked on every failure; align with the
`(Vec<String>, Vec<String>)` channel that every other sync step in
`test_docs_are_in_sync` already uses, so a single sync run reports all
problems instead of bailing on the first.

While in the file: drop redundant `.exists()` prechecks in
`sync_command_pages` / `sync_skill_files` (the read that follows
already surfaces a missing file), collapse the existing
existence-then-read for `skill_file` to `unwrap_or_default()` (we'll
write `expected` either way), and share `docs_content_page_names` from
`convert_console_blocks_in_docs` so the directory walk and underscore
filter live in one place.

Net diff is shorter than baseline. Leaf TOCTOU reads stay as one-line
panics; converting them to the channel is ceremony, not improvement.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 0ccad47 into main Apr 26, 2026
25 checks passed
@max-sixty
max-sixty deleted the docs/static-output-for-gif-pages branch April 26, 2026 19:13
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.

2 participants