All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Run Linting (pull_request) Successful in 9m37s
CI/CD Pipeline - Apartment API / Run Tests (pull_request) Successful in 9m47s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Successful in 2s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Add markStaleUnits() that marks units as unavailable when they are not present in the current scrape results. Uses MongoDB updateMany with a $nin filter on unit_code to efficiently update only units that were previously available but no longer appear in the scraped data. Sets available to false and records marked_stale_date. Includes 18 tests covering filter criteria, $set fields, already unavailable units, empty currentUnitCodes, error handling, logging, and return value verification.