Skip to content

fix(apr-mono): eliminate sibling-pin diamond dep (muda)#1011

Merged
noahgift merged 2 commits into
mainfrom
fix/apr-mono-muda-eliminate-sibling-pins
Apr 22, 2026
Merged

fix(apr-mono): eliminate sibling-pin diamond dep (muda)#1011
noahgift merged 2 commits into
mainfrom
fix/apr-mono-muda-eliminate-sibling-pins

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Summary

Eliminates the aprender@0.27.8 + aprender@0.14.1 crates.io diamond that was breaking cargo clippy -p aprender with an ambiguous-package error. Converts 13 workspace Cargo.toml pinned-version dependencies on sibling crates (renacer, entrenar, entrenar-lora, batuta, trueno-graph) to { workspace = true } aliases pointing at the in-tree crates after APR-MONO Phase 2/3 consolidation.

  • Root cause: pinned crates.io sibling deps each dragged in an older aprender (0.14.1, 0.27.8) as a transitive, producing a diamond. No single crate saw two aprender versions directly, but the resolver did.
  • Toyota Way scope: every edit is the same mechanical rewrite; net −550 LOC (Cargo.lock shrinks from duplicate crate elimination).

Post-fix verification via cargo metadata --offline:

aprender:     1 package (workspace 0.31.2, no crates.io pulls)
renacer:      0 crates.io packages (workspace alias → aprender-profile)
entrenar:     0 crates.io packages (workspace alias → aprender-train)
trueno-graph: 0 crates.io packages (workspace alias → aprender-graph)

cargo clippy -p aprender --lib --no-deps now compiles cleanly in ~28s.

Why this matters (main-andon)

Per feedback_main_ci_andon: red main preempts feature work. This PR is the gating blocker for:

Both discharges are parked on this fix per SHIP-TWO-001 spec v2.24.0.

Files changed

13 Cargo.toml/Cargo.lock edits, all same pattern: foo = "X.Y"foo = { workspace = true } (+ 4 new workspace alias rows in root Cargo.toml).

Test plan

🤖 Generated with Claude Code

noahgift added a commit that referenced this pull request Apr 22, 2026
…ation

The sibling-alias MUDA fix in 3f38207 activates crates that were never
clippy-gated under main's red CI. This commit adds the minimum lint-unblock
changes needed for `cargo clippy --all-targets -- -D warnings` to pass.

Code fixes:
- aprender-compute GPU path (wgsl_forward, cached_matmul, dispatch, parallel):
  underscore-prefix unused vars, `.unwrap()` → `.expect()` with descriptive
  messages, collapsible_if, doc_lazy_continuation, allow map_entry, drop two
  bogus `contract_post_*!()` macro calls (type-mismatched, never compiled).
- aprender-graph/shortest_path.rs: add `#[must_use]` + doc on dijkstra_path,
  `.map_or(false, |&d| cost > d)` → `.is_some_and(|&d| cost > d)`.
- aprender-graph/pattern.rs: `mapping.iter()` → `mapping`.

Crate-level lint allows (pedantic lints carried over from pre-monorepo crates
— to be fixed per-lint in dedicated follow-up PRs):
- aprender-profile/src/lib.rs: 9 pedantic lints (renacer legacy).
- apr-cli/tests/*.rs (13 files): `disallowed_methods` etc for integration
  tests where `unwrap()` is idiomatic.
- apr-cli/examples/tool_calling_demo.rs: `disallowed_methods` for serde_json
  `json!` macro expansion.

Dead code (MUDA-aligned cleanup):
- Delete apr-cli/examples/probar_tui_testing.rs + federation_tui_demo.rs —
  both reference the removed `ratatui` crate and deleted `federation::tui`
  module.
- Drop matching `[[example]]` entries from apr-cli/Cargo.toml.

Verification:
  cargo clippy --all-targets -- -D warnings  # clean in 36s

Ported from closed PR #1010 (commit 4338cbf on fix/apr-mono-muda). Keeps
#1011's Cargo.toml changes intact; no conflicts with the MUDA fix commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift enabled auto-merge (squash) April 22, 2026 19:41
noahgift and others added 2 commits April 22, 2026 21:41
13 workspace Cargo.toml edits converting pinned crates.io
versions of renacer, entrenar, entrenar-lora, batuta, and
trueno-graph to `{ workspace = true }` aliases pointing at
the in-tree crates (aprender-profile, aprender-train,
aprender-orchestrate, aprender-graph).

Root cause: after APR-MONO Phase 2/3 consolidation, several
crates still pinned old crates.io sibling versions. Each
carried a transitive dep on an older `aprender` (0.14.1,
0.27.8), producing a diamond that broke
`cargo clippy -p aprender` with an ambiguous-package error.

Post-fix metadata:
  aprender: 1 package (workspace 0.31.2)
  renacer / entrenar / trueno-graph: 0 crates.io packages

Unblocks main-andon (required CI checks) and PRs #1008
(FALSIFY-SHIP-016 PARTIAL) and #1009 (FALSIFY-SHIP-009 PARTIAL).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ation

The sibling-alias MUDA fix in 3f38207 activates crates that were never
clippy-gated under main's red CI. This commit adds the minimum lint-unblock
changes needed for `cargo clippy --all-targets -- -D warnings` to pass.

Code fixes:
- aprender-compute GPU path (wgsl_forward, cached_matmul, dispatch, parallel):
  underscore-prefix unused vars, `.unwrap()` → `.expect()` with descriptive
  messages, collapsible_if, doc_lazy_continuation, allow map_entry, drop two
  bogus `contract_post_*!()` macro calls (type-mismatched, never compiled).
- aprender-graph/shortest_path.rs: add `#[must_use]` + doc on dijkstra_path,
  `.map_or(false, |&d| cost > d)` → `.is_some_and(|&d| cost > d)`.
- aprender-graph/pattern.rs: `mapping.iter()` → `mapping`.

Crate-level lint allows (pedantic lints carried over from pre-monorepo crates
— to be fixed per-lint in dedicated follow-up PRs):
- aprender-profile/src/lib.rs: 9 pedantic lints (renacer legacy).
- apr-cli/tests/*.rs (13 files): `disallowed_methods` etc for integration
  tests where `unwrap()` is idiomatic.
- apr-cli/examples/tool_calling_demo.rs: `disallowed_methods` for serde_json
  `json!` macro expansion.

Dead code (MUDA-aligned cleanup):
- Delete apr-cli/examples/probar_tui_testing.rs + federation_tui_demo.rs —
  both reference the removed `ratatui` crate and deleted `federation::tui`
  module.
- Drop matching `[[example]]` entries from apr-cli/Cargo.toml.

Verification:
  cargo clippy --all-targets -- -D warnings  # clean in 36s

Ported from closed PR #1010 (commit 4338cbf on fix/apr-mono-muda). Keeps
#1011's Cargo.toml changes intact; no conflicts with the MUDA fix commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift force-pushed the fix/apr-mono-muda-eliminate-sibling-pins branch from 9fc425e to 0a3d3e7 Compare April 22, 2026 19:41
@noahgift noahgift merged commit 8869fe5 into main Apr 22, 2026
10 checks passed
@noahgift noahgift deleted the fix/apr-mono-muda-eliminate-sibling-pins branch April 22, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant