-
Notifications
You must be signed in to change notification settings - Fork 1
Self Healing and Feedback Loop
github-actions[bot] edited this page Jun 1, 2026
·
3 revisions
One of Canary's most advanced features is its ability to learn from its own mistakes. The Execution Feedback Loop turns Canary from a static generator into an autonomous engineer.
- Generation: Canary writes a test file based on your requirement.
-
Execution: Using the
--runflag, Canary immediately executes the test in a secure subprocess. -
Capture: If the test fails (non-zero exit code), Canary captures
the
stderrand the failing code. - Self-Healing: Canary sends the error output back to the LLM, requesting a fix for the specific failure.
- Re-Verification: The fixed code is rewritten to disk and executed again.
canary generate "Create a playwright test for login" --runYou can also run any test file manually using Canary's knowledge:
canary run tests/generated/my_test.spec.ts playwright- 1-Retry Limit: To prevent infinite loops and token waste, the MVP self-healing loop is limited to one correction attempt.
- Subprocess Timeout: All test executions have a 30-second timeout to prevent "hanging" tests from blocking the CLI.
-
Non-Interactive Execution: Canary uses hardened flags (like
npx --yes) to ensure it doesn't get stuck waiting for user input during a run.