Filemaker Mcp

repo: ~/Projects/filemaker-mcp · 100 commits · 0 in last 24h, 1 in last 7d · █

Search the build

100 commits indexed

  1. a775694 2026-09-25 push-dashboard-revenue: wait for network before Cognito auth (boot-race exit=1, TK-12257)
  2. 84dbe50 2026-08-31 document invoice monitor launchd recovery proof
  3. cd8f973 2026-08-29 fix: handle FileMaker 401 no-records gracefully in new-invoice-monitor
  4. b1dedc0 2026-08-27 Guard fix: Schumacher family (DWSW/SCH) is legit-numeric — never withhold their DW#==mfr (contrarian blocker, TK-10906)
  5. 66e87e3 2026-08-27 Add read-only mfr review-queue generator (TK-10906 deliverable 2)
  6. e1069c1 2026-08-27 Otto importer: guard against DW#==mfr placeholders; read real mfr off existing master; alpha-prefix recovery (TK-10906)
  7. 2dd6a25 2026-08-19 GRS dedup review viewer + client-safe scoping + FM flag/archive path; lint, 0.3.2 (session close)
  8. 0ac2c19 2026-08-19 fm-client: dedupe guard on createRecord — block duplicate WALLPAPER masters (Series+JS Pattern)
  9. 0b28984 2026-08-19 GRS mfr recovery: FMP->Shopify fill (425 written, reversible) + dedup plan + last-1000 audit
  10. df2aeae 2026-08-13 chore: v0.3.1 (session close) — FMPro dashboard push local-refresh + launchd schedule
  11. c6075ff 2026-08-13 ads-dashboard FMPro push: 4x/day launchd plist (staged, gated install) + pusher also refreshes local copy — TK-10544 'must keep updated'
  12. c5cc14a 2026-08-12 auto-data-snapshot: 2026-08-12T09:56:27 (1 data files) — package-lock.json
  13. a2688ce 2026-08-12 chore: lint (env-path, dedup keep-guard, test readability), v0.2.6 -> v0.3.0 (session close)
  14. 7d38b74 2026-08-12 wallpaper: prevent duplicate masters via local Postgres idempotency ledger (FM Cloud index-lag guard) + test
  15. dcd8c12 2026-08-12 add dedup-dwpp-32837 script + 539333/539334 restore archives (delete API-blocked by FM 110)
  16. f48d475 2026-08-12 wallpaper: resolve private-label SKUs (mfr in metafields) + -Sample lines; add Content/Repeat/tags; DWPP vid=MDCKEN
  17. ef0b961 2026-08-10 Add GRS/WQ 20% price-bump script + canonical grasscloth importer (name/color mapped, writes via Full View layout)
  18. dd37d30 2026-08-10 Backfill blank Name/Color of Pattern on WallQuest GRS grasscloth WALLPAPER masters (joins specialty_grasscloths_stage; idempotent)
  19. d32c199 2026-08-04 wallpaper: prefix-agnostic UNIQUE-number mfr fallback so Shopify patterns always resolve their mfr
  20. 35cf4d3 2026-08-04 test: smoke-invoice-b — dry-run regression for SKU-on-line + money-on-first (choice B)
  21. 0a0ebba 2026-08-04 invoice(B): real SKU on every line (not 'Samples') + atomic line-write so no empty-shell invoices
  22. ccd79b3 2026-08-03 chore: bump v0.2.6 (session close — TK-10083 fail-closed parser)
  23. 9c6b447 2026-08-03 auto-save: 2026-08-03T11:23:33 (1 files) — scripts/tk-10083-cleanup.mjs
  24. 64cf597 2026-08-03 TK-10083: fail-closed combo-SKU parser — stop duplicate WALLPAPER master mints
  25. f72e424 2026-08-03 auto-save: 2026-08-03T10:23:02 (2 files) — lib/wallpaper.js scripts/tk-10083-dryrun.mjs
  26. e7b1887 2026-08-03 ads-dashboard revenue: FMPro 30d generator + Mac2->Kamatera push wrapper
  27. c991f6f 2026-08-03 auto-save: 2026-08-03T07:21:35 (2 files) — scripts/dashboard-revenue.mjs scripts/push-dashboard-revenue.sh
  28. 92722e0 2026-07-30 chore: v0.2.5 (session close — invoice SKU/VID audit + fix)
  29. 47d22bc 2026-07-30 Fix invoice dup-SKU + wrong-VID at the source (lib/wallpaper.js)
  30. 1d1f33b 2026-07-29 auto-save: 2026-07-29T20:11:57 (1 files) — package-lock.json
  31. 26038de 2026-07-29 chore: v0.2.4 (session close — MTD window fix + truncation guard)
  32. 541942f 2026-07-28 Reports bot: correct MTD bucketing comment to match date-only FM field
  33. bbd7473 2026-07-28 Reports bot: visible truncation warning + stop counting refunds as orders
  34. 073ebdd 2026-07-28 Harden sales-summary against silent fetch truncation
  35. 57f06a3 2026-07-28 auto-save: 2026-07-28T17:01:56 (1 files) — scripts/post-mtd-correction.mjs
  36. dafc8b0 2026-07-28 Fix DW Reports Bot MTD undercount: query from month-start, not 10-day lookback
  37. d91bd91 2026-07-16 add scripts/fetch-clients.js — page entire Clients file to MCC staged dataset
  38. 7210236 2026-07-16 chore: lint, refactor, v0.2.3 (session close)
  39. 8e0d01f 2026-07-16 auto-save: 2026-07-16T09:42:29 (1 files) — scripts/audit-clients.mjs
  40. 96da496 2026-07-16 Harden client dedup + add read-only single-order test
  41. de6eb81 2026-07-16 Fix client double-entry + Company/Name field swap in Shopify→FileMaker sync
  42. 65eb72c 2026-07-14 fix: idempotency guard — skip invoice creation when FileMaker already has one for this Cust PO (order#)
  43. aa0cddd 2026-07-14 fix: resolve George basic-auth from live fleet cred (was empty 'admin:', 401'd since 2026-07-13 rotation → froze Shopify→FileMaker sync at order #32600)
  44. 22d9eff 2026-07-14 Add Greenland cork disco script: stamps Date Discontinued on 15 WALLPAPER masters (recId 536960-536974) 2026-07-14
  45. 9f680a3 2026-07-12 auto-save: 2026-07-12T19:19:48 (1 files) — scripts/bulk-create-greenland-full.mjs
  46. c542aa6 2026-07-12 auto-save: 2026-07-12T08:47:12 (2 files) — scripts/bulk-series-dwgl-to-dwlg.mjs scripts/bulk-series-dwlg-to-cork.mjs
  47. c23bb05 2026-07-12 auto-save: 2026-07-12T08:17:05 (1 files) — scripts/bulk-set-dwnumber-fm.mjs
  48. b7ae2b7 2026-07-12 auto-save: 2026-07-12T07:46:59 (5 files) — scripts/_gl_recon.mjs scripts/_gl_recon2.mjs scripts/_gl_recon3.mjs scripts/bulk-create-greenland-cork.mjs scripts/bulk-series-cork-to-dwgl.mjs
  49. 81207d4 2026-07-10 chore: v0.2.2 (session close — invoice mfr backfill + flag-on-unresolved)
  50. 478c8b2 2026-07-10 invoice: backfill vid+mfr onto 158 pre-hook blank-mfr Otto invoice lines
  51. f8ad188 2026-07-10 invoice: flag+notify (not swallow) SKUs with no findable mfr number
  52. 4d2ed04 2026-07-10 wallpaper: resolve mfr# from flat metafields + vendor_catalog/registry tiers
  53. e138cce 2026-07-10 invoice: wire WALLPAPER auto-complete into the live daemon path
  54. 0c0536f 2026-07-10 wallpaper: resolve legacy DWLK sku -> canonical DWSW via shopify sku mapping
  55. ea6b092 2026-07-10 add lib/wallpaper.js — importable ensureWallpaper() for pipeline integration (wiring pending)
  56. 01d9bff 2026-07-10 add ensure-wallpaper-for-order: auto-complete FileMaker WALLPAPER master from dw_unified
  57. 5703973 2026-07-09 invoice: all money on FIRST invoice, just the SKU on each subsequent
  58. f7c8106 2026-07-09 add watch-real-units-order.mjs — live watcher for next real order's per-line breakdown
  59. d9b2cbf 2026-07-09 invoice: show real units + real per-unit price (not lumped Q1=1)
  60. fb3670b 2026-07-08 chore: v-bump (session close — per-SKU invoicing fix + dup audit tooling)
  61. 1b0bc8f 2026-07-07 auto-save: 2026-07-07T13:00:27 (1 files) — scripts/watch-next-multisku.mjs
  62. f705ac9 2026-07-07 auto-save: 2026-07-07T09:29:44 (1 files) — scripts/watch-next-order.mjs
  63. 4dd914e 2026-07-07 invoicing: fix double-increment so per-SKU invoice numbers are consecutive (no gaps); verified live 3-invoice write test PASS
  64. bd4cd95 2026-07-07 invoicing: one record per SKU, only the FIRST carries the dollars (NET/RETAIL=order total, PAID=grand total); remaining SKU records $0 (Steve 2026-07-07). Tax+shipping ride the money record only; $0 records stay off #new-order via GRAND TOTAL 2=0 filter
  65. f903c3b 2026-07-07 auto-save: 2026-07-07T08:57:11 (2 files) — scripts/tmp-probe-net.mjs scripts/tmp-probe-net2.mjs
  66. f3f4718 2026-07-07 auto-save: 2026-07-07T08:56:34 (2 files) — scripts/tmp-probe-net.mjs scripts/tmp-probe-net2.mjs
  67. 7b8fa26 2026-07-07 add read-only dry-run pipeline test: proves 1-invoice-per-order + zero per-SKU dups on latest Shopify orders
  68. 4b94f5f 2026-07-07 audit: add --csv export (both categories, per-invoice rows)
  69. 6a8406b 2026-07-07 add read-only dup-invoice audit: group by Cust PO, split double-billing (money) vs $0 tracking clutter
  70. a19a17d 2026-07-03 invoicing: require client account number before any invoice (client-account-first) + stop creating the duplicate per-SKU 'second invoice'
  71. 83d8494 2026-07-03 chore: macstudio3 migration — reconcile from mac2 + repoint paths (stevestudio2→macstudio3, node/npm/npx→/opt/homebrew)
  72. 1de6266 2026-07-03 sales summary: report trailing 24h window via seen-ledger diff (Steve 2026-07-03)
  73. 70f934b 2026-07-02 daily sales summary: move fire time 23:55 -> 16:30 (4:30 PM EOD report to #new-order)
  74. a4db9ca 2026-07-02 chore: lint, refactor (shared fm-script-helpers), v0.2.0 (session close)
  75. fec4102 2026-07-02 add DWTA baxter dedup: archive+delete script for FM dup record 536613
  76. 700b05c 2026-07-02 new-invoice-monitor: label booked sale vs unpaid quote (payment-received gate)
  77. 7bf6a1d 2026-07-02 sales-summary: count BOOKED orders only (payment received); add today's quotes (no payment) line — fixes $92k unpaid-quote inflating MTD
  78. 4255ec9 2026-07-02 sales-to-Slack via FileMaker: EOD daily+MTD summary + per-invoice monitor + launchd timers (reuses fm-client; posts to #new-order)
  79. 5a0d50e 2026-07-02 auto-save: 2026-07-02T07:11:42 (1 files) — scripts/relookup-invoice-102387.mjs
  80. a231cf0 2026-07-02 add DWKK-120156 master (order 32513/inv 102387) + invoice probes; codify fuzzy-SKU rule
  81. bcf5e67 2026-07-02 chore: v0.1.1 (session close — Baxter records, invoice 102374 repair, fuzzy-sku-check)
  82. 941cf7a 2026-07-01 add fuzzy-sku-check.mjs: reusable WALLPAPER SKU existence probe (strips -Sample; combo sku/comboskuwithdash/mfr pattern number/Mfr Pattern; exit 0/1 + JSON)
  83. 10f7a19 2026-07-01 invoice 102374 repair script: split Otto's collapsed 4-sample line into 4 proper lines (Fracchia / Shopify #32508); totals preserved 17+22=39
  84. 94f5487 2026-07-01 fix DWTT73434 (recordId 536611) Mfr Pattern AT79129->AT79126 + fill mfr pattern number (AT79129 belongs to 73436 Silver)
  85. 9bad19a 2026-07-01 create 3 missing DWTT Baxter WALLPAPER masters (73433 Navy/73435 Beige/73436 Silver) — recordIds 536615-17; combo sku + Dw Retail Price are calcs, omitted from write
  86. 2412a37 2026-07-01 test: dummy client+invoice demo scripts (999999/Testy McTestface); fix script gains RETAIL cols via HDR layout; probe scripts for line-2/tax calc behavior
  87. 7b9b08c 2026-07-01 fix: fm_find/sort JSON-string coercion (harness stringifies z.any); invoice file live w/ Order Detail default; add invoice-102332 repair script
  88. 1f3eaf8 2026-06-29 remove dead lib/invoice-core.js (orphaned from refactor; lib/invoice.js is the single source of truth)
  89. f9e757d 2026-06-29 invoice: strip dashes in WC Pattern Number AKA DW SKU; write 'Resale card lookup' (the resale field shown on invoice) so it's no longer blank
  90. ea51d97 2026-06-29 sync: every order also creates one no-$ per-SKU tracking record with the DW SKU in 'WC Pattern Number AKA DW SKU'; verified 8/8 on order 32476
  91. 707cde7 2026-06-29 invoice: populate 'WC Pattern Number AKA DW SKU' from primary line base SKU
  92. 7525e58 2026-06-29 fix: consolidate multi-item orders to single line (exact total), round cents, WC PATTERN=base pattern, delete API, Slack→#new-order, error-resilient runner; recovered 32476 ($34)
  93. 1894d57 2026-06-29 auto-save: 2026-06-29T12:49:09 (2 files) — lib/invoice.js src/fm-client.js
  94. c4dc440 2026-06-29 sync: refresh existing client's contact info from the order before invoicing (update client first, then invoice)
  95. e2e050f 2026-06-29 sync: every new order now auto-creates client + full invoice (UOM/Otto/FedEx/tax/resale/SKU/WC PATTERN/sold-ship blocks) + posts to Slack #general
  96. b60dfd5 2026-06-29 sync: every order now auto-creates client + full invoice (Otto/FedEx/tax/resale/SKU/WC-PATTERN/paid) + Slack #general alert; invoice 102262 fully built per Steve specs
  97. 8f367cd 2026-06-29 auto-save: 2026-06-29T12:19:02 (5 files) — bin/shopify-sync.js lib/sync-core.js lib/invoice-core.js lib/invoice.js lib/notify.js
  98. cecc780 2026-06-29 shopify->filemaker client sync: info@ trigger, 3-way dedup (email/phone/name), auto-create; created acct 1061931 live; launchd staged (not loaded)
  99. 6470923 2026-06-29 live: connected to FileMaker Cloud — Clients + WALLPAPER reading; invoice pending fmrest; MCP registered
  100. 2719a89 2026-06-29 initial scaffold: FileMaker Cloud MCP server + CLI (read + dry-run-gated writes)

Authors

Agents used

  • none detected

Skills used

  • /wallpaper6
  • /invoice4
  • /tax4
  • /supplier3
  • /name3
  • /catch2
  • /mfr-review-queue2
  • /color2
  • /notify2
  • /mfr2
  • /vid2
  • /tmp-probe-net2
  • /tmp-probe-net22
  • /invoice-core2
  • /resale2
  • /claude1
  • /code1
  • /mfr-guard1
  • /archive1
  • /day1
  • /tags1
  • /normalized-1
  • /wrong1
  • /smoke-mfr-number-fallback1
  • /racing1
  • /tk-10083-cleanup1
  • /tk-10083-dryrun1
  • /dashboard-revenue1
  • /push-dashboard-revenue1
  • /timeout1

Creative ideas + design notes

Commits with substantial prose (≥120 chars) — the rationale behind each move.

a775694 · 2026-09-25 · push-dashboard-revenue: wait for network before Cognito auth (boot-race exit=1, TK-12257)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7LB6rCwpA7ubJTqYzqXEX
cd8f973 · 2026-08-29 · fix: handle FileMaker 401 no-records gracefully in new-invoice-monitor
FM error 401 "No records match the request" is the expected response when
there are zero invoices for today (e.g. at 4 AM before orders come in).
Previously this caused process.exit(1), triggering cron-fire-canary WARN.

Now wrapped in try/catch — a 401 logs "0 invoices today" and exits 0.
Real errors (auth failures, network, etc.) still propagate and exit 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b1dedc0 · 2026-08-27 · Guard fix: Schumacher family (DWSW/SCH) is legit-numeric — never withhold their DW#==mfr (contrarian blocker, TK-10906)
Contrarian caught a live regression: the vendor-blind guard would withhold ~9,053 real
Schumacher mfrs (DWSW-5005933 mfr 5005933 IS the real code, per Steve's hard rule). Added a
LEGIT_NUMERIC allowlist (DWSW + SCH prefixes, boundary-matched) checked before isPlaceholderMfr,
so Schumacher passes through unflagged. Review-queue also skips the Schumacher family by
prefix AND vendor-name. Tests: 24 pass incl. Schumacher-passthrough + SCHX-boundary + queue-zero.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
66e87e3 · 2026-08-27 · Add read-only mfr review-queue generator (TK-10906 deliverable 2)
scripts/mfr-review-queue.mjs: for a vendor list, emits data/mfr-review-queue.jsonl of the
broken DW#==mfr rows with a best-guess real mfr + source + confidence for staff to confirm
before any (Steve-gated) repair. Sources in order: dw_sku alpha-prefix (Tier-2, high),
READ-ONLY FileMaker Mfr# note (medium), else none (needs vendor re-scrape). ZERO writes to
dw_unified / FileMaker / Shopify. Default Tier-3 set excludes Schumacher + pure-numeric-legit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e1069c1 · 2026-08-27 · Otto importer: guard against DW#==mfr placeholders; read real mfr off existing master; alpha-prefix recovery (TK-10906)
- findExistingMaster now returns the matched master's real spec (masterFields)
  so an existing master is completed from ITS mfr, never re-flagged 'no mfr number'.
- resolveWallpaperSource resolution order: existing-master real mfr -> dw_unified
  candidate (rejected when it equals the DW# numeric tail) -> unambiguous alpha-prefix
  recovery from dw_sku (Wolf-Gordon DWWG-AM10311 -> AM10311) -> flag (mfr write withheld,
  invoice line unaffected). Never stamps a DW#==mfr placeholder.
- scripts/mfr-guard.test.mjs proves HSW-51526-via-master, DW#==mfr-withheld, WG-alpha-recovery.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d32c199 · 2026-08-04 · wallpaper: prefix-agnostic UNIQUE-number mfr fallback so Shopify patterns always resolve their mfr
Root cause: a private-label pattern is sold on Shopify under one series prefix
(DWLA-436701) but its mfr number is filed in dw_unified under the real vendor's prefix
(DWPR-436701) with the same numeric tail — so the exact/normalized-SKU lookup misses and
the line gets a blank mfr + a FLAGGED-SKU warning. sourceFor now falls back to matching on
the trailing pattern number across shopify_products/vendor_catalog/dw_sku_registry, but
accepts it ONLY when the number maps to exactly ONE mfr (ambiguous like 46333 -> two mfrs,
and net-new, still fall through to review — never a guessed/wrong mfr). Read-only resolve.
Proven on 4 unique + 2 ambiguous SKUs (scripts/smoke-mfr-number-fallback.mjs).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35cf4d3 · 2026-08-04 · test: smoke-invoice-b — dry-run regression for SKU-on-line + money-on-first (choice B)
Replaces the stale test-real-units.mjs (referenced a removed moneyRecordLines field).
Asserts DETAIL shows the real SKU (not 'Samples'), all money rides the first line,
and every other SKU is a $0 stub. Covers the single-sample + multi-sample cases that
regressed (orders 32759 / 32760).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0a0ebba · 2026-08-04 · invoice(B): real SKU on every line (not 'Samples') + atomic line-write so no empty-shell invoices
- moneyLine: always headline the real SKU on the money line; money still rides the
  first record only, every other SKU = $0 stub (Steve 2026-08-04, choice B).
- create loop: write DETAIL/Q/Unit/NET/RETAIL as an immediate post-create step and
  DELETE the record if that write fails, so an interrupted/racing run can never leave
  a blank invoice shell (the 103152/103153/103154 defect).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64cf597 · 2026-08-03 · TK-10083: fail-closed combo-SKU parser — stop duplicate WALLPAPER master mints
Root cause: combo sku is a stored FM calc (Series & JS Pattern, no separator);
the Series|remainder split is NOT derivable from the raw string, so onboarding
OP-ART-DECO-WAVES mis-split it (Series DWC) and minted duplicate masters
538697/538698 alongside the genuine 2019 master 240939.

Fix (proven vs LIVE FileMaker, read-only):
- normalizeSku + parseCombo.confident flag; all-alpha / unknown-prefix inputs
  are confident:false and CANNOT trigger a create (double guard: resolve + create).
- findExistingMaster now matches via component-field {Series,JS Pattern} OR-find
  over every dash-boundary split (calc == can't be reconstructed), with a
  normalized re-check that rejects the wrong-split DWC dupes.
- Real FM errors fail closed (existence unverifiable -> do not create).
- dryrun exits non-zero if FM creds absent (required live PASS).
Live proof: all 3 SKU forms -> master 240939, distinct=1, 0 duplicates.

Adversarially gated by Cody (contrarian): FIX-THEN-DRAFT -> SHIP, MUST-FIX empty.
Does NOT activate until the filemaker-mcp MCP restarts; duplicate cleanup of
538697/538698 is a SEPARATE gated action.
47d22bc · 2026-07-30 · Fix invoice dup-SKU + wrong-VID at the source (lib/wallpaper.js)
lib/wallpaper.js was the single source of both reported invoice bugs.

WRONG VID — vid was ALWAYS the "most common vid among 25 same-Series
records" (vidForSeries), cached process-wide. That pushed a series-level
guess — or a blank, when the find errored — onto invoice lines instead of
the SKU's real vendor code. resolveWallpaperSource now prefers the existing
WALLPAPER master's OWN stored vid, and only falls back to a hardened
series-modal (samples 200, never caches a blank or an error-derived result)
for a genuinely-new SKU.

DUPLICATE MASTERS — ensureWallpaper's existence check (1) collapsed EVERY
FileMaker error into "not found" (auth blip/timeout -> duplicate create) —
the same bug already fixed in sync-core.js's client dedup but missed here;
and (2) only matched the current-prefix `combo sku`, so a line renamed
Cork<->DWGL<->DWLG (combo sku is a Series&JS-Pattern CALC) hid the existing
master and minted a duplicate. New findExistingMaster is alias-aware (checks
combo sku + comboskuwithdash across renamed prefixes) and error-honest (only
fmCode 401/102/105/106 = try-next/not-found; any real error means existence
UNVERIFIED and we refuse to create).

Safe-local: changes only what future runs compute/write; no backfill of
already-corrupted masters/VIDs (gated, separate). Read-only smoke test:
DWKK120156 -> vid KRA from its own master (was a series guess);
DWSW5003662 (no master) -> hardened series fallback, verified-absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
541942f · 2026-07-28 · Reports bot: correct MTD bucketing comment to match date-only FM field
Contrarian Hole 2, verified: the layout has no entry-timestamp, so MTD buckets
by the FM Date as entered, not a true Pacific-time instant. Fix the aspirational
'(Pacific Time)' comment rather than invent timezone logic the data can't support.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bbd7473 · 2026-07-28 · Reports bot: visible truncation warning + stop counting refunds as orders
Final DTD verdict FIX-THEN-SHIP (5/5) after contrarian gate. Two live-repro'd fixes:
- Truncation now posts a degraded '⚠️ DATA TRUNCATED' Slack warning (via FM
  foundCount>returnedCount) instead of throwing and going dark — silence was
  indistinguishable from a healthy zero-order day. Ledger is not written on a
  truncated run so the 24h diff isn't poisoned.
- Negative refund rows netted the dollar total correctly but were inflating the
  ORDER COUNT (14-16 rows). Count now excludes refunds; totals still net them out.
  Footer reworded to match (dropped the misleading 'refunds net out' phrasing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
073ebdd · 2026-07-28 · Harden sales-summary against silent fetch truncation
Same failure class as the MTD window bug: if the query ever returns more
than the page cap, MTD would undercount with no warning. Raise cap to 5000
(~600 records/mo today) and throw loudly if it is ever hit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dafc8b0 · 2026-07-28 · Fix DW Reports Bot MTD undercount: query from month-start, not 10-day lookback
MTD query window used the 10-day lookback date as its start, so from the
11th of each month onward it dropped every invoice before then. July MTD
read $26,526/80 orders; true value is $67,373/250. Window now = earlier
of month-start vs lookback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7210236 · 2026-07-16 · chore: lint, refactor, v0.2.3 (session close)
- findDuplicates: rename inner accumulator e→entry (was shadowing catch(e))
- annotate best-effort client-refresh catch
Author: steve@designerwallcoverings.com
96da496 · 2026-07-16 · Harden client dedup + add read-only single-order test
- findDuplicates now only swallows FileMaker 401 (no-records) as an empty
  result; any other find error is surfaced (per-order handler logs it) instead
  of silently returning no-match, which would double-enter the client
- scripts/test-one.mjs: read-only (commit:false) single-order test proving the
  Company/Name split and live dedup without writing to FileMaker

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
de6eb81 · 2026-07-16 · Fix client double-entry + Company/Name field swap in Shopify→FileMaker sync
- Company field now holds the business name, Name holds the contact person
  (was reversed: put e.g. 'Denny Wilson' in Company, 'Wilson Construction' in Name)
- Dedup rewritten as priority waterfall: email → company → client name,
  searching the correct fields (old code searched Company against the person's
  name, silently missing real dupes and creating second records)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
65eb72c · 2026-07-14 · fix: idempotency guard — skip invoice creation when FileMaker already has one for this Cust PO (order#)
Prevents the systemic double-billing (e.g. #32609). Dedup was local-only (state.processed[]); any re-process minted a duplicate invoice. Now checks FileMaker truth by Cust PO before creating.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
478c8b2 · 2026-07-10 · invoice: backfill vid+mfr onto 158 pre-hook blank-mfr Otto invoice lines
Steve-approved backfill of the pre-hook backlog (orders Otto invoiced before
ensureWallpaper was wired at e138cce). scripts/backfill-blank-mfr.mjs finds all
Otto-imported invoice lines with a blank Detail 1 Mfr Number, groups by distinct
SKU, ensureWallpaper() once per SKU, then direct-writes VID + Detail 1 Mfr
Number onto every matching line. --dry-run does a read-only resolve (no FileMaker
writes) via the new exported resolveWallpaperSource().

Result: 167 blank-mfr lines -> 146 SKUs resolved, 158 lines updated, 3 SKUs
FLAGGED and left blank (DWAT65011, XP5, a custom framed-art order — no findable
mfr, per Steve's flag-don't-guess rule). Remaining blank: 9 (4 flagged-SKU lines
+ 5 blank-SKU money records) — the correct residue.

lib/wallpaper.js: extract read-only resolveWallpaperSource() out of
ensureWallpaper() so dry-run/preview callers get zero-write resolution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f8ad188 · 2026-07-10 · invoice: flag+notify (not swallow) SKUs with no findable mfr number
createInvoiceForOrder still creates the invoice line when ensureWallpaper
returns {ok:false} FLAGGED or throws (money must never be blocked by a catalog
data gap), but the outer catch{} no longer silently swallows it. New else/catch
branch calls lib/notify.js flagSku():
  1. console.warn a loud single line (order/invoice/sku/reason).
  2. idempotent append to data/flagged-skus.jsonl (key=orderId:invoice:sku;
     stores ts,orderId,orderName,custPO,invoice,sku,dwSku,reason,resolved:false).
  3. internal Slack (#general) + George email to steve-office — INTERNAL ops
     signal only, never customer-facing.
Graft from DTD verdict C: scripts/drain-flagged-skus.mjs reads the queue, groups
unresolved rows by Cust PO, re-runs ensureWallpaper, writes VID+mfr onto matching
invoice lines (same copy-lookup write as ensure-wallpaper-for-order.mjs), and
marks rows resolved:true. --dry-run supported.

Fixes the silent-swallow that let 102660/102662 (Cust PO 32580) ship blank
vid/mfr unnoticed. Money/tax/shipping logic untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4d2ed04 · 2026-07-10 · wallpaper: resolve mfr# from flat metafields + vendor_catalog/registry tiers
Invoices 102660 (DWBR170698) and 102662 (DWDX220241) had blank vid+mfr#
because their WALLPAPER master records were never created — ensureWallpaper's
sourceFor() couldn't find a mfr number:
- DWDX (Designtex): mfr lived in a FLAT metafield (custom.manufacturer_sku
  = '8405252'), but SP_FIELDS only read the nested {value} shape.
- DWBR (Malibu private-label): absent from shopify_products entirely
  (dw_sku null); real mfr 2999-39028 lives in vendor_catalog + dw_sku_registry.

Fixes:
- SP_FIELDS now COALESCEs nested (->'k'->>'value') AND flat (->>'k') metafields
  for mfr/supplier/pattern/color/width.
- sourceFor() adds two universal fallback tiers: vendor_catalog (all scraped
  vendors, joined to dw_sku_registry for a clean supplier name) and
  dw_sku_registry (mfr+vendor backstop).

Ran ensure-wallpaper-for-order.mjs 32580: all 10 lines now carry vid+mfr#.
e138cce · 2026-07-10 · invoice: wire WALLPAPER auto-complete into the live daemon path
createInvoiceForOrder now calls ensureWallpaper(sku) per line — auto-creates/
completes the FileMaker WALLPAPER master from dw_unified and direct-writes VID +
Detail 1 Mfr Number onto each line, so every NEW order's width/name/vid/supplier/
mfr lookups resolve at creation (no manual redo). Best-effort: wrapped so a
WALLPAPER-completion failure never breaks invoicing. Verified end-to-end on a
2-sample order (DWTT70647 + DWKK134979 both fully resolve).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0c0536f · 2026-07-10 · wallpaper: resolve legacy DWLK sku -> canonical DWSW via shopify sku mapping
DWLK is a legacy Schumacher prefix; shopify_products maps old sku
(DWLK-830880-Sample) -> canonical dw_sku (DWSW-5003662) + real mfr (5003662).
ensureWallpaper sourceFor now tries dw_sku, then legacy sku/variant_sku
(base-normalized), then connie. Also backfilled connie_our_catalog.mfr_sku for
912 DWLK rows from this mapping (backup: _bak_connie_dwlk_mfr_20260710; rollback
list: _filled_connie_dwlk_mfr_20260710; 50 orphans remain). Refactored
ensure-wallpaper-for-order.mjs to import lib/wallpaper.js. #32574 DWLK830880 now
resolves mfr 5003662.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
01d9bff · 2026-07-10 · add ensure-wallpaper-for-order: auto-complete FileMaker WALLPAPER master from dw_unified
When invoicing (esp. samples), a SKU with no width/name/vid/supplier means the
FileMaker WALLPAPER master record is missing/incomplete → this creates/completes
it from dw_unified (shopify_products.metafields rich source, connie fallback):
create stored fields on 'Add wallcovering' (Mfr Pattern/JS Pattern/Series/
Supplier/Width; combo sku is a calc), then Name/Color of Pattern + vid (series-mode
code) + JPG Name on '*List Wallpapers - Full View'. Direct-writes invoice VID +
Detail 1 Mfr Number (copy-lookups) so a redo shows them. SKUs with no mfr number
are flagged, not created. Redid #32575 (Lee Jofa Taplow x4) + #32574 (DWTT70647;
DWLK830880 flagged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5703973 · 2026-07-09 · invoice: all money on FIRST invoice, just the SKU on each subsequent
Steve's refined rule (2026-07-09): the money record carries the WHOLE order
total on ONE line = total units x per-unit price (GRAND TOTAL = merch subtotal);
DETAIL='Samples' for an all-samples order so Q=2 reads '2 Samples @ $4.25 =
$8.50'. Every subsequent record shows JUST its SKU at $0. Reverts the
line-2-on-first-record approach. PAID ON ACCOUNT computed exactly (merch+tax+
shipping) so money is right even when a summarized per-unit line rounds a cent.
Also updated live invoice 102622 (order #32571) to the new format.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d9b2cbf · 2026-07-09 · invoice: show real units + real per-unit price (not lumped Q1=1)
- money record now lists each order line in its own physical row (line 1 =
  '… 1' fields, line 2 = distinct 'DETAIL 2'/'Q2'/'NET 2' fields) with the
  REAL quantity + REAL per-unit price; GRAND TOTAL/PAID sum correctly.
- single-SKU (the common case): line 1 = real qty x real unit price, identical
  GRAND/PAID/GRAND TOTAL 2 to before -> zero risk. 2-SKU shows both lines;
  >2-SKU lumps the overflow into line 2 (layout caps at 2 rows).
- per-SKU stub records stay $0 (real units shown for reference) so dollars are
  counted once and the monitor posts one card per order.
- monitor: card total now reads PAID ON ACCOUNT when booked (sums both lines;
  GRAND TOTAL 2 is a line-1-only calc that undercounts a 2-line order).
- verified live: single-SKU 2x$44.18=$88.36 and 2-SKU (2x$12.50 + 3x$4.25)=$37.75.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
707cde7 · 2026-06-29 · invoice: populate 'WC Pattern Number AKA DW SKU' from primary line base SKU
Discovered exact field name (Text[4], repeating, writable) and wired it into
createInvoiceForOrder via the '1-order detail 1 Copy3' layout (shares the
header base table). Proven on invoice 102262 -> DWCC-112200.

File tree

86 files tracked. Click any to browse the source at HEAD.

Other build journals

← Ffepurchasing  ·  all 4 projects  ·  Filibuster Marathon Cartoon →

Export

commits.csv · feed.atom · project.json · commits.json

rendered in 3ms