Skip to main content

Crate cea_core

Crate cea_core 

Source
Expand description

Causal edit attribution for structured code patches.

This crate converts a typed_patch::StructuredPatch plus a check_runner::CheckResult into weighted cause/effect attribution triples, learns edge weights in a causal graph, and predicts future edit risk without requiring heavyweight ML dependencies.

Key properties:

  • Deterministic attribution and run hashing.
  • Multi-cause proportional attribution instead of nearest-neighbor collapse.
  • Beta-distribution confidence tracking for edge reliability.
  • Compact graph persistence with versioned binary snapshots.

Structs§

AttributedRunResult
AttributionConfig
AttributionTriple
CausalEdge
CausalGraph
CausalPrediction
ConfidenceEnvelope
CoverageSummary
EdgeStats
EditOpSignature
FileIndex
OpIndex
PredictionConfig
RiskFlag

Enums§

AnchorKind
CausalNode
CeaCoreError
EditOpKind
ScopeTag

Constants§

MIN_SAMPLES_PER_SIGNATURE

Functions§

advisory_confidence
attribute_effects
attribute_effects_with_config
attribution_score
attribution_score_with_confidence
build_edit_op_signature
compute_run_hash
conservative_reliability
edit_op_node_id
effect_node_id
effective_sample_size
global_pass_effect_signature
posterior_mean
posterior_variance
predict
predict_with_config
sample_factor
sample_sufficiency_factor