mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 09:02:11 +03:00
Validated on the combined batch board + this branch: antigravity-dynamic-session-id + proxy-fetch-dns-retry green; file-size gate green with the proxyFetch 1244 frozen entry (dated annotation for the +5 retry-classification lines, owner-authorized). Static per-account sessionId unpinning ends the concurrent-turn 429s and EmptyStreamError drops on the Hermes→Antigravity path; EAI_AGAIN/ENOTFOUND/ETIMEDOUT now classified retryable. Conflict with the tip was only stale provider-count docs. Resolves the remaining #10443 root causes. Thank you @rqzbeh!
19 lines
880 B
TypeScript
19 lines
880 B
TypeScript
import assert from "node:assert/strict";
|
|
import { test } from "node:test";
|
|
import { getAntigravitySessionId } from "../../open-sse/services/antigravityIdentity.ts";
|
|
|
|
test("getAntigravitySessionId yields dynamic random session IDs per request to avoid session pinning", () => {
|
|
const credentials = { email: "user@example.com", connectionId: "conn_123" };
|
|
|
|
const id1 = getAntigravitySessionId(credentials);
|
|
const id2 = getAntigravitySessionId(credentials);
|
|
|
|
assert.notEqual(id1, id2, "getAntigravitySessionId should not pin to a static account email hash");
|
|
assert.equal(typeof id1, "string");
|
|
assert.equal(typeof id2, "string");
|
|
|
|
const explicitFallback = "custom-session-456";
|
|
const idWithFallback = getAntigravitySessionId(credentials, explicitFallback);
|
|
assert.equal(idWithFallback, explicitFallback, "explicit fallback session ID should take precedence");
|
|
});
|