spec: pin well-known type semantics in refinement rules (RFC-001 §6.2) - #96
Merged
Conversation
This was referenced Jul 16, 2026
trendvidia
force-pushed
the
spec/061-wkt-semantics
branch
from
July 16, 2026 06:19
e5728e0 to
ebcaac6
Compare
trendvidia
force-pushed
the
spec/060-engine-config
branch
from
July 16, 2026 06:19
ccb1379 to
0d8b0b1
Compare
Resolves spec issue #12 (GH #61). Spec-text only — no descriptor or lowering change; already-shipped type-alias lowering keeps its literal base_type_fqn, this pins what it means at evaluation time. - §6.2 expanded to five binding rules: wrappers unwrap (unchanged); Timestamp/Duration bind engine-native temporal values with mandatory comparison operators; Any never unwraps (type_url refinement is canonical, auto-unpacking forbidden as descriptor-pool inference); other messages bind structurally; engine now() builtins must be run-stable within one Report. - §10: temporal comparisons count as portable under --strict-portability. - §13 row 3 resolved; CHANGELOG updated. - testdata/schema-extensions/09_wkt_refinements.proto: schema-text fixture with Timestamp/Duration/Any aliases (v1.2 grammar).
trendvidia
force-pushed
the
spec/061-wkt-semantics
branch
from
July 16, 2026 06:24
ebcaac6 to
6efd650
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61 (spec item #12). Stacked on #95 (train: #94 → #95 → this); merge in order.
What
Ratifies the WKT binding semantics — pure spec text, no descriptor/lowering change. §6.2 becomes "Wrapper and well-known type handling" with five normative rules:
Timestamp/Durationbindthisto the engine-native temporal value; comparison operators are mandatory; temporal literals/helpers are engine-stdlib, not spec syntax. CEL's native mapping already conforms.Anynever unwraps —this.type_urlrefinement is canonical; auto-unpacking is forbidden (descriptor-pool inference + silent behavior change as pools grow). Payload access goes through an explicitfunction.now(): current-time builtins return one instant per validation run — otherwise@validate(this > now())is internally inconsistent within a collect-allReportand §6.5 memoization is unsound.Also: §10 notes temporal comparisons are portable under
--strict-portability; §13 row 3 resolved; CHANGELOG bullet; new schema-text fixture09_wkt_refinements.proto(Timestamp/Duration/Any aliases).Effect on shipped code
protocompile's type-alias lowering (
base_type_fqn) is untouched and retroactively unambiguous — the audit's concern that #12 "retroactively affects the meaning of already-shipped type-alias lowering" is settled in the direction that requires no code change. protocheck M4 execution (#42) now has portable WKT semantics to implement against.