build: replace uniq with sort -u to deduplicate directories in CI workflows - #13933
Merged
Conversation
… workflows The `uniq` command only removes adjacent duplicates, so when `git diff` output produces the same parent directory in non-adjacent positions (e.g., files in root interleaved with subdirectory files), duplicate directory entries survive. This causes test files, benchmarks, and coverage runs to execute multiple times for the same package. Replace `uniq` with `sort -u` in all affected workflow YAML files and their companion shell scripts. Additionally, add a deduplication step after merging changed directories with dependent directories in the affected tests script. Closes: stdlib-js/metr-issue-tracker#1113 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kgryte
approved these changes
Aug 5, 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.
Resolves stdlib-js/metr-issue-tracker#1113.
Description
This pull request:
uniqwithsort -uin all CI workflow YAML files and their companion shell scripts to properly deduplicate directory lists.The
uniqcommand only removes adjacent duplicates, so whengit diffoutput produces the same parent directory in non-adjacent positions (e.g., files in root interleaved with subdirectory files), duplicate directory entries survive. This causes test files, benchmarks, and coverage runs to execute multiple times for the same package. For example, in this run, every test file for@stdlib/complex/float32/base/divran twice.Related Issues
This pull request has the following related issues:
run_affected_testsworkflow metr-issue-tracker#1113Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code under my direction. Claude identified the root cause by analyzing the workflow scripts and a failing CI run, and authored the
uniq→sort -ureplacements.@stdlib-js/reviewers