Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(e2e): compare the Codex freeze fixture limits with the contract LIMITS (#739)
Alfredo Lopez268a6519473c
diff --git a/tests/e2e/integration/codex-subscription-contract-freeze.test.ts b/tests/e2e/integration/codex-subscription-contract-freeze.test.tsindex f02bdd14d..760cf2e54 100644--- a/tests/e2e/integration/codex-subscription-contract-freeze.test.ts+++ b/tests/e2e/integration/codex-subscription-contract-freeze.test.ts@@ -215,6 +215,24 @@ describe('codex-subscription contract freeze', () => {expect(limits?.maxMessages).toBe(1024)expect(limits?.maxRequestBodyBytes).toBe(8388608)expect(limits?.maxVisualRequestBodyBytes).toBe(25165824)+ // Every bound the fixture shares with the runtime contract must equal it, so+ // a change to `LIMITS` that forgets the fixture fails here for every field,+ // not only for the ones pinned above.+ const { LIMITS } = createRequire(import.meta.url)(+ join(repoRoot, 'packages/llm-provider-attempt-contract/index.cjs')+ ) as { LIMITS: Record<string, number> }+ const shared = Object.keys(LIMITS).filter(name => limits !== undefined && name in limits)+ expect(shared).toEqual([+ 'maxRequestBodyBytes',+ 'maxVisualRequestBodyBytes',+ 'maxMessages',+ 'maxToolCalls',+ 'maxOutputTokens',+ 'maxDeadlineMs',+ ])+ for (const name of shared) {+ expect({ [name]: limits?.[name] }).toEqual({ [name]: LIMITS[name] })+ }const errors = contract.errorTaxonomyexpect(Array.isArray(errors) && (errors as unknown[]).length > 0).toBe(true)diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.jsonindex 36c4b726b..29ee9e821 100644--- a/tests/e2e/package-lock.json+++ b/tests/e2e/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-e2e-tests",- "version": "0.1.90",+ "version": "0.1.91","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-e2e-tests",- "version": "0.1.90",+ "version": "0.1.91","devDependencies": {"@types/jsonwebtoken": "^9.0.10","@types/node": "^22.0.0",diff --git a/tests/e2e/package.json b/tests/e2e/package.jsonindex 561f40264..1257d6683 100644--- a/tests/e2e/package.json+++ b/tests/e2e/package.json@@ -1,6 +1,6 @@{"name": "clerum-e2e-tests",- "version": "0.1.90",+ "version": "0.1.91","private": true,"type": "module","scripts": {