Repository navigation
fix(build): make install overwrites untracked binaries; ship meta-rust - #110
Conversation
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]]
|
Warning Review limit reached
This review includes 8 billable files and costs up to $2.00. Or wait 39 minutes for your next included review. View limit details
No actionable comments were generated in the recent review.
|
| 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:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- gitkb/meta#109: Introduced the
BIN_CRATESlist 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-rustcommand-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: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull 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.
Implements [[tasks/harmony-2743]]
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]]
Implements [[tasks/harmony-2743]]
Implements [[tasks/harmony-2743]]
…its skill changes Implements [[tasks/harmony-2743]]
Implements [[tasks/harmony-2743]]
Implements [[tasks/harmony-2743]]
Follow-ups to #109. Merge after gitkb/meta_cli#39 and gitkb/meta_rust_cli#15.
meta exec -- <cmd>runs the command as typed and never hands it to a plugin. Before,meta exec -- cargo --versionprinted meta-rust's help.meta cargo <any cargo args>runs that cargo command in each selected repo that has aCargo.toml, not onlybuild/test. Themeta rust build|testaliases are removed.This PR keeps installing
meta-rustand ships it in releases, and its docs, skill copies andCargo.lockdescribe the behaviour those two PRs ship.What and why
1.
make installno longer stops on a binary cargo didn't install.If
~/.cargo/bin/loop(ormeta, …) was copied in by hand, e.g. from a release download, cargo doesn't track it and refuses to overwrite it:This costs nothing extra:
cargo install --pathalready rebuilds and reinstalls every time ("Installing with --path will always build and install, unless there are conflicting binaries from another package",cargo help install).--forceonly changes the conflict case. Each Make target is still one command.install.shandinstall.ps1don'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 latermake installleaves those copies in place andPATHorder decides which one runs. The README now says so.2.
meta-ruststays inmake installand releases now ship it too.make installhas always installedmeta-rust(BIN_CRATESis unchanged), so many people already have it. With the two sibling PRs it is a plain cargo passthrough that no longer interferes withmeta exec. I decided releases should ship it, so every install path gives the same binaries:release.ymlbuildsmeta_rust_cliand putsmeta-rustin the Unix and Windows archives.release.ymlwrites, anddistribution/homebrew/meta-cli.rb) installs it.install.shandinstall.ps1copy 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 namesmeta,loop_cliandmeta-mcpthere belong to other projects or are stale, andmeta_git_lib,meta_git_cliandmeta_project_cliwere never published (the steps arecontinue-on-error). Onlyloop_lib,meta_coreandmeta_plugin_protocolare published. One more publish step that fails silently adds nothing; fixing crates.io publishing is its own decision.3. Docs match the sibling PRs.
rustis "meta cargo <cargo args>: any cargo command in each repo that has aCargo.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 putsmeta execfirst ("as typed, never through a plugin"), and the example ismeta cargo buildinstead of the removedmeta rust build. It also says thatmeta exec -- git ...is now plain git andmeta exec -- git cloneno longer bootstraps, so usemeta git ...for those.docs/claude_code_skills.md: the meta-plugins summary gives the new routing rule.meta-execandmeta-pluginsskill copies (.meta/skills/,claude-plugin/skills/): regenerated withmake skillsfrom meta_cli#39, which updates both skills (tests/init.batsrequires the copies to match meta_cli). The meta-plugins skill now documentsmeta cargo <any cargo args>in place of the removedmeta rust build|test.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.json0.2.0 → 0.2.1, because the plugin's skills changed (the bump rule is indocs/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") formeta cargo --helpandmeta cargo build --help. Themeta rust …cases are gone along with the alias.4.
Cargo.lockcarries meta_rust_cli#15's dependency change (shlexin;anyhow,meta_core,serde_jsonout), so CI's--lockedbuild passes against it.How CI tests the set
clone-child-repos.shclones each child from a branch named like this PR's branch when one exists, and frommainotherwise. So that CI builds this PR against both sibling PRs, I pushed branches namedfix/install-force-and-meta-rustin gitkb/meta_cli and gitkb/meta_rust_cli, pointing at #39's and #15's heads (nowea11fcdand6b44b9b). They are test mirrors only, and should be deleted once the sibling PRs merge.How it was verified
CARGO_INSTALL_ROOT, own target dir, a hand-writtenloopalready inbin/): with main's Makefile,make install-loop_clifails withbinary `loop` already exists in destination(exit 2). With this branch,make installexits 0, and cargo reportsReplaced package 'unknown' with 'loop_cli v0.2.22'.make uninstall(scratchHOME) removes every binary and exits 0.ea11fcd, meta_rust_cli6b44b9b):cargo build --workspace --lockedpasses. With a scratchMETA_DATA_DIR, so no installed plugin is used:meta --primary exec -- cargo --versionruns real cargo in all 11 cloned repos (the 2 failures are the unclonedagentandmeta-plugins),meta --primary --dry-run cargo fmt --checkplans 11 runs, andmeta --include meta_rust_cli cargo --versionprints cargo's version. bats isn't installed locally. CI runs the full suite against these heads via the mirror branches; the CI log showsCloning meta_cli from branch fix/install-force-and-meta-rust.Look closely at
--forcealso replaces aloop(ormeta) that belongs to a different cargo package, not only an untracked copy. That seems right formake installof meta, andinstall.shalready overwrites the same way, but it is a behaviour change.tests/init.batsand--lockedCI 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 withgit clone --depth 1at its default branch when the job starts. Nothing records which child revisions a parent tag stands for. So the binaries and crates forvXcome from whatever each child'smainis 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 fromon-push-main.yml'srelease-taggedrepository_dispatch, withactions/checkoutand noref, 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:
rev:per project in.meta.yaml, or a small lock file).on-child-update.ymlalready opens a sync PR per child change and could write the SHA.release.yml(its two inline clone lists) andclone-child-repos.shthen check out those SHAs. The tag then fully describes the source.vX. That makes reruns reproducible but doesn't change what is picked at release time.Option 1 seems closest to how
on-child-updatealready 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.