← back to Designer Wallcoverings
cadence-import: recompute price-coverage at end of run (feeds CNCP panel)
bccac2fd4a317d88acbdb8712a91f31d2089eda4 · 2026-06-11 11:02:06 -0700 · SteveStudio2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files touched
M shopify/scripts/cadence/cadence-import.js
Diff
commit bccac2fd4a317d88acbdb8712a91f31d2089eda4
Author: SteveStudio2 <stevestudio2@SteveStudio2s-Mac-Studio.local>
Date: Thu Jun 11 11:02:06 2026 -0700
cadence-import: recompute price-coverage at end of run (feeds CNCP panel)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
shopify/scripts/cadence/cadence-import.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 2f2d8c39..7151a24d 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -252,4 +252,11 @@ async function createProduct(table, row, payload) {
fs.mkdirSync(DATADIR,{recursive:true}); fs.writeFileSync(planFile, JSON.stringify(plan,null,1));
console.log(`\n\n${COMMIT?`CREATED ${created}, failed ${failed}`:`DRY-RUN planned ${plan.length} products`} → ${planFile}`);
if (!COMMIT) console.log('Re-run with --commit to create these on Shopify (DRAFT status, dw_unified logged first).');
+
+ // refresh the CNCP "Price Coverage" goal panel now that new cost may have landed.
+ // Read-mostly + isolated to its own tables; never let it break the import.
+ try {
+ execFileSync('node', [path.join(__dirname, 'compute-price-coverage.js'), '--quiet'], { stdio: 'ignore' });
+ console.log('price-coverage recomputed.');
+ } catch (e) { console.warn('price-coverage recompute skipped:', e.message); }
})();
← 46463911 Add compute-price-coverage.js — truthful vendor cost-coverag
·
back to Designer Wallcoverings
·
Romo per-unit pricing: repair 57 corrupt total_price_per_rol 75964c0c →