100-percent-pass-validation

star 3

Mandatory 100% pass rate validation for all test commands

nashgao By nashgao schedule Updated 2/9/2026

name: 100-percent-pass-validation description: Mandatory 100% pass rate validation for all test commands type: command-enhancement

๐Ÿšจ MANDATORY 100% PASS RATE VALIDATION

CRITICAL: This MUST be integrated into ALL test commands to prevent false success claims

๐Ÿšจ ZERO TOLERANCE ENFORCEMENT

MANDATORY - This validation enforces PERFECT test execution across ALL test commands:

Universal Success Criteria (ALL must be met)

  • โœ… 0 Failed Tests - Every single test must pass (not 99%, not "mostly")
  • โœ… 0 Errors - No runtime errors allowed in any test
  • โœ… 0 Warnings - Warnings are treated as hard failures
  • โœ… 0 Deprecations - Deprecation notices block success
  • โœ… 0 Incomplete Tests - Incomplete tests counted as failures
  • โœ… 0 Risky Tests - Risky test detection must pass
  • โœ… 0 Skipped Tests - Unless explicitly allowed with justification
  • โœ… 100% Verified - Triple validation confirms consistency

Failure Response Protocol

When ANY issue is detected:

  1. STOP - Do not proceed or claim success
  2. REPORT - List exact issues with counts and file:line references
  3. FIX - Resolve ALL issues before re-testing
  4. VERIFY - Run triple validation to confirm 100% pass rate
  5. DOCUMENT - Provide evidence logs for all validation runs

Exit Codes (Enforced Across All Test Commands)

  • 0 = Perfect execution (no warnings, no deprecations, no failures)
  • 1 = Any failure, warning, deprecation, or incomplete test
  • 2 = Configuration or setup error

โ›” THE PROBLEM WE'RE SOLVING

Test agents were claiming success without verification:

  • Running subset of tests and claiming "all fixed"
  • Accepting exit code 0 without checking for actual test execution
  • Declaring victory after fixing "some" tests
  • Not validating that 100% of tests actually pass

๐Ÿ”’ MANDATORY VALIDATION PATTERN

For Every Test Command

#!/bin/bash

# ๐Ÿšจ CRITICAL: 100% PASS RATE ENFORCEMENT
validate_100_percent_pass_rate() {
    local test_command="$1"
    local validation_log="$2"

    echo "=== ๐Ÿ”’ 100% PASS RATE VALIDATION ==="

    # Step 1: Run FULL test suite (not subset)
    echo "Step 1/5: Executing FULL test suite..."
    $test_command 2>&1 | tee "$validation_log"
    local exit_code=$?

    # Step 2: Verify exit code is 0
    if [ $exit_code -ne 0 ]; then
        echo "โŒ VALIDATION FAILED: Exit code $exit_code (expected 0)"
        echo "๐Ÿ“Š Status: TESTS FAILING - NOT 100% PASS RATE"
        return 1
    fi
    echo "โœ… Step 2/5: Exit code 0 verified"

    # Step 3: Verify test output exists
    if [ ! -s "$validation_log" ]; then
        echo "โŒ VALIDATION FAILED: No test output captured"
        echo "๐Ÿ“Š Status: TESTS MAY NOT HAVE RUN - CANNOT VERIFY 100%"
        return 1
    fi
    echo "โœ… Step 3/5: Test output captured"

    # Step 4: Check for positive success indicators
    if ! grep -E "(Tests:.*[0-9]+.*passed|โœ“.*All tests passed|PASSED.*100%|OK \([0-9]+ tests?\))" "$validation_log" > /dev/null; then
        echo "โŒ VALIDATION FAILED: No positive success indicators"
        echo "๐Ÿ“Š Status: CANNOT CONFIRM 100% PASS RATE"
        return 1
    fi
    echo "โœ… Step 4/5: Positive success indicators found"

    # Step 5: Verify ZERO failures
    if grep -E "(FAIL|FAILED|ERROR|โœ—|โœ–|[1-9][0-9]* failing)" "$validation_log" > /dev/null; then
        echo "โŒ VALIDATION FAILED: Failure patterns detected"
        echo "๐Ÿ“Š Status: TESTS STILL FAILING - NOT 100% PASS RATE"
        return 1
    fi
    echo "โœ… Step 5/5: Zero failures confirmed"

    # Extract and report exact numbers
    extract_test_counts "$validation_log"

    echo "๐ŸŽฏ 100% PASS RATE VALIDATED SUCCESSFULLY"
    return 0
}

# Extract exact test counts for reporting
extract_test_counts() {
    local log_file="$1"

    echo "๐Ÿ“Š TEST RESULTS SUMMARY:"

    # PHPUnit pattern
    if grep -q "OK ([0-9]* test" "$log_file"; then
        local count=$(grep -o "OK ([0-9]* test" "$log_file" | grep -o "[0-9]*")
        echo "  Total Tests: $count"
        echo "  Passed: $count (100%)"
        echo "  Failed: 0"
        return
    fi

    # Jest/Vitest pattern
    if grep -q "Tests:.*[0-9]* passed" "$log_file"; then
        local passed=$(grep -o "[0-9]* passed" "$log_file" | head -1 | grep -o "[0-9]*")
        local total=$(grep -o "[0-9]* total" "$log_file" | head -1 | grep -o "[0-9]*")
        echo "  Total Tests: $total"
        echo "  Passed: $passed ($(( passed * 100 / total ))%)"
        echo "  Failed: $(( total - passed ))"
        return
    fi

    # Pytest pattern
    if grep -q "passed" "$log_file" && grep -q "=.*passed.*in.*seconds.*=" "$log_file"; then
        local passed=$(grep -o "[0-9]* passed" "$log_file" | head -1 | grep -o "[0-9]*")
        echo "  Total Tests: $passed"
        echo "  Passed: $passed (100%)"
        echo "  Failed: 0"
        return
    fi

    # Go test pattern
    if grep -q "PASS" "$log_file" && grep -q "ok.*coverage" "$log_file"; then
        local test_count=$(grep -c "PASS" "$log_file")
        echo "  Test Packages: $test_count"
        echo "  Status: ALL PASSING (100%)"
        return
    fi

    # Generic fallback
    echo "  Status: All tests passing (framework-specific counts not extracted)"
}

๐Ÿ”„ TRIPLE VALIDATION REQUIREMENT

Mandatory for Final Success Claims

# ๐Ÿšจ CRITICAL: TRIPLE VALIDATION FOR 100% CONFIDENCE
triple_validation_100_percent() {
    local test_command="$1"
    local pass_count=0
    local required_passes=3

    echo "=== ๐Ÿ”’ TRIPLE VALIDATION FOR 100% PASS RATE ==="
    echo "Requirement: $required_passes consecutive successful runs"

    for i in 1 2 3; do
        echo ""
        echo "๐Ÿ” Validation Run $i/$required_passes"
        echo "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"

        if validate_100_percent_pass_rate "$test_command" "validation_run_${i}.log"; then
            pass_count=$((pass_count + 1))
            echo "โœ… Run $i: PASSED (100% pass rate confirmed)"
        else
            echo "โŒ Run $i: FAILED (not 100% pass rate)"
            echo "๐Ÿ”„ Triple validation failed at run $i"
            echo "๐Ÿ“Š Final Status: Only $pass_count/$required_passes validations passed"
            echo "โš ๏ธ  CANNOT CONFIRM 100% PASS RATE"
            return 1
        fi
    done

    echo ""
    echo "๐ŸŽ‰ TRIPLE VALIDATION COMPLETE"
    echo "๐Ÿ“Š Final Status: $pass_count/$required_passes validations passed"
    echo "โœ… 100% PASS RATE CONFIRMED WITH HIGH CONFIDENCE"
    return 0
}

๐Ÿ“‹ INTEGRATION CHECKLIST

For Test Commands

## โœ… 100% Pass Rate Validation Checklist

Before claiming ANY test success:

โ–ก **Full Suite**: Ran complete test suite (not cherry-picked)
โ–ก **Exit Code 0**: Test command returned success
โ–ก **Output Exists**: Test output captured and non-empty
โ–ก **Positive Indicators**: Found "PASSED", "โœ“", or "OK" patterns
โ–ก **Zero Failures**: No "FAIL", "ERROR", or "โœ—" patterns
โ–ก **Exact Counts**: Can report exact pass/fail numbers
โ–ก **Triple Validation**: Passed 3 consecutive runs
โ–ก **100% Confirmed**: All tests verified passing

โŒ **IF ANY UNCHECKED**: Cannot claim 100% pass rate

๐Ÿšซ FORBIDDEN CLAIMS WITHOUT VALIDATION

โŒ **NEVER SAY THESE WITHOUT VALIDATION:**
- "All tests fixed" (without running full suite)
- "100% pass rate achieved" (without triple validation)
- "Tests are passing" (without exact counts)
- "Should work now" (without verification)
- "Fixed the failures" (without confirming zero remain)

๐Ÿ“Š REPORTING TEMPLATE

After Successful 100% Validation

## โœ… 100% TEST PASS RATE ACHIEVED

**Validation Summary:**
- Command: `[exact command used]`
- Total Tests: [exact count]
- Passed: [exact count] (100%)
- Failed: 0
- Skipped: 0

**Verification Method:**
- โœ… Full test suite executed
- โœ… Exit code 0 confirmed
- โœ… Positive indicators found
- โœ… Zero failure patterns
- โœ… Triple validation passed (3/3)

**Evidence:**
- Run 1: [log file] - 100% pass
- Run 2: [log file] - 100% pass
- Run 3: [log file] - 100% pass

**Confidence Level:** HIGH (triple-validated)

๐Ÿ”ด ENFORCEMENT CONSEQUENCES

What Happens Without 100% Validation

  1. Premature Success Claim โ†’ Task marked FAILED
  2. Partial Testing โ†’ Results invalidated
  3. Missing Validation โ†’ Must restart from beginning
  4. False 100% Claim โ†’ Credibility loss
  5. Incomplete Verification โ†’ User trust damaged

๐Ÿ’ป USAGE EXAMPLES

In Test Fix Commands

# Example: PHP test fixing with 100% validation
fix_php_tests() {
    echo "๐Ÿ”ง Fixing PHP tests..."

    # ... fix implementation ...

    # MANDATORY: Validate 100% pass rate
    echo "๐Ÿ” Validating 100% pass rate..."
    if ! triple_validation_100_percent "composer test:integration"; then
        echo "โŒ FAILED: Could not achieve 100% pass rate"
        return 1
    fi

    echo "โœ… SUCCESS: 100% pass rate achieved and validated!"
}

# Example: JavaScript test fixing with 100% validation
fix_js_tests() {
    echo "๐Ÿ”ง Fixing JavaScript tests..."

    # ... fix implementation ...

    # MANDATORY: Validate 100% pass rate
    echo "๐Ÿ” Validating 100% pass rate..."
    if ! triple_validation_100_percent "npm test"; then
        echo "โŒ FAILED: Could not achieve 100% pass rate"
        return 1
    fi

    echo "โœ… SUCCESS: 100% pass rate achieved and validated!"
}

๐ŸŽฏ KEY PRINCIPLES

  1. No Assumptions: Never assume tests pass without running them
  2. Full Coverage: Always run complete test suite, not subsets
  3. Multiple Signals: Exit code alone is insufficient
  4. Exact Counts: Must report specific numbers, not vague claims
  5. Repeatability: Success must be consistent across multiple runs

REMEMBER: 100% means 100% - not 99%, not "mostly", not "should be". VALIDATE RUTHLESSLY.

Install via CLI
npx skills add https://github.com/nashgao/mqtt-client --skill 100-percent-pass-validation
Repository Details
star Stars 3
call_split Forks 1
navigation Branch main
article Path SKILL.md
More from Creator