Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

ci(module-boundaries): enforce linked host boundary checks

Steven Enamakel7d4cdf9ad03f
diff --git a/scripts/ci/check-module-boundaries.mjs b/scripts/ci/check-module-boundaries.mjs
index 78030b0d4d..5b584058fa 100644
--- a/scripts/ci/check-module-boundaries.mjs
+++ b/scripts/ci/check-module-boundaries.mjs
@@ -93,7 +93,18 @@ export function auditGraph(metadata, roots, policy, contract = null) {
if (contract) continue;
}
}
- for (const next of edges(id)) queue.push([...path, next]);
+ for (const next of edges(id)) {
+ if (!contract && packages.get(next).name === policy.linkedHost?.package) {
+ const parent = packages.get(id).name;
+ if (path.length === 1 && policy.linkedHost.allowedParents.includes(parent)) continue;
+ violations.push({
+ scope: 'hosts', package: policy.linkedHost.package,
+ path: [...path, next].map(item => packages.get(item).name),
+ });
+ continue;
+ }
+ queue.push([...path, next]);
+ }
}
}
return { violations, exceptions };