Skip to content
This repository was archived by the owner on Dec 3, 2026. It is now read-only.

fix(build): make install overwrites untracked binaries; ship meta-rust - #110

Merged
gold-silver-copper merged 10 commits into
mainfrom
fix/install-force-and-meta-rust
Oct 25, 2026
Merged

gold-silver-copper merged 10 commits into
mainfrom
fix/install-force-and-meta-rust

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Follow-ups to #109. Merge after gitkb/meta_cli#39 and gitkb/meta_rust_cli#15.

This PR keeps installing meta-rust and ships it in releases, and its docs, skill copies and Cargo.lock describe the behaviour those two PRs ship.

What and why

1. make install no longer stops on a binary cargo didn't install.
If ~/.cargo/bin/loop (or meta, …) was copied in by hand, e.g. from a release download, cargo doesn't track it and refuses to overwrite it:

$ make install-loop_cli      # before
error: binary `loop` already exists in destination
Add --force to overwrite
make: *** [Makefile:47: install-loop_cli] Error 101
# before
	cargo install --locked --path $*
# after
	cargo install --locked --force --path $*

This costs nothing extra: cargo install --path already rebuilds and reinstalls every time ("Installing with --path will always build and install, unless there are conflicting binaries from another package", cargo help install). --force only changes the conflict case. Each Make target is still one command.

install.sh and install.ps1 don't have this trap: they copy over existing files (cp, Copy-Item -Force). They install into ~/.local/bin / %USERPROFILE%\.meta\bin, not ~/.cargo/bin, so a later make install leaves those copies in place and PATH order decides which one runs. The README now says so.

2. meta-rust stays in make install and releases now ship it too.
make install has always installed meta-rust (BIN_CRATES is unchanged), so many people already have it. With the two sibling PRs it is a plain cargo passthrough that no longer interferes with meta exec. I decided releases should ship it, so every install path gives the same binaries:

  • release.yml builds meta_rust_cli and puts meta-rust in the Unix and Windows archives.
  • Homebrew (the formula release.yml writes, and distribution/homebrew/meta-cli.rb) installs it.
  • install.sh and install.ps1 copy it out of the archive.

Not crates.io: no publish step is added for meta_rust_cli, because none of the CLI crates actually reach crates.io today. The names meta, loop_cli and meta-mcp there belong to other projects or are stale, and meta_git_lib, meta_git_cli and meta_project_cli were never published (the steps are continue-on-error). Only loop_lib, meta_core and meta_plugin_protocol are published. One more publish step that fails silently adds nothing; fixing crates.io publishing is its own decision.

# release.yml, build step (archives, Homebrew and scripts get matching lines)
          cargo build --release --target ${{ matrix.target }} -p meta_project_cli
+         cargo build --release --target ${{ matrix.target }} -p meta_rust_cli
          cargo build --release --target ${{ matrix.target }} -p meta-mcp

3. Docs match the sibling PRs.

  • README plugin table: rust is "meta cargo <cargo args>: any cargo command in each repo that has a Cargo.toml". It used to say "Cargo build, test, and command passthrough", which wasn't true until chore(main): release 0.2.3 #15.
  • docs/architecture_overview.md: the meta_rust_cli section describes the passthrough; the routing list puts meta exec first ("as typed, never through a plugin"), and the example is meta cargo build instead of the removed meta rust build. It also says that meta exec -- git ... is now plain git and meta exec -- git clone no longer bootstraps, so use meta git ... for those.
  • docs/claude_code_skills.md: the meta-plugins summary gives the new routing rule.
  • meta-exec and meta-plugins skill copies (.meta/skills/, claude-plugin/skills/): regenerated with make skills from meta_cli#39, which updates both skills (tests/init.bats requires the copies to match meta_cli). The meta-plugins skill now documents meta cargo <any cargo args> in place of the removed meta rust build|test.
  • README "How It Works": meta exec -- <cmd> goes to the loop engine as typed; any other command goes to the plugin that claims it or fails. It used to say unclaimed commands fall through to exec.
  • claude-plugin/.claude-plugin/plugin.json 0.2.0 → 0.2.1, because the plugin's skills changed (the bump rule is in docs/claude_code_skills.md).
  • tests/help.bats: the meta-rust help test checks chore(main): release 0.2.3 #15's help (meta cargo <cargo args>, "Run cargo with your args in each selected repo") for meta cargo --help and meta cargo build --help. The meta rust … cases are gone along with the alias.

4. Cargo.lock carries meta_rust_cli#15's dependency change (shlex in; anyhow, meta_core, serde_json out), so CI's --locked build passes against it.

How CI tests the set

clone-child-repos.sh clones each child from a branch named like this PR's branch when one exists, and from main otherwise. So that CI builds this PR against both sibling PRs, I pushed branches named fix/install-force-and-meta-rust in gitkb/meta_cli and gitkb/meta_rust_cli, pointing at #39's and #15's heads (now ea11fcd and 6b44b9b). They are test mirrors only, and should be deleted once the sibling PRs merge.

How it was verified

  • Install over an untracked binary (throwaway CARGO_INSTALL_ROOT, own target dir, a hand-written loop already in bin/): with main's Makefile, make install-loop_cli fails with binary `loop` already exists in destination (exit 2). With this branch, make install exits 0, and cargo reports Replaced package 'unknown' with 'loop_cli v0.2.22'. make uninstall (scratch HOME) removes every binary and exits 0.
  • Against the sibling heads (meta_cli ea11fcd, meta_rust_cli 6b44b9b): cargo build --workspace --locked passes. With a scratch META_DATA_DIR, so no installed plugin is used: meta --primary exec -- cargo --version runs real cargo in all 11 cloned repos (the 2 failures are the uncloned agent and meta-plugins), meta --primary --dry-run cargo fmt --check plans 11 runs, and meta --include meta_rust_cli cargo --version prints cargo's version. bats isn't installed locally. CI runs the full suite against these heads via the mirror branches; the CI log shows Cloning meta_cli from branch fix/install-force-and-meta-rust.

Look closely at

  • --force also replaces a loop (or meta) that belongs to a different cargo package, not only an untracked copy. That seems right for make install of meta, and install.sh already overwrites the same way, but it is a behaviour change.
  • Merge order: if this merges before the siblings, a release would ship the old meta-rust, and main's tests/init.bats and --locked CI would fail until they merge.

Not in this PR: releases build the child repos' current main, not the tagged source

release.yml (the build and crates.io publish jobs) clones every child repo with git clone --depth 1 at its default branch when the job starts. Nothing records which child revisions a parent tag stands for. So the binaries and crates for vX come from whatever each child's main is when the release runs, which can be newer than what CI tested for that tag, and a rerun weeks later builds different child code under the same tag. Each published crate does record its own repo's commit (.cargo_vcs_info.json), but the release binaries and the parent tag don't.

The parent itself is effectively pinned. A release runs twice (v0.2.21 and v0.2.22 both did): once on the v* tag push, with the parent checked out at the tag, and once from on-push-main.yml's release-tagged repository_dispatch, with actions/checkout and no ref, so the parent is main's head at dispatch time. So far that was the tag commit, and reruns keep that SHA. Both runs upload assets to the same release and both run the crates.io publish job. That is a separate pre-existing issue, noted here only because it affects the options.

Options I see:

  1. Pin child SHAs in the parent. Record each child's revision in a committed file (e.g. a rev: per project in .meta.yaml, or a small lock file). on-child-update.yml already opens a sync PR per child change and could write the SHA. release.yml (its two inline clone lists) and clone-child-repos.sh then check out those SHAs. The tag then fully describes the source.
  2. Tag the children at release. When release-please tags the parent, tag each child at its current head with the same version, and have the release jobs clone each child at vX. That makes reruns reproducible but doesn't change what is picked at release time.
  3. git submodules. Gives pinning for free, but changes how meta itself works with its children and fights the meta-repo design.
  4. Leave it, document it. Accept that a release is "parent at the tag, children at main when the release job runs".

Option 1 seems closest to how on-child-update already works. Whichever is chosen, it is a good moment to keep only one of the two release triggers. This is a release-pipeline design call for Matt.

cargo install --path always rebuilds, so --force only changes the case
where a binary cargo doesn't track (a release download) is in the way.
meta-rust leaves make install to match what releases ship.

Implements [[tasks/harmony-2743]]
Earlier make installs put meta-rust in ~/.cargo/bin; leaving it there
keeps breaking meta exec -- cargo commands other than build and test.

Implements [[tasks/harmony-2743]]
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 8 billable files and costs up to $2.00.

Or wait 39 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8a80ffa1-de7f-4e28-aaeb-b5c6d49c233f
Commits

Reviewing files that changed from the base of the PR and between c9f3c74 and 67a01b2.

Files selected for processing: 8
  • .meta/skills/meta-exec/SKILL.md
  • .meta/skills/meta-plugins/SKILL.md
  • README.md
  • claude-plugin/.claude-plugin/plugin.json
  • claude-plugin/skills/meta-exec/SKILL.md
  • claude-plugin/skills/meta-plugins/SKILL.md
  • docs/architecture_overview.md
  • tests/help.bats

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e01e9d1a-11c9-4c08-8253-27ae0541cd27
Commits

Reviewing files that changed from the base of the PR and between a563c3d and c9f3c74.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 10
  • .github/workflows/release.yml
  • .meta/skills/meta-exec/SKILL.md
  • Makefile
  • README.md
  • claude-plugin/skills/meta-exec/SKILL.md
  • distribution/homebrew/meta-cli.rb
  • docs/architecture_overview.md
  • docs/claude_code_skills.md
  • install.ps1
  • install.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The release workflow and installers now include meta-rust. The Makefile installs listed binaries with --force. Documentation describes installation locations and distinguishes direct command execution from plugin routing.

Changes

meta-rust distribution and command guidance

Layer / File(s) Summary
Build and distribute meta-rust
.github/workflows/release.yml, distribution/homebrew/meta-cli.rb, install.ps1, install.sh
The release workflow builds and packages meta-rust for Unix and Windows. The generated Homebrew formula and both installers include the binary.
Install shipped binaries
Makefile, README.md
The install recipe uses --force for each listed crate. The README describes the installed binaries, destination, replacement behavior, and copies that remain in install-script locations.
Document command routing
docs/architecture_overview.md, README.md, docs/claude_code_skills.md, .meta/skills/meta-exec/SKILL.md, claude-plugin/skills/meta-exec/SKILL.md
The documentation describes meta exec as running commands as typed and plugin commands as handled by their respective plugins. It also describes meta cargo behavior and updates the examples.

Priority: Pending latest changes

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • gitkb/meta#109: Introduced the BIN_CRATES list and install targets that this change updates.
  • gitkb/meta#107: Changed the Makefile install recipe and README source-install instructions that this change extends.
  • gitkb/meta#102: Added the meta-rust command-routing claims that this change removes from both skill copies.
Merge Risk: Minimal · up to c9f3c

The change makes make install overwrite existing binaries and adds meta-rust to the release archives, installers and Homebrew formula, with matching documentation. No concrete defect was found, so this is ready to merge. The only loose end is that meta-rust is not published to crates.io.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (8 skipped: 8… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies both primary changes: forced overwrites during make install and shipping meta-rust.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (8 skipped: 8 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit packs a binary tight,
For Unix, Windows, and brew tonight.
--force makes room in Cargo’s bin,
While plugins catch their commands within.
Direct commands run as typed and clear,
The rabbit hops with meta-rust near.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from mateodelnorte October 24, 2026 22:17
make install keeps installing meta-rust, and releases now ship it too
(archives, Homebrew, install scripts), so every install path agrees.

Implements [[tasks/harmony-2743]]
meta exec runs commands as typed (gitkb/meta_cli#39); meta cargo passes
any cargo command through (gitkb/meta_rust_cli#15). Skill copies come
from meta_cli via make skills; Cargo.lock follows meta_rust_cli's deps.

Implements [[tasks/harmony-2743]]
@gold-silver-copper gold-silver-copper changed the title fix(build): make install overwrites untracked binaries and matches the release set fix(build): make install overwrites untracked binaries; ship meta-rust Oct 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant