src.dackar.RCA.orchestrators.ishikawa_evaluator

ishikawa_evaluator — Deterministic Ishikawa (fishbone) matrix builder.

Extracted from rca_reasoning_orchestrator.py. The parent module re-exports HeuristicIshikawaEvaluatorV1 for backward-compatible imports.

Attributes

JsonDict

Classes

HeuristicIshikawaEvaluatorV1

First deterministic Ishikawa evaluator.

Functions

utcnow_iso()

Module Contents

src.dackar.RCA.orchestrators.ishikawa_evaluator.JsonDict[source]
src.dackar.RCA.orchestrators.ishikawa_evaluator.utcnow_iso()[source]
Return type:

str

class src.dackar.RCA.orchestrators.ishikawa_evaluator.HeuristicIshikawaEvaluatorV1[source]

First deterministic Ishikawa evaluator.

Builds a structured fishbone-style matrix from:
  • candidate hypotheses

  • KG context

  • temporal support

  • retrieved evidence

  • optional PM / operational context

CATEGORY_ORDER = ['equipment_hardware', 'process_procedure', 'measurement_instrumentation',...[source]
evaluate(event, telemetry_summary, kg_context, tskr_patterns, causality_candidates, evidence_bundle, operational_context, pm_compliance, run_context)[source]

Build the Ishikawa contributing-factor matrix for an event.

Assembles category-grouped rows from the causal candidates (each cited with its own supporting evidence — see _supporting_evidence_by_candidate()), telemetry/TSKR measurement signals, maintenance and operating-context factors, process evidence, and KG-context factors.

Parameters:
  • event (JsonDict) – Target event (must carry event_id or id), its telemetry summary, and the KG neighbourhood.

  • telemetry_summary (JsonDict) – Target event (must carry event_id or id), its telemetry summary, and the KG neighbourhood.

  • kg_context (JsonDict) – Target event (must carry event_id or id), its telemetry summary, and the KG neighbourhood.

  • tskr_patterns (Optional[JsonDict]) – TSKR chain-position patterns, or None.

  • causality_candidates (JsonDict) – Ranked candidate hypotheses and their retrieved evidence.

  • evidence_bundle (JsonDict) – Ranked candidate hypotheses and their retrieved evidence.

  • operational_context (Optional[JsonDict]) – Optional supporting artifacts, or None.

  • pm_compliance (Optional[JsonDict]) – Optional supporting artifacts, or None.

  • run_context (JsonDict) – Orchestrator run context (run_id).

Returns:

An Ishikawa matrix conforming to schemas/ishikawa_matrix.json (categories, rows, and a summary of top candidates).

Return type:

JsonDict

_candidate_rows(causality_candidates, evidence_bundle)[source]
Parameters:
Return type:

List[JsonDict]

_supporting_evidence_by_candidate(evidence_bundle)[source]

Index the evidence bundle by the candidate each hit supports.

Groups the bundle’s results by their metadata.linked_candidate_id (falling back to metadata.candidate_id), keeping only non-superseded, support_role == "supporting" hits, so that each Ishikawa row cites the evidence retrieved for its own candidate rather than the first three snippet ids in the bundle.

Parameters:

evidence_bundle (JsonDict) – Evidence bundle whose results list holds normalized retrieval hits (top-level snippet_id / support_score / superseded, with support_role and candidate linkage under metadata).

Returns:

Maps candidate_id to its supporting snippet ids, highest support_score first and capped at three. Candidates with no supporting evidence are absent (callers default to []).

Return type:

Dict[str, List[str]]

_measurement_rows(telemetry_summary, tskr_patterns)[source]
Parameters:
Return type:

List[JsonDict]

_maintenance_rows(pm_compliance, causality_candidates)[source]
Parameters:
Return type:

List[JsonDict]

_operating_context_rows(operational_context, event)[source]
Parameters:
Return type:

List[JsonDict]

_process_rows(evidence_bundle)[source]
Parameters:

evidence_bundle (JsonDict)

Return type:

List[JsonDict]

_kg_context_rows(kg_context)[source]
Parameters:

kg_context (JsonDict)

Return type:

List[JsonDict]

_group_rows(rows)[source]
Parameters:

rows (List[JsonDict])

Return type:

Dict[str, List[JsonDict]]