fix(deps): the monorepo pulled its own siblings from crates.io, and the gate that should have caught it could not fail - #2471
Merged
Conversation
…he gate that should have caught it could not fail
CLAUDE.md states the rule: the workspace is a self-contained DAG and every sibling
must be a path alias consumed as `{ workspace = true }`, because "pulling a
crates.io copy reintroduces a duplicate crate + the published-crate dependency
cycle the consolidation removed".
36 declarations violated it. `trueno` — the SIMD/GPU foundation — resolved at
0.16, 0.16.5 AND the in-tree 0.63.0 simultaneously. `jugar-probar` spanned seven
declared versions. All now resolve to the in-tree path.
## The gate that should have caught this exited 0 by construction
`Makefile:485` was:
@Cargo tree --duplicate | grep -v "^$$" || echo "✅ No duplicate dependencies"
@Cargo audit || echo "⚠️ Security issues found"
`||` reads GREP's status, not cargo's. Measured on the unfixed tree: **1,828 lines
of duplicates printed, exit code 0**. The second line swallows `cargo audit`
failures the same way. And nothing in .github/workflows/ or any tier target
invokes `deps-validate` at all, so even a working version was never run.
Third instance of this exact class here (#2336 qwen-story-daily, #2360 make
publish's POST-PUBLISH VERIFICATION). Both lines now redirect to a file and read
the real status; `make deps-validate` returns non-zero on the current tree, where
it returned 0 before.
## The guard, and why it ships in the same commit
`scripts/check_workspace_siblings_pathed.sh` fails any manifest declaring a
workspace-local crate with a registry `version =`. It matches on BOTH `[package]
name` and `[lib] name`, which is not optional here: package `aprender-compute` has
`[lib] name = "trueno"`, so a checker comparing only package names is blind to the
single most important violation.
PASS: 100 manifest(s) scanned against 272 workspace-local crate name(s)
(positive control flagged, so this absence is a measurement, not a blind spot)
self-test: 30 cases from a table file, plus 6 end-to-end tree probes.
**Landing order was a real hazard.** The guard is wired into `guard-runner-labels`,
which `gate` hard-requires with an explicit `exit 1`. Merged before the 36 manifest
fixes it would turn main RED and block every PR. Verified they pass together: with
both applied, the guard exits 0.
## Numbers, and why the headline one understates it
`cargo tree --workspace --duplicates`: 57 -> 56 distinct duplicated names.
That is a poor measure of this change and should not be quoted as its value.
`cargo tree --duplicates` is **structurally blind** to the class being fixed: the
in-tree packages were RENAMED during consolidation (aprender-compute, aprender-serve),
so a registry `trueno` and a path `aprender-compute` are different names and no
collision exists for the duplicate detector to see. The verifier proved this —
`cargo tree -p aprender-rag --features transcription` lists crates.io
`aprender v0.27.8` and `trueno v0.17.5`, a stale published copy of this monorepo,
while `--duplicates` on the same invocation reports nothing.
Cargo.lock is the honest measure: 1493 -> 1402 packages, 91 removed, 0 added.
## Not in this commit
- The third-party version unification (57 -> 41) conflicts with this change on
eight manifests. Hand-merging two sets of manifest edits is how a silent defect
ships, so it rebases and lands separately.
- `whisper-apr` still transitively re-imports crates.io `aprender 0.27.8`,
`realizar 0.8.6`, `trueno 0.17.5` via apr-cli's `whisper` feature. Real, and
invisible to `--duplicates` for the renaming reason above. Its own ticket.
- `crates/aprender-test/Cargo.toml:102` declares `probar = { path = "crates/probar" }`
pointing at a directory that does not exist. That crate is workspace-EXCLUDED
and unbuildable already (#2470).
`cargo check --workspace`: clean, 0 errors.
Refs #2463, #2470
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.
fix(deps): the monorepo pulled its own siblings from crates.io, and the gate that should have caught it could not fail
CLAUDE.md states the rule: the workspace is a self-contained DAG and every sibling
must be a path alias consumed as
{ workspace = true }, because "pulling acrates.io copy reintroduces a duplicate crate + the published-crate dependency
cycle the consolidation removed".
36 declarations violated it.
trueno— the SIMD/GPU foundation — resolved at0.16, 0.16.5 AND the in-tree 0.63.0 simultaneously.
jugar-probarspanned sevendeclared versions. All now resolve to the in-tree path.
The gate that should have caught this exited 0 by construction
Makefile:485was:||reads GREP's status, not cargo's. Measured on the unfixed tree: 1,828 linesof duplicates printed, exit code 0. The second line swallows
cargo auditfailures the same way. And nothing in .github/workflows/ or any tier target
invokes
deps-validateat all, so even a working version was never run.Third instance of this exact class here (#2336 qwen-story-daily, #2360 make
publish's POST-PUBLISH VERIFICATION). Both lines now redirect to a file and read
the real status;
make deps-validatereturns non-zero on the current tree, whereit returned 0 before.
The guard, and why it ships in the same commit
scripts/check_workspace_siblings_pathed.shfails any manifest declaring aworkspace-local crate with a registry
version =. It matches on BOTH[package] nameand[lib] name, which is not optional here: packageaprender-computehas[lib] name = "trueno", so a checker comparing only package names is blind to thesingle most important violation.
self-test: 30 cases from a table file, plus 6 end-to-end tree probes.
Landing order was a real hazard. The guard is wired into
guard-runner-labels,which
gatehard-requires with an explicitexit 1. Merged before the 36 manifestfixes it would turn main RED and block every PR. Verified they pass together: with
both applied, the guard exits 0.
Numbers, and why the headline one understates it
cargo tree --workspace --duplicates: 57 -> 56 distinct duplicated names.That is a poor measure of this change and should not be quoted as its value.
cargo tree --duplicatesis structurally blind to the class being fixed: thein-tree packages were RENAMED during consolidation (aprender-compute, aprender-serve),
so a registry
truenoand a pathaprender-computeare different names and nocollision exists for the duplicate detector to see. The verifier proved this —
cargo tree -p aprender-rag --features transcriptionlists crates.ioaprender v0.27.8andtrueno v0.17.5, a stale published copy of this monorepo,while
--duplicateson the same invocation reports nothing.Cargo.lock is the honest measure: 1493 -> 1402 packages, 91 removed, 0 added.
Not in this commit
eight manifests. Hand-merging two sets of manifest edits is how a silent defect
ships, so it rebases and lands separately.
whisper-aprstill transitively re-imports crates.ioaprender 0.27.8,realizar 0.8.6,trueno 0.17.5via apr-cli'swhisperfeature. Real, andinvisible to
--duplicatesfor the renaming reason above. Its own ticket.crates/aprender-test/Cargo.toml:102declaresprobar = { path = "crates/probar" }pointing at a directory that does not exist. That crate is workspace-EXCLUDED
and unbuildable already (APR-MONO consolidation debt: 126 verified findings — a member that will not compile, 9 orphans, guards scanning the wrong directory #2470).
cargo check --workspace: clean, 0 errors.Refs #2463, #2470