fix: render M3 workbench wiring
This commit is contained in:
@@ -246,6 +246,15 @@ function runStaticSmoke() {
|
||||
]
|
||||
});
|
||||
|
||||
addCheck(checks, blockers, "m3-rendered-workbench-not-m5-fixture", m3RenderedWorkbenchNotM5Fixture(files.app), "Right workbench hardware status and wiring table render the M3 chain, not M5 fixture rows or undefined DOM-node rows.", {
|
||||
blocker: "runtime_blocker",
|
||||
evidence: [
|
||||
"renderHardwareStatus passes data objects into hardwareGroup",
|
||||
"renderWiringList uses M3_TRUSTED_ROUTE",
|
||||
"M5 activeConnections are not mapped into the workbench wiring table"
|
||||
]
|
||||
});
|
||||
|
||||
const help = inspectHelpContract(files);
|
||||
addCheck(checks, blockers, "help-md-contract", help.status, help.summary, {
|
||||
blocker: help.blocker,
|
||||
@@ -558,6 +567,21 @@ function m3FixtureCountsNotDevLive(app) {
|
||||
);
|
||||
}
|
||||
|
||||
function m3RenderedWorkbenchNotM5Fixture(app) {
|
||||
const hardwareBody = functionBody(app, "renderHardwareStatus");
|
||||
const hardwareGroupBody = functionBody(app, "hardwareGroup");
|
||||
const wiringBody = functionBody(app, "renderWiringList");
|
||||
return (
|
||||
/group\.rows\.map\(hardwareRow\)/u.test(hardwareGroupBody) &&
|
||||
!/hardwareRow\(\s*\{/u.test(hardwareBody) &&
|
||||
/M3_TRUSTED_ROUTE\.fromResourceId/u.test(wiringBody) &&
|
||||
/M3_TRUSTED_ROUTE\.patchPanelServiceId/u.test(wiringBody) &&
|
||||
/M3_TRUSTED_ROUTE\.toResourceId/u.test(wiringBody) &&
|
||||
!/activeConnections\.map/u.test(wiringBody) &&
|
||||
!/link\.fromResourceId/u.test(wiringBody)
|
||||
);
|
||||
}
|
||||
|
||||
function functionBody(source, functionName) {
|
||||
const match = source.match(new RegExp(`function\\s+${escapeRegExp(functionName)}\\s*\\([^)]*\\)\\s*\\{`, "u"));
|
||||
if (!match) return "";
|
||||
|
||||
Reference in New Issue
Block a user