Repository navigation
refactor(tests): align two sync helpers with error channel; share docs page-list - #2427
Merged
Merged
Conversation
…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]>
worktrunk-bot
approved these changes
Apr 26, 2026
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up #1 from PR #2422 review:
sync_well_known_skillsandsync_llms_txtpanicked on every failure, while every other step intest_docs_are_in_syncreports 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 theif exists() then read else String::new()pattern forskill_filetounwrap_or_default()(we writeexpectedeither way), and shareddocs_content_page_namesfromconvert_console_blocks_in_docsso 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.