refactor: collapse single-implementation interfaces
Nine interfaces had exactly one implementation and no test double — they existed only to be named twice in a DI registration: IFindingsStore, IFindingsStoreLocator, IPrimeScheduleSignal, IRefineRunner, IWeekReportService, IMergeCoordinator, IMissionControlPane, IOnlineLoginService, ITaskListFilter. Consumers now depend on the concrete type; the DTO records that shared those files moved next to their implementation. IInteractiveLaunchSpecService stays — it carries 54 lines of contract documentation, which is not ceremony. IMergeCoordinator in particular had a redundant null object: MergeCoordinator with a null Handler already no-ops, and every test used the real class with Handler set. Filtering/ collapses from 8 files to 1. ITaskListFilter and TaskListFilterBase were a double abstraction over four predicates, with MatchesAsContext => false declared in both. SmartFlagFilter also compiled its expression twice (its own _flag plus the inherited Matches cache) — it now uses the cache. StaticTokenAuthProvider was in src but production uses ZitadelAuthProvider; it is a test double, so it moves to the test project. Its own test goes away with it.
This commit is contained in:
@@ -86,7 +86,7 @@ public sealed class WindowsTerminalLauncher : ITerminalLauncher
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// The raw claude CLI args for a --resume launch, shared with InteractiveLaunchSpecService
|
||||
// The raw claude CLI args for a --resume launch, shared with IInteractiveLaunchSpecService
|
||||
// (which needs the bare Exe/Args pair for a ConPTY host, not a wrapped pwsh command line).
|
||||
internal static IReadOnlyList<string> BuildResumeArgs(string claudeSessionId) =>
|
||||
new[] { "--resume", claudeSessionId };
|
||||
@@ -99,7 +99,7 @@ public sealed class WindowsTerminalLauncher : ITerminalLauncher
|
||||
BuildPwshCommand(claudePath, BuildPlanningStartArgs(ctx));
|
||||
|
||||
// The raw claude CLI args for an interactive planning START, shared with the embedded-ConPTY
|
||||
// planning path (InteractiveLaunchSpecService), which needs the bare Exe/Args pair rather than
|
||||
// planning path (IInteractiveLaunchSpecService), which needs the bare Exe/Args pair rather than
|
||||
// a pwsh-wrapped command line. Arg order matters: variadic flags (--allowedTools, --add-dir)
|
||||
// come first; the single-line kickoff prompt is positional, so it must follow a single-value
|
||||
// flag (--append-system-prompt-file) or a variadic flag would swallow it.
|
||||
@@ -176,7 +176,7 @@ public sealed class WindowsTerminalLauncher : ITerminalLauncher
|
||||
?? throw new TerminalLaunchException("Failed to start Windows Terminal process.");
|
||||
}
|
||||
|
||||
// Not private: reused by InteractiveLaunchSpecService to resolve the claude executable
|
||||
// Not private: reused by IInteractiveLaunchSpecService to resolve the claude executable
|
||||
// for a ConPTY-hosted launch spec the same way a wt-launched terminal resolves it.
|
||||
internal static string? Resolve(string pathOrName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user