mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
- Introduced a new command for validating tests, providing detailed instructions for running tests and fixing failures based on code changes. - Updated the environment variable handling in the Claude provider to only allow explicitly defined variables, enhancing security and preventing leakage of sensitive information. - Improved feature loading to handle errors more gracefully and load features concurrently, optimizing performance. - Centralized port configuration for the Automaker application to prevent accidental termination of critical services.
1.3 KiB
1.3 KiB
Project Test and Fix Command
Run all tests and intelligently fix any failures based on what changed.
Instructions
-
Run all tests
npm run test:all -
If all tests pass, report success and stop.
-
If any tests fail, analyze the failures:
- Note which tests failed and their error messages
- Run
git diff mainto see what code has changed
-
Determine the nature of the change:
-
If the logic change is intentional (new feature, refactor, behavior change):
- Update the failing tests to match the new expected behavior
- The tests should reflect what the code NOW does correctly
-
If the logic change appears to be a bug (regression, unintended side effect):
- Fix the source code to restore the expected behavior
- Do NOT modify the tests - they are catching a real bug
-
-
How to decide if it's a bug vs intentional change:
- Look at the git diff and commit messages
- If the change was deliberate and the test expectations are now outdated → update tests
- If the change broke existing functionality that should still work → fix the code
- When in doubt, ask the user
-
After making fixes, re-run the tests to verify everything passes.
-
Report summary of what was fixed (tests updated vs code fixed).