From 522053e02da4f3acb28dd0fc5527170d894edb07 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Thu, 6 Aug 2026 23:53:58 -0300 Subject: [PATCH] fix: allowlist cron-parser dep and document OMNIROUTE_RUNNOW_TIMEOUT_MS env var Co-authored-by: diegosouzapw --- .env.example | 10 ++++++++++ config/quality/dependency-allowlist.json | 1 + docs/reference/ENVIRONMENT.md | 7 ++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index e0131b2f69..c5341e08e8 100644 --- a/.env.example +++ b/.env.example @@ -536,6 +536,16 @@ NEXT_PUBLIC_BASE_URL=http://localhost:20128 # cost of more upstream polling; raise to reduce request volume. # OMNIROUTE_CGPT_WEB_PRO_POLL_INTERVAL_MS=4000 +# Timeout for the /api/jobs/:id/run-now endpoint, in milliseconds. +# This bounds the CALL, not the job. runNow() dispatches the handler with +# `void` and returns as soon as it has decided to start, so on the normal +# path it resolves in milliseconds. It only matters when the job is already +# running: runNow() then waits for the in-flight run before starting the +# queued one, and this timeout prevents that wait from hanging forever. +# Used by: src/app/api/jobs/[id]/run-now/route.ts +# Default: 30000 (30 seconds) +# OMNIROUTE_RUNNOW_TIMEOUT_MS=30000 + # Public cloud URL — client-side mirror of CLOUD_URL. NEXT_PUBLIC_CLOUD_URL= diff --git a/config/quality/dependency-allowlist.json b/config/quality/dependency-allowlist.json index 6c7e2e3f45..4cd3b0f157 100644 --- a/config/quality/dependency-allowlist.json +++ b/config/quality/dependency-allowlist.json @@ -44,6 +44,7 @@ "commander", "concurrently", "cross-env", + "cron-parser", "csv-stringify", "ctrf", "dompurify", diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index ffa959c450..db2acb043b 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -675,9 +675,10 @@ REQUEST_TIMEOUT_MS (global override) | `OMNIROUTE_RETRY_BACKOFF_MS` | `10` | Shared retry backoff for the direct/relay/proxy retry-once paths in `open-sse/utils/proxyFetch.ts` (#9158). `0` = retry immediately. | | `OMNIROUTE_CHATGPT_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`chatgptTlsClient.ts`). | | `OMNIROUTE_CHATGPT_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. | -| `OMNIROUTE_CHATGPT_STREAM_FIRST_BYTE_TIMEOUT_MS` | `30000` (30s) | Max wait for the first streamed byte from the ChatGPT TLS sidecar (`chatgptTlsClient.ts`) before aborting a dead stream. Raise if upstream cold-starts exceed the window. | -| `OMNIROUTE_CLAUDE_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`claudeTlsClient.ts`). | -| `OMNIROUTE_CLAUDE_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. | +| `OMNIROUTE_CHATGPT_STREAM_FIRST_BYTE_TIMEOUT_MS` | `30000` | Max wait for the first streamed byte from the ChatGPT TLS sidecar. | +| `OMNIROUTE_CLAUDE_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding. | +| `OMNIROUTE_CLAUDE_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. | +| `OMNIROUTE_RUNNOW_TIMEOUT_MS` | `30000` | Timeout for the `/api/jobs/:id/run-now` endpoint. Bounds how long a run-now call waits for an in-flight job to finish before starting the queued run. See `src/app/api/jobs/[id]/run-now/route.ts`. | | `OMNIROUTE_PPLX_TLS_TIMEOUT_MS` | `30000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`perplexityTlsClient.ts`). | | `OMNIROUTE_PPLX_TLS_GRACE_MS` | `10000` | JS-side grace added on top of the wire timeout when the native binding is wedged. | | `OMNIROUTE_GROK_TLS_TIMEOUT_MS` | `60000` | Wire-level timeout for the bogdanfinn/tls-client koffi binding (`grokTlsClient.ts`). |