Repository navigation
perf(module-pack): build inside the platform container, prebuilt siblings, per-digest tester cache - #2922
Merged
Conversation
…ings ride prebuilt, the tester is a per-digest cache
Measured on Plugins#1032 attempt 3 (MeshWeaver.Mcp): 681 s in the build
step — two multi-GB pulls, docker cp of 331 assemblies plus the shared
frameworks, and a full re-compile of MeshWeaver.AI that the same run's
floor job had already built. Three changes, one doctrine (the image IS
the room):
- ONE container: the build executes inside the platform image itself —
its /app is the reference set and its runtime is the shared-framework
surface, so the extraction and the --app/--shared-frameworks flags
disappear along with the tester-image pull.
- The BUILDER travels as files: the tester's /app (builder + generators
+ module-libs) extracted once per DIGEST into the actions cache and
mounted read-only at /tester.
- --prebuilt: an in-root ProjectReference whose assembly a prebuilt
directory supplies resolves to that DLL and is not rebuilt ("we don't
need to rebuild the mesh", maintainer 2026-08-31). Each container job
uploads module-dll-<name> right after its build; a consumer listed in
the new prebuilt-modules input waits bounded for the artifact and
falls back to source WITH A LOUD LINE — same compiler, same
verification, only slower. Measured: MeshWeaver.Mcp 2.2 s end-to-end
with a prebuilt MeshWeaver.AI, vs ~3 min rebuilding it.
Prebuilt assemblies never ride the consumer's bundle (they ship as their
own) and are covered by the platform binding-identity check like every
reference. 282/282 tests, incl. the consumed-not-rebuilt pin and the
missing-directory refusal.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the node-repo module-pack “container” lane by running mw-plugin-test build-project inside the pinned platform image, adding a --prebuilt seam to avoid rebuilding in-root sibling modules, and introducing a per-digest cache for the tester image’s extracted /app payload.
Changes:
- Add
--prebuiltsupport tomw-plugin-test build-projectand wire prebuilt sibling DLLs into the project-graph compilation reference set. - Extend the CLI argv handling to accept repeated
--prebuilt <dir>inputs. - Update
node-repo-module-pack.ymlto build inside the platform container, cache the tester/appby digest, and publish built module DLLs for other matrix entries to consume.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/MeshWeaver.PluginTester/ProjectBuild.cs | Implements prebuilt sibling discovery and adds prebuilt DLLs to Roslyn reference resolution. |
| tools/MeshWeaver.PluginTester/Program.cs | Adds --prebuilt CLI parsing and usage text for build-project. |
| test/MeshWeaver.PluginTester.Test/PrebuiltSiblingTest.cs | Adds regression coverage for consuming prebuilt siblings and refusing missing prebuilt directories. |
| .github/workflows/node-repo-module-pack.yml | Switches container builds to run inside the platform image, adds tester-app cache restore, downloads sibling DLL artifacts, and uploads module DLL artifacts for reuse. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+503
to
+510
| var referenceAssembly = Path.GetFileNameWithoutExtension(reference); | ||
| if (prebuilt.TryGetValue(referenceAssembly, out var prebuiltDll)) | ||
| { | ||
| prebuiltReferences[referenceAssembly] = prebuiltDll; | ||
| sink.Info( | ||
| $"{Path.GetFileNameWithoutExtension(current)}: ProjectReference {referenceAssembly} " | ||
| + "→ PREBUILT (this run already built it; not rebuilding the mesh)"); | ||
| continue; |
Comment on lines
+693
to
701
| # The tester's extracted /app, cached by DIGEST — one extraction per digest per repo, | ||
| # every later job restores it in seconds instead of pulling the tester image at all. | ||
| - name: Restore the tester app (per-digest cache) | ||
| if: ${{ inputs.tester-image-digest != '' }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ runner.temp }}/tester-app | ||
| key: tester-app-${{ inputs.tester-image-digest }} | ||
| - name: Build the module — and say which compiler produced it |
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
rbuergi
added this pull request to the merge queue
Aug 31, 2026
rbuergi
added a commit
that referenced
this pull request
Sep 1, 2026
…e closure — no module waits for an artifact it does not reference The first run that ever ACTIVATED prebuilt-modules (Plugins 33451338438) measured the #2922 wait indiscriminate: every container job — consumers and non-consumers alike — sat the bounded wait for every wanted module, and with the producers' uploads broken by the path: split that was a uniform ~680s of pure idling per job, poisoning the whole benchmark. The wait now runs only for modules in THIS entry's transitive ProjectReference closure (computed by a 12-line stdlib walk over csproj ProjectReferences — verified: Northwind's closure carries MeshWeaver.Import; OgCard's carries neither AI nor Import and skips every wait). The rendered bash and the embedded heredoc were proven by extraction + execution, not by eyeballing YAML dedent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The container lane's wall-time, fixed at the three measured sinks (Plugins#1032 attempt 3, Mcp job: 681 s in the build step):
docker cp331 assemblies + shared frameworks, every job/appand the frameworks are the container's ownMeshWeaver.AI(168 sources, ~3 min) recompiled by every dependent--prebuilt: consumers take the floor'smodule-dll-*artifact (bounded wait, loud same-compiler fallback). Measured: Mcp 2.2 s vs ~3 minNew lane input
prebuilt-modules(callers set it to their always-modules); each container job publishes its DLL artifact right after building, before its tests. Prebuilt references never ride the consumer's bundle and stay under the binding-identity check. 282/282 tester tests including the consumed-not-rebuilt pin.Expected end state per job: ~30–60 s portal pull + seconds of compile — decisively under the SDK path's 10–18 min.
🤖 Generated with Claude Code