mirror of
https://github.com/stablyai/orca.git
synced 2026-10-02 00:02:05 +00:00
Semantic sweep of src/main persistence, skills, agent-hooks and providers. 22 cases removed across 14 files, plus one file; no production code touched. `opencode-message-part-flood-bench.test.ts` is deleted (137 lines). Its headline assertion is `THROTTLED_POSTS < LEGACY_PART_UPDATES / 3 + 1`, i.e. `120 < 134.33` over two constants declared in the test file itself, and the second is arithmetic over two more. The throttle it is named for lives in the OpenCode plugin and is never invoked: the test hand-simulates both client behaviours and posts them to a server that only asserts `status === 204`. Timings are logged, not asserted. Negative controls whose refusal comes from a different guard than the name claims: - "keeps permission visible for unpreviewable tool input with another tool use id" is blocked by `!hasConflictingToolUseId` AND the whole input clause, making it strictly weaker than the sibling that shares the guard with that clause satisfied; - "keeps permission visible when unknown tool previews collide" refuses on `nextToolUseId !== undefined` (`server-claude-status-rules.ts:133`), never on the collision; - "pane key present but no endpoint" hits the same `-z PORT || -z TOKEN || -z PANE_KEY` guard as its sibling, since PORT and TOKEN stay empty either way. Cases that cannot fail: "skips a no-op write when contents already match" — writing identical content yields identical content whether or not a skip fired, and the comment concedes nothing is observable. "Keeps the event loop responsive" asserted `settled === false`, restating promise pendingness, while the sibling "no synchronous HOME filesystem calls" catches the regression harder. Inputs no production path reads: `reconcileEndedProcessForPaneKeys` gates on `paneHasStateClaims`, not `state`; `applyAgentStatusHooksEnabled(false, …)` returns before reading `settings`; nothing branches on spaces in a script path, since POSIX always single-quotes and Windows base64-encodes the payload (the caret/percent case is the stronger #6078 guard); `TaskUpdate` is absent from `TOOL_INPUT_KEYS_BY_TOOL`, so it takes the same `if (!keys) return undefined` arm as the unknown-tool sibling. A provider loop drops `prime-agent`, a pure fall-through of every `pi` arm with no server-side special case; `omp` stays because `source === 'omp'` genuinely diverges in the retirement path. Kept on history rather than structure: `remote-hook-service-registry-coverage.test.ts` reads like a copied inventory but is the ratchet for #7253, where Droid and Copilot shipped `installRemote` unregistered and SSH status silently vanished. A HOME-ordering source grep also stays — its behavioural sibling only reproduces the 6.6s Xcode-stub stall on macOS, so the grep is the only cross-platform guard.