Skip to content

[policy operators] subset_of and essential example table wrong #196

@zachmann

Description

@zachmann

Section 6.1.3.1.8 "Notes on Operators" contains the following tables about combining essential and subset_of, input and what should be the output.

essential subset_of (metadata) input output
true [a,b,c] [a,e] [a]
false [a,b,c] [a,e] [a]
true [a,b,c] [d,e] error
false [a,b,c] [d,e] no parameter
true [a,b,c] no parameter error
false [a,b,c] no parameter no parameter

While this all seems logical, it is not in line with the specification.
The problem is with the two middle lines where subset_of and input are distinct.
According to the subset_of operator description this will result in an empty array, not no parameter. This will be the case for both lines, i.e. also when essential=true there won't be an error, since the metadata parameter has a value set (the empty array) and essential=true will only fail if there is no value set.

In the metadata policy test vectors such a case is included in e.g. n=1562
(The test vector does it according to the spec test, not according to the table).

TL;DR the table is wrong and should read as (or the operators need to be updated):

essential subset_of (metadata) input output
true [a,b,c] [a,e] [a]
false [a,b,c] [a,e] [a]
true [a,b,c] [d,e] []
false [a,b,c] [d,e] []
true [a,b,c] no parameter error
false [a,b,c] no parameter no parameter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions