Skip to content

fix(aprender-core): permissive version + path on dev-deps — clean-room compat (Refs #1514)#1517

Merged
noahgift merged 2 commits intomainfrom
fix/v0.32.0-publish-hygiene-dev-dep-version
May 5, 2026
Merged

fix(aprender-core): permissive version + path on dev-deps — clean-room compat (Refs #1514)#1517
noahgift merged 2 commits intomainfrom
fix/v0.32.0-publish-hygiene-dev-dep-version

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

@noahgift noahgift commented May 5, 2026

Summary

Follow-up to PR #1515. Path-only-no-version dev-deps worked for `cargo publish --dry-run` but failed in clean-room's GATE A0 strip:

```
strip_path_deps() {
sed -i 's/, *path *= "[^"]"//g' Cargo.toml
sed -i 's/path *= "[^"]", *//g' Cargo.toml
}
```

Clean-room's naive sed leaves `entrenar = { package = "..." }` — invalid (no source). `cargo publish` itself handles path-only-no-version correctly by dropping the dep entirely; clean-room's heuristic doesn't.

Fix

Add permissive version range alongside path:
```toml
renacer = { version = ">=0.27", path = "../aprender-profile", package = "aprender-profile" }
entrenar = { version = ">=0.27", path = "../aprender-train", package = "aprender-train" }
```

After clean-room strip: `{ version = ">=0.27", package = "aprender-profile" }` ← valid.

Verification

  • `cargo publish -p aprender-core --dry-run --allow-dirty` ✓ clean
  • Simulated clean-room strip locally → valid Cargo.toml ✓
  • About to re-run `make clean-room-aprender` on intel post-merge

Refs #1514 — step 1.b

PR #1515 was step 1.a (path-only). This is step 1.b (clean-room compat). Step 2: re-run clean-room until green; step 3: cascade publish.

🤖 Generated with Claude Code

…oom compat (Refs #1514)

Follow-up to PR #1515. The path-only-no-version fix worked for
`cargo publish --dry-run` but failed in the clean-room's GATE A0
strip:

  GATE A0: Strip local path deps (sed -i 's/path *= *"[^"]*"//g')
  GATE A1: cargo generate-lockfile
    error: dependency (entrenar) specified without providing a local
    path, Git repository, version, or workspace dependency to use

The clean-room's `strip_path_deps` is a naive sed that ONLY strips
the `path = "..."` part — leaving `entrenar = { package = "..." }`
which is an invalid Cargo.toml entry (no source).

`cargo publish` itself handles path-only-no-version dev-deps
correctly (drops them entirely), but the clean-room's heuristic
doesn't.

## Fix

Add a permissive version range alongside the path:

  renacer = { version = ">=0.27", path = "../aprender-profile", package = "aprender-profile" }
  entrenar = { version = ">=0.27", path = "../aprender-train", package = "aprender-train" }

After clean-room strip:
  renacer = { version = ">=0.27", package = "aprender-profile" }   ← valid

The version range `>=0.27` is permissive enough to satisfy any
currently-published aprender-profile / aprender-train (0.27.x
through 0.31.2). When v0.32.0 publishes, the range still satisfies.
The cycle is broken because publish doesn't require an EXACT 0.32.0
version on crates.io.

## Verification

  $ cargo publish -p aprender-core --dry-run --allow-dirty
    Uploading aprender-core v0.32.0 ✓
  $ # Simulated clean-room strip:
  $ sed 's/, *path *= *"[^"]*"//g' Cargo.toml
    → renacer = { version = ">=0.27", package = "aprender-profile" }   ← valid
    → entrenar = { version = ">=0.27", package = "aprender-train" }    ← valid

## Five Whys

1. Why did PR #1515's path-only-no-version fix fail in clean-room?
   Clean-room uses naive sed strip, not cargo's published-manifest
   logic. After strip: `entrenar = { package = "..." }` — invalid.
2. Why does clean-room use sed instead of cargo? Historical;
   simpler than reading published manifest. Out of scope to change.
3. Why permissive range >=0.27 vs >=0.30 or exact? 0.27 was the
   first stable aprender-{core,train,profile} version after the
   APR-MONO consolidation. Anything above resolves cleanly.
4. Why version + path vs path-only? After strip, just `version` +
   `package` remains — valid Cargo.toml entry. Cargo resolves the
   dev-dep via crates.io at test-time on the published crate;
   locally always uses path.
5. Why fix in a fresh PR vs amending #1515? #1515 already merged;
   one-PR-per-fix discipline per `feedback_falsifier_first_cascade_pattern.md`.

Refs #1514

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift enabled auto-merge (squash) May 5, 2026 14:54
@noahgift noahgift merged commit a5e0815 into main May 5, 2026
10 checks passed
@noahgift noahgift deleted the fix/v0.32.0-publish-hygiene-dev-dep-version branch May 5, 2026 15:51
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