Skip to content

fix(ci): the reusable lanes land a module's static web assets, not only its DLLs - #3535

Merged
meshweaver-cloud[bot] merged 1 commit into
mainfrom
fix/3514-lanes-land-module-static-assets
Sep 7, 2026
Merged

meshweaver-cloud[bot] merged 1 commit into
mainfrom
fix/3514-lanes-land-module-static-assets

Conversation

@rbuergi

@rbuergi rbuergi commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3514.

Which half was wrong

The lane, not the packer. A module legitimately carries static web assets and the platform has
a complete lane for them: ModulePackCommand packs wwwroot/** → meshweaver/moduleassets/,
ModuleLandingService writes each asset at its verbatim module-relative path beside the entry
assembly, and MeshModuleStaticAssetExtensions.ModuleWwwrootPath looks for wwwroot beside the
loaded assembly
and serves it at _content/<Name>/…. Production is unaffected because
ServedModuleBytes reads the moduleassets/ prefix correctly.

The recorded constraint "modules cannot carry native or static assets" is a different claim
wearing the same words: native payloads genuinely cannot ride (Assembly.LoadFrom never reads
a module's deps.json, #1728); static web assets can, and that half was corrected twice
already — most recently when #2221 fixed a registry shelf that discarded them.

So the two lanes' cp -R "$u"/meshweaver/modules/. "$EXT/$name/" was simply landing half the
bundle. Nothing was producing assets a module should not have.

What changed

Both node-repo-gate.yml and node-repo-publish-bake.yml now also copy
meshweaver/moduleassets/. into the same module directory, and assert per file that what the
bundle ships is what the directory holds — failing closed with both numbers and the missing path.

Two deliberate refinements over the pattern in the issue:

  • module-relative, not wwwroot-specific. The packer's contract (and ValidateAssetPath's) is
    a relative path; wwwroot/ is merely the only root it emits today. cp -R moduleassets/.
    survives a second root, cp -R moduleassets/wwwroot/. does not.
  • a denominator in the log, not just a count: external modules: 30 composed, 6 of them carrying static web assets, 294 asset file(s) landed. An uncounted zero is what let this ride —
    24 of 30 real modules legitimately ship none, so "0 landed" looked exactly like the healthy case.

node-repo-compile-check.yml (cp modules/*.dll refs/) and node-repo-module-pack.yml are
deliberately unchanged: a Roslyn reference set and a bundle inspection have no request path.

Verification

.github/scripts/test-module-asset-landing.py executes the lanes rather than asserting about
them, and runs in dotnet-test.yml beside the other workflow-shell gates.

  • Both lanes' step is extracted by id: — a copy would pass while the real thing rots. Losing
    the id is RED, not a skip (watched: it dies with "no step with id 'ext-modules'").
  • The verdict is read off the landed bytes' sha256, never off the step's log.
  • The bundle layout is read out of NuGetPackageWriter.ModuleAssetFolder in src/, so renaming
    the constant reds the harness instead of orphaning the lane.
  • Three controls (no-asset bundle still composes · no-entry-DLL bundle is refused · the DLL closure
    still lands) so the harness can tell "it lands assets" from "it always passes".

Both falsification arms, watched:

arm result
whole asset block removed from the REAL node-repo-gate.yml harness exit 1, 12 findings, 0/12 landed
only the cp removed, the lane's own check kept the step exits non-zero naming the first missing asset — the check is not a no-op
id: ext-modules removed harness exit 1, refuses to run
a broken link added to the new doc page DocumentationLinkIntegrityTest fails naming it

The loop closed on the URL, not the directory. Real bundle → the lane step extracted from
node-repo-gate.yml → a real WebApplication with AddMeshModuleStaticAssets() /
UseMeshModuleStaticAssets() over the landed tree → an actual fetch. Against
MeshWeaver.Blazor.Chat 1.0.23 (23 assemblies, 283 assets, 5 mounts):

request with the fix pre-fix
_content/MeshWeaver.Markdown.Collaboration/Components/collaborativeMarkdownView.js — the literal URL in #3514's stack trace 200, text/javascript, 12,391 B, byte-identical 404
_content/MeshWeaver.Blazor.Chat/chatResizer.js (own asset, re-based) 200, 4,273 B, byte-identical 404
_content/MeshWeaver.Blazor.Chat/ChatMessageList.razor.js (collocated JS) 200, 22,739 B, byte-identical 404
_content/MeshWeaver.Blazor.Chat/background.png (binary) 200, byte-identical 404
the same URL with Accept-Encoding: br 200 + Content-Encoding: br, byte-identical to the landed .br sibling 404
_content/MeshWeaver.Blazor.Chat/does-not-exist.js — negative control 404 404

The negative control is what makes the first five mean something. The pre-fix host's entire
complaint, at Debug: Module MeshWeaver.Blazor.Chat contributes no static assets — no wwwroot at …/MeshWeaver.Blazor.Chat/wwwroot.

Real-bundle measurement — the extracted lane step run against all 30 module bundles of
MeshWeaver.Plugins run 34086016940 (2026-09-07):

modules with assets asset files shipped landed byte-identical
with the fix 30 6 294 294
pre-fix 30 6 294 0, exit code 0

The 6: Blazor.Chat 283, Blazor.OpenStreetMap 7, Blazor.Analysis/.EntityViews/.Graph/
.Radzen 1 each (their scoped-CSS aggregates).

Local: actionlint (all workflows) · check-workflow-shell.py · check-workflow-timeouts.py
(71 jobs, 0 violations) · check-pr-secret-preflight.py · MeshWeaver.Documentation.Test
304/304 Release -warnaserror.

Work product

Doc/Architecture/ModuleStaticAssets — the four hops, the landing invariant, every site that lands
a module and what each owes, why the failure is invisible to review/CI/production, and the measured
denominators. Indexed from Doc/Architecture; What's New entry added.

Two things the issue's premise gets slightly wrong

  1. Education feat(mcp): Space instance-sync MCP tool #274 is OPEN, not landed. The issue cites it as the fix pattern; its branch does
    carry the moduleassets copy, but the PR is a different change (ci: fetch the upstream once, gate the bake in parallel…), is mergeable_state: blocked, and Education's main still has the
    broken block — so Education's mesh e2e is still 404ing. That half is theirs to land; this change
    does not touch it.
  2. There is a third latent copy. MeshWeaver.Plugins/scripts/mesh-test.py unpacks bundles whole
    and hands the mesh --module …/meshweaver/modules/<Name>.dll, so ModuleWwwrootPath resolves to
    …/meshweaver/modules/wwwroot while the assets sit at …/meshweaver/moduleassets/wwwroot. Same
    shape, latent only because nothing points a browser at it — filed as
    Systemorph/MeshWeaver.Plugins#1440.

Copilot AI lite review requested due to automatic review settings September 7, 2026 05:50
@meshweaver-cloud
meshweaver-cloud Bot enabled auto-merge September 7, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional change is well-guarded by an executing harness and fail-closed checks; remaining feedback is limited to minor log/comment accuracy.

Pull request overview

Fixes a CI gap in the reusable node-repo gate/publish-bake workflows so externally composed module bundles land their static web assets (CSS/JS) alongside their DLL closure, preventing _content/<Module>/… 404s in browser-driven test environments.

Changes:

  • Update node-repo-gate.yml and node-repo-publish-bake.yml to also copy meshweaver/moduleassets/. into /ext/<Module>/ and fail closed per missing asset file.
  • Add a workflow-shell harness (test-module-asset-landing.py) executed by dotnet-test.yml to extract the real workflow step (by id:) and verify asset landing byte-for-byte with falsification arms.
  • Add documentation: a new architecture page plus a What’s New entry, and link the page from the Architecture index.
File summaries
File Description
src/MeshWeaver.Documentation/Data/WhatsNew/2026-09-07-a-module-brings-its-styling-with-it.md Announces the fix and explains user-visible symptoms/why it stayed hidden.
src/MeshWeaver.Documentation/Data/Architecture/ModuleStaticAssets.md Documents the bundle/landing/serving contract and where asset-loss can recur.
src/MeshWeaver.Documentation/Data/Architecture.md Adds the new architecture page to the catalog index.
.github/workflows/node-repo-publish-bake.yml Lands moduleassets into /ext/<Module>/ and validates shipped-vs-landed assets per file.
.github/workflows/node-repo-gate.yml Mirrors the same external-module asset landing + fail-closed verification in the gate lane.
.github/workflows/dotnet-test.yml Executes the new harness so the workflow shell is actually tested in-core CI.
.github/scripts/test-module-asset-landing.py New harness to extract and execute the real workflow step and assert correct asset landing (with negative controls).
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +71 to +75
# (workflow, job id, step id) — both lanes carry the same landing block and both are executed.
LANES = [
(".github/workflows/node-repo-gate.yml", "ext-modules"),
(".github/workflows/node-repo-publish-bake.yml", "ext-modules"),
]
echo "external module composed: $name ($(basename "$b")) — $assets static asset file(s)"
done
[ -n "$MODULE_ARGS" ] || { echo "::error::external modules were requested but none were assembled — the artifact pattern matched nothing and no registry bundle was fetched."; exit 1; }
echo "external modules: $MODULE_COUNT composed, $ASSET_MODULES of them carrying static web assets, $ASSET_FILES asset file(s) landed under /ext/<module>/wwwroot"
echo "sealing $name as module package '$pkg'"
done
[ -n "$MODULE_ARGS" ] || { echo "::error::external modules were requested but none were assembled — the artifact pattern matched nothing and no registry bundle was fetched."; exit 1; }
echo "external modules: $MODULE_COUNT composed, $ASSET_MODULES of them carrying static web assets, $ASSET_FILES asset file(s) landed under /ext/<module>/wwwroot"
@rbuergi
rbuergi force-pushed the fix/3514-lanes-land-module-static-assets branch from 0489a66 to 6a45d59 Compare September 7, 2026 05:53
…ly its DLLs

`node-repo-gate.yml` and `node-repo-publish-bake.yml` composed every external module
into `/ext/<Name>/` with `cp -R meshweaver/modules/.` and nothing else. A module bundle
carries its static web assets separately, under `meshweaver/moduleassets/`
(`NuGetPackageWriter.ModuleAssetFolder`), keeping their MODULE-RELATIVE path — which is
exactly the shape `ModuleLandingService` writes beside the entry assembly and
`MeshModuleStaticAssetExtensions` serves at `_content/<Name>/…`. So a module landed this
way LOADED PERFECTLY and then 404'd every asset it ships, announced in one LogDebug line.

Both lanes now copy `meshweaver/moduleassets/.` into the same module directory —
module-relative, not `wwwroot`-specific, so a second asset root would ride too — and
assert PER FILE that what the bundle ships is what the directory holds, failing closed
with both numbers. Each run prints its denominator (`N composed, M carrying static web
assets, K asset file(s) landed`), because an uncounted zero was what let this ride: 24 of
30 real modules legitimately ship none.

`.github/scripts/test-module-asset-landing.py` EXECUTES the fix rather than asserting
about it. It extracts BOTH lanes' step by `id:` (a copy would pass while the real thing
rots), reads the verdict off the landed bytes' sha256, reads the bundle layout out of
`NuGetPackageWriter` in src/ so a rename reds the harness, and carries two falsification
arms per lane that MUTATE the real step: the pre-fix body must fail the positive case,
and removing only the `cp` must trip the lane's own fail-closed check.

Measured against the 30 real module bundles of MeshWeaver.Plugins run 34086016940:
6 carry assets, 294 asset files shipped, 294 landed byte-identical with the fix — and
0 of 294 landed pre-fix, at exit code 0.

Closes #3514.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rbuergi
rbuergi force-pushed the fix/3514-lanes-land-module-static-assets branch from 6a45d59 to 2fe5484 Compare September 7, 2026 05:57
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

492 tests  ±0   492 ✅ ±0   43s ⏱️ -2s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

251 tests  ±0   251 ✅ ±0   2m 2s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

1 034 tests  ±0   1 034 ✅ ±0   1m 22s ⏱️ +12s
    2 suites ±0       0 💤 ±0 
    2 files   ±0       0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

1 600 tests  ±0   1 406 ✅ ±0   2m 14s ⏱️ +6s
    4 suites ±0     194 💤 ±0 
    4 files   ±0       0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

    5 files  ±0      5 suites  ±0   1m 42s ⏱️ -32s
1 473 tests ±0  1 473 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 474 runs  ±0  1 474 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

1 079 tests  ±0   1 079 ✅ ±0   3m 32s ⏱️ +2s
    3 suites ±0       0 💤 ±0 
    3 files   ±0       0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

   16 files  ±0     16 suites  ±0   11m 37s ⏱️ -13s
5 929 tests ±0  5 735 ✅ ±0  194 💤 ±0  0 ❌ ±0 
5 930 runs  ±0  5 736 ✅ ±0  194 💤 ±0  0 ❌ ±0 

Results for commit 2fe5484. ± Comparison against base commit 75a062f.

@meshweaver-cloud
meshweaver-cloud Bot added this pull request to the merge queue Sep 7, 2026
@rbuergi

rbuergi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Copilot's three findings are all correct and all message/comment drift, no behaviour: the LANES comment said (workflow, job id, step id) for a (workflow, step id) tuple, and both lanes' summary line said landed under /ext/<module>/wwwroot when the copy is deliberately module-relative — which contradicts the very generality the change argues for.

They landed a minute too late: auto-merge had already enqueued this PR (gh-readonly-queue/main/pr-3535-459e35f8), and a push now would eject it. They are fixed and verified locally (harness + actionlint + check-workflow-shell + check-workflow-timeouts + MeshWeaver.Documentation.Test 304/304) and land as a follow-up immediately after this merges, rather than churning the queue for three strings.

Merged via the queue into main with commit d2a564c Sep 7, 2026
29 checks passed
@rbuergi
rbuergi deleted the fix/3514-lanes-land-module-static-assets branch October 10, 2026 13:10
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.

Reusable lanes land a module bundle's DLLs but not its meshweaver/moduleassets/wwwroot — a browser-driven mesh 404s every _content/<Module>/ asset

2 participants