You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDS: optional and prohibited property requirements give inverted results #821
For a Property facet used as a requirement, cardinality="optional" and cardinality="prohibited" don't follow IDS. Two places cause it:
IDSFacet.evalRequirement applies the cardinality to every individual check, including the property set and property name matching in IDSProperty.test: prohibited inverts each match and optional forces each to pass.
When no property set matches, IDSProperty.test pushes pass: false regardless of cardinality.
IDS says:
Cardinality
Passes when
prohibited
the property is absent (prohibited with a data type or value is not a valid IDS)
optional
always: "If the requirement is optional but would fail if it were required instead, the checker tool must not log an error" (IDS developer guide; test cases property/pass-an_optional_facet_always_passes_regardless_of_outcome_*)
Reproduce
With the repo's own tests/fixtures/type-psets.ifc (Pset_WallCommon.IsExternal is TRUE on walls 40, 41, 42 and 46, FALSE on 45, absent on 43), requiring Pset_WallCommon.IsExternal on the six walls:
Requirement
Passing now
Expected
prohibited, no value
none
43
optional, value TRUE
40, 41, 42, 45, 46
all six
The prohibited case fails the one wall that has no IsExternal. The optional case fails #43, which has no Pset_WallCommon at all: when no property set matches, the facet pushes pass: false regardless of cardinality.
A PR with a test follows.
System info
main at 8479a7c, Node 24.14.0, macOS, yarn 3.2.1 (the repo's own setup).
Correction to the optional row above (now edited): I first wrote that an optional property present with another value should fail. IDS's developer guide says the opposite ("If the requirement is optional but would fail if it were required instead, the checker tool must not log an error"), and the buildingSMART test cases property/pass-an_optional_facet_always_passes_regardless_of_outcome_* agree. So optional never fails. The bug that remains is the one where no property set matches at all, which fails today. #822 is updated to match.
Activity
helenkwok commentedon Oct 11, 2026
Correction to the optional row above (now edited): I first wrote that an optional property present with another value should fail. IDS's developer guide says the opposite ("If the requirement is optional but would fail if it were required instead, the checker tool must not log an error"), and the buildingSMART test cases
property/pass-an_optional_facet_always_passes_regardless_of_outcome_*agree. So optional never fails. The bug that remains is the one where no property set matches at all, which fails today. #822 is updated to match.