
> claimmanager-enterprise-pilot@2.0.0 check:all
> npm run typecheck && npm test && npm run test:enterprise


> claimmanager-enterprise-pilot@2.0.0 typecheck
> tsc --noEmit


> claimmanager-enterprise-pilot@2.0.0 test
> vitest run --exclude "tests/enterprise/**"


[1m[30m[46m RUN [49m[39m[22m [36mv4.1.11 [39m[90m/vercel/sandbox/data/claimmanager-review/ClaimManager_v2[39m

 [32m✓[39m tests/fileFormats.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m 35[2mms[22m[39m
 [32m✓[39m tests/specCores.test.ts [2m([22m[2m33 tests[22m[2m)[22m[32m 30[2mms[22m[39m
 [32m✓[39m tests/templateConformance.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 17[2mms[22m[39m
 [32m✓[39m tests/localEngine.test.ts [2m([22m[2m35 tests[22m[2m)[22m[32m 15[2mms[22m[39m
 [32m✓[39m tests/engine.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 25[2mms[22m[39m
 [32m✓[39m tests/claimNumericIntegrity.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 37[2mms[22m[39m
 [32m✓[39m tests/delayClaimDocument.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 43[2mms[22m[39m
 [32m✓[39m tests/contractAnalysis.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 13[2mms[22m[39m
 [32m✓[39m tests/arbitration.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m 22[2mms[22m[39m
 [32m✓[39m tests/claimPipeline.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 51[2mms[22m[39m
 [32m✓[39m tests/financial5090.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 7[2mms[22m[39m
 [32m✓[39m tests/realDocumentDefects.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 16[2mms[22m[39m
 [32m✓[39m tests/delayDays.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 23[2mms[22m[39m
 [32m✓[39m tests/retryPolicy.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 9[2mms[22m[39m
 [32m✓[39m tests/p6Schedule.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 8[2mms[22m[39m
 [32m✓[39m tests/dashboardMetrics.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 9[2mms[22m[39m
 [32m✓[39m tests/financial1300.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 9[2mms[22m[39m
 [32m✓[39m tests/integrity.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 68[2mms[22m[39m
 [32m✓[39m tests/delayClauseMap.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 23[2mms[22m[39m
 [32m✓[39m tests/reportChat.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 11[2mms[22m[39m
 [32m✓[39m tests/ganttChart.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 21[2mms[22m[39m
 [32m✓[39m tests/ocr.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 34[2mms[22m[39m
 [32m✓[39m tests/xlsxSheetNames.test.ts [2m([22m[2m5 tests[22m[2m | [22m[33m4 skipped[39m[2m)[22m[32m 3[2mms[22m[39m
 [32m✓[39m tests/scheduleClassification.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[2mms[22m[39m

[2m Test Files [22m [1m[32m24 passed[39m[22m[90m (24)[39m
[2m      Tests [22m [1m[32m428 passed[39m[22m[2m | [22m[33m4 skipped[39m[90m (432)[39m
[2m   Start at [22m 16:00:42
[2m   Duration [22m 4.67s[2m (transform 437ms, setup 0ms, import 1.06s, tests 536ms, environment 3ms)[22m


> claimmanager-enterprise-pilot@2.0.0 test:enterprise
> tsx --test --test-concurrency=1 tests/enterprise/*.test.ts

[llm-keys] key "primary" on cooldown for 360min — اتمام اعتبار (402)
(node:656) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:634) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
✔ scrypt: correct password, wrong password, unique salts (146.580685ms)
✔ protected API requires a valid server-side session (70.788653ms)
✔ mutations reject cross-origin requests including login (0.823771ms)
✔ login establishes HttpOnly, Strict, Secure cookie without exposing password (44.527904ms)
✔ bad password fails; session cannot be forged (37.081776ms)
✔ creates project and project-scoped document, deduplicates content (5.298009ms)
✔ offline answer has verbatim source and correct line; no network (2.798695ms)
✔ selection cannot silently include a different project (0.675137ms)
✔ unknown question produces no invented evidence (1.047446ms)
✔ Persian and Arabic letter variants are normalized only for matching (0.244792ms)
✔ offline report is durable, draft, source-hashed, no cloud required (17.814906ms)
✔ 402 on cloud falls through to local extractive answer (36.11162ms)
✔ auto mode uses configured local LLM when cloud is absent (1.6233ms)
✔ reader role can query but cannot create/delete docs or review (78.213945ms)
✔ analyst cannot approve report; reviewer can review with audit event (155.363363ms)
✔ audit/users are not exposed to reader; admin cannot disable self (1.17926ms)
✔ invalid UUIDs and malicious input are rejected, never interpreted as file paths (1.347413ms)
✔ security headers present; no cache of protected data (0.432849ms)
✔ database survives a fresh process and backup integrity is verified (65.79112ms)
✔ logout revokes current session (1.616362ms)
ℹ tests 20
ℹ suites 0
ℹ pass 20
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1114.498396
