Severity: Medium — publish.yml publishes two crates with no test gate and risks an index race
# .github/workflows/publish.yml
- run: cargo publish --package txio-api
- run: cargo publish --package txio
(.github/workflows/publish.yml).
Problems
- No verification before publishing — no
cargo build/cargo test runs first, so a tag can publish a broken release to crates.io (which is immutable; you can only yank).
- Index propagation race — the CLI (
txio) depends on txio-api (it imports txio_api). If txio's dependency on txio-api is a version dependency, publishing txio immediately after txio-api can fail because the new txio-api version may not yet be available in the registry index. Publishing also requires path deps to carry a version.
Fix
- Add
cargo test --workspace (and a dry-run cargo publish --dry-run) as a prerequisite.
- Publish
txio-api first, then wait/retry for it to be queryable before publishing txio, and ensure the inter-crate dependency declares a published version.
Migrated from Kingvic300/txio#48
Severity: Medium —
publish.ymlpublishes two crates with no test gate and risks an index race(.github/workflows/publish.yml).
Problems
cargo build/cargo testruns first, so a tag can publish a broken release to crates.io (which is immutable; you can only yank).txio) depends ontxio-api(it importstxio_api). Iftxio's dependency ontxio-apiis a version dependency, publishingtxioimmediately aftertxio-apican fail because the newtxio-apiversion may not yet be available in the registry index. Publishing also requires path deps to carry aversion.Fix
cargo test --workspace(and a dry-runcargo publish --dry-run) as a prerequisite.txio-apifirst, then wait/retry for it to be queryable before publishingtxio, and ensure the inter-crate dependency declares a publishedversion.Migrated from Kingvic300/txio#48