Fix: tighten finish-capture contract assertions (#568)

The previous substring checks would still pass if the skill told agents to run npx playwright install.

AI-assisted: prepared with Cursor Grok under @abdulwahabone direction.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-09-01 14:45:24 +05:00
co-authored by Cursor
parent a2c00964ca
commit 8685fd75e6
+3 -2
View File
@@ -73,8 +73,9 @@ describe('skill reference authoring contracts', () => {
const inspectAndFinish = newWork.match(/## 7\. Inspect and finish\n([\s\S]*?)(?:\n## |$)/)?.[1] ?? '';
assert.match(inspectAndFinish, /native or browser-canvas screenshot path/);
assert.match(inspectAndFinish, /npx playwright install/);
assert.match(inspectAndFinish, /installed Chrome/);
assert.match(inspectAndFinish, /Never run `npx playwright install`/);
assert.match(inspectAndFinish, /installed Chrome, Chromium, or Edge/);
assert.match(inspectAndFinish, /fail fast if none is present/);
assert.match(inspectAndFinish, /leftover page from another process on the same localhost port/);
});
});