Public declaration syntax from harness-sdk/src/harness/manifest.rs Original source SHA-256: 24f9c7e81ba48f21a9653591ce6a7749f1fef6b1c58b271ec812728c19eb0654 Function bodies and constant values are omitted. This is not the complete implementation. Source line 26 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum TaskOutcome { /// Task passed. Pass, /// Task failed. Fail, /// Task was not run (e.g. crashed, skipped). NotRun, } Source line 38 #[must_use] pub fn is_pass(self) -> bool; Source line 44 #[must_use] pub fn is_fail(self) -> bool; Source line 52 #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(transparent)] pub struct TaskOutcomeMap { /// Map keyed by task name. `BTreeMap` so serialization is /// deterministic (matters for diffing manifests across runs). pub outcomes: BTreeMap } Source line 64 #[must_use] pub fn from_pairs(it: I) -> Self where I: IntoIterator, S: Into,; Source line 79 #[must_use] pub fn outcome(&self, task: &str) -> TaskOutcome; Source line 87 pub fn set(&mut self, task: impl Into, outcome: TaskOutcome); Source line 92 pub fn iter(&self) -> impl Iterator; Source line 98 #[must_use] pub fn len(&self) -> usize; Source line 104 #[must_use] pub fn is_empty(&self) -> bool; Source line 111 #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct PredictedImpact { /// Tasks the evolve agent expects this edit to *fix* (move from /// `Fail` → `Pass`). #[serde(default)] pub expected_fixes: Vec, /// Tasks the evolve agent flags as at risk of regressing /// (currently `Pass`, may move to `Fail`). #[serde(default)] pub at_risk_regressions: Vec } Source line 126 #[must_use] pub fn new( expected_fixes: impl IntoIterator>, at_risk_regressions: impl IntoIterator>, ) -> Self; Source line 142 #[must_use] pub fn is_empty(&self) -> bool; Source line 150 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct ManifestEntry { /// Stable id (uuid string). Lets verdicts and audit trails /// reference an entry independent of array position. pub id: String, /// Free-form list of task failures the edit addresses (e.g. /// task names + one-line justification). #[serde(default)] pub failure_evidence: Vec, /// Diagnosed root cause behind those failures. pub root_cause: String, /// One-line summary of the targeted fix the edit applies. pub targeted_fix: String, /// Predicted impact (the falsifiable contract). pub predicted_impact: PredictedImpact, /// The actual edit applied to the workspace. pub edit: HarnessComponentEdit } Source line 171 #[must_use] pub fn new( failure_evidence: impl IntoIterator>, root_cause: impl Into, targeted_fix: impl Into, predicted_impact: PredictedImpact, edit: HarnessComponentEdit, ) -> Self; Source line 191 #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct ChangeManifest { /// Iteration this manifest belongs to (e.g. `iteration_007`). pub iteration: u32, /// Entries in application order. pub entries: Vec } Source line 201 #[must_use] pub fn new(iteration: u32) -> Self; Source line 209 pub fn push(&mut self, entry: ManifestEntry) -> usize; Source line 216 #[must_use] pub fn len(&self) -> usize; Source line 222 #[must_use] pub fn is_empty(&self) -> bool; Source line 228 #[must_use] pub fn find(&self, id: &str) -> Option<&ManifestEntry>; Source line 236 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum AttributionDecision { /// Every promised fix landed AND no flagged regression broke. /// The edit is kept. Confirmed, /// Some promised fixes landed; some flagged regressions /// broke. The loop driver decides whether to keep or revert. PartiallyConfirmed, /// No promised fixes landed (or every flagged regression /// broke). The edit is reverted. Refuted, /// The contract was silent (`PredictedImpact::is_empty()`); the /// edit cannot be falsified and is treated as refuted by /// default — the AHE paper requires a non-trivial contract. UnfalsifiableContract, } Source line 255 #[must_use] pub fn is_keep(self) -> bool; Source line 261 #[must_use] pub fn is_revert(self) -> bool; Source line 271 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TaskDelta { /// Task name. pub task: String, /// Outcome before the edit (i.e. the prior iteration's run). pub before: TaskOutcome, /// Outcome after the edit (this iteration's run). pub after: TaskOutcome } Source line 283 #[must_use] pub fn is_fix(&self) -> bool; Source line 289 #[must_use] pub fn is_regression(&self) -> bool; Source line 296 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AttributionVerdict { /// Manifest entry id this verdict belongs to. pub entry_id: String, /// Decision (`Confirmed` / `PartiallyConfirmed` / `Refuted` / /// `UnfalsifiableContract`). pub decision: AttributionDecision, /// Promised fixes that actually landed. pub confirmed_fixes: Vec, /// Promised fixes that did **not** land. pub missed_fixes: Vec, /// Regressions the contract flagged that DID happen. pub triggered_regressions: Vec, /// Regressions the contract flagged that did NOT happen /// (kept stable). pub avoided_regressions: Vec } Source line 316 #[must_use] pub fn is_keep(&self) -> bool; Source line 323 #[must_use] pub fn is_revert(&self) -> bool; Source line 331 #[must_use] pub fn attribute( manifest: &ChangeManifest, before: &TaskOutcomeMap, after: &TaskOutcomeMap, ) -> Vec; Source line 345 #[must_use] pub fn attribute_entry( entry: &ManifestEntry, before: &TaskOutcomeMap, after: &TaskOutcomeMap, ) -> AttributionVerdict;