fix(ci): stop sync-from-npm racing tar against grep -q - #1
Open
wangqianqianjun wants to merge 1 commit into
Open
wangqianqianjun wants to merge 1 commit into
wangqianqianjun wants to merge 1 commit into
Conversation
Background: `gh workflow run sync-from-npm.yml -f version=0.5.0` failed twice in a row with `tar: stdout: write error` on the guard step, blocking the @magic-art/cli@0.5.0 mirror + ClawHub publish. Solution: the guard piped `tar -tzf <tarball>` into `grep -q`. grep exits at the first match; if tar still has entries to write it gets EPIPE and exits non-zero, and `set -o pipefail` propagates that as a step failure. It is a race, which is why the same line passed for every earlier release and then failed on both 0.5.0 attempts. Write the listing to a file and grep the file, so tar always runs to completion. Verified against the real 0.5.0 tarball locally: guard passes, 41 entries listed. Affected Files: .github/workflows/sync-from-npm.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Background
gh workflow run sync-from-npm.yml -R FutrixDev/magic-art-skill -f version=0.5.0failed twice in a row (runs 34344335720, both attempts) with:This blocks mirroring
@magic-art/cli@0.5.0(already published to npm) intoskills/magic-art, thev0.5.0tag, and the ClawHub publish.Solution
The guard step was:
grep -qexits as soon as it matches. Iftarstill has entries to write it gets EPIPE and exits non-zero, andset -o pipefailturns that into a failed step. Whether tar loses the race depends on scheduling — which is why this exact line passed for every earlier release and then failed deterministically on the runner for 0.5.0.Fix: list to a file, then grep the file, so tar always runs to completion. The guard's intent (fail loudly if the tarball has no
skill/SKILL.md) is unchanged.Verified locally against the real published 0.5.0 tarball: guard passes, 41 entries listed.
Affected Files
.github/workflows/sync-from-npm.yml— guard step only🤖 Generated with Claude Code