Philip Conrad

Results 74 comments of Philip Conrad

@shaded-enmity I got to try out the playground demo with a non-trivial example or two, and it looks awesome! I'll do a more in-depth review of the grammar changes tomorrow...

> Is this by design or a bug? :smiley: @shaded-enmity That is almost certainly a parser/evaluator bug. :bug: You can file an issue around that test case if you'd like,...

## Built-in Functions with non-deterministic outputs - [`rand.intn`](https://www.openpolicyagent.org/docs/latest/policy-reference/#builtin-numbers-randintn) (relies on RNG) - ~[`io.jwt.encode_sign`, `io.jwt.encode_sign_raw`](https://www.openpolicyagent.org/docs/latest/policy-reference/#tokensign) (relies on RNG internally)~ - ~[`io.jwt.decode_verify`](https://www.openpolicyagent.org/docs/latest/policy-reference/#tokens) (relies on time internally)~ - [`time.now_ns`](https://www.openpolicyagent.org/docs/latest/policy-reference/#builtin-time-timenow_ns) (relies on time directly)...

I'm considering a simple K/V cache for implementing aspects of this. Do we want a max size restriction on the cache? I'd assume that if someone enables recording non-deterministic builtin...

Also, because this feature will potentially result in massive additional memory consumption (and equally massive decision logs in some cases!), I am planning to gate this feature of decision logging...

> Hmm http.send is different, though. Those response payloads can be very large. Right, I'm thinking of the cases where a user hits *several* unique webpages. > IIRC decision logs...

My current plan (I'm copying this over from the design doc) is to only cache the **first** result from a non-deterministic builtin. That at least bounds how much memory we're...

Well, that's perfect then! Since we already have caching in place for these things, it's mostly going to be an exercise in plumbing work to get those cached values up...

Ah, nuts. I accidentally left in the `Fixes #1514` in the PR, because when it was first written, the plan had been to go all the way to decision logging...

We'll put this zombie issue back to rest when decision logging integrates the non-deterministic builtin cache work from #4926. :zombie: