ontocast.tool.facts_validation.critic_findings¶
Convert critic-proposed fixes into the finding shape the repair pass reads.
The loop had two repair channels that never met. Deterministic findings went to
_run_finding_driven_repair, a bounded rewrite-in-place pass costing one
patch render. Critic fixes went somewhere else entirely: they were stashed on
state.suggestions and consumed by the next full render, which re-extracted
the unit from scratch under a prompt that also invited it to "proactively
identify and fix additional problems not mentioned in the critique".
So the cheap, contract-bound channel carried the reliable evidence and the expensive, open-ended one carried the model's opinion. Routing both through the same findings pipeline is what makes a rejection cost a repair rather than a re-extraction.
critic_fixes_to_findings(fixes, policy=None)
¶
Render critic fixes as findings, blocking ones marked mandatory.
mandatory follows the policy's severity cut, with one exception that is
not configurable: an action="REMOVE" fix is never mandatory. The
findings block it would be rendered into states that a finding is never
resolved by deleting the statement, so a mandatory REMOVE would contradict
the instruction printed directly above it -- the same contradiction shape
shacl_catalog_contradictions exists to catch, and one that has already
caused repair renders to delete valid values wholesale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fixes
|
Sequence[TripleFix]
|
Fixes from the critique report, in the order proposed. |
required |
policy
|
FactsAcceptancePolicy | None
|
The deployment's severity cut. |
None
|
Returns:
| Type | Description |
|---|---|
list[FactsUnitFinding]
|
One finding per fix, advisory unless the policy blocks on it. |