Skip to content

feat(aprender-rag): v0.31.2 → v0.32.0 — rename lib trueno_rag → aprender_rag (BREAKING)#1512

Merged
noahgift merged 2 commits into
mainfrom
feat/aprender-rag-lib-rename-v0.32.0
May 5, 2026
Merged

feat(aprender-rag): v0.31.2 → v0.32.0 — rename lib trueno_rag → aprender_rag (BREAKING)#1512
noahgift merged 2 commits into
mainfrom
feat/aprender-rag-lib-rename-v0.32.0

Conversation

@noahgift

@noahgift noahgift commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Published `aprender-rag = "0.31.2"` had `[lib] name = "trueno_rag"`, making `use aprender_rag::*` not compile against external consumers. This renames the lib to match the package name + bumps to v0.32.0 (breaking import-path change → minor bump per SemVer).

User report:

the published aprender-rag = "0.31.2" still has [lib] name = "trueno_rag" in its Cargo.toml, so use aprender_rag::* won't actually compile against the current crate.

What ships

  • `crates/aprender-rag/Cargo.toml`: `[lib] name = "trueno_rag"` → `"aprender_rag"`.
  • `crates/aprender-rag/src/**/.rs`: doctests use `aprender_rag::`.
  • `crates/aprender-rag/crates/trueno-rag-cli/`: sub-cli updated to consume the renamed lib (Cargo.toml + 7 source files).
  • Workspace `version` 0.31.2 → 0.32.0 across 64 files.

What is NOT changed

  • `aprender-core`, `aprender-train`, `aprender-orchestrate` continue to depend on the external `trueno-rag = "0.2"` crate from crates.io (NOT the local path dep). Their `use trueno_rag::*` imports remain — they consume a separate, older published crate. Migrating those is a separate refactor.
  • `apr-cli/src/commands/mono.rs` line 184 already declared the intended lib name `aprender_rag` for the `apr mono` rename registry — this PR makes Cargo.toml match the registry.

Verification

```
cargo check -p aprender-rag # ✓ clean
cargo test -p aprender-rag --lib # 442/442 pass
cargo test -p aprender-rag --doc # 5/5 pass
```

`cargo check --workspace` has 1 pre-existing error in `aprender-orchestrate` bin (`batuta::cmd_code` arg drift) — unrelated to this PR (verified by reproducing on main pre-this-branch via `git stash`).

Five Whys

  1. Why did lib name drift from package name? Pre-monorepo crate was published as `trueno-rag` with lib `trueno_rag`; APR-MONO renamed the package but not the lib.
  2. Why did internal tests pass but external compile fail? Internal doctests use `use trueno_rag::` (matching lib name); external consumers expect `use aprender_rag::` (matching package name they typed).
  3. Why minor bump (0.32.0)? Renaming the lib changes public import path → breaking → SemVer minor (this is pre-1.0).
  4. Why not migrate workspace crates off external `trueno-rag`? Out of scope; needs API-diff investigation between published 0.2.x and local 0.32.0.
  5. Why ship despite pre-existing orchestrate error? Unrelated defect (verified pre-existing on main); blocking conflates concerns.

Operator follow-up

`cargo publish` requires crates.io credentials (operator-only):
```
cargo publish -p aprender-rag # publishes 0.32.0
cargo install aprender --force # post-publish QA per
feedback_post_publish_qa_required.md
```

Test plan

  • Lib rename in `crates/aprender-rag/Cargo.toml`
  • All workspace 0.31.2 pins → 0.32.0
  • aprender-rag doctests + unit tests pass
  • PMAT pre-commit gates pass
  • CI gate green
  • Auto-merge fires on green CI
  • Operator runs `cargo publish -p aprender-rag` post-merge

🤖 Generated with Claude Code

…der_rag (BREAKING)

Published `aprender-rag = "0.31.2"` had `[lib] name = "trueno_rag"`,
making `use aprender_rag::*` not compile against external consumers.
This renames the lib to match the package name + bumps to v0.32.0
(breaking import-path change requires minor version bump per SemVer).

## Why

When operators add `aprender-rag = "0.31.2"` to Cargo.toml, the
natural Rust import is `use aprender_rag::*`. The published lib
exposed `use trueno_rag::*` instead — the historical pre-monorepo
crate name leaked through.

## What ships

- `crates/aprender-rag/Cargo.toml`: `[lib] name = "trueno_rag"` →
  `"aprender_rag"`.
- `crates/aprender-rag/src/**/*.rs`: doctests
  `use trueno_rag::*` → `use aprender_rag::*` (Rust source only;
  the historical-link string `paiml/trueno-rag` in `repository:` is
  preserved for backward compatibility).
- `crates/aprender-rag/crates/trueno-rag-cli/`: sub-cli's
  `Cargo.toml` and `src/*.rs` updated to consume the renamed lib
  (declared as `aprender-rag = { path = "../..", version = "0.32.0" }`,
  imports use `aprender_rag::*`).
- Workspace `version` 0.31.2 → 0.32.0 (touches 64 Cargo.toml + Rust
  files via consistent sed).

## What is NOT changed

- `crates/aprender-core`, `crates/aprender-train`, and
  `crates/aprender-orchestrate` continue to depend on the **external**
  `trueno-rag = "0.2"` crate from crates.io (NOT the local path
  dep). Their `use trueno_rag::*` imports remain — they consume a
  separate, older published crate. Migrating those workspace crates
  to the local `aprender-rag` is a separate, larger refactor (out
  of scope for this PR).
- `apr-cli/src/commands/mono.rs` line 184 already declared the
  intended lib name `aprender_rag` for the `apr mono` rename
  registry — this PR makes the Cargo.toml match the registry.

## Verification

  $ cargo check -p aprender-rag             # ✓ clean
  $ cargo test -p aprender-rag --lib        # 442/442 pass
  $ cargo test -p aprender-rag --doc        # 5/5 pass

  $ cargo check --workspace                 # 1 pre-existing error in
                                              aprender-orchestrate bin
                                              (batuta::cmd_code arg
                                              count drift; unrelated to
                                              this PR — verified by
                                              reproducing on main pre-
                                              this-branch via git
                                              stash).

## Five Whys

1. Why did the lib name drift from the package name? Pre-monorepo
   the crate was published as `trueno-rag` with lib name
   `trueno_rag`; the APR-MONO consolidation renamed the package
   to `aprender-rag` but didn't update the lib name (the file lives
   inside `crates/aprender-rag/Cargo.toml` but `[lib] name = "trueno_rag"`).
2. Why did external consumers notice but internal tests not? Doctests
   inside aprender-rag use `use trueno_rag::*` (matching the lib
   name) — they pass internally because the lib IS named `trueno_rag`.
   External consumers expect `use aprender_rag::*` (matching the
   package name they typed in Cargo.toml).
3. Why bump to 0.32.0 (minor) not 0.31.3 (patch)? Renaming the lib
   changes the public import path, which is a breaking API change
   per SemVer. Patch bumps must be backward-compatible; this is not.
4. Why not also migrate workspace crates off external `trueno-rag = "0.2"`?
   Out of scope. The external crate still publishes; migrating
   internal consumers requires API-diff investigation between the
   published 0.2.x and the local 0.32.0 (different feature surfaces,
   different traits). Tracked as a separate refactor.
5. Why ship even though `aprender-orchestrate` has a pre-existing
   build error? The error is in the `aprender-orchestrate` bin's
   call to `batuta::agent::code::cmd_code` — unrelated to the rag
   lib name. Pre-existing on main (verified via `git stash` +
   `cargo check`). Blocking this PR on it would conflate unrelated
   defects.

## Operator follow-up

`cargo publish` requires operator credentials. After this PR merges:
  cd /home/noah/src/aprender
  cargo publish -p aprender-rag       # publishes 0.32.0
  cargo install aprender --force      # post-publish QA per
                                        feedback_post_publish_qa_required.md

This addresses the user-reported defect: "the published
aprender-rag = "0.31.2" still has [lib] name = "trueno_rag" in its
Cargo.toml, so use aprender_rag::* won't actually compile against
the current crate."

Refs: feedback_post_publish_qa_required.md (yank-on-skip rule)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift enabled auto-merge (squash) May 5, 2026 10:53
@noahgift noahgift merged commit 845554b into main May 5, 2026
10 checks passed
@noahgift noahgift deleted the feat/aprender-rag-lib-rename-v0.32.0 branch May 5, 2026 11:18
noahgift added a commit that referenced this pull request May 5, 2026
Records the v0.32.0 cascade publish: 15 user-facing crates published
to crates.io in topological order via three release-engineering fix
PRs (#1515 dev-dep cycle break, #1517 clean-room compat, #1518 apr-cli
aliases.yaml in-crate copy).

Also documents the breaking aprender-rag lib rename
(trueno_rag → aprender_rag) per Issue #1510 / PR #1512.

User-facing additions for 0.32.0:
- apr pretrain --init polymorphic Qwen2.5-Coder-0.5B-Instruct fine-tune
- apr tokenize import-hf for HF BPE → aprender layout
- pv lint --strict-test-binding (PV-VER-002)

Closes #1514

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
noahgift added a commit that referenced this pull request May 5, 2026
…h + 4 release-engineering defects closed (#1520)

§58 records the parallel release-engineering track that landed during the §57 drift-sweep wait:
the v0.32.0 user-facing-crate cascade publish (Issue #1514 CLOSED) and the four hidden defects
it surfaced + closed.

User-facing crates now live on crates.io at v0.32.0:
  - aprender = "0.32.0"
  - aprender-rag = "0.32.0"
  - aprender-core = "0.32.0"
  - apr-cli = "0.32.0"

Defects closed during cascade (each in its own PR):
  - #1512 aprender-rag [lib] name = "trueno_rag" → "aprender_rag" BREAKING
  - #1513 aprender-orchestrate cmd_code 7→8 arg drift on emit_trace addition
  - #1515 aprender-core path-only dev-deps (publish-time cycle break)
  - #1517 aprender-core permissive version + path (clean-room sed-strip robustness)
  - #1518 apr-cli aliases.yaml in-crate copy (include_str scope fix)

Plus PR #1511 (pv-lint --strict-test-binding) closes §57.4's foreshadowed prevention rule.

5g.1 corpus retokenize (PID 2767124) at 62 shards / 16h19m wall (manifest pending).
Ship-% unchanged: MODEL-1=91%, MODEL-2=57%. §58 is the third hygiene amendment in a row;
§59 will record 5g.1 completion when manifest emits.

Refs: #1514

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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