Skip to content

[Medium] publish.yml publishes crates with no test gate and risks index race #7

Description

@Kingvic300

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

  1. 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).
  2. 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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingpriority:mediumNormal priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions