Files
orca/src/main/daemon
Neil 2d85fdc753 test: retire src/main cases that replay a contract their owner already proves (#24025)
Audit sweep over `src/main/{native-chat,startup,daemon,skills,ssh,providers,git,
persistence,claude,agent-hooks,github}`. 35 case declarations removed across 23
files, 1 test file deleted, 655 lines gone. No production file touched.

What went, by pattern:

- Duplicate invocations of a contract owned exhaustively elsewhere: three
  `publishDaemonEndpoint` cases that `daemon-endpoint-publish.test.ts` already
  covers in 20, and three daemon health classifications (`HEALTHY`, `DEGRADED`,
  `UNREACHABLE`) that `daemon-health.test.ts` owns. `WEDGED` and `WEDGED-HELLO`
  stayed — the never-resolving-RPC and never-answers-hello paths have no other
  owner.
- Provider-local replays of a shared helper: five `GitStatusReadLeaseOwner` cases
  re-run per provider, owned by `src/main/git/git-status-read-lease-owner.test.ts`,
  and `returns the connectionId` replayed in three provider suites against an
  identity getter.
- Assertion-free coverage probes, including one whose comment says "no writes
  should happen" while nothing checks that.
- Copied inventories that restate a type: `PROVIDER_FRAME_CLASSIFICATIONS` is
  declared `as const satisfies Record<...>`, so a missing key is already a type
  error and an extra key fails the excess-property check. Those cases also pinned
  key order, which is not a contract.
- A negative control that cannot fail: asserting a profile-state filename is not
  an unrelated literal, in a file whose first case already pins that filename
  positively.
- Byte-identical duplicates across files, and a second case re-asserting the
  `unverifiable -> true` mapping the case above it already proves.

`src/main/providers/ssh-git-provider-api.test.ts` goes: 52 method names asserted
`toBeTypeOf('function')` plus `toHaveLength(52)` over its own literal. Note the
reason, because the obvious one is wrong. "The `IGitProvider & SshGitProvider`
annotation enforces this at compile time" does NOT hold — removing an operation
from the interface and its implementing class in one commit still compiles. What
makes the file redundant is that all 51 extractable names are referenced by some
other test under `src`, so dropping an operation breaks a behavioral test anyway.

The same check kept the three `registers all expected handlers` manifests in
`src/relay` during the previous wave, where eleven methods had no behavioral
caller at all. An inventory test is a ratchet if and only if at least one entry is
pinned solely by it; that is verified per entry, not per file.

Kept deliberately: everything a reliability gate cites, checked by case TITLE and
not only by file path, because the gate script resolves paths only; bound, quota
and provenance guards; the Windows MSYS job-breakaway and daemon-host relocation
tests, which guard failures that pass every existing gate; SSH execution-boundary
verdict vocabulary; and Git capability tests covering first fallback, cached call,
concurrent probes and per-host isolation as four distinct risks.

Coverage is partial and stated as such: of 1,449 files in scope, roughly 990 were
read case-by-case and 452 received title-and-grep triage only. The unread paths
are recorded for a later sweep rather than assumed clean.

Verified: per-area suites green (`daemon`+`skills` 294 files/3016 cases;
`git`+`persistence` 414 files/4476 cases; and the rest), gate manifest 140 gates,
`check:code-quality:changed` 0 new findings. A combined 11-path local run put
1,563 files through one machine and surfaced three timing-sensitive failures in
files this change does not touch (`history-manager`,
`structured-agent-session-refusal-retry`, `ssh-remote-commands`); all three pass
in isolation, and no production code changed, so CI's sharded run is the arbiter.
2026-09-29 23:10:40 -07:00
..