@devries-cameron20 / t3code-1 / commits / cabac780f5
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(desktop): cover WSL hashes through runtime resolution (#10285)

Julius Marminge committed Sep 5, 2026 at 22:12 UTC cabac780f5d9566ea26d340c9f126a46664b698b
2 files changed +1 -9
apps/desktop/src/backend/DesktopBackendConfiguration.test.ts
-8
@@ -218,14 +218,6 @@ const withPackagedWslHarness = <A, E, R>(
218 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer));
219
220 describe("DesktopBackendConfiguration", () => {
221 - it("accepts only normalized SHA-256 archive identities", () => {
222 - assert.equal(
223 - DesktopBackendConfiguration.parseWslRuntimeArchiveHash(` ${"A".repeat(64)}\n`),
224 - "a".repeat(64),
225 - );
226 - assert.isNull(DesktopBackendConfiguration.parseWslRuntimeArchiveHash("abc123"));
227 - });
228 -
221 it.effect("resolvePrimary produces a stable scoped bootstrap token", () =>
222 withHarness(
223 Effect.gen(function* () {
apps/desktop/src/backend/DesktopBackendConfiguration.ts
+1 -1
@@ -243,7 +243,7 @@ const WSL_RUNTIME_ARCHIVE_NAME = "wsl-runtime.tar.gz";
243 const WSL_RUNTIME_ARCHIVE_HASH_NAME = `${WSL_RUNTIME_ARCHIVE_NAME}.sha256`;
244 const SHA256_HEX_PATTERN = /^[0-9a-f]{64}$/i;
245
246 -export const parseWslRuntimeArchiveHash = (value: string): string | null => {
246 +const parseWslRuntimeArchiveHash = (value: string): string | null => {
247 const trimmed = value.trim();
248 return SHA256_HEX_PATTERN.test(trimmed) ? trimmed.toLowerCase() : null;
249 };