Context
The spec now supplies the bound domain to a provider's initialize function, and adds an opt-in domain-scoped provider declaration that the API enforces by binding such a provider to at most one domain. This lets stateful providers (e.g. an OFREP static-context provider with a persistent cache) scope their state to a single, unambiguous domain.
Relevant spec sections
Requirements summary
| Requirement |
Level |
Description |
| 1.1.2.2 |
MUST |
The provider mutator supplies the bound domain (if any) when invoking initialize |
| 2.4.1 |
MAY |
initialize accepts the global evaluation context and an optional bound domain |
| 2.4.3 |
MAY |
A provider may declare itself domain-scoped (maintains per-domain state that can't be shared) |
| 2.4.4 |
MUST |
A domain-scoped provider must accept the bound domain during initialization |
| 1.1.8 / 1.1.8.1 |
MUST NOT |
The provider mutator must not bind a domain-scoped provider instance to more than one domain, rejecting any attempt to bind an already-bound instance to an additional domain |
Section 1.8.4 prose was also updated: a provider instance can back multiple domains unless it declares itself domain-scoped.
Non-functional requirements
- Add the
domain parameter in a backwards-compatible way where the language allows it (optional/overloaded/default parameter). This is non-breaking in JS, Java, Python, .NET, Ruby, and Rust.
- In languages where
initialize/Init is a required interface/protocol method (Go, Kotlin, Swift), introduce it via an optional secondary interface or batch it into the next major; the domain-scoped declaration should likewise be opt-in.
- PHP has no initialization hook today; adding one is out of scope here unless done separately.
- Associated testing and README/docs updates.
Implementation tracking
Child issues:
Context
The spec now supplies the bound
domainto a provider'sinitializefunction, and adds an opt-indomain-scopedprovider declaration that the API enforces by binding such a provider to at most onedomain. This lets stateful providers (e.g. an OFREP static-context provider with a persistent cache) scope their state to a single, unambiguousdomain.Relevant spec sections
Requirements summary
domain(if any) when invokinginitializeinitializeaccepts the global evaluation context and an optional bounddomaindomain-scoped(maintains per-domainstate that can't be shared)domain-scopedprovider must accept the bounddomainduring initializationdomain-scopedprovider instance to more than onedomain, rejecting any attempt to bind an already-bound instance to an additionaldomainSection 1.8.4 prose was also updated: a provider instance can back multiple
domainsunless it declares itselfdomain-scoped.Non-functional requirements
domainparameter in a backwards-compatible way where the language allows it (optional/overloaded/default parameter). This is non-breaking in JS, Java, Python, .NET, Ruby, and Rust.initialize/Initis a required interface/protocol method (Go, Kotlin, Swift), introduce it via an optional secondary interface or batch it into the next major; thedomain-scopeddeclaration should likewise be opt-in.Implementation tracking
Child issues: