workspace, release: build each crate's tests from its published package #201

Merged
natsukium merged 1 commit from workspace/packaged-tests into main 2026-10-20 09:19:59 +09:00
Owner

Part of #160: every published crate's tests build from its crates.io package, and a release-time guard keeps it that way.

  • felis dev-dependencies inherit the versioned [workspace.dependencies] entries (felis-daemon gets one at the app version), so cargo package keeps them.
  • Exception: felis-client-core → felis-daemon stays path-only (felis-daemon dev-depends back; versions on both edges make cargo publish --workspace --dry-run fail). The client-core tests that serve a real daemon are behind a daemon-tests feature, turned on in the workspace by a path-only self dev-dependency that cargo package drops.
  • tools/release/crates.py check enforces the new rule; crates.py package-tests (just package-tests, in release.yml's build job, timeout 45 → 60 min) packages, extracts and cargo test --no-runs every crate against the other packages.

Verified locally: all 12 packaged suites compile and pass; un-gating one daemon test makes package-tests fail; package-tests takes ~3.5 min warm. luna review: PASS.

Part of #160: every published crate's tests build from its crates.io package, and a release-time guard keeps it that way. - felis dev-dependencies inherit the versioned `[workspace.dependencies]` entries (felis-daemon gets one at the app version), so `cargo package` keeps them. - Exception: felis-client-core → felis-daemon stays path-only (felis-daemon dev-depends back; versions on both edges make `cargo publish --workspace --dry-run` fail). The client-core tests that serve a real daemon are behind a `daemon-tests` feature, turned on in the workspace by a path-only self dev-dependency that `cargo package` drops. - `tools/release/crates.py check` enforces the new rule; `crates.py package-tests` (`just package-tests`, in `release.yml`'s build job, timeout 45 → 60 min) packages, extracts and `cargo test --no-run`s every crate against the other packages. Verified locally: all 12 packaged suites compile and pass; un-gating one daemon test makes `package-tests` fail; `package-tests` takes ~3.5 min warm. luna review: PASS.
workspace, release: build each crate's tests from its published package
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 9s
darwin / detect relevant changes (pull_request) Successful in 8s
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / darwin docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 47s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 54s
windows / cargo nextest (Windows) (pull_request) Successful in 2m42s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 2m44s
pr / nix flake check (pull_request) Successful in 1m23s
windows / frontend smoke (Windows) (pull_request) Successful in 54s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m16s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 28s
windows / cargo clippy (Windows cross) (pull_request) Successful in 16s
d7707ef225
A crates.io consumer, or a distribution that runs a crate's tests from
its tarball, gets a package whose path-only felis dev-dependencies were
dropped, so six crates' tests did not compile there. Felis
dev-dependencies now inherit the versioned [workspace.dependencies]
entries and stay in the package.

The exception is felis-client-core's dev-dependency on felis-daemon:
felis-daemon dev-depends back, and with versions on both edges neither
package can be built before the other is on crates.io. That edge stays
path-only, and the client-core tests that serve a real daemon sit behind
a daemon-tests feature, which a path-only self dev-dependency turns on
in the workspace and cargo package drops with it.

crates.py check enforces the new rule, and `just package-tests` (in the
tag's build job) compiles every package's tests from the extracted
tarballs, so a regression fails the release rather than a consumer.

Assisted-by: Claude Code
natsukium deleted branch workspace/packaged-tests 2026-10-20 09:19:59 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!201
No description provided.