This repository was archived by the owner on Sep 13, 2026. It is now read-only.
v0.3.6
Added
- TTFT-watchdog gated retry experiment (off by default,
experiment_ttft_watchdog=false). Detects stuck-on-first-byte upstream
fetches within a configurable threshold (ttft_timeout_ms, default 60s)
and retries with gating:- Manual first-chunk read races the watchdog; wrapped
ReadableStream
preserves the existingTransformStreamcapture path (no first chunk
lost). - Retry decision gated by breaker state, gate saturation, auto-disable
state, and attempt cap — suppresses retry when upstream is degraded. - Same-key retry (attempt 2) reuses the permit and is
rate-limiter-exempt. - Rewrite-id escalation (attempt 3) extends
attemptRewriteRetrywith
optionalttftController+forceEscalateparams (existing 502/529
path unchanged). - Auto-disable: feature self-disables after
ttft_retry_failure_thresholdconsecutive retry failures within
ttft_retry_failure_window_ms; only config reload re-enables. - Cooldown between retries (
ttft_retry_cooldown_ms). - Response headers:
X-Proxy-Retry-Attempt,X-Proxy-TTFT-Exceeded,
X-Proxy-Breaker-State. - Invariants preserved: single-release permit, breaker untouched on
TTFT timeout, rate limiter charged once,classify429unchanged. - 7 new config fields (all hot-reloadable, not in
RESTART_REQUIRED
orGATE_RECONFIG). ADR 0004 + CONTEXT.md glossary entries added. - 27 new tests (end-to-end via
startProxy+ mock upstream, plus
unit tests forTtftWatchdogState). Full suite: 1120 pass, 0 fail.
- Manual first-chunk read races the watchdog; wrapped
Changed
- Dashboard timestamps now render in UTC instead of the browser's
local timezone.fmtDateandfmtDateTimewere replaced by
fmtUtcTime(HH:mm:ss) andfmtUtcDateTime(MMM d, yyyy, HH:mm:ss)
usingIntl.DateTimeFormatpinned totimeZone: "UTC". All
dashboard components that previously rendered local times — capture
detail, capture row, gate status, models tab, usage tab, usage
timeline (current + old), vision calls — now use the UTC variants.
This makes timestamps consistent across machines in different
timezones and matches the UTC convention used in server-side logs.
Added dashboard unit tests pinning the UTC formatting against a known
epoch-ms.