Keep loaded workflow-version closures out of implicit copies

LoadedWorkflowVersionClosure owns every file of every version in the
dependency graph, so an advertised Clone invites accidental deep copies
of the whole set. Drop the derive until a consumer needs owned copies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Scott Werner 2026-08-17 17:01:04 -04:00
parent 1e29347227
commit 3e6b23ce76

View file

@ -43,7 +43,10 @@ pub enum WorkflowVersionStoreError {
/// A fully loaded and validated workflow-version dependency graph: the
/// requested root alongside every unique transitive dependency, keyed by
/// canonical content ID.
#[derive(Clone, Debug)]
///
/// Deliberately not `Clone`: a closure owns the full file contents of every
/// version in the graph, so copies should be explicit and deliberate.
#[derive(Debug)]
pub struct LoadedWorkflowVersionClosure {
root_id: WorkflowVersionId,
root: ValidatedWorkflowVersion,