review · segments
Integrate DAP with WooCommerce and FOS data
claude 124 events 1 segments dap-fos-enrichment
segment 1 of 1
Explore and plan integration of DAP with FOS/WooCommerce to establish a 'first import into FOS' timestamp on DAP orders
Created a new branch dap-fos-enrichment off origin/master. Three parallel Explore agents mapped DAP orders schema, FOS AuditLog model, and Lab Dashboard metrics. Read FOS source to confirm photos_cached_at is overwritten unconditionally on every successful re-import. Probed local FOS staging DB (no order.import-images rows). User brainstormed FOS-first approach (add photos_first_cached_at column to FOS orders) vs DAP-only derivation. Used flower recall to discover existing todos (514, 515, 518) and backfill conventions (sync-shipped-at pattern). Created flower brief #54 in tdr-thedarkroom project with full spec and four open questions. Filed one flower feedback note on ingest freshness threshold.
outcome
Flower brief #54 created with spec and open questions; branch dap-fos-enrichment ready; data architecture fully mapped; approach favors FOS-first root fix pending user decisions.
next steps
- Review and answer the four open questions on the brief (approach A vs B, FOS migration OK, 'delivered' definition, prod FOS read OK)
- Once decisions are made, implement FOS-side migration + null-guard on Order.php photos_cached_at write
- Implement FOS backfill command to populate photos_first_cached_at from audit_logs
- Implement DAP-side sync command to copy fos_imported_at from FOS
- Add Uploaded-to-Delivered lag metric to Lab Dashboard
key decisions
- Branch named dap-fos-enrichment, no upstream tracking set
- FOS-first approach preferred (add photos_first_cached_at to FOS orders table with null-guard, then copy to DAP)
- Historical backfill will derive first import time from FOS audit_logs with filter: message contains 'photos added this run' and not 'failed thumbs'
- Backfill conventions follow existing sync-shipped-at pattern (chunked <=500 ids, direct DB update, --dry-run/--limit/--all)
- FOS deploy path: staging -> cherry-pick to master -> Forge deploy (coordinated with Daniel)
- Column name photos_first_cached_at proposed but pending user confirmation
open questions
- Approach A (FOS-first recommended) vs B (DAP-only) vs start B now do A later?
- Ok to run a Laravel 4.2 migration on FOS orders table and edit the hot import path? Column name photos_first_cached_at?
- Define the 'delivered' moment: (a) first successful cache, (b) Order Ready notification, or (c) store both?
- Ok to run read-only queries against production FOS audit_logs to validate historical coverage?
2 weeks ago → 3 days ago