test: render-safety test for the Python pandas sample's Explorer area#469
Open
rbuergi wants to merge 1 commit into
Open
test: render-safety test for the Python pandas sample's Explorer area#469rbuergi wants to merge 1 commit into
rbuergi wants to merge 1 commit into
Conversation
Adds PandasExplorerLayoutAreaTest to MeshWeaver.Hosting.Monolith.Test. It
renders the REAL live-compiled Doc/DataMesh/PythonPandasNode/PandasExplorer
NodeType (Source ships as embedded resources served by AddDocumentation, so
the mesh compiles the actual production frontend with Roslyn) and its
LiveFrame instance's Explorer area, mirroring CessionLayoutAreaTest.
Verifies the production render-safety contract when NO py/pandas participant
is attached (the default in prod/CI):
1. Explorer renders a StackControl composing title + intro + toolbar + grid.
2. The toolbar resolves to a Stack of real ButtonControls (load, append,
groupby, rolling, describe, refresh, reset).
3. THE POINT: the reactive grid DEGRADES to the "No Python pandas node
attached" notice within the backend timeout — it never hangs and never
shows a raw error. Every assertion runs under a hard wall-clock budget,
so a genuine hang trips the bound and fails the test instead of blocking
CI (the exact production hazard guarded).
The Python participant (clients/python/.../pandas_node.py) is already covered
by clients/python/tests/test_pandas_node.py (15 tests: load/append/reset/
render/groupby/rolling/describe, the CSV-from-content path, the code surface,
and the end-to-end demo), so no new Python test is added.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What
Adds a render/behavior test for the Python pandas sample's C# frontend — the live-compiled
Doc/DataMesh/PythonPandasNode/PandasExplorerNodeType and itsExplorerlayout area (PandasExplorerLayoutAreas).New file:
test/MeshWeaver.Hosting.Monolith.Test/PandasExplorerLayoutAreaTest.csWhy
The
Explorerarea drives a Pythonpy/pandasmesh participant. In prod and CI no such participant is attached, and the contract is that the reactive grid then degrades to a "No Python pandas node attached" notice within the backend timeout — it must never hang and never show a raw error. There was no C# test guarding this render-safety behavior.How it's tested
The test renders the REAL embedded Source, not a test double. The Pandas NodeType, its two
Source/*.csfiles, and theLiveFrameinstance all ship as embedded resources underMeshWeaver.Documentation.Data, soAddDocumentation()registers the wholeDocpartition and the mesh compiles the actual production frontend live with Roslyn — mirroring the siblingCessionLayoutAreaTest.With no
py/pandasparticipant attached, the single test asserts:Explorerrenders aStackControlcomposingtitle+intro+toolbar+gridsub-areas.toolbarresolves to a horizontalStackControlwhose named sub-areas are the realButtonControls (load,append,groupby,rolling,describe,refresh,reset) — genuine framework controls, not an HTML string.gridsub-area degrades to the"No Python pandas node attached"markdown notice. Every assertion runs under a hard wall-clock budget (Within(...)), so a genuine hang trips the bound and fails the test rather than blocking CI — the exact production hazard being guarded.Python participant
The Python participant (
clients/python/meshweaver/examples/pandas_node.py) is already covered byclients/python/tests/test_pandas_node.py(15 tests: load/append/reset/render/groupby/rolling/describe, the CSV-from-content path, the code surface, and the end-to-end demo) — all green — so no new Python test is added.Test run
🤖 Generated with Claude Code