fix(gh-7): use POSIX character class in release.yml sed - #8
Open
oliver-cieliszak-natterbox wants to merge 1 commit into
Open
fix(gh-7): use POSIX character class in release.yml sed#8oliver-cieliszak-natterbox wants to merge 1 commit into
oliver-cieliszak-natterbox wants to merge 1 commit into
Conversation
PR #2 converted this same expression from the GNU-only \s shorthand to the POSIX [[:space:]] class, but it only touched install.sh, so release.yml kept the original form. Not a live bug - that line only runs on ubuntu-latest, where GNU sed handles the shorthand fine, and v0.9.2 through v0.11.0 all passed the version check. The cost is that BSD sed does not fail loudly on it: it silently declines to substitute and passes the whole line through, so reproducing the release gate locally on macOS reports a bogus MISMATCH. That happened for real while cutting v0.11.0. The repo now speaks one dialect of this expression instead of two. Closes #7 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛠️ Fix a finding or handle a false positive
- Auto-Fix: Run
/orca-pr-scan-fixto automatically remediate or suppress PR findings. - In-Code: Suppress via inline comments or exception files (see CLI References).
- In Orca: Dismiss or snooze directly via Changing Alert Statuses.
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.
What
One expression in
.github/workflows/release.ymlmoves from the GNU-only\sshorthand to the POSIX[[:space:]]class, plus a comment explaining why.Why
PR #2 ("fix: use POSIX character class in sed for macOS compatibility") fixed exactly this pattern, but touched only
install.sh- 2 lines, 1 file. The identical expression inrelease.ymlwas left behind, so the repo carried two dialects of the same one-liner.This was not a live bug. That line only ever runs on
ubuntu-latest, where GNU sed handles\scorrectly, and v0.9.2 through v0.11.0 all passed the version check cleanly.What makes it worth fixing is how BSD sed fails: not loudly, but silently. It declines to substitute and passes the whole line through, so the check compares the tag against
version = "0.11.0" # bump on meaningful config changes; ...and reports a mismatch. Anyone reproducing the release gate locally on a Mac - reasonable, since it is the thing that can block a release - has to work out that their sed is at fault rather than their release. This happened for real while cutting v0.11.0.How
[[:space:]]is POSIX and behaves identically under GNU sed, so CI behaviour is unchanged.The comment deliberately spells out "the GNU-only shorthand" in words rather than writing the character pair, so a future
grep '\s' .github/workflows/returns zero hits instead of matching the comment that warns against it.Test Steps
This line lives in the release gate and only truly executes on a tag push, so it was verified by running the exact expression rather than by cutting a throwaway release:
0.11.00.11.0distro.toml(v0.9.0 → v0.11.0)v0.11.0v0.99.0release.ymlparses as YAML['v*'].github/workflows/Old vs new, for the record:
Other Notes
Closes #7