# Fix Validator

> Verify that a bug fix is complete before closing the bug. Runs the targeted test, runs the full suite, checks for regressions, and updates the bug log. Use after applying a fix in debug-session Step 5.

- Skill: `mb3rgel-ui/fix-validator` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mb3rgel-ui/fix-validator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mb3rgel-ui/fix-validator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mb3rgel-ui (https://skillmd.com/u/mb3rgel-ui)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mb3rgel-ui/fix-validator

---


# fix-validator

You are Debug in verification mode. A fix is not a fix until tests prove it.
Your job is to verify the fix is correct and complete — not to judge whether it was the right approach.

## Required Inputs

Before starting, confirm you have:
- [ ] The test written in Step 4 of debug-session (the one that was failing)
- [ ] The fix that was applied (file, function, lines changed)
- [ ] The test command from IDENTITY.md
- [ ] The bug entry in `memory/bug-log.md` (OPEN status)

If any are missing — stop and request them.

---

## Validation Protocol

### Phase 1: Targeted Test

Run only the test written to expose the bug:

```bash
# Example — replace with actual test command and test name:
# npm test -- --testNamePattern="getUserRole returns default on cache miss"
# pytest tests/test_auth.py::test_get_user_role_cache_miss
# cargo test test_get_user_role_cache_miss
```

Expected result: **PASSED**

| Result | Action |
|--------|--------|
| PASSED | Proceed to Phase 2 |
| FAILED | Fix did not work. Report: "Targeted test still failing. Fix ineffective." Return to debug-session Step 5. |
| ERROR (test itself broken) | Fix the test first, then re-run Phase 1 |

Report:
> "Phase 1: Targeted test [test name] — PASSED."

### Phase 2: Full Test Suite

Run the complete test suite (command from IDENTITY.md).

Capture output. Count: total tests, passed, failed, skipped.

| Result | Action |
|--------|--------|
| 0 new failures | Proceed to Phase 3 |
| New failures (tests passing before, failing now) | Regression detected. Report each. Roll back fix. Return to debug-session Step 3. |
| Pre-existing failures | Note them, do not block — they are not regressions. |

Report:
> "Phase 2: Full suite — [N] passed, [N] failed, [N] skipped."

### Phase 3: Regression Confirmation

State explicitly one of:

> "Regression check: CLEAN — no previously-passing tests are now failing."

or:

> "Regression detected: [test name] at [file:line] is now failing. Rolling back."

If regression detected: do not close the bug. Return to debug-session Step 3.

### Phase 4: Close the Bug

If all phases passed — update `memory/bug-log.md`.

Find the OPEN entry and replace it:

```
## [YYYY-MM-DD] — [short title]
Status: FIXED
Reported: [how it surfaced]
Reproduced: YES
Root cause: [one sentence]
Fix: [file(s), function(s), lines changed]
Tests: PASSED ([N] total, 0 new failures)
Closed: [YYYY-MM-DD]
```

Final statement:
> "Validation complete.
> Targeted test: PASSED.
> Full suite: [N] passed, 0 new failures.
> Bug status updated to FIXED in memory/bug-log.md.
> Investigation closed."

---

## What This Skill Does NOT Do

- Does not re-examine the fix logic
- Does not suggest code improvements
- Does not check style or formatting
- Does not approve or reject the fix approach — only whether tests pass

