From fc8bfffc4b68106f7fee131100984873ce9e6951 Mon Sep 17 00:00:00 2001 From: Goni Sulaiman Date: Wed, 23 Sep 2026 19:59:49 +0100 Subject: [PATCH] docs(env): add DEEP_HEALTH_CHECK_ENABLED to .env.example The opt-in deep health check flag shipped in #14236 but only ever existed in code; check-env-doc-sync now fails on the release tip because the var is referenced in src/app/api/monitoring/health/route.ts and absent from .env.example. Document it next to the healthcheck-path block and mirror the row in ENVIRONMENT.md (the sync check reads both). Verified: npm run check:env-doc-sync and npm run check:docs-all pass on this tree; both fail on the release tip without the change. --- .env.example | 5 +++++ docs/reference/ENVIRONMENT.md | 1 + 2 files changed, 6 insertions(+) diff --git a/.env.example b/.env.example index 8de94b6c4c93..42cd0cfd7f1a 100644 --- a/.env.example +++ b/.env.example @@ -183,6 +183,11 @@ PORT=20128 # Used by: scripts/dev/healthcheck.mjs # OMNIROUTE_HEALTHCHECK_PATH=/api/monitoring/health +# Opt-in deep health check (issue #14236): an authenticated caller may +# append ?deep=1 to /api/monitoring/health to sample the completions surface once per TTL. +# Off by default; anonymous callers never trigger a probe. +# DEEP_HEALTH_CHECK_ENABLED=1 + # Opt-in iframe embedding of the OmniRoute HTML pages (issue #10273). Off by default: # every route ships `frame-ancestors 'none'` + `X-Frame-Options: DENY`, which is why the # VS Code Simple Browser (used by the OmniCopilot extension's "Open Dashboard → editor" diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index dff6cfe841bf..e42d00e37482 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -122,6 +122,7 @@ OmniRoute uses **SQLite** (via `better-sqlite3`) for all persistence. These vari | `PROXY_LOG_INCLUDE_IPS` | `false` | `src/lib/proxyLogger.ts` | Set to `"true"` or `"1"` to include client/egress IPs and the account prefix in the verbose `[ProxyEgress]` process-log line. Kept OFF by default so the process log does not leak IPs or the account prefix. | | `OMNIROUTE_DEBUG` | _(unset)_ | `bin/cli/commands/quota.mjs` | Set to `1` to print per-request timing diagnostics (`[omniroute] GET completed in Nms`) from the CLI quota commands to stderr. | | `OMNIROUTE_HEALTHCHECK_PATH` | _(auto)_ | `scripts/dev/healthcheck.mjs` | Explicit path probed by the container health check. Unset, the probe derives it from `OMNIROUTE_BASE_PATH`; setting it opts back into the deep monitoring endpoint. | +| `DEEP_HEALTH_CHECK_ENABLED` | _(unset)_ | `src/app/api/monitoring/health/route.ts` | Set to `1` to allow an authenticated caller to append `?deep=1` to `/api/monitoring/health`, sampling the completions surface once per TTL (#14236). Off by default; anonymous callers never trigger a probe. | | `OMNIROUTE_DEBUG_COMPLETION` | _(unset)_ | `bin/cli/commands/completion.mjs` | Set to any non-empty value to emit `[omniroute completion]` diagnostics from the CLI shell-completion cache paths (read/refresh/write). Off by default — those caches fail silently so a missing/corrupt cache never breaks tab-completion. | | `BATCH_RETRY_DURATION_MS` | `86400000` (24h) | `open-sse/services/batchProcessor.ts` | Maximum retry window for individual batch items (ms). Items exceeding this duration are marked failed. | | `BATCH_BACKOFF_BASE_MS` | `5000` | `open-sse/services/batchProcessor.ts` | Base delay (ms) for exponential backoff on batch item retries. |