Skip to content

fix(ci): correct workspace member parsing and relay rustfmt violation#177

Open
afbase wants to merge 3 commits intomainfrom
fix/workspace-members-toml-parsing
Open

fix(ci): correct workspace member parsing and relay rustfmt violation#177
afbase wants to merge 3 commits intomainfrom
fix/workspace-members-toml-parsing

Conversation

@afbase
Copy link
Copy Markdown
Collaborator

@afbase afbase commented Apr 11, 2026

Summary

Fixes two independent CI failures exposed by PR #170.

1. check job — empty package name (determine-workspace-members.sh)

The sed range used to extract workspace members:

sed -n '/\[workspace\]/,/\[/p' Cargo.toml

stops at the first line containing [ after [workspace], which is members = [ itself. The member names on subsequent lines are never captured, so readarray receives an empty string and produces WORKSPACE_MEMBERS=("") — a one-element array of the empty string.

When .github/ changes are detected (as in PR #170 adding dependabot.yml), the script includes all "members" in the matrix, including the empty string. This causes cargo check -p (blank package name) to exit 101.

Fix: replace the broken sed range with awk that properly tracks entry into and exit from the members = [...] block, and guard readarray against an empty result.

/^\[workspace\]/ { in_workspace=1 }
in_workspace && /members[[:space:]]*=/ { in_members=1 }
in_members { print }
in_members && /\]/ { exit }

2. formatting job — rustfmt violation in rsky-relay

cargo fmt -- --check flagged a split match-arm in rsky-relay/src/server/server.rs introduced by the host-banning PR (96e4858). Collapsed to the single line rustfmt expects.

Changes

  • Other: CI / tooling fix

Checklist

  • I have tested the changes (awk output verified against the workspace Cargo.toml locally)
  • I have formatted my code correctly

🤖 Generated with Claude Code

afbase and others added 3 commits April 10, 2026 20:52
The sed range '/\[workspace\]/,/\[/' in determine-workspace-members.sh
stopped at "members = [" (which itself contains "["), so the multiline
member list was never captured. This left WORKSPACE_MEMBERS as a
one-element array of the empty string, which propagated through to the
matrix and caused `cargo check -p ` (blank package) to exit 101.

Replace the broken sed pattern with awk that tracks when it enters the
members array and exits on the closing "]". Also guard readarray against
an empty MEMBERS_LIST to prevent the empty-element array from recurring.

Separately, collapse a split match-arm pattern in rsky-relay/src/server/
server.rs that rustfmt flagged in the formatting job.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant