Repository navigation
build(release): bundle each default plugin's pinned release archive - #2546
Conversation
DefaultPlugin gains `repository`, the GitHub owner/name whose release v<version> publishes the plugin's archives (Mesh-LLM/capsules for capsules). The release job fetches the pinned archive from there and bundles it, so a pin bump stays a one-entry change. A node still never downloads a default. Signed-off-by: Ethan Zhang <github@yzhang.io>
repository bundled-plugins --target TRIPLE reads DEFAULT_PLUGINS from mesh-llm-plugin-manager's defaults.rs and prints, for each default pinned for the target, `<name> <version> <sha256> <url>`, the URL being the archive on the plugin's own GitHub release. A default with no pin for the target prints nothing. A list it cannot read into well-formed entries (name, version, owner/name repository, a lowercase hex SHA-256 per target) fails. repository bundled-plugins-check --bundle DIR has the bundle's own mesh-llm install its defaults into a scratch home, config and store, with none of the machine's MESH_LLM_* settings, finding plugins/ beside itself as an installed node does, and fails unless every archive there comes out installed as a default. Signed-off-by: Ethan Zhang <github@yzhang.io>
package-release.sh now places each default plugin the host pins for the release target under plugins/ in the bundle, where a node installs its defaults from. `repository bundled-plugins` lists them from DEFAULT_PLUGINS; each archive is downloaded from the plugin's own GitHub release, checked against its pinned SHA-256 and placed as plugins/<name>-<version>-<target>.tar.gz. A missing archive or a digest mismatch fails the release, and the bundle's own host must then install every placed archive as a default (`repository bundled-plugins-check`). A target with no pin, such as Windows, bundles nothing. MESH_LLM_BUNDLED_PLUGINS_INPUT_DIR names a directory that already holds the archives, for offline or local runs; they are checked against the pins all the same. Signed-off-by: Ethan Zhang <github@yzhang.io>
mesh-llm update staged only the host, its manifests and native-runtimes/ from a composed bundle and dropped any other directory, so an updated node kept the previous release's plugins/ (or none) and never installed the default plugins its new release bundles. A bundle's plugins/, which holds the pinned release archives of those defaults, now installs with the host and replaces the previous one. A node updating from a release without this change still drops it. Signed-off-by: Ethan Zhang <github@yzhang.io>
RELEASE.md, ci/ci.md and the plugin docs now say that macOS and Linux release archives carry each pinned default plugin's release archive in plugins/, fetched from the plugin's own GitHub release and checked against the pin, that the bundle's host must install it, that packaging therefore needs network access unless MESH_LLM_BUNDLED_PLUGINS_INPUT_DIR holds the archives, and that mesh-llm update installs a release's plugins/. Signed-off-by: Ethan Zhang <github@yzhang.io>
The list `repository bundled-plugins` reads must be the one the host compiles. It now refuses what could make them differ: more than one DEFAULT_PLUGINS, any attribute but a doc comment (such as #[cfg] or #[cfg_attr]) on it, on an entry or on a field, and an entry that takes fields from another (`..BASE`). `repository bundled-plugins-check` now also fails when the bundle's host reports a default it pins for this platform as not bundled, the line `plugins install-defaults` prints for NotBundled, so a list that misses a pin cannot pass by bundling nothing. A bundle with no archive passes when the host pins nothing there. A test keeps the line in step with mesh-llm-commands. The host runs with MESH_LLM_INTERNAL_HELPER=1, as `mesh-llm update` runs a staged binary, so a packaging run records and sends no analytics. Signed-off-by: Ethan Zhang <github@yzhang.io>
place_bundled_plugins now runs `repository bundled-plugins-check` when the pin list names nothing for the target too, so a host that pins a default there that the bundle lacks fails the release. No empty plugins/ is left in that case. Downloads are restricted to HTTPS, redirects included. Signed-off-by: Ethan Zhang <github@yzhang.io>
…archives The CI inventory described the Linux composition rows as only verifying, composing and archiving producer bytes. They now also fetch each pinned default plugin archive from its GitHub release over HTTPS and run the bundled plugin check with the composed host. RELEASE.md notes that the check also runs when nothing is listed. Signed-off-by: Ethan Zhang <github@yzhang.io>
…ows build The check ran the host with --log-format json, but the NotBundled line it reads is console text, which a JSON output sink would drop; it now runs plain plugins install-defaults. The test helpers that drive the shell stand-in host, and their imports, are Unix-only, as the host is, so the xtask tests still build on Windows. Signed-off-by: Ethan Zhang <github@yzhang.io>
|
Review record (Ethan's agent):
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Virgile-pct
left a comment
There was a problem hiding this comment.
Checked the Windows side of mesh-llm update, since the PR leaves Windows packaging alone:
- A Windows bundle has no
plugins/, socollect_bundle_filesnever stages it there and the Windows update is unchanged. - If a Windows bundle carries
plugins/one day, it goes throughwindows_update_script, notreplace_bundle_files(that one iscfg(not(windows))). The script already handles directory entries generically (Test-Path -PathType Container,Remove-Item -Recurse,Move-Item), the same pathnative-runtimes/takes, so nothing more would be needed there. test_stage_composed_product_bundle_installs_its_pluginssits incomposed_product_regression_tests, which is#[cfg(all(unix, test))], so it doesn't run on Windows. That's consistent with the Rust replace path being Unix-only; just noting it because the neighbouring "Windows zip lane" scenario lives in the same Unix-only module.
I didn't review the bundled-plugins parser or the release script changes.
ndizazzo
left a comment
There was a problem hiding this comment.
No blocking findings in the pin parser, archive placement and verification, or updater integration. I also checked the installer and release-composition callers and confirmed all three capsules asset digests match the pins. Shell syntax validation passed. I haven't run Rust tests or a full release build.
i386
left a comment
There was a problem hiding this comment.
Reviewed as part of the open-PR sweep. This closes a real gap left by #2337 (pinned defaults existed but no release pipeline ever placed them in a bundle), and the design keeps DEFAULT_PLUGINS as the single reviewed source of truth:
- The
syn-based reader is fail-closed in the ways that matter at the final head: it refuses attributes (#[cfg]/#[cfg_attr]) on the list, entries, or fields, refuses..BASEspreads and duplicate pins/names, restricts name/version/repository/target to URL- and filename-safe characters, and requires a 64-char lowercase-hex digest.the_shipped_defaults_parsepins it to the real file. package-release.shdigest-checks every archive whether downloaded over HTTPS or supplied viaMESH_LLM_BUNDLED_PLUGINS_INPUT_DIR, and runsbundled-plugins-checkunconditionally on the composed bundle. The check is genuinely two-directional because it drives the bundle's ownmesh-llm plugins install-defaultsin a sandboxed environment (MESH_LLM_* stripped, scratch home/config/store): the host refuses archives that don't hash to its compiled pins, and a default pinned-but-missing fails the install — so a parser that drifted from the compiled pins fails the release instead of shipping an emptyplugins/.mesh-llm updatestagingplugins/through the same backup/replace/rollback path asnative-runtimes/(with the replace-not-merge regression test) fixes the stale-defaults-on-update hole. The one-time gap for nodes updating from pre-plugins releases is called out for release notes.- Windows exclusion is justified (no pins exist for Windows targets).
Approving.
- goose-contributing: fork merge times now hours to weeks (12 fork PRs merged 10-18..10-25, 1 h to 23 days); Codex reviewed 13 of 37 merged PRs (#12619, #12914, #13024, #12946) instead of 4 of 37. aaif-goose/goose#13071 removed the in-repo AI review workflows; the Codex app still reviews. - llama-cpp-contributing: PR checker also flags `PR_TEMPLATE`, `MAINTAINER_CAN_MODIFY`, `AI_DETECTED` (ggml-org/llama.cpp#31017, #31122, #31135, #31159); new `Behavior Check` CI (ggml-org/llama.cpp#31036); history numbers and closures since 10-21. - mesh-llm-contributing: the no-Python rule is now enforced by `just ci-crate-lists` (Mesh-LLM/mesh-llm#2530); ndizazzo's ranked [P2]/[P3] review findings (Mesh-LLM/mesh-llm#2422, #2511, #2513, #2565); merge pace and date. - mesh-llm-org: default plugins live in their own repos and ship as pinned archives in release bundles (Mesh-LLM/mesh-llm#2546, #2520). Checked, no change: nixos-org, nixpkgs-contributing, nixpkgs-maintaining, block-org, buzz, buzz-app, berd, ggml-org, aaif-goose-org, archlinux-org, aur-contributing; switches table unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Title
build(release): bundle each default plugin's pinned release archive
Original problem
#2337 made a node install its default plugins only from a copy its release bundles:
plugins/<name>-<version>-<target>.tar.gzbeside themesh-llmbinary, checked against the pin inDEFAULT_PLUGINS(mesh-llm-plugin-manager/src/defaults.rs). Nothing in the release pipeline puts that archive there. So release bundles carry no default plugin, and a node installs none: capsules 0.1.4 is pinned, but no 0.78.x bundle has it.mesh-llm updatealso left a bundle'splugins/behind, so an updated node never got its new release's defaults.Diagnostics
mesh/scripts/package-release.shon main composes the host, its manifests andnative-runtimes/, and nothing else.bundled_plugins_dir()finds noplugins/in a 0.78.x bundle.collect_bundle_filesinrelease_fetch.rsstages only the host files andnative-runtimes/.Fix
DEFAULT_PLUGINSstays the single reviewed source. Bumping a pin is still a one-entry change.DefaultPlugin.repositorynames the GitHub repository whose releases publish the pinned archive. capsules:Mesh-LLM/capsules.cargo xtool repository bundled-plugins --target Tparsesdefaults.rswithsynand prints, for each default pinned forT, its name, version, SHA-256 and release URL (https://github.com/<repository>/releases/download/v<version>/<name>-<version>-<T>.tar.gz).DEFAULT_PLUGINS, a#[cfg]or other attribute on the list or an entry, a..BASEentry, a malformed field, or a non-hex digest.package-release.shfetches each listed archive over HTTPS only, checks its SHA-256 against the pin, and places it underplugins/. This runs for the macOS and Linux bundles (all six compose rows) and uses the base target triple for every flavor.MESH_LLM_BUNDLED_PLUGINS_INPUT_DIRcan supply the archives instead, for offline and local runs. They are still digest-checked.cargo xtool repository bundled-plugins-check --bundle DIRruns the bundle's ownmesh-llm plugins install-defaultsagainst a scratch home, config and store, with no inheritedMESH_LLM_*and analytics off (MESH_LLM_INTERNAL_HELPER=1). It checks both directions:package-release.shalways runs it on macOS and Linux, so a parser that drifted from the compiled pins fails the release instead of passing silently.mesh-llm updatenow installs a bundle'splugins/with the host and replaces the previous one. This is the same backup, rename and rollback path asnative-runtimes/.Docs:
RELEASE.md,ci/ci.md,mesh/docs/plugins/README.mdand the CI inventory are updated. Composition now fetches the pinned archives from GitHub over HTTPS. Nothing else changed.Unchanged:
release.yml(curl and network access are already there in every compose row) and Windows (no default pins a Windows build;package-release.ps1bundles nothing).One-time gap: a node updating from a release without fix 5 still drops
plugins/when it updates to the first release that carries it. Its defaults install from the update after that, or right away with a fresh install. This belongs in the release notes.This replaces the closed #2520, which built the plugin from the release commit. The plugin is now released from Mesh-LLM/capsules, and the bundle carries the archive that
DEFAULT_PLUGINSpins. It is independent of #2537.Validation
cargo fmt --all --checkpasses.cargo clippy -D warningsis clean formesh-llm-plugin-manager,mesh-llm-systemandxtask(withautomation-contracts).mesh-llm-plugin-manager67 pass;mesh-llm-system241 pass, including the update test; the xtaskbundled_pluginstests (10) and thepackage_release_adaptercontract tests (4) pass.just ci-automation-contracts: the suites that fail here fail the same way on main, because they need external SDK sources or bash 4. That is macOS's bash 3.2, which lacksmapfile.mesh-llmand the real capsules 0.1.4aarch64-apple-darwinarchive (it matches the pin on main):release.ymlrun, which can only run from a tag.Summary by CodeRabbit