diff --git a/lib/crates/fabro-types/src/test_support.rs b/lib/crates/fabro-types/src/test_support.rs index 2f2a2e147..9db7eff91 100644 --- a/lib/crates/fabro-types/src/test_support.rs +++ b/lib/crates/fabro-types/src/test_support.rs @@ -1,6 +1,4 @@ -use crate::{ - AuthMethod, IdpIdentity, Principal, RunProvenance, RunServerProvenance, SystemActorKind, -}; +use crate::{AuthMethod, IdpIdentity, Principal, RunProvenance, RunServerProvenance}; #[must_use] pub fn test_principal() -> Principal { @@ -21,16 +19,3 @@ pub fn test_run_provenance() -> RunProvenance { subject: test_principal(), } } - -/// Provenance attributed to the engine itself, with no server/client metadata. -/// Used in tests that exercise system-initiated runs and serde round-trips. -#[must_use] -pub fn engine_run_provenance() -> RunProvenance { - RunProvenance { - server: None, - client: None, - subject: Principal::System { - system_kind: SystemActorKind::Engine, - }, - } -} diff --git a/lib/crates/fabro-types/tests/run_event_serde.rs b/lib/crates/fabro-types/tests/run_event_serde.rs index be824fa8c..1639089d2 100644 --- a/lib/crates/fabro-types/tests/run_event_serde.rs +++ b/lib/crates/fabro-types/tests/run_event_serde.rs @@ -6,7 +6,7 @@ use fabro_types::run_event::run::{RunCreatedProps, RunParentLinkedProps, RunPare use fabro_types::run_event::{RunSessionTurnFailedCode, RunSessionTurnFailedProps}; use fabro_types::settings::InterpString; use fabro_types::settings::run::RunGoal; -use fabro_types::test_support::engine_run_provenance; +use fabro_types::test_support::test_run_provenance; use fabro_types::{EventBody, TurnId, WorkflowSettings, fixtures}; fn templated_settings() -> WorkflowSettings { @@ -28,7 +28,7 @@ fn run_created_props_round_trip_templated_settings() { source_directory: Some("/Users/client/project".to_string()), workflow_slug: Some("demo".to_string()), db_prefix: Some("run_".to_string()), - provenance: engine_run_provenance(), + provenance: test_run_provenance(), manifest_blob: None, git: Some(GitContext { origin_url: "https://github.com/fabro-sh/fabro.git".to_string(), @@ -90,7 +90,7 @@ fn run_created_props_omits_web_url_when_absent() { source_directory: None, workflow_slug: None, db_prefix: None, - provenance: engine_run_provenance(), + provenance: test_run_provenance(), manifest_blob: None, git: None, fork_source_ref: None, @@ -128,7 +128,7 @@ fn run_created_props_defaults_retried_from_when_absent() { "graph": Graph::new("ship"), "labels": {}, "run_dir": "/tmp/run", - "provenance": engine_run_provenance() + "provenance": test_run_provenance() }); let props: RunCreatedProps = serde_json::from_value(json).expect("props should deserialize"); diff --git a/lib/crates/fabro-types/tests/run_spec_methods.rs b/lib/crates/fabro-types/tests/run_spec_methods.rs index 5004d87d7..76a853561 100644 --- a/lib/crates/fabro-types/tests/run_spec_methods.rs +++ b/lib/crates/fabro-types/tests/run_spec_methods.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use fabro_types::graph::Graph; use fabro_types::run::{DirtyStatus, GitContext, PreRunPushOutcome, RunSpec}; use fabro_types::settings::{ProjectNamespace, WorkflowNamespace}; -use fabro_types::test_support::engine_run_provenance; +use fabro_types::test_support::test_run_provenance; use fabro_types::{WorkflowSettings, fixtures}; fn sample_run_spec() -> RunSpec { @@ -27,7 +27,7 @@ fn sample_run_spec() -> RunSpec { workflow_slug: Some("demo".to_string()), source_directory: Some("/Users/client/project".to_string()), labels: HashMap::from([("team".to_string(), "platform".to_string())]), - provenance: engine_run_provenance(), + provenance: test_run_provenance(), manifest_blob: None, definition_blob: None, git: Some(GitContext { diff --git a/lib/crates/fabro-types/tests/run_spec_serde.rs b/lib/crates/fabro-types/tests/run_spec_serde.rs index ebe556f3d..8cd76c3df 100644 --- a/lib/crates/fabro-types/tests/run_spec_serde.rs +++ b/lib/crates/fabro-types/tests/run_spec_serde.rs @@ -4,7 +4,7 @@ use fabro_types::graph::Graph; use fabro_types::run::{DirtyStatus, ForkSourceRef, GitContext, PreRunPushOutcome, RunSpec}; use fabro_types::settings::InterpString; use fabro_types::settings::run::RunGoal; -use fabro_types::test_support::engine_run_provenance; +use fabro_types::test_support::test_run_provenance; use fabro_types::{WorkflowSettings, fixtures}; fn templated_settings() -> WorkflowSettings { @@ -23,7 +23,7 @@ fn run_spec_round_trips_templated_settings() { workflow_slug: Some("demo".to_string()), source_directory: Some("/Users/client/project".to_string()), labels: HashMap::from([("team".to_string(), "platform".to_string())]), - provenance: engine_run_provenance(), + provenance: test_run_provenance(), manifest_blob: None, definition_blob: None, git: Some(GitContext {