Testability Boundaries

Agentty keeps external systems behind trait boundaries so orchestration logic can be tested deterministically.

Testability and Boundaries🔗

All traits below use #[cfg_attr(test, mockall::automock)]:

TraitModuleBoundary
SyncMainRunnerapp/core.rsApp-level async sync orchestration trigger used by list-mode sync flows.
GitClientinfra/git/client.rsGit/process operations (worktree, merge, rebase, diff, push, pull).
FsClientinfra/fs.rsFilesystem operations used by app orchestration (create/remove/read workflow files).
TmuxClientinfra/tmux.rsTmux subprocess operations for opening session worktrees and dispatching open commands.
AgentChannelinfra/channel.rsProvider-agnostic turn execution (session init, run turn, shutdown).
AgentBackendinfra/agent/backend.rsPer-provider CLI command construction and one-time setup.
AppServerClientinfra/app_server.rsApp-server RPC execution (provider routing, JSON-RPC transport).
EventSourceruntime/event.rsTerminal event polling for deterministic event-loop tests.
Sleeperlib.rsWall-clock sleep boundary used by the event-reader thread.
EditorLauncherruntime/terminal.rsExternal editor process launch boundary used by runtime key handlers.
VersionCommandRunnerinfra/version.rsnpm/curl command execution for update checks.
GitCommandRunnerinfra/git/rebase.rsRebase command invocation boundary for conflict/retry tests.
SyncAssistClientapp/session/workflow/merge.rsSync-rebase assistance execution boundary.
GeminiRuntimeTransportinfra/gemini_acp.rsACP stdio transport boundary for Gemini runtime protocol tests.

When adding higher-level flows involving multiple external commands, prefer injectable trait boundaries and mockall-based tests over flaky end-to-end shell-heavy tests.