Test and Fix
SkillDev toolsAutonomously run tests, analyze failures, and fix them in the `integration_tests` directory.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Test and Fix skill
What this skill tells your AI
The instructions your AI receives, as published by ubie-oss/dbt-data-privacy in .claude/skills/test-and-fix/SKILL.md and read by ahel’s review.
Purpose
This skill provides an autonomous loop to identify, analyze, and fix test failures within the integration_tests directory using the project's make commands.
Loop Logic
- Identify: Run tests from the
integration_testsdirectory.- Agent must make sure what type of test the user wants to run (unit or integration), becaues it takes a long time to run all tests.
make test: Runs all unit and integration tests (both dbt-core and dbt-fusion). This is the standard command for a full verification.make run-unit-tests: Runs all unit tests (both core and fusion).make run-integration-tests: Runs all integration tests (both core and fusion).- For targeted debugging, use granular sub-targets:
make run-unit-tests-core/make run-unit-tests-fusionmake run-integration-tests-core/make run-integration-tests-fusion
- Analyze: Examine the test output and logs to understand which tests are failing.
- Check the
logs/dbt.loginintegration_tests/for detailed dbt execution logs. - For macro failures, inspect the generated SQL and compare it with expected BigQuery syntax.
- Note: BigQuery is the only supported warehouse in this repository.
- Check the
- Plan Fix: Before applying any fix, create an MVP scaffold that delivers the smallest valuable slice of the fix.
- Define acceptance criteria for the fix.
- Create a plan in memory to track the fix progress.
- Execute & Test:
- Implement the MVP scaffold.
- Run the relevant tests immediately (e.g.,
cd integration_tests && make run-unit-tests-core). - Only add details and enhancements after the scaffold tests pass.
- Verify: Re-run the tests.
- If all checks pass: Termination.
- If new or remaining failures exist: Analyze the failure and repeat the loop.
Termination Criteria
- All relevant tests exit with code 0 (all checks passed).
- Reached max iteration limit of 5 attempts.
- No progress being made (same errors persisting despite fix attempts).
Examples
Scenario: Fixing a failing macro unit test
- Agent runs
make testand identifies a failure intest_macrosfor dbt-core. - Agent analyzes the output and finds that
macro_ais returning incorrect SQL for BigQuery. - Agent creates a plan in memory.
- Agent implements a minimal fix for
macro_ato address the specific failure. - Agent runs
make run-unit-tests-coreto quickly verify the fix. - The test passes. Agent runs
make testto ensure no regressions across the entire suite. - The test passes. Agent marks the task as complete.
Signals
- GitHub stars
- 22
- Forks
- 2
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
test-and-fix- Source
- github.com/ubie-oss/dbt-data-privacy