Skip to content

feat: add auditable data lifecycle and archive policy #135

feat: add auditable data lifecycle and archive policy

feat: add auditable data lifecycle and archive policy #135

Triggered via pull request July 22, 2026 13:09
Status Failure
Total duration 1m 4s
Artifacts

ci.yml

on: pull_request
Lint, typecheck, format, test
1m 0s
Lint, typecheck, format, test
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
integrations/unit/audit.middleware.test.ts > Audit Middleware > Archive Visibility Tests > should exclude archived records by default: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Soft-Delete Tests > should exclude soft-deleted records from count: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Soft-Delete Tests > should exclude soft-deleted records from findMany: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Soft-Delete Tests > should convert delete to soft-delete for users: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Immutability Tests > should allow creation of immutable records: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Immutability Tests > should prevent deletion of transactions: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Immutability Tests > should prevent updates to transactions: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Immutability Tests > should prevent deletion of audit logs: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/unit/audit.middleware.test.ts > Audit Middleware > Immutability Tests > should prevent updates to audit logs: src/audit/middleware.ts#L85
ForbiddenError: Cannot delete immutable model: Completion. Audit data must be retained. ❯ Array.deleteMany src/audit/middleware.ts:85:21 ❯ node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:11:9310 ❯ o node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1022 ❯ PrismaPromise.then node_modules/.pnpm/@prisma+client@7.4.2_prisma@7.4.2_@types+react@19.2.14_react-dom@19.2.4_react@19.2.4__r_49b4b128965f74ea9bbd7586bc0c7d7a/node_modules/@prisma/client/runtime/client.js:65:1118 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, isOperational: true }
integrations/auth.controller.test.ts > AuthController > register > should register a new user successfully: integrations/auth.controller.test.ts#L76
AssertionError: expected "vi.fn()" to be called with arguments: [ 201 ] Received: 1st vi.fn() call: [ - 201, + 500, ] Number of calls: 1 ❯ integrations/auth.controller.test.ts:76:41
Lint, typecheck, format, test
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4, pnpm/action-setup@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/