debug-a-failing-test
/debug-a-failing-test
Sprawdza, dlaczego test nie przechodzi, naprawia przyczynę w kodzie i potwierdza poprawkę ponownym uruchomieniem.
- Autor
- farena-ai ↗
- Repozytorium
- sara ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Sprawdza, dlaczego test nie przechodzi, naprawia przyczynę w kodzie i potwierdza poprawkę ponownym uruchomieniem.
Oryginalny opis (EN)
Finds out why a test fails and fixes the cause, not the test: reproduce it alone, read the error, narrow it down, fix, and prove it with a run. Use when a test fails, a check is red, a test is flaky, or the owner says the tests broke.
Jak działa
- 1. Reproduce it alone
- 2. Read before changing anything
- 3. Narrow it down
- 4. Fix the cause
- 5. Prove it
Podgląd SKILL.md
---
name: debug-a-failing-test
description: "Finds out why a test fails and fixes the cause, not the test: reproduce it alone, read the error, narrow it down, fix, and prove it with a run. Use when a test fails, a check is red, a test is flaky, or the owner says the tests broke."
license: MIT
metadata:
"sara-version": "1"
---
# Debug a failing test
## 1. Reproduce it alone
- Run only that test (e.g. `node --test path/to/file.test.ts`, `npx vitest run -t "name"`,
`pytest path::test_name -x`, `go test -run TestName ./pkg`). Note the exact error and line.
- If it passes alone but fails in the full run, it depends on another test (shared state, order,
ports, temp folders) or on time: run the full suite twice to see if it is flaky.
## 2. Read before changing anything
- Read the whole error and the stack trace. Open the test and the code it calls at those lines.
- Write down in one sentence what the test expects and what actually happens.
- Check what changed recently: `git log -p -5 -- <file>` and `git diff`.
## 3. Narrow it down
- Make the smallest input that still fails. Add a temporary log or assertion near the first place
the values go wrong; remove it afterwards.
- Common causes: a changed default, a time zone or date, an unawaited promise, a leftover file from
an earlier run, a mocked function that no longer matches, Windows paths or line endings.
## 4. Fix the cause
- Change the code that is wrong. Change the test only when the test itself is wrong (it expected
the old behaviour on purpose), and say so.
- Never delete, skip or loosen a test just to make it pass.
## 5. Prove it
- Run the test alone, then the whole suite, and report the real numbers ("412 passed, 0 failed").
- For a flaky test, run it several times in a row and say how many passed.
- Tell the owner what the cause was, in one or two sentences, and what you changed.
Wersje
W bazie nie ma innych skilli o nazwie debug-a-failing-test.
Migawka bazy z 13.11.2026 · wersja paczki 2936e7e71669 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100bug-fix
Naprawia błędy zgłoszone w projekcie Device: odtwarza je, pisze mały test, znajduje przyczynę i potwierdza poprawkę. - 100debug
Odtwarza błąd, test, build lub crash, znajduje przyczynę źródłową przed propozycją poprawki, potwierdza ją najmniejszym możliwym sprawdzeniem i dodaje test regresyjny. - 100debug
Dowodzi przyczyny błędu przed zmianą w kodzie, naprawia go u źródła testem, który wcześniej nie przechodzi, i eskaluje po trzech nieudanych hipotezach. - 90fix-loop
Znajduje przyczynę awarii aplikacji Java z logami stacktale, naprawia ją i potwierdza poprawkę, sprawdzając nowe błędy po ponownym uruchomieniu. - 90tmn-debug
Szuka przyczyny źródłowej błędu lub incydentu przed zmianą kodu: odtwarza go, zawęża dowodami i naprawia testem, który najpierw nie przechodzi. - 100sdlc-debug
Szuka przyczyny błędu z dowodami, pisze test regresyjny i wprowadza najmniejszą poprawkę.