Files
devvm/internal/sshagent
w3cjandClaude Opus 5.5 6128f400e4 refactor(backend): Backend is four role interfaces, and Running replaces StartID, Confined and Lifeline
backend.Backend is Name, Caps and four roles, each required:
- Host: Problems, NameMax, Location, DiskDirs, Floors
- Images: BuildImage, Images, ImageSize, DeleteImage, BuildTools,
  ToolFormat, KeyFiles
- Machines: CreateVM, Start, Running, ProxyURL, Stop, Delete, Rename,
  List, Inspect, Exec, Shell, SSH, ForwardTarget
- Housekeeping: Usage, Strays, DevvmCache, DeleteCache

The optional interfaces Lima implemented (KeyFiles, Storage, Locator,
UsageReporter, StrayFinder, CacheCleaner) are gone into the roles, and
their callers call the methods directly; Forgetter stays the one
optional role, found with backend.As. Running(ctx, vm) returns a
backend.Run (ID, Confined, Lifeline) in place of StartID, Confined and
Lifeline. Space.Check, Space.Warning and LocationOf take a Host.

lima.Lima keeps its fields, Name, Caps and its shared helpers (14
methods), and embeds host, images, machines and housekeeping, each over
the Lima it's part of (withRoles); backendtest.Fake is split the same
way. The guard has every role's methods, its own for the ones it guards.

Structure test: max-methods counts an interface's declared methods too;
Lima and the fake leave largeTypes. Tests: TestRunning, TestGuardRoles,
TestAs (Forgetter), TestFakeRunningAndNone, two TestRulesFail cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 19:58:19 -07:00
..