YachtMemory Phase 1C.1d v1 - Processing-State Reconciliation ================================================================ Basis ----- Full replacement of the uploaded Phase 1C v1 src/services/StayProcessingWriter.php. Scope ----- This phase reconciles status only. It does NOT add per-phase retry/attempt metadata, does NOT run any processor and does NOT change geography validity. Rules ----- Enrichment: - no enrichment row -> PENDING - enrichment revision differs from Stay revision -> PENDING - revisions equal -> COMPLETE Geography: - existing status is preserved - new processing rows start PENDING Classification: - existing status is preserved, except a proven COMPLETE -> PENDING Enrichment invalidation also invalidates Classification to PENDING - new processing rows start PENDING Overall: FAILED > RETRY > PROCESSING > PENDING > COMPLETE Important --------- The current real database state has already been re-enriched after Stay #36 moved to revision 2. Therefore the first normal DRY RUN is expected to be UNCHANGED for all 36 rows if the existing processing rows are consistent. This test does not artificially mutate the database to manufacture a stale Stay. The next naturally growing Stay revision can provide the real stale reconciliation test. Install / syntax ---------------- unzip -o YachtMemory_StayProcessing_Phase1C1d_v1.zip php -l src/services/StayProcessingWriter.php php -l shared_dashboard/scripts/test_stay_processing_reconcile.php Dry run only ------------ php shared_dashboard/scripts/test_stay_processing_reconcile.php 1 Do not use --apply until the dry-run output has been reviewed.