Check a test fix (heal guard)
check-test-changeVerifies changed Playwright spec files against a git ref or proposed edit to block weakened tests, deleted assertions, skipped tests, and .only; warns on weaker matchers and swallowed errors.
Instructions
Heal guard: check that changed tests were not made to pass by checking less. Compares spec files with a git ref (default HEAD = uncommitted changes) or one proposed file (file + after). BLOCK on deleted assertions, skipped/removed tests or .only; WARN on weaker matchers, waitForTimeout, force: true, swallowed errors, raised timeouts or retries. Run it after any AI fix, before committing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check-test-change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Git ref to compare with: 'HEAD' (default: uncommitted changes), 'origin/main' (the whole branch) | |
| file | No | With after: the spec file a fix would change | |
| after | No | With file: the fix's full new file content, checked before it is written | |
| files | No | Only these files (default: every changed spec file and playwright config) | |
| runtime | No | Also run each changed TS/JS spec in its old and new version and compare how many assertions actually ran per test (catches early returns and skipped branches the code scan cannot see) | |
| projectRoot | No | Project directory (default: server root) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false when the call failed (see error) or the tests it ran failed | |
| error | No | ||
| total | No | ||
| status | No | ||
| findings | No |