7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.
TypeScript
Loosen the compression timing caps off CI (#1030)
Tashfeen5bad9eb1fff1
diff --git a/server/src/__tests__/services/compression.test.ts b/server/src/__tests__/services/compression.test.tsindex 396f8d0d..ea7afab1 100644--- a/server/src/__tests__/services/compression.test.ts+++ b/server/src/__tests__/services/compression.test.ts@@ -377,6 +377,14 @@ describe('compression engines', () => {expect(savedChars).toBeGreaterThan(0);});+ // The wall-clock caps below are calibrated to GitHub's hosted runners, where+ // they gate every push. Off CI they are only a courtesy, and a laptop+ // running the suite inside Docker measures 2-3x slower than a runner (an+ // outside verification on Node 22 saw a 10-11 ms median and 252-277 ms on+ // the linearity payload), so the same numbers there only produce false+ // failures. Loosen them where nothing depends on them; CI keeps them exact.+ const slack = process.env.CI ? 1 : 3;+it('stays within the 100 KB synchronous performance budget', () => {const payload = `${'plain status line without protected tokens\n'.repeat(2_500)}tail`;const samples: number[] = [];@@ -392,8 +400,8 @@ describe('compression engines', () => {// 5 ms flaky (Node 22 measured 5.54–5.77 ms in otherwise-green CI runs).// Keep a tight median guard while the p99/adversarial 25 ms caps below// continue to catch material synchronous regressions.- expect(p50).toBeLessThan(8);- expect(p99).toBeLessThan(25);+ expect(p50).toBeLessThan(8 * slack);+ expect(p99).toBeLessThan(25 * slack);const unbalancedJson = '['.repeat(100_000);const adversarialStarted = performance.now();@@ -401,7 +409,7 @@ describe('compression engines', () => {config: config('lossless'),recordStats: false,});- expect(performance.now() - adversarialStarted).toBeLessThan(25);+ expect(performance.now() - adversarialStarted).toBeLessThan(25 * slack);const manyBalancedArrays = '[]'.repeat(50_000);const balancedStarted = performance.now();@@ -409,7 +417,7 @@ describe('compression engines', () => {config: config('lossless'),recordStats: false,});- expect(performance.now() - balancedStarted).toBeLessThan(25);+ expect(performance.now() - balancedStarted).toBeLessThan(25 * slack);});it('stays linear on protected-token-heavy adversarial payloads', () => {@@ -427,7 +435,7 @@ describe('compression engines', () => {], { config: config('standard'), recordStats: false });const traceStarted = performance.now();call(traceLines.join('\n'));- expect(performance.now() - traceStarted).toBeLessThan(250);+ expect(performance.now() - traceStarted).toBeLessThan(250 * slack);// Distinct numeric literals are the highest-cardinality protected kind;// the fidelity survival scan once rescanned the output per literal.@@ -435,6 +443,6 @@ describe('compression engines', () => {for (let i = 0; i < 12_000; i += 1) numberLines.push(`metric row ${i * 7 + 1_000_003} value ok`);const numbersStarted = performance.now();call(numberLines.join('\n'));- expect(performance.now() - numbersStarted).toBeLessThan(250);+ expect(performance.now() - numbersStarted).toBeLessThan(250 * slack);});});