Surfaced by #1781 B4 (PR #1790) while converting matcher-less assertions.
src/utils/app-log-files.ts:43 throws new Error(...)
src/utils/verified-file.ts:35 and :110 throw new Error(...)
The repo's typed-error rule (ADR-0010) is that failures are AppError with a code from the closed set in packages/kernel/src/errors.ts, so callers and tests can assert the reason rather than the message. These three sites can't be asserted by code today; src/daemon/__tests__/app-log.test.ts:39 had to fall back to a message regex.
Fix: pick the right code (COMMAND_FAILED / INVALID_ARGS as appropriate) and add a hint; then tighten the test in app-log.test.ts to assertThrowsAppError/assertRejectsAppError (helper added in #1790).
Surfaced by #1781 B4 (PR #1790) while converting matcher-less assertions.
src/utils/app-log-files.ts:43throwsnew Error(...)src/utils/verified-file.ts:35and:110thrownew Error(...)The repo's typed-error rule (ADR-0010) is that failures are
AppErrorwith a code from the closed set inpackages/kernel/src/errors.ts, so callers and tests can assert the reason rather than the message. These three sites can't be asserted by code today;src/daemon/__tests__/app-log.test.ts:39had to fall back to a message regex.Fix: pick the right code (
COMMAND_FAILED/INVALID_ARGSas appropriate) and add ahint; then tighten the test in app-log.test.ts toassertThrowsAppError/assertRejectsAppError(helper added in #1790).