[object Object]

← back to Sample Followup Sweep

chore: surface FM stamp failures (no more silent catch), v1.1.0 (session close)

57d645d6a2d8169a227d3c1c9d683812b387687d · 2026-09-01 12:59:36 -0700 · Steve

Lint (no linter configured) + refactor (no safe change — code deliberate) passes.
Applied logging-only hardening on the two silent FM-stamp catch sites the review
flagged (scheduled-run SEND path + watch-sent-stamp poller) — zero control-flow
change, just turns a swallowed stamp failure into a visible warning. Minor bump:
session added weekday+auto-widen window, ref/tracking + pattern-name columns,
WIN/CATCHUP/SEARCH_DAYS/MAX_AGE knobs, --include-suppressed, and the poller rewrite.

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

Files touched

Diff

commit 57d645d6a2d8169a227d3c1c9d683812b387687d
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Sep 1 12:59:36 2026 -0700

    chore: surface FM stamp failures (no more silent catch), v1.1.0 (session close)
    
    Lint (no linter configured) + refactor (no safe change — code deliberate) passes.
    Applied logging-only hardening on the two silent FM-stamp catch sites the review
    flagged (scheduled-run SEND path + watch-sent-stamp poller) — zero control-flow
    change, just turns a swallowed stamp failure into a visible warning. Minor bump:
    session added weekday+auto-widen window, ref/tracking + pattern-name columns,
    WIN/CATCHUP/SEARCH_DAYS/MAX_AGE knobs, --include-suppressed, and the poller rewrite.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 package-lock.json            | 4 ++--
 package.json                 | 2 +-
 scripts/scheduled-run.mjs    | 2 +-
 scripts/watch-sent-stamp.mjs | 3 ++-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 0f5dae4..cd18da7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "sample-followup-sweep",
-  "version": "1.0.0",
+  "version": "1.1.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "sample-followup-sweep",
-      "version": "1.0.0",
+      "version": "1.1.0",
       "dependencies": {
         "parse5": "7.3.0"
       }
diff --git a/package.json b/package.json
index 4d9da85..44a4611 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "sample-followup-sweep",
-  "version": "1.0.0",
+  "version": "1.1.0",
   "private": true,
   "description": "Designer Wallcoverings sample follow-up compliance and workflow tooling",
   "type": "commonjs",
diff --git a/scripts/scheduled-run.mjs b/scripts/scheduled-run.mjs
index bd0f50c..507e099 100644
--- a/scripts/scheduled-run.mjs
+++ b/scripts/scheduled-run.mjs
@@ -297,7 +297,7 @@ const run = async () => {
     if (!SEND) { sent.push({ vid, name: c.name, to: draft.to, n: rows.length, skus: rows.map((r) => r.sku), dryRun: true }); continue; }
     const res = await georgeSend({ account: 'info', to: draft.to, subject: draft.subject, body: draft.html });
     if (res.ok) {
-      for (const r of rows) { try { await fm.updateRecord(DB, LAYOUT, r.recordId, { [FIELD_SENT]: today, [FIELD_2ND_DATE]: today }, { dryRun: false }); } catch {} }
+      for (const r of rows) { try { await fm.updateRecord(DB, LAYOUT, r.recordId, { [FIELD_SENT]: today, [FIELD_2ND_DATE]: today }, { dryRun: false }); } catch (e) { console.warn(`  ⚠ FM stamp failed after send — recordId ${r.recordId} (${r.sku}): ${e.message}`); } }
       sent.push({ vid, name: c.name, to: draft.to, n: rows.length, messageId: res.id });
     } else {
       skipped.push({ vid, n: rows.length, reason: 'George send failed: ' + res.detail });
diff --git a/scripts/watch-sent-stamp.mjs b/scripts/watch-sent-stamp.mjs
index dd9d041..95e0deb 100644
--- a/scripts/watch-sent-stamp.mjs
+++ b/scripts/watch-sent-stamp.mjs
@@ -92,8 +92,9 @@ async function stampVids(vids, bodyText, win, today) {
       done.add(id);
       if (DRY_RUN) { stamped.push(mfr + ' [dry]'); continue; }
       // Steve 8/25: stamp BOTH the dedup guard (Date Email Sent…) AND the 2nd-request date.
-      const res = await fm.updateRecord(DB, LAYOUT, r.recordId, { [FIELD_SENT]: today, [FIELD_2ND_DATE]: today }, { dryRun: false }).catch(() => ({}));
+      const res = await fm.updateRecord(DB, LAYOUT, r.recordId, { [FIELD_SENT]: today, [FIELD_2ND_DATE]: today }, { dryRun: false }).catch((e) => ({ err: e.message }));
       if (res.committed) stamped.push(mfr);
+      else console.warn(`  ⚠ FM stamp not committed for ${mfr} (recordId ${r.recordId})${res.err ? ': ' + res.err : ''}`);
     }
   }
   return stamped;

← 59409a0 auto-data-snapshot: 2026-09-01T12:55:30 (2 data files) — dat  ·  back to Sample Followup Sweep  ·  auto-data-snapshot: 2026-09-01T13:36:10 (1 data files) — dat 993ca05 →