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

   ### What changes were proposed in this PR?
   
   Add `LogreplayPrimitivesSpec` covering five files in 
`amber/.../engine/architecture/logreplay`:
   
   `ReplayLoggerImpl`:
   - Channel-switch logging
   - Same-channel-no-message skip
   - Message append (ProcessingStep + MessageContent)
   - Channel-switch-without-message append
   - Drain buffer clear between drains
   - Synthetic ProcessingStep when drain step differs from lastStep
   - ReplayDestination append
   
   `OrderEnforcer` trait:
   - Implementable by a custom subclass
   
   `ReplayOrderEnforcer`:
   - Immediate completion on empty queue (with onComplete fire)
   - startStep skip during construction
   - Step-driven channel advance via canProceed
   - Single onComplete fire even when canProceed is called past the end
   
   `ReplayLogRecord` case-class subtypes:
   - Serializable + case-class equality + TerminateSignal singleton
   
   `AsyncReplayLogWriter` is intentionally skipped — it spawns its own thread 
and is hard to unit-test without flake. `ReplayLogGenerator` is likewise 
skipped since it requires a `SequentialRecordStorage` with records read from 
disk.
   
   ### Any related issues, documentation, discussions?
   
   Closes #4839
   
   ### How was this PR tested?
   
   `sbt "WorkflowExecutionService/testOnly 
org.apache.texera.amber.engine.architecture.logreplay.LogreplayPrimitivesSpec"` 
- 13/13 tests pass.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)


-- 
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