Skip to content

fix(apr-cli): bring aliases.yaml into crate dir for cargo publish (Refs #1514)#1518

Merged
noahgift merged 1 commit intomainfrom
fix/v0.32.0-followup-apr-cli-aliases-in-crate
May 5, 2026
Merged

fix(apr-cli): bring aliases.yaml into crate dir for cargo publish (Refs #1514)#1518
noahgift merged 1 commit intomainfrom
fix/v0.32.0-followup-apr-cli-aliases-in-crate

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

@noahgift noahgift commented May 5, 2026

Summary

`apr-cli/src/commands/aliases.rs:13` had `include_str!("../../../../configs/aliases.yaml")` referencing the workspace-root file. `cargo publish` excludes files outside the crate dir, breaking the publish step. Surfaced during v0.32.0 cascade publish (Issue #1514).

Fix

  • Copy `configs/aliases.yaml` into `crates/apr-cli/configs/aliases.yaml`.
  • Shorten include_str path from `../../../../configs/aliases.yaml` to `../../configs/aliases.yaml`.
  • Documented sync rule in code comment.

apr-cli v0.32.0 was already published to crates.io with this fix applied locally (cascade was operator-driven). This PR codifies the change on origin/main.

Refs #1514

🤖 Generated with Claude Code

#1514)

apr-cli's `aliases.rs:13` used `include_str!("../../../../configs/aliases.yaml")`
to embed the workspace-root alias map. cargo publish failed because
files outside the crate directory aren't included in the published
tarball:

  error: couldn't read `src/commands/../../../../configs/aliases.yaml`:
  No such file or directory
  --> src/commands/aliases.rs:13:28

Workaround applied during v0.32.0 cascade publish (Issue #1514): copy
the file into the crate's own directory and shorten the include path.

## What ships

- New file: `crates/apr-cli/configs/aliases.yaml` (28-line copy of
  workspace-root `configs/aliases.yaml`).
- Modified: `aliases.rs:13` — `include_str!` path changed from
  `"../../../../configs/aliases.yaml"` to `"../../configs/aliases.yaml"`
  (relative to the crate's `src/commands/`).
- Documented: comment explains the in-crate copy is a publish-time
  duplicate; the workspace root file remains canonical.

## Sync rule

When editing `configs/aliases.yaml` at the workspace root:
  cp configs/aliases.yaml crates/apr-cli/configs/aliases.yaml

Until a build.rs symlink or a `[package.include]` rewrite addresses
this more cleanly, the two copies must be kept in sync manually. Out
of scope for this fix; this PR only un-blocks v0.32.0 cascade publish.

## Verification

- `cargo check -p apr-cli` ✓ clean
- `cargo publish -p apr-cli --dry-run --allow-dirty` ✓ clean
- apr-cli v0.32.0 already published to crates.io with this fix included
  (pushed before this PR landed because cascade publish is operator-
  driven; this PR retroactively documents the change on origin/main).

## Five Whys

1. Why did include_str! reference outside the crate? Historical: the
   workspace had only one apr-cli at v0.4.x, and the YAML was placed
   at the workspace root for "global" config. The ../../../../ path
   worked in dev because the workspace root was always present.
2. Why didn't earlier publishes catch this? apr-cli wasn't published
   to crates.io for a while; this is the first cascade attempt that
   tried publishing apr-cli itself. The defect was latent.
3. Why use a copy vs a build.rs that pulls from workspace root? Build
   scripts can read sibling files at compile time but the published
   tarball still doesn't include them. The copy is the simpler fix.
4. Why not move the canonical YAML into the crate? Workspace root has
   other consumers (CI, docs); moving would break those references.
   In-crate copy + sync rule is least disruptive.
5. Why now (post-publish) rather than before? The cascade publish was
   operator-driven (per `feedback_post_publish_qa_required.md`); the
   defect surfaced during cascade and was patched locally to keep the
   cascade moving. This PR codifies the local patch for origin/main.

Refs #1514

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift enabled auto-merge (squash) May 5, 2026 16:11
@noahgift noahgift merged commit 0bb94d5 into main May 5, 2026
11 checks passed
@noahgift noahgift deleted the fix/v0.32.0-followup-apr-cli-aliases-in-crate branch May 5, 2026 16:41
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