He-Pin opened a new pull request, #3680: URL: https://github.com/apache/pekko/pull/3680
### Motivation Typed message adapters wrap responses in internal envelopes before they reach the mailbox. Receive-timeout handling inspects those envelopes before adaptation, so an adapted message implementing `NotInfluenceReceiveTimeout` still resets the timeout. This affects `messageAdapter`, context `ask`/`askWithStatus`, and `pipeToSelf`. ### Modification - Mark both internal adapter envelopes as `NotInfluenceReceiveTimeout` and classify the final adapted message on the actor thread. - Cancel the existing timeout task for ordinary adapted messages, allowing `ActorCell` to reschedule after processing through its existing version tracking. - Add 20 deterministic regression tests covering nine Scala/Java adapter paths, ordinary messages, and explicit timeout changes/cancellation. Use manual time and synchronous dispatch. - Document that the marker belongs on the adapted message delivered to the behavior in both DSLs and the interaction guide. ### Result Marked adapted messages retain the original receive deadline. Ordinary adapted messages reset it, and explicit timeout changes or cancellation still take effect. The regression suite changes from 9 failures before the fix to 20 passing tests afterward. ### Tests - `sbt "actor-typed-tests / Test / testOnly org.apache.pekko.actor.typed.ReceiveTimeoutSpec"` — 20 passed after the fix (9 failed, 11 passed before the fix). - `sbt "+actor-typed-tests / Test / testOnly org.apache.pekko.actor.typed.ReceiveTimeoutSpec org.apache.pekko.actor.typed.CancelReceiveTimeoutSpec org.apache.pekko.actor.typed.scaladsl.MessageAdapterSpec org.apache.pekko.actor.typed.scaladsl.ActorContextAskSpec org.apache.pekko.actor.typed.scaladsl.ActorContextPipeToSelfSpec org.apache.pekko.actor.typed.javadsl.ActorContextAskTest org.apache.pekko.actor.typed.javadsl.ActorContextPipeToSelfTest"` — 45 passed on each of Scala 2.13.18 and 3.3.8, JDK 17. - Scoped `sbt sortImports`, native `scalafmt --mode diff-ref=origin/main` and `scalafmt --list --mode diff-ref=origin/main` — passed. - `sbt headerCreateAll checkCodeStyle` — passed, including Java formatting on JDK 17 and cross-version header checks. The new file header was generated by sbt. - `sbt +mimaReportBinaryIssues` — passed for both Scala versions. An initial Scala 3 incremental compilation error in `remote` was resolved with `remote / clean` and a full rebuild. - `sbt docs/paradox` — passed on the default Scala version. An earlier Scala 3 docs run was stopped after its Maven dependency download stalled. - `git diff --check` — passed. - `sbt -Dpekko.test.multi-in-test=false validatePullRequest` — stopped before completion; remaining impact validation is delegated to CI. Completed suites reported no failures; multi-JVM tests were not run locally. - Qoder CLI stdout review — **No must-fix findings**. Earlier service-interrupted review attempts were not counted as completed reviews. ### References Refs akka/akka-core#32372 — original problem report. This is an independent implementation based on the Pekko codebase; no code from the upstream fix was copied. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
