src.dackar.RCA.orchestrators.supersession¶
Attributes¶
Functions¶
Return epistemic class string, preferring Phase A annotation over doc_type fallback. |
|
|
|
|
Return authority rank — lower integer = higher authority. |
|
Relevance (on-pointness) proxy for the P-4 supersession gate. |
|
Extract best available recency timestamp from hit metadata. Returns None when absent. |
|
Recompute score-affecting fields of candidate_evidence_summary after supersession. |
|
Zero support_score of analyzes-class hits superseded by higher-authority hits. |
Module Contents¶
- src.dackar.RCA.orchestrators.supersession._epistemic_class_from_meta(meta)[source]¶
Return epistemic class string, preferring Phase A annotation over doc_type fallback.
- Parameters:
meta (JsonDict)
- Return type:
str
- src.dackar.RCA.orchestrators.supersession._is_analyzes_class(meta)[source]¶
- Parameters:
meta (JsonDict)
- Return type:
bool
- src.dackar.RCA.orchestrators.supersession._authority_rank(meta)[source]¶
Return authority rank — lower integer = higher authority.
- Parameters:
meta (JsonDict)
- Return type:
int
- src.dackar.RCA.orchestrators.supersession._relevance_of(hit)[source]¶
Relevance (on-pointness) proxy for the P-4 supersession gate.
Prefers an explicit relevance / semantic-overlap annotation when the retriever supplies one, else falls back to the retrieval
support_score(the pre- supersession value if a prior pass already zeroed it). This is the axis supersession must respect so a higher-authority but off-point hit does not erase strongly on-point lower-authority support.- Parameters:
hit (JsonDict)
- Return type:
float
- src.dackar.RCA.orchestrators.supersession._recency_dt(meta)[source]¶
Extract best available recency timestamp from hit metadata. Returns None when absent.
- Parameters:
meta (JsonDict)
- Return type:
Optional[datetime.datetime]
- src.dackar.RCA.orchestrators.supersession._patch_candidate_summary(summary, results)[source]¶
Recompute score-affecting fields of candidate_evidence_summary after supersession.
Only patches best_support_score, supporting_count, supporting_snippet_ids, and best_source_tier — all fields touched by support_score zeroing. spaCy aggregates and NER entity lists are metadata-derived and unaffected.
- src.dackar.RCA.orchestrators.supersession.resolve_supersession(bundle, epistemics_policy_version=None)[source]¶
Zero support_score of analyzes-class hits superseded by higher-authority hits.
- Modifies bundle in-place. On each superseded hit sets:
superseded = True,support_score_original(original value),support_score = 0.0, and downgradesmetadata.support_rolefrom “supporting” to “contextual”.
Patches
bundle["candidate_evidence_summary"]so thatrefine_with_evidencesees the post-supersession best scores.- Adds provenance fields to the bundle:
supersession_applied,supersession_count,supersession_policy_version(when policy_version is supplied).