fix(#1786): retire six NodeTypes that type nothing and cannot compile, and guard the shape - #2030
fix(#1786): retire six NodeTypes that type nothing and cannot compile, and guard the shape#2030rbuergi wants to merge 1 commit into
Conversation
…, and guard the shape
Six sample NodeTypes — FutuRe/{AmericasIns,EuropeRe,AsiaRe}/{LineOfBusiness,
TransactionMapping} — were copy-pasted from their parents: the same
WithContentType<LineOfBusiness>() lambda, but none of the parent's Source/*.cs.
They are still parked at CompilationStatus.Error on memex.meshweaver.cloud today,
and the compiler is explicit about why:
CS0246 The type or namespace name 'LineOfBusiness' could not be found
Matched Code nodes (0):
(none) — the configuration lambda cannot reference types because no source
files were included.
Not one node anywhere is typed by any of the six: every LoB instance carries
nodeType FutuRe/LineOfBusiness and every mapping instance FutuRe/TransactionMapping
(the parents, which own their Source/ and compile Ok). So the six could never do
anything but park. They keep their governance prose and their children as ordinary
Markdown nodes.
Also removes three source-less DUPLICATES under samples/Graph/Data/Doc/ — Cession,
SocialMedia/Post and SocialMedia/Profile. src/MeshWeaver.Documentation/Data authors
the same three mesh paths WITH their Source/ folders and their instances; the samples
copies carry no source, no instances, and can only clobber the good nodes on a
deployment that imports both. CessionLayoutAreaTest exercises the documentation tree
(AddDocumentation()), not these; its comment saying otherwise is stale. The
CollaborativeEditing fixture the Content tests do rely on is untouched.
The guard: a shipped NodeType must not name a content type that neither its own
Source/ folder nor the framework declares. WithContentType<T> is the one reference a
NodeType always makes explicitly, so it is checkable in milliseconds — where the real
compile only runs on a deployment, and fails quietly there: CompileWatcher parks the
type and serves the cached error without retrying, so pages stay broken while CI is
green. That is why #1786 sat unticketed as a standing condition.
Proven non-vacuous: reverting only the data half fails the compiled test naming all
nine files. Graph 1493 passed, Content 274 passed, CessionLayoutAreaTest 6 passed.
There was a problem hiding this comment.
Pull request overview
This PR removes several sample-tree NodeType definitions that cannot compile (because they reference content types with no corresponding Source/*.cs), replaces them with ordinary Markdown nodes where appropriate, and adds a filesystem-based test guard to prevent shipping NodeTypes whose WithContentType<T>() cannot be satisfied by either the NodeType’s own Source/ folder or framework-declared types.
Changes:
- Retire six unused, non-compilable
FutuRe/*/{LineOfBusiness,TransactionMapping}NodeTypes by converting them toMarkdownnodes with their governance text preserved. - Remove three source-less duplicate NodeTypes under
samples/Graph/Data/Doc/**that can clobber correctly-authored documentation-tree NodeTypes. - Add
ShippedNodeTypeSourceResolutionTestto fail CI when a shipped NodeType’sWithContentType<T>()names a type that the shipped sources/framework cannot provide.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/MeshWeaver.Graph.Test/ShippedNodeTypeSourceResolutionTest.cs | Adds a guard test to prevent shipping NodeTypes whose named content types cannot be resolved from shipped sources/framework. |
| samples/Graph/Data/FutuRe/EuropeRe/TransactionMapping.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/FutuRe/EuropeRe/LineOfBusiness.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/FutuRe/AsiaRe/TransactionMapping.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/FutuRe/AsiaRe/LineOfBusiness.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/FutuRe/AmericasIns/TransactionMapping.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/FutuRe/AmericasIns/LineOfBusiness.json | Converts an unused/non-compilable NodeType into a Markdown governance node. |
| samples/Graph/Data/Doc/DataMesh/SocialMedia/Profile.json | Removes a source-less duplicate NodeType that can override the correctly-authored documentation-tree node. |
| samples/Graph/Data/Doc/DataMesh/SocialMedia/Post.json | Removes a source-less duplicate NodeType that can override the correctly-authored documentation-tree node. |
| samples/Graph/Data/Doc/Architecture/BusinessRules/Cession.json | Removes a source-less duplicate NodeType that can override the correctly-authored documentation-tree node. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results (shard 2)3 206 tests +2 3 205 ✅ +1 8m 24s ⏱️ -13s For more details on these failures, see this check. Results for commit b63fbf0. ± Comparison against base commit 46a4378. |
Test Results 59 files ±0 59 suites ±0 50m 3s ⏱️ + 1m 58s For more details on these failures, see this check. Results for commit b63fbf0. ± Comparison against base commit 46a4378. |
Closes the remaining half of #1786. Measured on prod first — of the 13 NodeTypes that issue reported parked on memex.meshweaver.cloud, 7 are already green and 6 are still Error today; this fixes those 6 plus 3 latent duplicates, and adds the guard that would have caught all nine at authoring time.
What is still broken, verified live today
GetDiagnosticsagainstmemex.meshweaver.cloud(serving3.0.0-rc6.ci.4780):FutuRe/{AmericasIns,EuropeRe,AsiaRe}/LineOfBusinessFutuRe/{AmericasIns,EuropeRe,AsiaRe}/TransactionMappingDoc/DataMesh/SocialMedia/{Post,Profile},SocialMedia/{Post,Profile},Doc/Architecture/BusinessRules/CessionNorthwind/{Product,AnalyticsCatalog}The six: copy-paste NodeTypes that type nothing
Each carries the identical configuration lambda as its parent but none of the parent's
Source/*.cs:The parent
FutuRe/LineOfBusinesscompiles Ok on the same mesh, because it owns itsSource/. That contrast is the whole diagnosis.And nothing is typed by any of the six — every instance beneath them names the parent:
nodeTypeAmericasIns/LineOfBusinessFutuRe/LineOfBusinessEuropeRe/LineOfBusinessFutuRe/LineOfBusinessAmericasIns/TransactionMappingFutuRe/TransactionMappingEuropeRe/TransactionMappingFutuRe/TransactionMappingAsiaRe/*A repo-wide scan for
"nodeType": "<any of the six>"returns 0 files. So they were pure dead weight that could only ever park.They stay as nodes — the folder must exist for its children, and the governance prose is worth keeping — but as ordinary
Markdownnodes, with the description as the body. No compile, nothing lost.The three duplicates
samples/Graph/Data/Doc/authors ten files and all ten duplicatesrc/MeshWeaver.Documentation/Data/. For the three NodeTypes among them the samples copies are strictly inferior — same node path, same lambda, but noSource/and no instances, while the documentation copies have both. On a deployment importing both, the source-less copy can only clobber a good node; that is a plausible origin for the SocialMedia/Cession third of #1786 in the first place.Removed. The
CollaborativeEditingfixture in the same folder — the one theMeshWeaver.Content.Testsuite actually loads viaAddDoc()— is untouched.CessionLayoutAreaTestloadsAddDocumentation(), not this tree; the comment in it claiming otherwise is stale.The guard
ShippedNodeTypeSourceResolutionTest— a shipped NodeType must not name a content type that neither its ownSource/folder nor the framework declares.WithContentType<T>()is the one reference a NodeType always makes explicitly, so this is checkable from the filesystem in ~0.4 s. The real compile only runs on a deployment that imports the tree, and it does not fail loudly there:CompileWatcherparks the type and serves the cached error without retrying, so every page backed by it is broken while CI stays green. That is exactly why #1786 describes a standing condition nothing was ticketing.Scope is stated honestly in the test: it does not type-check the whole lambda, and it skips a NodeType with an explicit
sourceslist (mesh queries are not filesystem-resolvable). It is a floor, not a compiler. It excludessrc/MeshWeaver.Documentation/Datafrom the "framework" set — that is a node repo that happens to live undersrc/, and its per-NodeType Source folders would otherwise vouch for types no framework assembly exports.Non-vacuity — proven, not asserted
Reverting only the data half and re-running the compiled test fails, naming all nine:
A second test pins both scans against vacuity — the framework scan must find the
src/tree, andLineOfBusiness/TransactionMappingmust not be mistaken for framework types, or the invariant would wave through the exact #1786 shape.Tests executed
MeshWeaver.Graph.TestMeshWeaver.Content.Test(loads theDoctree)CessionLayoutAreaTestBranched off
origin/mainat46a4378f9.Note for whoever deploys
Merging does not clear the six on memex-cloud by itself — the mesh keeps what the source tree drops, so the six parked NodeType nodes will still be there after the sync until they are retyped or removed on the instance. That is a live-mesh write, so I have not made it.
🤖 Generated with Claude Code