Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

test(ts): stabilize CI complexity guard

KunjShah950e7a8d14813e
diff --git a/laya-ts/tests/identifier-complexity.test.ts b/laya-ts/tests/identifier-complexity.test.ts
index 5c54d62f..7e28a1dc 100644
--- a/laya-ts/tests/identifier-complexity.test.ts
+++ b/laya-ts/tests/identifier-complexity.test.ts
@@ -96,13 +96,7 @@ describe("identifier stripping: complexity", () => {
// apart, which CI jitter covers either way. The 20 000 and 50 000 character cases
// above carry the guarantee -- they are 250x and 1500x apart.
- it("4x the input costs under 8x the time (linear ~4, quadratic ~16)", () => {
- const best = (n: number) =>
- Math.min(...[0, 1, 2].map(() => elapsed(() => latinProfile("a".repeat(n)))));
- const small = best(12_500);
- const large = best(50_000);
- // performance.now() granularity makes a sub-0.05 ms baseline meaningless; the
- // absolute ceilings above already carry the guarantee in that case.
- if (small > 0.05) expect(large / small).toBeLessThan(8);
- });
+ // The absolute ceilings above are the stable regression guard. A relative timing
+ // ratio is too sensitive to Vitest worker contention on CI: unrelated tests can delay
+ // one small sample and make a linear implementation appear super-linear.
});