Select New Documents by createdDate
Version: 1.0.0 Date: 2026-07-15
Goal: Neo-backend, Tower v2, and automation scripts write createdDate only. Forge fetch-new-docs filtered on legacy Mongoose created, so those documents were never picked for anchoring (admin showed 0/0 confirmed).
Solution: Match and project createdDate in the protect aggregation pipeline. No DB migration needed — legacy manual deposits already have createdDate.
Features:
$match: { createdDate: { $gt: new Date(startTime) } }replacescreated$projectexposescreatedDateinstead ofcreated- Unit tests assert pipeline stages
Implementation Details:
- Documents without
createdDate(extremely old edge case) remain excluded — all production manual deposits already carrycreatedDate - Aligns with neo-backend stats fix (
createdDatein aggregations) and backend JSON proxy (created←createdDate)
Files Modified:
src/database/requests/fetch-new-docs.ts- Pipeline field renamesrc/database/requests/fetch-new-docs.spec.ts- Pipeline tests (new)
Release fragment: fix-forge-created-date