def evaluate(c,evaluation_time):
    provenance_complete=c.get("provenance_complete")
    if provenance_complete is None:
        return {"comparability_state":"UNKNOWN","decision":"BLOCK_UNKNOWN_PROVENANCE","semantics_equivalent":False,"query_equivalent":False,"source_fresh":c.get("source_freshness")=="CURRENT","provenance_complete":False,"bridge_valid":bool(c.get("bridge_valid")),"control_reason":"PROVENANCE_STATUS_UNKNOWN"}
    if c.get("snapshot_reused_after_requery") or c.get("source_freshness")!="CURRENT":
        return {"comparability_state":"STALE_EVIDENCE","decision":"REFRESH_SOURCE_SNAPSHOT","semantics_equivalent":bool(c.get("same_lens") and c.get("same_metric_regime") and c.get("same_reporting_identity")),"query_equivalent":c.get("same_query") is True,"source_fresh":False,"provenance_complete":bool(provenance_complete),"bridge_valid":bool(c.get("bridge_valid")),"control_reason":"SOURCE_SNAPSHOT_NOT_CURRENT"}
    if not provenance_complete:
        return {"comparability_state":"UNVERIFIED","decision":"DEFER_REBUILD_PROVENANCE","semantics_equivalent":bool(c.get("same_lens") and c.get("same_metric_regime") and c.get("same_reporting_identity")),"query_equivalent":c.get("same_query") is True,"source_fresh":True,"provenance_complete":False,"bridge_valid":bool(c.get("bridge_valid")),"control_reason":"DERIVATION_OR_PROVENANCE_MISSING"}
    if c.get("same_query") is None:
        return {"comparability_state":"UNVERIFIED","decision":"REBUILD_QUERY_IDENTITY","semantics_equivalent":bool(c.get("same_lens") and c.get("same_metric_regime") and c.get("same_reporting_identity")),"query_equivalent":False,"source_fresh":True,"provenance_complete":True,"bridge_valid":bool(c.get("bridge_valid")),"control_reason":"QUERY_IDENTITY_INCOMPLETE"}
    sem=bool(c.get("same_lens") and c.get("same_metric_regime") and c.get("same_reporting_identity"))
    query=c.get("same_query") is True
    if sem and query:
        return {"comparability_state":"VERIFIED","decision":"SUPPORT_BOUNDED_PLANNING","semantics_equivalent":True,"query_equivalent":True,"source_fresh":True,"provenance_complete":True,"bridge_valid":False,"control_reason":"EQUIVALENT_IDENTITY_AND_PROVENANCE"}
    bridge=bool(c.get("bridge_valid"))
    if bridge and c.get("same_lens") and query and c.get("same_reporting_identity"):
        return {"comparability_state":"BRIDGED","decision":"SUPPORT_WITH_BRIDGE","semantics_equivalent":False,"query_equivalent":True,"source_fresh":True,"provenance_complete":True,"bridge_valid":True,"control_reason":"EXPLICIT_SEMANTIC_BRIDGE"}
    return {"comparability_state":"NOT_COMPARABLE","decision":"DO_NOT_COMPARE","semantics_equivalent":sem,"query_equivalent":query,"source_fresh":True,"provenance_complete":True,"bridge_valid":bridge,"control_reason":"IDENTITY_OR_QUERY_MISMATCH"}
