[object Object]

← back to Designerwallcoverings

romo-verify: report MODULE_NOT_FOUND as CRITICAL (builder file missing), not WARN

9fe129a3b22340322d6c9bb6dfc3eb8ee5efee64 · 2026-07-29 04:07:25 -0700 · steve@designerwallcoverings.com

build-romo-rolls.mjs is absent from the project root. The canary was
swallowing the MODULE_NOT_FOUND error and emitting a misleading "no
buildable product found" WARN to CNCP instead of a CRITICAL "builder failed
to launch". Add a post-catch check so any MODULE_NOT_FOUND in stdout/stderr
sets spawnErr and routes to the CRITICAL path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files touched

Diff

commit 9fe129a3b22340322d6c9bb6dfc3eb8ee5efee64
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date:   Wed Jul 29 04:07:25 2026 -0700

    romo-verify: report MODULE_NOT_FOUND as CRITICAL (builder file missing), not WARN
    
    build-romo-rolls.mjs is absent from the project root. The canary was
    swallowing the MODULE_NOT_FOUND error and emitting a misleading "no
    buildable product found" WARN to CNCP instead of a CRITICAL "builder failed
    to launch". Add a post-catch check so any MODULE_NOT_FOUND in stdout/stderr
    sets spawnErr and routes to the CRITICAL path.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---
 scripts/romo-verify/run.mjs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/romo-verify/run.mjs b/scripts/romo-verify/run.mjs
index 2c7cae0..4b2f3e1 100644
--- a/scripts/romo-verify/run.mjs
+++ b/scripts/romo-verify/run.mjs
@@ -53,6 +53,11 @@ function report(sev, title, body) {
     // that is NOT "no buildable product". Flag it so it's surfaced distinctly, not swallowed.
     if (e.code === 'ENOENT' || e.code === 'EACCES' || !out) spawnErr = e;
   }
+  // MODULE_NOT_FOUND in output means build-romo-rolls.mjs is missing — treat as
+  // a launch failure so it surfaces as CRITICAL, not "no buildable product found".
+  if (!spawnErr && /MODULE_NOT_FOUND|Cannot find module/i.test(out)) {
+    spawnErr = { code: 'MODULE_NOT_FOUND', message: 'Builder file missing (build-romo-rolls.mjs not found at ' + ROOT + ')' };
+  }
   console.log(out);
 
   const lines = fs.existsSync(CREATED) ? fs.readFileSync(CREATED, 'utf8').split('\n').filter(Boolean) : [];

← ff60d03 auto-save: 2026-07-29T04:05:35 (3 files) — scripts/sample-sp  ·  back to Designerwallcoverings  ·  auto-save: 2026-07-29T05:36:12 (2 files) — scripts/kravet-sp d3defbb →