The GitHub Actions job "Benchmarks PR Comment" on texera.git/main has failed. Run started by GitHub user PG1204 (triggered by PG1204).
Head commit for run: d76a51e347f54c6c3ff43a7f8cd11f14ae5739ea / Xinyuan Lin <[email protected]> test(amber): add unit test coverage for FutureBijection and ElidableStatement (#5555) ### What changes were proposed in this PR? Pin behavior of two utility modules in `engine/common`. No production-code changes. | Spec | Source class | Tests | | --- | --- | --- | | `FutureBijectionSpec` | `FutureBijection` | 11 | | `ElidableStatementSpec` | `ElidableStatement` | 9 | Both spec files follow the `<srcClassName>Spec.scala` one-to-one convention. **Behavior pinned — `FutureBijection`** | Surface | Contract | | --- | --- | | `TwitterFuture.value.asScala` | resolves to the same value (type preserved, `null` preserved) | | `TwitterFuture.exception.asScala` | resolves with the same `Throwable` instance (type, message, `eq` identity) | | `ScalaFuture.successful.asTwitter` | resolves to the same value (type preserved, `null` preserved) | | `ScalaFuture.failed.asTwitter` | resolves with the same `Throwable` instance | | Twitter → Scala on an already-resolved future | the resulting Scala future is already completed when the implicit returns | | Twitter → Scala → Twitter round-trip | preserves both values and exceptions | | Scala → Twitter → Scala round-trip | preserves values | **Behavior pinned — `ElidableStatement`** The texera build sets `-Xelide-below WARNING` (`amber/build.sbt`). Every `ElidableStatement` helper is annotated with an elide level **strictly below WARNING** (FINEST / FINER / FINE / INFO), so the Scala compiler replaces every CALL to these helpers with a `()` Unit value at *compile* time. The spec pins this silent-in-production contract: | Surface | Contract | | --- | --- | | `info` / `fine` / `finer` / `finest` (with side-effect block) | the side effect MUST NOT fire (counter stays at 0) | | same methods (with throwing block) | the exception MUST NOT propagate | | 1000 successive elided calls | no side-effect accumulation | | Return type | `Unit` (compile-time enforced) | | Parameter shape | accepts a `=> Unit` by-name block (compile-time enforced) | A regression that bumped a method's elide level above WARNING, removed the `@elidable` annotation, or relaxed `-Xelide-below` in the build would re-enable side effects in production — and this spec would catch it. ### Any related issues, documentation, discussions? Closes #5551. ### How was this PR tested? Pure unit-test additions; verified locally with: - `sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.common.FutureBijectionSpec org.apache.texera.amber.engine.common.ElidableStatementSpec"` — 20 tests, all green - `sbt scalafmtCheckAll` — clean - CI to confirm ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Sonnet 4.5) Report URL: https://github.com/apache/texera/actions/runs/27431522337 With regards, GitHub Actions via GitBox
