test(daemon): cover lock-target matrix, auth-hook rejections, archive root inference, and longpress duration

Merged
TH
2mo ago
+358-0

Summary

Covers the four low-coverage CRAP findings from #3424 (G1 of 3) through their owning modules' public entry points; no production changes, no splits.

FunctionCRAP before → after
request-lock-policy.ts targetSelectorsConflict33 → 9.4 (33% → 83%)
server/http-authorization.ts sendAuxiliaryAuthHookRejection30 → 5 (0% → 100%)
artifact-archive.ts inferArchiveRootName30 → 5 (0% → 100%)
session-script-writer.ts readLongPressDurationFromPositionals30 → 5 (0% → 100%)

Routes: applyRequestLockPolicy fresh-session target/lock-platform matrix; the shared aux HTTP auth gate rejecting a hook via the diagnostics route; extractTarInstallableArtifact without expectedRootName; SessionScriptWriter.write longpress selector rewrite. Each new test was observed to fail under a targeted mutation of its function, then pass again.

Part of #3424, part of #3414.

Validation

  • Tested commit: 8c6bbd8a0 (rebased onto current main).
  • pnpm check:affected --run: all runnable checks passed (format, lint, typecheck, fallow, related tests) under the machine-wide lock.
  • pnpm check:coverage-crap --all on a per-file map: no function at or above 30 among the four owned files (was 4).
  • CI Coverage/Integration evidence on the PR head tracked in the checks tab.