Skip to content

Support cel::ActivationInterface in CelTestContext. - #2182

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_956029155
Jul 29, 2026
Merged

Support cel::ActivationInterface in CelTestContext.#2182
copybara-service[bot] merged 1 commit into
masterfrom
test_956029155

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 29, 2026

Copy link
Copy Markdown

Support cel::ActivationInterface in CelTestContext.

Update CelTestContext and CelActivationFactoryFn to return std::unique_ptr<cel::ActivationInterface> instead of cel::Activation by value.

Previously, CelTestContext::CelActivationFactoryFn was hardcoded to return absl::StatusOr<cel::Activation>. This overlooked the fact that cel::Runtime::Evaluate accepts const cel::ActivationInterface& and prevents custom or lazy activations that implement cel::ActivationInterface directly from being returned by the factory without object slicing or compilation errors.

CelTestContext and TestRunner now accept std::unique_ptr<cel::ActivationInterface> from the factory function.

@copybara-service copybara-service Bot changed the title No public description Support cel::ActivationInterface in CelTestContext. Jul 29, 2026
@copybara-service
copybara-service Bot force-pushed the test_956029155 branch 6 times, most recently from 13885a7 to 8207d52 Compare July 29, 2026 20:03
Update `CelTestContext` and `CelActivationFactoryFn` to return `std::unique_ptr<cel::ActivationInterface>` instead of `cel::Activation` by value.

Previously, `CelTestContext::CelActivationFactoryFn` was hardcoded to return `absl::StatusOr<cel::Activation>`. This overlooked the fact that `cel::Runtime::Evaluate` accepts `const cel::ActivationInterface&` and prevents custom or lazy activations that implement `cel::ActivationInterface` directly from being returned by the factory without object slicing or compilation errors.

`CelTestContext` and `TestRunner` now accept `std::unique_ptr<cel::ActivationInterface>` from the factory function.

PiperOrigin-RevId: 956045618
@copybara-service
copybara-service Bot merged commit 54c0512 into master Jul 29, 2026
@copybara-service
copybara-service Bot deleted the test_956029155 branch July 29, 2026 20:08
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