Skip to content

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

fix(ci): skip denied path checks for allowlisted imports

Steven Enamakelecbff2cfee3f
diff --git a/scripts/__tests__/check-test-ownership.test.mjs b/scripts/__tests__/check-test-ownership.test.mjs
index 7a4f382e89..277253d12f 100644
--- a/scripts/__tests__/check-test-ownership.test.mjs
+++ b/scripts/__tests__/check-test-ownership.test.mjs
@@ -75,10 +75,10 @@ test('expands nested grouped imports of TinyChannels provider internals', () =>
]);
});
-test('allowlisted imports do not permit direct calls into implementation internals', () => {
+test('allowlisted implementation paths do not permit direct calls outside their fixture', () => {
const source = 'tinymemory_tools::lifecycle::window::Window::default();';
assert.equal(
- findOwnershipViolations(source, 'crates/openhuman-core/src/memory/lifecycle/adapter_tests.rs').length,
+ findOwnershipViolations(source, 'crates/openhuman-core/src/example_tests.rs').length,
1,
);
});
diff --git a/scripts/ci/check-test-ownership.mjs b/scripts/ci/check-test-ownership.mjs
index ed59f8412c..39102a2840 100644
--- a/scripts/ci/check-test-ownership.mjs
+++ b/scripts/ci/check-test-ownership.mjs
@@ -126,14 +126,13 @@ export function findOwnershipViolations(source, filePath) {
}
for (const denied of DENIED_PATHS) {
+ if (allowed?.has(denied.path)) continue;
const deniedSegments = denied.path.split('::').filter(Boolean);
const reportedLines = new Set();
- if (!allowed?.has(denied.path)) {
- for (const importedPath of importedPaths) {
- if (deniedSegments.every((segment, index) => importedPath[index]?.value === segment)) {
- reportedLines.add(source.slice(0, importedPath[0].start).split('\n').length);
- }
+ for (const importedPath of importedPaths) {
+ if (deniedSegments.every((segment, index) => importedPath[index]?.value === segment)) {
+ reportedLines.add(source.slice(0, importedPath[0].start).split('\n').length);
}
}