test(workflow-core): add unit test coverage for FinalizePort and FinalizeExecutor markers#4792
Merged
Yicong-Huang merged 3 commits intoMay 3, 2026
Conversation
Add InternalMarkerSpec covering the FinalizePort and FinalizeExecutor markers used to signal port- and executor-level finalization within a TupleLike stream: argument-passing, empty getFields and zero inMemSize, case-class equality, and inter-marker distinguishability. Closes apache#4791 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds focused unit coverage for the internal tuple-stream marker types in workflow-core. It helps lock down the lightweight marker contract used by the execution engine to signal port and executor finalization.
Changes:
- Added a new
InternalMarkerSpeccoveringFinalizePortfield values and case-class equality. - Added assertions that
FinalizePortandFinalizeExecutorbehave as emptyTupleLikemarkers with zero in-memory size. - Added a cross-marker inequality check to distinguish the two marker payloads.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4792 +/- ##
============================================
- Coverage 43.62% 43.61% -0.01%
+ Complexity 2088 2087 -1
============================================
Files 957 957
Lines 34077 34077
Branches 3753 3753
============================================
- Hits 14865 14864 -1
+ Misses 18419 18417 -2
- Partials 793 796 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Replace the type-level equality check with a pattern-matching classification, so the test actually exercises the dispatch behavior the marker types are designed for. - Apply scalafmt to long-line case-class equality assertions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang
approved these changes
May 3, 2026
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 changes were proposed in this PR?
Add
InternalMarkerSpeccovering theFinalizePortandFinalizeExecutorpayloads used to signal finalization within aTupleLikestream:FinalizePortcarries the configuredportIdandinputdirectionTupleLikewith emptygetFieldsand zeroinMemSizeFinalizePortrespects case-class equality on its constructor argumentsFinalizeExecutorinstances are equal (no-field case class)List[TupleLike]and asserts the dispatch labels), exercising the actual call-site idiom rather than just==Any related issues, documentation, discussions?
Closes #4791
How was this PR tested?
sbt "WorkflowCore/testOnly org.apache.texera.amber.core.tuple.InternalMarkerSpec"— 6/6 tests pass.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)