- Add per-cycle correlation ID ([cyc:xxxxxxxx]) threaded through Python
logs and SQL audit tables for end-to-end traceability of any divergence.
- New ProductionDataBaseSync.SyncApplyRunLog table + @CycleID on usp_SyncApply
for per-table apply auditing (pending/merged/deleted/applied, dead/error
counts, duration). Audit write isolated in its own TRY/CATCH outside txn.
- Capture/cleanup phases now emit full detail: Insert->Delete downgrade
warning with record_id/log_id, dedup_skipped as apply-stall signal,
per-file summary, and access log-id ranges on cleanup.
- Queue health check surfaces error/dead rows with recent samples instead of
silent accumulation (previously the top cause of data divergence).
- sql_writer uses INSERT...SELECT...WHERE NOT EXISTS for observable dedup;
idle cycles lowered to DEBUG with periodic heartbeat.
- Backward compatible: old proc callers still work (CycleID nullable; legacy
coarse-grained logging with one-time notice).
Excluded from this commit: CODE.md, build_code_doc.py (doc generation).