Skip to content

Type Alias: SuggestedFix

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SuggestedFix

SuggestedFix = { action: "swap"; } | { action: "replace_predicate"; feature: string; } | { action: "add_subject_type"; sort: string; } | { action: "add_object_type"; sort: string; } | UnrecognizedSuggestedFix

Defined in: src/types/conformance.ts:160

A bounded repair the conformance detector proposes, discriminated by action.

{ action: "swap"; }

action: "swap"

Swap subject and object.


{ action: "replace_predicate"; feature: string; }

action: "replace_predicate"

Use another declared feature.

feature: string

The feature to use instead.


{ action: "add_subject_type"; sort: string; }

action: "add_subject_type"

Narrow the subject toward the declared domain.

sort: string

The sort to add to the subject.


{ action: "add_object_type"; sort: string; }

action: "add_object_type"

Narrow the object toward the declared range.

sort: string

The sort to add to the object.


UnrecognizedSuggestedFix

Read from the engine’s SuggestedFixDto (crates/api/src/handlers/conformance.rs, #[serde(tag = "action")]):

  • swap — swap subject and object (V1 inversion).
  • replace_predicate — use another declared feature that fits the two sorts (V2).
  • add_subject_type — narrow the subject toward the declared domain sort (V3).
  • add_object_type — narrow the object toward the declared range sort (V3).
  • unrecognized — SDK-side: an entry whose action this SDK does not know (or that lacks its field). The wire entry is kept whole in entry, so a fix that a later engine adds reaches the caller instead of being dropped.