From 82dc09abce9491832cdda0077d46ccab9fdcef0e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:04:51 +0000 Subject: [PATCH 1/2] Initial plan From d2e143160b15682da8f5b2211c755ebb120c69f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:08:20 +0000 Subject: [PATCH 2/2] Fix: scope sed package-name normalization to [package] section only The global sed substitution in the "Normalize crate package name" step was replacing every `name = "helios"` line in rs/helios/Cargo.toml, including the [lib] target name. Since the [package] name is already `vrillabs-helios`, the only line still matching was `[lib] name = "helios"`, which was wrongly renamed to `vrillabs-helios`. Per the official Cargo reference (cargo-targets.html): "library target names cannot contain hyphens" Cargo rejects the mangled manifest with that error, causing cargo set-version / cargo metadata to fail. Fix: use a sed address range (/^\[package\]/,/^\[/) to restrict the substitution to the [package] section, leaving the [lib] name (a valid Rust identifier) untouched. --- .github/workflows/publish-crate.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-crate.yml b/.github/workflows/publish-crate.yml index 4328486..c3497bc 100644 --- a/.github/workflows/publish-crate.yml +++ b/.github/workflows/publish-crate.yml @@ -60,8 +60,17 @@ jobs: # "helios" to "vrillabs-helios". Patch it in-place so all cargo commands # below can use the canonical crates.io name unconditionally. This change # is ephemeral and is never committed or pushed. + # + # The substitution is intentionally scoped to the [package] section via a + # sed address range (/^\[package\]/,/^\[/). This prevents the pattern from + # also matching the `name` field under [lib], which must remain "helios" + # (an unqualified Rust identifier). Per the official Cargo reference: + # https://doc.rust-lang.org/cargo/reference/cargo-targets.html + # "library target names cannot contain hyphens" — Cargo rejects any [lib] + # name that is not a valid Rust identifier, so "vrillabs-helios" is illegal + # there even though it is a valid [package] name on crates.io. run: | - sed -i 's/^name = "helios"$/name = "vrillabs-helios"/' rs/helios/Cargo.toml + sed -i '/^\[package\]/,/^\[/{s/^name = "helios"$/name = "vrillabs-helios"/}' rs/helios/Cargo.toml - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable