When debugging Rego policies, using sample { ... } is very useful to test previous real inputs. However, sometimes the filtering capability in here (Example: sample { input.stack.id == “<stack_id>“ } ) is not enough to easily identify certain samples across time.
The unique identifier for “Sampled previous inputs” is a timestamp (Example: 2025-05-05 12:00:00), however, it would be very useful if some extra info in here could be set.
I’d suggest adding some extra info in here by default, for instance the
input.stack.name,input.push.branch(Push Policy), or others. This would provide some default QoL to quickly identify which sample you’re interested in instead of going one by one until you find the one you’re looking for.Additionally or alternatively, some
sample_nameoutput could be added to allow to the user the sampling name customization. For instance, “sample_name := input.stack.name“ would end up in a title like `2025-05-05 12:00:00 <my-stack-name>`.
Wdyt? This would improve debugging experience ( - frustration, - time consumption for debugging)