Fixes E2E test failures from logs/e2e-failures.log (written by the Test: Run E2E task).
Fix Playwright E2E failures collected in logs/e2e-failures.log.
Read these two files in parallel (single tool call):
logs/e2e-failures.log.claude/skills/fix-e2e/known-fixes.mdIf the log file does not exist or is empty, tell the user to run the Test: Run E2E (headless) task first, then stop.
If the last line of logs/e2e-failures.log is --- ADDRESSED, the failures have
already been fixed. Tell the user:
These E2E failures were already addressed. Re-run the Test: Run E2E (headless) task and invoke
/fix-e2eagain if new failures appear.
Then stop.
Before investing in fixes, scan the log for these signals of incomplete diagnostics:
| Signal | What it means |
|---|---|
A # test_name[browser] block has no traceback or error message lines (only a header + # fix: line) | The failure body wasn't captured — root cause is invisible |
A failure block is missing a # fix: line entirely | Fix hint extraction failed — the block lacks actionability |
A test appears failed in a summary but has no corresponding # test_name block | Failure body was dropped by the script's filter |
If any quality problem is found:
scripts/run-e2e.ps1 to preserve the missing content (e.g., always emit a
# fix: hint, widen the block-capture logic to include assertion output).For every failure block in the log, check if any Error pattern substring from
known-fixes.md appears in the traceback, error line, or # fix: hint.
If a known fix matches: apply it immediately as a one-shot fix. Do not read additional files to re-derive the solution. Do not investigate further. Just apply the documented fix, increment the Hits column by 1, set Last used to today's date, and move on to the next failure.
Only proceed to Step 2 for failures that have no known-fix match.
For any failure not matched by a known fix, collect its structured block:
# test_name[browser] — the failing test# fix: <hint> — machine-generated fix hintSkip this step entirely if all failures were resolved by known fixes in Step 1.
You have a hard cap of 5 file reads per failure. Count every read_file and
grep_search call against this budget. The 5 reads must be:
tests/e2e/After 5 reads, you must attempt a fix based on what you know. Do not read more files. If you are genuinely stuck after 5 reads, propose your best-guess fix and ask the user for confirmation — do not keep investigating.
Do not read logs/runtime/carameli.log unless the fix hint specifically says 5xx /
backend endpoint AND the test code + route handler don't reveal the cause. Runtime
logs are large and usually add noise, not signal.
| Fix hint keyword | Read first |
|---|---|
5xx / backend endpoint | Route handler in app/api/ |
CORS / Access-Control | app/main.py CORS middleware section |
4xx / auth | Auth dependency in app/core/auth.py, then the route |
Timeout / navigation | Frontend component, then frontend/src/routes.ts |
connection refused | Stop — not a code fix, tell the user to start servers |
DOM element not found | The frontend component rendering the selector |
collection error | The test file imports and conftest.py |
For each failure:
logger.* calls; add any that are missing per
.claude/rules/logging.md./add-db-model instead.After fixing all actionable failures, append --- ADDRESSED to the end of
logs/e2e-failures.log. This prevents re-triage on the next invocation.
After all fixes are applied, if any failure was not already covered by a row in
known-fixes.md and its error pattern is likely to recur, append a new row with:
1Do not add entries for one-off mistakes (e.g., a misspelled variable name).
While editing known-fixes.md, delete rows where Hits = 0 and Added is more
than 90 days ago.
connection refused → infra issue, tell the user and stop.State clearly:
app/): tell the user to run docker compose restart appfrontend/src/): note that Vite HMR should pick it up
(manual restart only needed for config changes like vite.config.ts)/fix-e2e
again if failures remain.pytest, playwright, or any test
runner command. All test execution is done by the user via the VS Code task.--- ADDRESSED — tell the user to re-run E2E first.carameli.log) unless the fix hint says 5xx and the route
handler alone doesn't explain it. Runtime logs are a last resort, not a first step.scripts/run-e2e.ps1 and stop — never attempt fixes when root cause is invisible.