test(daemon): cover lock-target matrix, auth-hook rejections, archive root inference, and longpress duration
Merged
TH
2mo ago+358+358+012345678901234567890123456789-0-0-0123456789
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.
| Function | CRAP before → after |
|---|---|
request-lock-policy.ts targetSelectorsConflict | 33 → 9.4 (33% → 83%) |
server/http-authorization.ts sendAuxiliaryAuthHookRejection | 30 → 5 (0% → 100%) |
artifact-archive.ts inferArchiveRootName | 30 → 5 (0% → 100%) |
session-script-writer.ts readLongPressDurationFromPositionals | 30 → 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.
Validation
- Tested commit:
8c6bbd8a0(rebased onto currentmain). pnpm check:affected --run: all runnable checks passed (format, lint, typecheck, fallow, related tests) under the machine-wide lock.pnpm check:coverage-crap --allon 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.