ci: fix Test job failure (broken since 0.7.3) + release-process cleanup#110
Merged
Conversation
The release workflow's publish step was missing ck-tui, so it was never published to crates.io as part of a release even though ci.yaml's duplicate publish job included it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_subdirectory_search_uses_parent_ckignore and test_multiple_ckignore_files_merge_correctly use SearchMode::Semantic with threshold 0.1. Under --no-default-features (neither fastembed nor mixedbread enabled) ck-embed falls back to DummyEmbedder which returns all-zero vectors, so cosine similarity is 0 for everything and the threshold filters out every result. The tests assert results exist, so they panic. These tests are specifically about semantic search interacting with .ckignore — there's nothing meaningful to test without an embedder, so cfg-gating is the right fix. This is the actual root cause of the CI test failures on \`cargo hack test --each-feature --workspace\` since 0.7.3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two long-standing problems made every release fragile:
1. **Duplicated publish-crates jobs.** Both ci.yaml and release.yml
fired `cargo publish` on tag push. ci.yaml's gated on the test
matrix; release.yml's gated on the binary builds. Two concurrent
publishers racing for the same tag invited inconsistent state on
crates.io. Remove publish-crates from ci.yaml; release.yml is the
sole canonical publisher.
2. **Manual version bumps across 9 files via sed.** ck-cli set its own
`version`, every other crate hardcoded its sibling deps as
`version = "0.7.4"` plus path. A bump touched 9 Cargo.toml files;
if one was missed, `cargo publish` blew up partway through (which
is what left 0.7.4 partially published — only ck-core landed on
crates.io, the other 8 are stuck at 0.7.2).
Move all intra-workspace deps into [workspace.dependencies] with
explicit `path` + `version`. Each crate now declares siblings as
`{ workspace = true }`, and ck-cli inherits `version.workspace`
like its peers. Future bumps touch only:
- workspace.package.version
- the 8 sibling-dep version strings in workspace.dependencies
Both live in the root Cargo.toml — one file, ~9 lines.
CLAUDE.md updated to match.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous fix used \`any(fastembed, mixedbread)\` but the tests' default ModelConfig asks for the \`fastembed\` provider specifically. Under \`--features mixedbread\` alone (no fastembed), ck-embed's create_embedder_for_config takes the \`"fastembed"\` match arm, sees fastembed isn't compiled, and silently returns DummyEmbedder. DummyEmbedder produces zero vectors → cosine 0 → below threshold 0.1 → tests panic. Gate strictly on fastembed since that's what the tests actually need to function. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
runonthespot
added a commit
that referenced
this pull request
May 23, 2026
First clean release after the publish-plumbing fixes: - #110 consolidated workflows and simplified version bumps - 8b21d68 added the User-Agent header that was making crates.io verification 403 and aborting every prior release mid-way Supersedes the partially-published 0.7.4 (only ck-core landed on crates.io). All nine crates ship 0.7.5 together. See CHANGELOG.md for details. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 23, 2026
Closed
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.
Summary
CI has been failing on `main` since the 0.7.3 tag (Jan 25, 2026, ~4 months). This PR gets it green again and tightens the release process so the same class of bug is less likely.
Root cause of the CI failure
`cargo hack test --each-feature --workspace` runs the test suite once per feature permutation. Two ck-engine tests assumed the `fastembed` embedder was available:
Both use `SearchMode::Semantic` with a default `ModelConfig` that asks for the `fastembed` provider, plus `threshold: 0.1`. Under permutations where `fastembed` was disabled (`--no-default-features` and `--features mixedbread`-only), `ck-embed::create_embedder_for_config` silently returned `DummyEmbedder` (zero vectors) instead of erroring. Every cosine similarity is then 0, nothing passes threshold, the assertions panic.
Introduced by commit 295b827 ("Add feature flags for Windows compatibility") which added the `fastembed`/`mixedbread` features and made `--each-feature` exercise permutations no one had tested before.
Fix: cfg-gate both tests with `#[cfg(feature = "fastembed")]` since they cannot meaningfully run without the embedder they're configured for.
Also in this PR
While I was in the release plumbing, fixed two longstanding fragility sources:
Duplicated publish-crates jobs: `ci.yaml` and `release.yml` both had a `publish-crates` job firing on tag push. Two concurrent `cargo publish` runs against the same tag is a recipe for inconsistent state on crates.io (which is exactly what happened to 0.7.4 — only `ck-core` published, the other 8 are stuck at 0.7.2). Removed from `ci.yaml`; `release.yml` is the sole publisher.
9-file version bumps via sed: each release required `find . -name Cargo.toml -exec sed -i ...`. If a file was missed, `cargo publish` failed partway through, leaving crates.io in an inconsistent state. Moved all intra-workspace deps to `[workspace.dependencies]`. `ck-cli` now uses `version.workspace = true` like its peers. Future bumps touch one file (~9 lines). `CLAUDE.md` updated to match.
Missing `ck-tui` in release.yml CRATES list: `release.yml` was publishing 8 of 9 crates. Added.
What this PR does NOT fix (separate follow-ups)
Test plan
🤖 Generated with Claude Code