eugenegujing opened a new pull request, #7768:
URL: https://github.com/apache/texera/pull/7768

   ### What changes were proposed in this PR?
   
   The frontend renders a chart by reading a single `html-content` STRING 
column from a visualization operator's one output port. All 48 Python 
visualization descriptors re-declare that contract in identical three-line 
`getOutputSchemas` overrides, but 24 of them never had the method called by any 
test, and no spec swept the operator registry for the contract as a whole — so 
a new chart, or an edit to an existing one, could silently ship a schema the 
frontend cannot render.
   
   This PR adds one new guard spec, `VisualizationOutputSchemaSpec`, instead of 
24 per-operator tests. It walks `OperatorMetadataGenerator.operatorTypeMap`, 
selects the visualization descriptors by package, instantiates each, and 
asserts the contract, so the next chart operator is covered the moment it is 
registered. Four tests: a floor assertion (at least 48 swept) so a package 
rename cannot turn the sweep into a vacuous pass; an assertion that the only 
visualization-package registrations outside `PythonOperatorDescriptor` are 
exactly `HtmlVizOpDesc` and `UrlVizOpDesc`, which derive their schemas through 
`SchemaPropagationFunc` and are covered by their own specs, so a new non-Python 
visualization operator must be consciously added to the exclusion list; the 
main per-descriptor sweep asserting exactly one output port whose schema is a 
single `html-content` STRING attribute, with a per-operator `withClue` for 
diagnosis; and an assertion that the derived schema is independent of the in
 put schemas.
   
   No production code changed; all 48 descriptors satisfy the contract today. 
The registry-wide-guard shape follows the precedents in the same package, 
`OutputPortReuseFlagSpec` and `AttributeTypeRuleTargetSpec` (#7249).
   
   ### Any related issues, documentation, discussions?
   
   Resolves #7766
   
   ### How was this PR tested?
   
   This PR is test-only. The new suite passes locally: `sbt 
"WorkflowOperator/testOnly *VisualizationOutputSchemaSpec"` runs 4 tests 
sweeping all 48 descriptors, all green, and 
`WorkflowOperator/Test/scalafmtCheck` passes. The full `WorkflowOperator/test` 
suite was also run locally to confirm the new spec introduces no cross-test 
interference.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Fable 5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to