Skip to content

build(release): bundle each default plugin's pinned release archive - #2546

Merged
i386 merged 9 commits into
Mesh-LLM:mainfrom
ethanyzhang:capsules-bundle-pinned-release
Oct 24, 2026
Merged

i386 merged 9 commits into
Mesh-LLM:mainfrom
ethanyzhang:capsules-bundle-pinned-release

Conversation

@ethanyzhang

@ethanyzhang ethanyzhang commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

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.gz beside the mesh-llm binary, checked against the pin in DEFAULT_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 update also left a bundle's plugins/ behind, so an updated node never got its new release's defaults.

Diagnostics

  • mesh/scripts/package-release.sh on main composes the host, its manifests and native-runtimes/, and nothing else.
  • bundled_plugins_dir() finds no plugins/ in a 0.78.x bundle.
  • collect_bundle_files in release_fetch.rs stages only the host files and native-runtimes/.

Fix

DEFAULT_PLUGINS stays the single reviewed source. Bumping a pin is still a one-entry change.

  1. DefaultPlugin.repository names the GitHub repository whose releases publish the pinned archive. capsules: Mesh-LLM/capsules.

  2. cargo xtool repository bundled-plugins --target T parses defaults.rs with syn and prints, for each default pinned for T, its name, version, SHA-256 and release URL (https://github.com/<repository>/releases/download/v<version>/<name>-<version>-<T>.tar.gz).

    • It fails on anything it would not read the way the compiler does: more than one DEFAULT_PLUGINS, a #[cfg] or other attribute on the list or an entry, a ..BASE entry, a malformed field, or a non-hex digest.
    • Names, versions and repositories are restricted to characters that are safe in a URL and a file name.
  3. package-release.sh fetches each listed archive over HTTPS only, checks its SHA-256 against the pin, and places it under plugins/. This runs for the macOS and Linux bundles (all six compose rows) and uses the base target triple for every flavor.

    • A missing archive or a digest mismatch fails the release.
    • MESH_LLM_BUNDLED_PLUGINS_INPUT_DIR can supply the archives instead, for offline and local runs. They are still digest-checked.
  4. cargo xtool repository bundled-plugins-check --bundle DIR runs the bundle's own mesh-llm plugins install-defaults against a scratch home, config and store, with no inherited MESH_LLM_* and analytics off (MESH_LLM_INTERNAL_HELPER=1). It checks both directions:

    • every placed archive must come out installed as a default, so it matches the pin compiled into that host;
    • no default the host pins for this platform may be missing from the bundle.

    package-release.sh always runs it on macOS and Linux, so a parser that drifted from the compiled pins fails the release instead of passing silently.

  5. mesh-llm update now installs a bundle's plugins/ with the host and replaces the previous one. This is the same backup, rename and rollback path as native-runtimes/.

  6. Docs: RELEASE.md, ci/ci.md, mesh/docs/plugins/README.md and 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.ps1 bundles 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_PLUGINS pins. It is independent of #2537.

Validation

  • I ran the relevant local checks, or explained why they do not apply.
    • cargo fmt --all --check passes.
    • cargo clippy -D warnings is clean for mesh-llm-plugin-manager, mesh-llm-system and xtask (with automation-contracts).
    • Tests: mesh-llm-plugin-manager 67 pass; mesh-llm-system 241 pass, including the update test; the xtask bundled_plugins tests (10) and the package_release_adapter contract 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 lacks mapfile.
    • End to end on macOS arm64, with a local mesh-llm and the real capsules 0.1.4 aarch64-apple-darwin archive (it matches the pin on main):
      • placed and installed both from the input directory and from the GitHub download;
      • a tampered archive fails (digest mismatch);
      • a missing archive fails;
      • a host that pins a default the bundle lacks fails.
    • Not checked: a full release.yml run, which can only run from a tag.
  • UI changes include screenshots or video, or explain why visual aids are not needed. No UI changes.

Summary by CodeRabbit

  • New Features
    • macOS and Linux release bundles now include verified, platform-specific default plugin archives. Updating to a new release installs its bundled plugins.
    • Windows release bundles remain unchanged and do not include plugins.
  • Documentation
    • Updated release and plugin documentation to explain which platforms include plugins and how bundled plugins are handled.

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>
@ethanyzhang

Copy link
Copy Markdown
Collaborator Author

Review record (Ethan's agent):

  • Codex, 3 rounds:
    • r1 at 29f6425 asked for changes. The syn parser could diverge from the compiled pins, so the host check could be skipped, and the sandbox check dropped the analytics opt-out. Fixed in 527e193 and 0b08dd1.
    • r2 asked for changes: the Unix-only test helpers broke the Windows test build. Fixed in 653166a.
    • r3 converged.
  • Claude (claude -p --permission-mode plan, standing in for Kimi), 2 rounds:
    • r1 asked for changes: telemetry in the sandbox, the parser and host check each covering only one direction, HTTPS-only curl, and the CI inventory. Fixed in 527e193, 0b08dd1 and 324f586.
    • r2 converged, and suggested dropping --log-format json from the check (done in 653166a).
  • No product text or rule changes, so no PM review.
  • Final head: 653166a.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: CHILL
  • Plan: Advanced
  • Run ID: de6a7ee1-c4f8-45fd-9286-87cb7b742e0f
📥 Commits

Reviewing files that changed from the base of the PR and between 95f9b48 and 653166a.

📒 Files selected for processing: 14
  • .agents/skills/manage-ci/references/current-inventory.md
  • RELEASE.md
  • ci/ci.md
  • mesh/crates/mesh-llm-plugin-manager/src/defaults.rs
  • mesh/crates/mesh-llm-system/src/autoupdate/release_fetch.rs
  • mesh/docs/plugins/README.md
  • mesh/scripts/package-release.sh
  • tools/xtask/src/cli.rs
  • tools/xtask/src/repository.rs
  • tools/xtask/src/repository/bundled_plugins.rs
  • tools/xtask/src/repository/bundled_plugins/check.rs
  • tools/xtask/src/repository/bundled_plugins/pins.rs
  • tools/xtask/src/repository/bundled_plugins/tests.rs
  • tools/xtask/tests/migration_lifecycle/package_release_adapter.rs

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

📝 Walkthrough

macOS and Linux release packaging now includes pinned default-plugin archives and checks their hashes and installation by the bundled host. New xtask commands list target-specific pins and validate bundles. The updater stages bundled plugins when replacing an installation.

Changes: Release plugin bundles

Layer / File(s) Summary
Pin data and listing commands
mesh/crates/mesh-llm-plugin-manager/src/defaults.rs, tools/xtask/src/repository/bundled_plugins/pins.rs, tools/xtask/src/repository/bundled_plugins.rs, tools/xtask/src/cli.rs, tools/xtask/src/repository.rs, tools/xtask/src/repository/bundled_plugins/tests.rs
Default-plugin entries now include the publishing GitHub repository. The xtask commands parse and validate the pin source, then list archive details for a target. Tests cover valid and malformed pin entries and listing output.
Release bundle validation
tools/xtask/src/repository/bundled_plugins/check.rs, tools/xtask/src/repository/bundled_plugins/tests.rs
The bundle check runs the bundled host’s plugins install-defaults command in an isolated environment. It fails if the host reports an unbundled pinned default or does not install each archive as an enabled, default-managed plugin.
Package and verify pinned archives
mesh/scripts/package-release.sh, tools/xtask/tests/migration_lifecycle/package_release_adapter.rs, .agents/skills/manage-ci/references/current-inventory.md, RELEASE.md, ci/ci.md, mesh/docs/plugins/README.md
Packaging copies archives from the configured input directory or downloads them over HTTPS, verifies their SHA-256 values, and checks the bundle before creating release archives. Documentation describes the macOS and Linux bundle contents, the GitHub network requirement, the checked input-directory option, and the absence of bundled plugins in Windows releases.
Stage bundled plugins during updates
mesh/crates/mesh-llm-system/src/autoupdate/release_fetch.rs
The updater stages plugins/ from a composed bundle when that directory is present. A regression test checks that replacement retains the new archive and removes the previous archive.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Package as package-release.sh
  participant Xtask as xtask bundled_plugins
  participant Defaults as DEFAULT_PLUGINS
  participant GitHub as GitHub Releases
  participant Host as Bundled mesh-llm
  Package->>Xtask: List pins for target
  Xtask->>Defaults: Read and parse pin source
  Xtask-->>Package: Return pinned archive details
  Package->>GitHub: Fetch pinned archive when no input directory is set
  Package->>Xtask: Check composed bundle
  Xtask->>Host: Run plugins install-defaults
  Host-->>Xtask: Return command result and install records
  Xtask-->>Package: Return bundle-check result
Loading
Merge Risk: ⚪ Minimal · up to 65316

No actionable issue remains before merge, subject to normal release checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 10 files. (4 skipped:… 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 describes the main change: bundling each default plugin’s pinned release archive in release builds.
Linked Issues check Passed The only directly linked issue, #2520, is closed and completed. It provides historical context only. No active directly linked issue imposes coding requirements on this PR.
Out of Scope Changes check Passed The reviewed change summary aligns with the PR’s current intent: list and verify pinned plugin archives, place them in macOS and Linux bundles, validate the bundle against the host, update plugins dur…
Full details: Out of Scope Changes check

Explanation

The reviewed change summary aligns with the PR’s current intent: list and verify pinned plugin archives, place them in macOS and Linux bundles, validate the bundle against the host, update plugins during self-update, and document and test these behaviors. The checksum-helper change supports archive digest verification. No unrelated change is evident in the available summary.

Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 48 functions across 10 files. (4 skipped: 4 unsupported.)

Resolution

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Virgile-pct Virgile-pct left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the Windows side of mesh-llm update, since the PR leaves Windows packaging alone:

  • A Windows bundle has no plugins/, so collect_bundle_files never stages it there and the Windows update is unchanged.
  • If a Windows bundle carries plugins/ one day, it goes through windows_update_script, not replace_bundle_files (that one is cfg(not(windows))). The script already handles directory entries generically (Test-Path -PathType Container, Remove-Item -Recurse, Move-Item), the same path native-runtimes/ takes, so nothing more would be needed there.
  • test_stage_composed_product_bundle_installs_its_plugins sits in composed_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 ndizazzo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 i386 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ..BASE spreads 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_parse pins it to the real file.
  • package-release.sh digest-checks every archive whether downloaded over HTTPS or supplied via MESH_LLM_BUNDLED_PLUGINS_INPUT_DIR, and runs bundled-plugins-check unconditionally on the composed bundle. The check is genuinely two-directional because it drives the bundle's own mesh-llm plugins install-defaults in 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 empty plugins/.
  • mesh-llm update staging plugins/ through the same backup/replace/rollback path as native-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.

@i386
i386 merged commit 3bddae6 into Mesh-LLM:main Oct 24, 2026
133 of 135 checks passed
kleinbem added a commit to kleinbem/skills that referenced this pull request Oct 25, 2026
- 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>
@ethanyzhang
ethanyzhang deleted the capsules-bundle-pinned-release branch October 27, 2026 15:17
@ndizazzo ndizazzo added this to the 0.79.0 milestone Nov 1, 2026
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.

4 participants