From 1869fcb5b29fcb1e566becd25f68264f93fac24b Mon Sep 17 00:00:00 2001 From: Jarvis Prime Date: Mon, 9 Mar 2026 18:35:13 +0000 Subject: [PATCH] 7B: Add parse error tracking (BMad review fix) --- contracts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts.js b/contracts.js index ffabe85..31561a7 100644 --- a/contracts.js +++ b/contracts.js @@ -135,6 +135,7 @@ function extractContracts(filePath, relFile) { function extractAllContracts(subsystemMap, srcRoot) { const allContracts = []; const bySubsystem = {}; + const parseErrors = []; for (const sub of subsystemMap.subsystems) { bySubsystem[sub.name] = []; @@ -150,12 +151,12 @@ function extractAllContracts(subsystemMap, srcRoot) { allContracts.push(...contracts); bySubsystem[sub.name].push(...contracts); } catch (err) { - // Skip files that fail to parse + parseErrors.push({ file: relFile, error: err.message }); } } } - return { contracts: allContracts, bySubsystem }; + return { contracts: allContracts, bySubsystem, parseErrors }; } /**