npm notice run backend@0.0.1 test
npm notice run jest --runInBand corporate.integration.spec -t bounds detail|oversized
FAIL src/admin/hermes/corporate.integration.spec.ts
  ● corporate API / disposable PostgreSQL › bounds detail relations and report snapshots with explicit truncation and immutable replay

    expect(received).toHaveLength(expected)

    Expected length: 100
    Received length: 106
    Received array:  [[Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], …]

      153 |     await db.corporateEvent.createMany({ data: Array.from({ length: 105 }, () => ({ taskId: task.id, speaker: 'SYSTEM', speakerName: 'fixture', step: 'FIXTURE', content: 'x'.repeat(10000), payload: { nested: ['x'.repeat(10000)] } })) });
      154 |     const detail = await request(app.getHttpServer()).get('/admin/hermes/tasks/' + task.id).set('x-api-key', 'executor').expect(200);
    > 155 |     expect(detail.body.logs).toHaveLength(100);
          |                              ^
      156 |     expect(detail.body.relationsMeta.logs).toEqual({ total: 106, returned: 100, limit: 100, truncated: true });
      157 |     const op = key(), body = { day: new Date().toISOString().slice(0, 10), summary: 'bounded' };
      158 |     const report = (await post('reports', body, 'executor', op).expect(201)).body;

      at Object.<anonymous> (admin/hermes/corporate.integration.spec.ts:155:30)

  ● corporate API / disposable PostgreSQL › rolls back oversized mutation responses instead of persisting huge idempotency values

    expect(received).rejects.toThrow()

    Received promise resolved instead of rejected
    Resolved to value: {"value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

      168 |     const service = app.get(CorporateService) as any;
      169 |     const before = await db.corporateTask.count();
    > 170 |     await expect(service.operation('fixture', 'oversize', key(), {}, async (tx: any) => {
          |           ^
      171 |       await tx.corporateTask.create({ data: { title: 'rollback', description: 'fixture', taskCode: key(), normalizedTitle: 'rollback', normalizedCode: key(), department: 'CONTENT_SEO', createdBy: 'fixture' } });
      172 |       return { value: 'x'.repeat(1100000) };
      173 |     })).rejects.toThrow('Operation response exceeds limit');

      at expect (../../../corporate-backend/backend/node_modules/expect/build/index.js:2116:15)
      at Object.<anonymous> (admin/hermes/corporate.integration.spec.ts:170:11)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 10 skipped, 12 total
Snapshots:   0 total
Time:        4.583 s
Ran all test suites matching corporate.integration.spec with tests matching "bounds detail|oversized".