diff --git a/CLAUDE.md b/CLAUDE.md index 4096ffc..7053706 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/docs/CONFORMANCE.md b/docs/CONFORMANCE.md index 6f31fdb..d49ad80 100644 --- a/docs/CONFORMANCE.md +++ b/docs/CONFORMANCE.md @@ -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 @@ -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. @@ -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 @@ -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. diff --git a/docs/conformance-report.json b/docs/conformance-report.json index e240add..17ca66a 100644 --- a/docs/conformance-report.json +++ b/docs/conformance-report.json @@ -1,6 +1,6 @@ { "cel_spec": "ba58ae5007845f3a1279b488cdeb79645ce958bb", - "cel_go": "v0.32.0", + "cel_go": "v0.33.1", "postgres": "18", "totals": { "files": 31, diff --git a/docs/conformance-report.md b/docs/conformance-report.md index 7c16ffa..bacccdd 100644 --- a/docs/conformance-report.md +++ b/docs/conformance-report.md @@ -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 diff --git a/go.mod b/go.mod index e712e11..63d3e09 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 7f3c0c1..49de681 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/internal/oracle/options.go b/internal/oracle/options.go index 55e1143..6f88063 100644 --- a/internal/oracle/options.go +++ b/internal/oracle/options.go @@ -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()}, diff --git a/internal/oracle/oracle.go b/internal/oracle/oracle.go index 70460d0..754aa72 100644 --- a/internal/oracle/oracle.go +++ b/internal/oracle/oracle.go @@ -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) { diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..946752b --- /dev/null +++ b/renovate.json @@ -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=(?v\\d+\\.\\d+\\.\\d+)", + "against pg_tle (?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." + ] + } + ] +}