Skip to content

Widen CEL durations to match google.protobuf.Duration bounds. - #1434

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1010820757
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1010820757

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Widen CEL durations to match google.protobuf.Duration bounds.

CEL specification PR #501 widens valid CEL durations from roughly ±290 years (64-bit signed nanoseconds) to the full google.protobuf.Duration range (±10,000 years, -315,576,000,000.999999999s to +315,576,000,000.999999999s) so every difference between valid Timestamp values is representable as a CEL duration.

Update duration bounds checking, timestamp and duration arithmetic, and timestamp(int) epoch-second validation across both native java.time and protobuf runtime representations. Replace threeten-extra duration parsing with a zero-allocation Go time.ParseDuration-compatible parser supporting the ±10,000-year range (removing the org.threeten:threeten-extra dependency), deprecate CelOptions.Builder.enableTimestampOverflowCheck as a no-op, and enable the widened duration conformance tests.

@copybara-service
copybara-service Bot force-pushed the test_1010820757 branch 2 times, most recently from 3ce2d1a to 0920c81 Compare October 31, 2026 00:20
CEL specification PR #501 widens valid CEL durations from roughly ±290 years (64-bit signed nanoseconds) to the full `google.protobuf.Duration` range (±10,000 years, -315,576,000,000.999999999s to +315,576,000,000.999999999s) so every difference between valid `Timestamp` values is representable as a CEL duration.

Update duration bounds checking, timestamp and duration arithmetic, and `timestamp(int)` epoch-second validation across both native `java.time` and protobuf runtime representations. Replace `threeten-extra` duration parsing with a zero-allocation Go `time.ParseDuration`-compatible parser supporting the ±10,000-year range (removing the `org.threeten:threeten-extra` dependency), deprecate `CelOptions.Builder.enableTimestampOverflowCheck` as a no-op, and enable the widened duration conformance tests.

PiperOrigin-RevId: 1010820757
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