Repository navigation
fix: bundle skills inside the published crate so cargo publish succeeds - #18
Merged
Merged
Conversation
`cargo publish` builds from a tarball containing only the crate directory, so
`include_str!("../../../../skills/...")` escaped the package root: agentspec
built fine locally and in CI, then failed to compile from its own tarball,
taking down the v0.14.0 crates.io publish after the tag and GitHub release had
already been cut.
Move the bundled skills from the workspace root to crates/agentspec/skills/ so
they ship inside the package, and point the include_str! paths at them.
Add a Package CI job running `cargo publish --dry-run --locked` on every PR.
Nothing in `just check` built the crate the way the release does, which is why
this passed review; the Integration job now gates on it. A unit test also
pins the skills to the crate directory so the paths cannot drift back.
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.
Fixes the failed v0.14.0 release run.
What broke
cargo publishbuilds from a tarball containing only the crate directory.bootstrap.rsusedinclude_str!("../../../../skills/..."), reaching up to the workspace root — fine locally and in CI, absent from the tarball:The merge itself was fine. Tag
v0.14.0, the GitHub release, and all four binaries were published; only the crates.io step failed, so agentspec 0.14.0 is not on crates.io.Fix
Move the bundled skills from
skills/tocrates/agentspec/skills/so they ship inside the package, and pointinclude_str!at them. One source of truth, now inside the published crate.cargo package --listconfirms they land in the tarball:Why review missed it
Nothing in
just checkor CI built the crate the way the release does. Added a Package job runningcargo publish --dry-run --lockedon every PR, withIntegrationgated on it, plus a unit test pinning the skills to the crate directory so the paths cannot drift back.Verification
cargo publish --dry-run -p agentspec --lockednow compiles the packaged tarball clean — this is the exact check that failed in the release run.just checkpasses: 99 unit + 45 integration.Note, separate from this PR
crates.io is at 0.12.0 — 0.13.0 never published either. Worth a look independently of this fix.
🤖 Generated with Claude Code