Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ specified one: two independent implementations agreeing is evidence about
the spec; one is evidence about that implementation.

**cel-go is pinned exactly in `go.mod` and stays exactly pinned**
(`cel.dev/cel-go v0.32.0`). The set of expressions the two
(`cel.dev/cel-go v0.33.1`). The set of expressions the two
implementations agree on moves with the version, so an upgrade is a
deliberate change with a re-measurement behind it, never a routine bump
or a transitive one. `internal/oracle.Version` restates the pin and a
Expand Down
8 changes: 4 additions & 4 deletions docs/CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Three things pin what that sentence means:
| | |
|---|---|
| corpus | cel-spec at `ba58ae5007845f3a1279b488cdeb79645ce958bb` |
| reference | cel-go `v0.32.0` |
| reference | cel-go `v0.33.1` |
| substrate | PostgreSQL 18 |

All three are pinned deliberately and move only with a
Expand Down Expand Up @@ -136,7 +136,7 @@ expression and both verdicts.
The spec text is settled: `double` and `null` are not valid map key
types, and duplicate keys are an error at construction — including
keys that collide only after `int`/`uint` normalization, as in
`{0: 1, 0u: 2}`. The corpus expects an error; cel-go v0.32.0 returns a
`{0: 1, 0u: 2}`. The corpus expects an error; cel-go v0.33.1 returns a
value and annotates the cases with its current behaviour as a
comment. cel4postgres errors.

Expand All @@ -148,7 +148,7 @@ planning rather than when evaluating.)
`timestamps/duration_converters/get_milliseconds`

The corpus expects the sub-second component — `321` for a duration of
123s 321456789ns. cel-go v0.32.0 returns total milliseconds
123s 321456789ns. cel-go v0.33.1 returns total milliseconds
(`123321`). cel-java's `GetMillisecondsFunction` computes
`toMillis(arg) % 1000`, agreeing with the corpus, and the corpus's own
description marks the total-milliseconds reading as the one being
Expand Down Expand Up @@ -196,7 +196,7 @@ the nullable type.

The corpus accepts the hex form `::ffff:c0a8:1` and treats it as
equal to the IPv4 address it maps to, while rejecting the dotted form
`::ffff:192.168.0.1`. cel-go v0.32.0's `parseIPAddr` rejects both, and
`::ffff:192.168.0.1`. cel-go v0.33.1's `parseIPAddr` rejects both, and
its conformance harness does not run `network_ext` at all — so there
is no reference position to weigh here, only the corpus, and the
corpus is what cel4postgres implements.
Expand Down
2 changes: 1 addition & 1 deletion docs/conformance-report.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cel_spec": "ba58ae5007845f3a1279b488cdeb79645ce958bb",
"cel_go": "v0.32.0",
"cel_go": "v0.33.1",
"postgres": "18",
"totals": {
"files": 31,
Expand Down
2 changes: 1 addition & 1 deletion docs/conformance-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ divergences listed at the end.
| | |
|---|---|
| cel-spec corpus | `ba58ae5007845f3a1279b488cdeb79645ce958bb` |
| cel-go | `v0.32.0` |
| cel-go | `v0.33.1` |
| PostgreSQL | 18 |

## Summary
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/emfga/cel4postgres
go 1.27

require (
cel.dev/cel-go v0.32.0
cel.dev/cel-go v0.33.1
cel.dev/expr v0.25.3
github.com/jackc/pgx/v5 v5.11.0
google.golang.org/protobuf v1.36.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cel.dev/cel-go v0.32.0 h1:irvpFKr5EuGPyxeME03ERh0rii1TX+BDAnB9eL3IvNk=
cel.dev/cel-go v0.32.0/go.mod h1:DnVip7tpJSsgZymwfT+m1tnEVy3ivAjSMXPx12YrMkU=
cel.dev/cel-go v0.33.1 h1:xRL3XUfZ3DXxWFLUsM2uavmtRBwrhlBBc+GEL1b9CIQ=
cel.dev/cel-go v0.33.1/go.mod h1:DnVip7tpJSsgZymwfT+m1tnEVy3ivAjSMXPx12YrMkU=
cel.dev/expr v0.25.3 h1:A2jO8jwOugrrovveCWfj0KEZOfqiLgAcwjpHPhzIGw0=
cel.dev/expr v0.25.3/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
Expand Down
15 changes: 12 additions & 3 deletions internal/oracle/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,22 @@ var envOptions = map[string][]cel.EnvOption{
cel.CrossTypeNumericComparisons(true),
cel.EnableErrorOnBadPresenceTest(true),
},
// Libraries whose latest version declares functions sql/ does
// not register are pinned to the version it implements: an
// unversioned library widens the reference env on every cel-go
// bump, and an oracle that knows overloads the evaluator lacks
// is configured differently from it. Lists 5 adds hasOnly /
// hasAny / hasAll / hasExactly; encoders 2 adds
// base64.encodeUrl / decodeUrl and json / yaml; optionals 3
// adds optional.hasValue(v) and 4 re-expands optMap /
// optFlatMap (both cel-go v0.33.0).
"strings": {ext.Strings()},
"math": {ext.Math()},
"lists": {ext.Lists()},
"encoders": {ext.Encoders()},
"lists": {ext.Lists(ext.ListsVersion(4))},
"encoders": {ext.Encoders(ext.EncodersVersion(1))},
"bindings": {ext.Bindings()},
"optionals": {
cel.OptionalTypes(),
cel.OptionalTypes(cel.OptionalTypesVersion(2)),
},
"two_var_comprehensions": {ext.TwoVarComprehensions()},
"network": {ext.Network()},
Expand Down
2 changes: 1 addition & 1 deletion internal/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// version, so an upgrade is a deliberate change that re-measures
// conformance, never a routine bump. This constant exists so a test
// can assert the two have not drifted apart.
const Version = "v0.32.0"
const Version = "v0.33.1"

// Env returns a CEL environment carrying only the standard library.
func Env(options ...cel.EnvOption) (*cel.Env, error) {
Expand Down
85 changes: 85 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":disableRateLimiting",
":docker",
":enableVulnerabilityAlerts",
":pinAllExceptPeerDependencies",
":rebaseStalePrs",
":renovatePrefix",
":timezone(America/Sao_Paulo)",
"config:best-practices",
"schedule:earlyMondays",
"security:openssf-scorecard"
],
"commitMessageAction": "Bump",
"commitMessageExtra": "",
"commitMessageLowerCase": "never",
"commitMessageTopic": "{{depName}}",
"semanticCommits": "disabled",
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"],
"vulnerabilityAlerts": {
"addLabels": ["security"]
},
"customManagers": [
{
"description": "Track the pg_tle release built into the validation image and named in the install guide",
"customType": "regex",
"managerFilePatterns": [
"/^docker/pg_tle\\.Dockerfile$/",
"/^docs/INSTALL\\.md$/"
],
"matchStrings": [
"ARG PG_TLE_VERSION=(?<currentValue>v\\d+\\.\\d+\\.\\d+)",
"against pg_tle (?<currentValue>v\\d+\\.\\d+\\.\\d+)"
],
"depNameTemplate": "aws/pg_tle",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver"
}
],
"packageRules": [
{
"description": "One PR for all GitHub Actions bumps, not one per action per digest",
"matchManagers": ["github-actions"],
"matchDepTypes": ["action"],
"groupName": "github-actions",
"commitMessageTopic": "GitHub Actions"
},
{
"description": "One PR for image digest refreshes",
"matchDatasources": ["docker"],
"matchUpdateTypes": ["digest"],
"groupName": "docker digests"
},
{
"description": "The go directive and the golang image of the containerised suite move together",
"matchDatasources": ["golang-version", "docker"],
"matchDepNames": ["go", "golang"],
"matchUpdateTypes": ["major", "minor"],
"groupName": "Go toolchain"
},
{
"description": "One PR for the golang.org/x modules",
"matchManagers": ["gomod"],
"matchPackageNames": ["golang.org/x/**"],
"groupName": "golang.org/x"
},
{
"description": "cel-go is the conformance oracle and stays exactly pinned (CLAUDE.md). Its PR is a deliberate re-measurement, never a routine merge.",
"matchPackageNames": ["cel.dev/cel-go"],
"prBodyNotes": [
"Bumping cel-go moves the conformance oracle: update `internal/oracle.Version` in the same commit (a test fails while they differ), re-run the full suite, and re-measure any case whose verdict changes before merging."
]
},
{
"description": "A PostgreSQL major changes the server every test and release check runs against",
"matchDatasources": ["docker"],
"matchPackageNames": ["postgres"],
"matchUpdateTypes": ["major"],
"prBodyNotes": [
"A PostgreSQL major moves the server CI, the release smoke test and the pg_tle image all run on: check that the pinned pg_tle release builds against it before merging."
]
}
]
}
2 changes: 1 addition & 1 deletion sql/000_install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS cel.schema_version (
);

INSERT INTO cel.schema_version (version)
VALUES ('0.0.2')
VALUES ('0.0.3')
ON CONFLICT (version) DO NOTHING;

-- The installed schema version. IMMUTABLE is deliberately wrong for
Expand Down
Loading