test: align two tests left red by merged PRs (#4335 db-rules count + #4271 arena metadata) (#4346)

* test(db-rules): align audited-module count to 28 (apiKey db helpers)

#4335 added apiKeyColumnFallbacks + apiKeyUsageLimitFields to INTENTIONALLY_INTERNAL
(both db-internal, consumed only by db/apiKeys.ts) but did not update the parity test
in check-db-rules-classification.test.ts, which still expected exactly 26 audited
modules — leaving it red on release/v3.8.30 (28 != 26). Add the two modules to the
expected list and bump the count to 28. Test-only alignment; no production change.

* test(web-session): align lmarena metadata to the split-cookie source (#4271)

#4271/#4331 updated webSessionCredentials.ts for lmarena's split auth cookie —
new placeholder text and storageKeys arena-auth-prod-v1.0/.1 — but did not update
web-session-credentials.test.ts, which still asserted the old placeholder + 3-key
storageKeys. Align the expected metadata to the merged source; test-only, no prod change.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-06-20 00:47:19 -03:00
committed by GitHub
parent 68e200a2d5
commit 832fde52b4
2 changed files with 8 additions and 4 deletions

View File

@@ -122,10 +122,12 @@ test("INTENTIONALLY_INTERNAL is exported from check-db-rules.mjs", () => {
assert.ok(INTENTIONALLY_INTERNAL.size > 0, "INTENTIONALLY_INTERNAL must not be empty");
});
test("INTENTIONALLY_INTERNAL contains the expected 26 audited modules", () => {
test("INTENTIONALLY_INTERNAL contains the expected 28 audited modules", () => {
const expected = [
"_rowTypes",
"accessTokens",
"apiKeyColumnFallbacks",
"apiKeyUsageLimitFields",
"cleanup",
"cliToolState",
"comboForecast",

View File

@@ -37,13 +37,15 @@ test("web session credential metadata identifies cookie, token, and no-auth prov
acceptsFullCookieHeader: false,
storageKeys: ["token", "userToken"],
});
// lmarena.ai's real auth cookie is `arena-auth-prod-v1`, not `session` (#3810)
// lmarena.ai's real auth cookie is `arena-auth-prod-v1`, not `session` (#3810).
// The session is now split across `arena-auth-prod-v1.0`, `.1`, … (#4271).
assert.deepEqual(webSessionCredentials.getWebSessionCredentialRequirement("lmarena"), {
kind: "cookie",
credentialName: "arena-auth-prod-v1",
placeholder: "arena-auth-prod-v1=... or full Cookie header from lmarena.ai",
placeholder:
"Paste the full Cookie header from lmarena.ai (the session is now split across arena-auth-prod-v1.0, .1, …)",
acceptsFullCookieHeader: true,
storageKeys: ["cookie", "arena-auth-prod-v1", "session"],
storageKeys: ["cookie", "arena-auth-prod-v1", "arena-auth-prod-v1.0", "arena-auth-prod-v1.1", "session"],
});
// veoaifree-web is now a NOAUTH provider — not in WEB_SESSION_CREDENTIAL_REQUIREMENTS
assert.equal(webSessionCredentials.getWebSessionCredentialRequirement("veoaifree-web"), null);