Skip to content

fix(#1786): retire six NodeTypes that type nothing and cannot compile, and guard the shape - #2030

Open
rbuergi wants to merge 1 commit into
mainfrom
fix/1786-vestigial-futures-nodetypes
Open

fix(#1786): retire six NodeTypes that type nothing and cannot compile, and guard the shape#2030
rbuergi wants to merge 1 commit into
mainfrom
fix/1786-vestigial-futures-nodetypes

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

GetDiagnostics against memex.meshweaver.cloud (serving 3.0.0-rc6.ci.4780):

the original 13 today
FutuRe/{AmericasIns,EuropeRe,AsiaRe}/LineOfBusiness Error
FutuRe/{AmericasIns,EuropeRe,AsiaRe}/TransactionMapping Error
Doc/DataMesh/SocialMedia/{Post,Profile}, SocialMedia/{Post,Profile}, Doc/Architecture/BusinessRules/Cession Ok ✅
Northwind/{Product,AnalyticsCatalog} node no longer exists ✅

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:

CS0246 The type or namespace name 'LineOfBusiness' could not be found
--- Source discovery ---
  - namespace:…/AmericasIns/LineOfBusiness/Source scope:subtree nodeType:Code
Matched Code nodes (0):
  (none) — the configuration lambda cannot reference types because no source files were included.

The parent FutuRe/LineOfBusiness compiles Ok on the same mesh, because it owns its Source/. That contrast is the whole diagnosis.

And nothing is typed by any of the six — every instance beneath them names the parent:

folder instances their nodeType
AmericasIns/LineOfBusiness 8 FutuRe/LineOfBusiness
EuropeRe/LineOfBusiness 8 FutuRe/LineOfBusiness
AmericasIns/TransactionMapping 14 FutuRe/TransactionMapping
EuropeRe/TransactionMapping 13 FutuRe/TransactionMapping
AsiaRe/* 0

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 Markdown nodes, with the description as the body. No compile, nothing lost.

Why not a sources list pointing at the parent? sources entries are absolute mesh paths, and this tree does not mount at one fixed root: FutuRe is its own partition via AddFutuRe() locally, but on memex-cloud the same nodes live under MeshWeaver/samples/Graph/Data/FutuRe/…. An absolute entry would be correct in one deployment and dead in the other, and $self cannot address a parent's sibling. Since the types are unused, not shipping them is the honest fix.

The three duplicates

samples/Graph/Data/Doc/ authors ten files and all ten duplicate src/MeshWeaver.Documentation/Data/. For the three NodeTypes among them the samples copies are strictly inferior — same node path, same lambda, but no Source/ 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 CollaborativeEditing fixture in the same folder — the one the MeshWeaver.Content.Test suite actually loads via AddDoc() — is untouched. CessionLayoutAreaTest loads AddDocumentation(), 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 own Source/ 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: CompileWatcher parks 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 sources list (mesh queries are not filesystem-resolvable). It is a floor, not a compiler. It excludes src/MeshWeaver.Documentation/Data from the "framework" set — that is a node repo that happens to live under src/, 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:

Failed!  - Failed: 1, Passed: 1
  A shipped NodeType names a content type that neither its own Source/ folder nor the
  framework declares … Offending files:
  samples/Graph/Data/FutuRe/EuropeRe/LineOfBusiness.json: LineOfBusiness
  samples/Graph/Data/FutuRe/EuropeRe/TransactionMapping.json: TransactionMapping
  samples/Graph/Data/FutuRe/AsiaRe/LineOfBusiness.json: LineOfBusiness
  samples/Graph/Data/FutuRe/AsiaRe/TransactionMapping.json: TransactionMapping
  samples/Graph/Data/FutuRe/AmericasIns/LineOfBusiness.json: LineOfBusiness
  samples/Graph/Data/FutuRe/AmericasIns/TransactionMapping.json: TransactionMapping
  samples/Graph/Data/Doc/DataMesh/SocialMedia/Post.json: SocialMediaPost
  samples/Graph/Data/Doc/DataMesh/SocialMedia/Profile.json: SocialMediaProfile
  samples/Graph/Data/Doc/Architecture/BusinessRules/Cession.json: CessionData

A second test pins both scans against vacuity — the framework scan must find the src/ tree, and LineOfBusiness/TransactionMapping must not be mistaken for framework types, or the invariant would wave through the exact #1786 shape.

Tests executed

suite result
MeshWeaver.Graph.Test 1493 passed, 0 failed
MeshWeaver.Content.Test (loads the Doc tree) 274 passed, 0 failed, 1 skipped
CessionLayoutAreaTest 6 passed

Branched off origin/main at 46a4378f9.

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

…, 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.

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.

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 to Markdown nodes 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 ShippedNodeTypeSourceResolutionTest to fail CI when a shipped NodeType’s WithContentType<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.

@github-actions

Copy link
Copy Markdown

Test Results (shard 3)

   10 files  ±0     10 suites  ±0   5m 3s ⏱️ +13s
1 731 tests ±0  1 731 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 206 runs  ±0  2 206 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results (shard 5)

1 215 tests  ±0   1 214 ✅ ±0   6m 56s ⏱️ + 1m 24s
   11 suites ±0       1 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results (shard 0)

1 232 tests  ±0   1 228 ✅ ±0   11m 48s ⏱️ +7s
    9 suites ±0       4 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results (shard 4)

1 801 tests  ±0   1 693 ✅ ±0   9m 4s ⏱️ -6s
   10 suites ±0     108 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results (shard 1)

1 930 tests  ±0   1 737 ✅ ±0   8m 45s ⏱️ +31s
   10 suites ±0     193 💤 ±0 
   10 files   ±0       0 ❌ ±0 

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results (shard 2)

3 206 tests  +2   3 205 ✅ +1   8m 24s ⏱️ -13s
    9 suites ±0       0 💤 ±0 
    9 files   ±0       1 ❌ +1 

For more details on these failures, see this check.

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

@github-actions

Copy link
Copy Markdown

Test Results

    59 files  ±0      59 suites  ±0   50m 3s ⏱️ + 1m 58s
11 115 tests +2  10 808 ✅ +1  306 💤 ±0  1 ❌ +1 
11 590 runs  +2  11 283 ✅ +1  306 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit b63fbf0. ± Comparison against base commit 46a4378.

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.

2 participants