frmscoe / General-Issues

This repo exists to track current work and any issues within the FRMS CoE
2 stars 0 forks source link

epic: Remove the true/false outcomes from the rule result #351

Open Justus-at-Tazama opened 5 months ago

Justus-at-Tazama commented 5 months ago

Background

Every rule processor delivers a rule result in the format:

{
  "id": "011@1.0.0",
  "cfg": "1.0.0",
  "subRuleRef": ".err",
  "result": false
},

The "result" value can be either true or false, though this determination is largely arbitrary - which outcome it is only affects the typology processor in the following way. In the typology processor, according to the typology configuration:

{
"id": "011@1.0.0",
"cfg": "1.0.0",
"ref": ".err",
"true": 0,
"false": 0
},

the value of the result attribute that is received from the rule processor is translated into a typology score. If the value is "true", the score associated with "true" is used. If the value is "false", the score associated with "false" is used.

Essentially, this processing is redundant. The typology processor knows that a specific rule's result has been delivered because it exists. The typology processor will receive a result ("subRuleRef") from the rule ("id" and "cfg"). whether it is true or false is irrelevant. All the typology processor needs to do is map the fact that it received the reference from the rule to a value directly.

Acceptance criteria:

  1. Drop the "result" attribute from all rule results
  2. Replace the "true" and "false" attributes in the typology configuration with a single "weight" attribute.
  3. When a rule result (id, cfg and subRuleRef) is received from a rule processor, map it directly to the "weight" value.