← back to Mfr Review Viewer Corruption
fix [110]: route sweep deletes/writes through Basic List of Fields (no related tables); add corrected 3-record HSW plan
1ba83104e86b4cbbeb870a208df70e764defd6c5 · 2026-08-28 07:33:26 -0700 · Steve Abrams
Files touched
M scripts/execute-sweep.mjs
Diff
commit 1ba83104e86b4cbbeb870a208df70e764defd6c5
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Aug 28 07:33:26 2026 -0700
fix [110]: route sweep deletes/writes through Basic List of Fields (no related tables); add corrected 3-record HSW plan
---
scripts/execute-sweep.mjs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/scripts/execute-sweep.mjs b/scripts/execute-sweep.mjs
index 0caa907..84a7987 100644
--- a/scripts/execute-sweep.mjs
+++ b/scripts/execute-sweep.mjs
@@ -46,6 +46,17 @@ const FM_ENV = path.join(FM_PROJECT, '.env');
const FM_CLIENT = path.join(FM_PROJECT, 'src', 'fm-client.js');
const FM_DB = 'WALLPAPER';
const FM_LAYOUT = '*List Wallpapers - Full View';
+// WRITE/DELETE layout (fix for FileMaker error [110] "Related tables are missing", 2026-08-28):
+// The full-view layout carries a portal ("WALLPAPER2 by mfr#") + related fields (Clients::,
+// "WALLPAPER2 by combo sku::"). The Data API validates ALL related table occurrences on a
+// DELETE / PATCH (but not on a plain GET), and one of those relationships is broken/missing,
+// so every delete aborts with [110] even though the record itself is fine and reads succeed.
+// "Basic List of Fields" (21 fields, 0 portals, 0 related fields) reads the SAME record clean
+// (verified: same recordId = same base-table occurrence, identical combo sku + Mfr Pattern) and
+// deletes/patches without the related-table validation. Cascade behavior is defined in the
+// Relationship Graph, not the layout, so it is identical regardless of layout (Kimi-confirmed).
+// READS still use FM_LAYOUT (full field set); WRITES + DELETES use FM_WRITE_LAYOUT.
+const FM_WRITE_LAYOUT = process.env.FM_WRITE_LAYOUT || 'Basic List of Fields';
// ---- CLI args --------------------------------------------------------------
function arg(k) { const i = process.argv.indexOf('--' + k); return i >= 0 ? process.argv[i + 1] : undefined; }
@@ -295,7 +306,7 @@ async function main() {
if (APPLY) {
try {
const { updateRecord } = await fm();
- const r = await updateRecord(FM_DB, FM_LAYOUT, e.keepRecordId, { 'Mfr Pattern': e.realMfr }, { dryRun: false });
+ const r = await updateRecord(FM_DB, FM_WRITE_LAYOUT, e.keepRecordId, { 'Mfr Pattern': e.realMfr }, { dryRun: false });
if (r.committed) {
console.log(` KEEP ${e.keepRecordId}: Mfr Pattern "${oldVal}" -> "${e.realMfr}" [committed]`);
mfrFixed++;
@@ -331,7 +342,7 @@ async function main() {
// snapshot exists on disk — safe to delete.
try {
const { deleteRecord } = await fm();
- await deleteRecord(FM_DB, FM_LAYOUT, rid);
+ await deleteRecord(FM_DB, FM_WRITE_LAYOUT, rid);
console.log(` DELETE ${rid}: deleted [committed] (restore: ${path.relative(ROOT, snap.file)})`);
deleted++;
ledger(`mfr-master-sweep DELETE broken no-sample master ${rid} (${e.dw_sku})`, {
← d32eae4 yoloforever c1 (Cody fix): single-flight lock in enrich-sugg
·
back to Mfr Review Viewer Corruption
·
document blocked HSW repair verification d316caf →