[object Object]

← back to Commercialrealestate

crcp: drive broker-of-record recorder nightly (TK-10139)

089c36823b0ed177bc0725b94f736b7fd923d3b2 · 2026-08-02 08:04:40 -0700 · Steve

The append-only broker_of_record_history was only ever a one-time backfill snapshot
(all rows sharing observed_at) because nothing ran enrich-provenance.js on a schedule.
Wire it into the existing com.steve.crcp-broker-snapshot nightly wrapper (04:15) to run
BEFORE the snapshot export, non-fatal so a recorder failure never breaks the export.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 089c36823b0ed177bc0725b94f736b7fd923d3b2
Author: Steve <steve@designerwallcoverings.com>
Date:   Sun Aug 2 08:04:40 2026 -0700

    crcp: drive broker-of-record recorder nightly (TK-10139)
    
    The append-only broker_of_record_history was only ever a one-time backfill snapshot
    (all rows sharing observed_at) because nothing ran enrich-provenance.js on a schedule.
    Wire it into the existing com.steve.crcp-broker-snapshot nightly wrapper (04:15) to run
    BEFORE the snapshot export, non-fatal so a recorder failure never breaks the export.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/refresh-broker-snapshot.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/refresh-broker-snapshot.sh b/scripts/refresh-broker-snapshot.sh
index e48d1de..90e0612 100755
--- a/scripts/refresh-broker-snapshot.sh
+++ b/scripts/refresh-broker-snapshot.sh
@@ -14,6 +14,10 @@ LOG=/tmp/crcp-broker-snapshot.log
 ts() { date '+%Y-%m-%d %H:%M:%S'; }
 echo "[$(ts)] refresh start" >> "$LOG"
 
+# 0) drive the broker-of-record recorder so the append-only history captures every nightly update
+# (TK-10139). Non-fatal: a recorder failure must never break the snapshot refresh below.
+node scripts/enrich-provenance.js >> "$LOG" 2>&1 || echo "[$(ts)] recorder non-fatal fail — continuing" >> "$LOG"
+
 # 1) regenerate locally (needs the cre DB on this host)
 if ! node scripts/export-brokers-snapshot.js >> "$LOG" 2>&1; then
   echo "[$(ts)] EXPORT FAILED — leaving prod snapshot untouched" >> "$LOG"; exit 1

← a4cd3fa crcp: checkpoint broker-of-record.sqlite after recorder veri  ·  back to Commercialrealestate  ·  auto-save: 2026-08-02T08:13:37 (1 files) — data/ranked.json b4364f0 →