Skip to content

refactor: replace unnecessary dyn Trait with static dispatch #1984

@bug-ops

Description

@bug-ops

Epic: #1974

Replace 3 unnecessary Box usages with static dispatch:

  1. zeph-tools/tool_orchestrator.rs:31Vec<Box<dyn PreExecutionVerifier>> -> enum dispatch
  2. zeph-channels/cli.rs:14Box<dyn Fn(&str) + Send> -> generic parameter
  3. zeph-acp/agent/mod.rs:32Arc<dyn Fn(&str) -> Option<AnyProvider>> -> ProviderFactory enum

Acceptance Criteria:

  • No heap allocation for pre-execution verifiers
  • CliChannel generic over persist function type
  • All tests pass

Complexity: Small | Effort: 2h
Ref: TYPE-01

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions