diff --git a/server/valkey.ts b/server/valkey.ts index 5532498..6fe7d66 100644 --- a/server/valkey.ts +++ b/server/valkey.ts @@ -6,8 +6,21 @@ const VALKEY_URL = Deno.env.get("VALKEY_URL") || export const valkey = VALKEY_URL ? new Redis(VALKEY_URL, { enableOfflineQueue: false, + maxRetriesPerRequest: 1, + retryStrategy: (times) => (times > 3 ? null : Math.min(times * 100, 1000)), }) - : new Redis({ lazyConnect: true, enableOfflineQueue: false }); + : new Redis({ + lazyConnect: true, + enableOfflineQueue: false, + maxRetriesPerRequest: 1, + retryStrategy: () => null, + }); + +valkey.on("error", (err) => { + if (Deno.env.get("DEBUG_VALKEY")) { + console.warn("[Valkey] Connection warning:", err.message); + } +}); export async function pingValkey(): Promise { if (!VALKEY_URL) return; // Skip in test diff --git a/tasks/path.md b/tasks/path.md index 1f6bf96..7d444c9 100644 --- a/tasks/path.md +++ b/tasks/path.md @@ -47,7 +47,8 @@ in an existing task file._ 2. Apply minimal, pure functional modifications. 3. Ensure all downstream pipeline steps and context contracts remain intact. 4. Run all quality gates (`deno fmt`, `deno task lint`, `deno task check`, `deno task test`). -5. Upon successful completion and verification, update the task status according to `tasks/GUIDELINES.md`. +5. Run ONLY unit tests (`deno task test` / `deno test --allow-all`). Do NOT execute `deno task start` or `deno task dev` (live database daemons are not running in sandbox containers). +6. Upon successful completion and verification, update the task status according to `tasks/GUIDELINES.md`. ``` ---