Skip to content

fix: harden parMap cancellation and async boundary liveness#10

Merged
yianni merged 4 commits into
mainfrom
hardening/p0-runtime-correctness
Feb 26, 2026
Merged

fix: harden parMap cancellation and async boundary liveness#10
yianni merged 4 commits into
mainfrom
hardening/p0-runtime-correctness

Conversation

@yianni

@yianni yianni commented Feb 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace parMap batch execution internals with cancellation-aware completion-service scheduling
  • remove indefinite Await.result waits from parMap execution path and preserve ordered output mapping
  • improve Stream.ensuring error precedence by preserving processing errors and suppressing close failures
  • harden asyncBoundary producer liveness with bounded offer loops, stall detection, and consumer-signal tracking
  • add regression tests for parMap cancellation and async-boundary producer cleanup on downstream failure

Why

  • closes P0 runtime risks from staff-level review: cancellation responsiveness, deadlock/liveness hazards, and finalizer precedence consistency

Validation

  • sbt test passes (30 tests)
  • sbt -Dsbt.supershell=false "Test / runMain SimpleStreamProcessor.BackpressureStressValidation 10000" passes

@yianni
yianni merged commit b48ab9a into main Feb 26, 2026
1 check passed
@yianni
yianni deleted the hardening/p0-runtime-correctness branch February 26, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant