How it works
Repair rules
A test can always be made to pass by weakening it. These rules exist so that a KwikQA repair changes how a test reaches the behavior it checks, never what behavior it accepts. A proposal that breaks any rule is rejected with a reason and is not shown as a patch.
Rejected edits
| Rule | Examples it catches |
|---|---|
| No skipping or focusing tests | test.skip(, test.only(, test.fixme(, describe.skip( |
| No fixed waits | page.waitForTimeout( |
| No added retries | retries: |
| No timeout increases without a latency contract in the evidence | setTimeout( |
| No broad snapshot acceptance | toMatchSnapshot( |
| No swallowed errors | catch (e) {} |
| No brittle selectors without positive evidence | .locator("#id"), .locator(".class"), XPath |
| No fewer assertions | Any matcher used fewer times in a file than before, such as a removed toHaveText |
| Only editable test code | Application source, dependencies, lockfiles, package manifests, generated files, or any path your config doesn't allow |
Preserving intent
Each proposal states the test's intent and the behavior it preserves, and every edit cites the evidence it relies on. If the only passing change would alter the expected outcome, remove coverage, or treat the application's current behavior as correct without evidence, KwikQA abstains (abstained-from-repair) and tells you why.
Size budgets
A proposal may change at most 3 files and 100 lines, or less if your config sets lower budgets. A cause that needs more is reported as a manual repair recommendation instead of a truncated patch.
Your uncommitted work
Files you have modified but not committed are excluded from repairs. Rollback restores exactly what KwikQA wrote and refuses to overwrite your later edits.
Shared test code in 0.1
Repairs to shared code (page objects, fixtures, helpers, and Playwright configuration) need a passing baseline for every affected test, and the failing test can't provide one. In KwikQA 0.1 these repairs are proposed, then stop with validation-unavailable before anything is applied. Repairs to spec files are validated and applied normally.