Mission ID: P-TWO Difficulty: Level 3 (Async Patterns) Context: Data Batch Processor
We are running a critical data migration script. The logs say "Migration Complete", but the destination database is empty.
Your job is to fix src/batch.js so that the system ACTUALLY WAITS for the records to be processed before returning success.
- Data Integrity: All 3 records must be processed.
- Sequence: The function must not return until all records are fully processed.
- Efficiency: Processing should be efficient (Parallel is preferred, but Serial is acceptable if safe).
- "A loop that does not wait is a lie."
- Fork & Clone.
npm installnpm test(Fails: Expected 3 records, got 0).- Fix
src/batch.js. - Submit PR with Liability Waiver.