Stability of function return values in Nix

Seeking opinions from the community since I can’t seem to find any documentation on this. Is there an official guarantee or implicit understanding that “pure-nix” function return values are absolutely stable? Say I implemented a builtin that tracks all calls to import made during the process of evaluating some expression (let’s just assume for now that the specification of said expression itself creates no ambiguities and causes no complications, so that we may focus on the evaluation of the expression after it is specified). If the laziness behaviour of Nix changes (for instance if this gets merged) and hence the set of imports that actually get evaluated shrinks, would the presence of this function make that a breaking change? Would it constitute one on its own?

which I am in the earliest stages of attempting a draft implementation of.
Pinging @RaitoBezarius since he brought up primop stability in the discussion of that pre-RFC.

1 Like

That’s a gap in the Nix manual, so I’ve opened Stability promise, reprodubility properties · Issue #10694 · NixOS/nix · GitHub for now.
I believe it also answers your question. I don’t think improved laziness should be considered a breaking change, unless more is going on.