mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 07:42:13 +03:00
Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates green: static + changed tests + vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-213228-suite.log
21 lines
685 B
JavaScript
21 lines
685 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
const source = readFileSync(
|
|
new URL("../../open-sse/handlers/chatCore.ts", import.meta.url),
|
|
"utf8"
|
|
);
|
|
|
|
test("global compression off gates reactive and last-resort context compaction", () => {
|
|
assert.match(
|
|
source,
|
|
/reactiveContextCompactionEnabled\s*=\s*compressionSettingsResult\.enabled\s*&&\s*!compressionExcluded;/
|
|
);
|
|
assert.match(source, /reactiveContextCompactionEnabled\s*&&\s*estimatedTokens\s*>\s*threshold/);
|
|
assert.match(
|
|
source,
|
|
/reactiveContextCompactionEnabled\s*&&\s*finalEstimatedInputTokens\s*>=\s*finalContextLimit/
|
|
);
|
|
});
|