(sizeBytes: number)
| 242 | }, |
| 243 | }) |
| 244 | const skipOp = (sizeBytes: number) => ({ |
| 245 | type: 'skip' as const, |
| 246 | extDoc: { |
| 247 | externalId: `s-${Math.random()}`, |
| 248 | title: 'f', |
| 249 | content: '', |
| 250 | contentHash: 'h', |
| 251 | mimeType: 'text/plain', |
| 252 | skippedReason: 'too big', |
| 253 | metadata: { fileSize: sizeBytes }, |
| 254 | }, |
| 255 | }) |
| 256 | |
| 257 | it('batches small ops up to the count cap', async () => { |
| 258 | const { chunkOpsByByteBudget } = await import('@/lib/knowledge/connectors/sync-engine') |