Summary

  • add ZIOAppMainSpec in core-tests/jvm-native to validate shutdown-flow behavior through main
  • cover simulated external-shutdown path to ensure interruption produces failure exit and app finalizers run
  • cover gracefulShutdownTimeout behavior by verifying shutdown hook returns quickly even when finalizers are still running
  • add a small test seam in ZIOAppPlatformSpecific (registerShutdownHook) so shutdown hooks can be injected/observed in tests without changing runtime behavior

Why this lane

This targets the lifecycle areas called out in #9909 and the linked historical regressions around shutdown/finalizer behavior (#9901, #9807).

Test commands

sbt 'coreTestsJVM/testOnly zio.ZIOAppMainSpec'
sbt 'coreTestsJVM/testOnly zio.ZIOAppSpec'

Notes

  • tests are JVM-specific and live under core-tests/jvm-native
  • the hook-timeout spec intentionally verifies bounded wait behavior while finalization is still in progress

/claim #9909

Claim

Total prize pool $400
Total paid $0
Status Pending
Submitted February 28, 2026
Last updated February 28, 2026

Contributors

LI

Liuyi Yu

@yuliuyi717-ux

100%

Sponsors

ZI

ZIO

@ZIO

$400