rego.metadata.rule() will simply return the last metadata block annotations, while chain() will give you all of them. I don't think it makes any sense to have duplicate, potentially "conflicting" annotations on the same scope, like in the example above. We should of course still allow the same attributes to descripe different scopes though (e.g. one description for document and one for rule).
Not sure about the category, but I would think this is likely a mistake, so leaniing towards bugs.
I didn't know this worked until now, but it does:
rego.metadata.rule()
will simply return the last metadata block annotations, whilechain()
will give you all of them. I don't think it makes any sense to have duplicate, potentially "conflicting" annotations on the same scope, like in the example above. We should of course still allow the same attributes to descripe different scopes though (e.g. one description fordocument
and one forrule
).Not sure about the category, but I would think this is likely a mistake, so leaniing towards
bugs
.