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:
- STOP - Do not proceed or claim success
- REPORT - List exact issues with counts and file:line references
- FIX - Resolve ALL issues before re-testing
- VERIFY - Run triple validation to confirm 100% pass rate
- 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 test2= 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
- Premature Success Claim โ Task marked FAILED
- Partial Testing โ Results invalidated
- Missing Validation โ Must restart from beginning
- False 100% Claim โ Credibility loss
- 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
- No Assumptions: Never assume tests pass without running them
- Full Coverage: Always run complete test suite, not subsets
- Multiple Signals: Exit code alone is insufficient
- Exact Counts: Must report specific numbers, not vague claims
- Repeatability: Success must be consistent across multiple runs
REMEMBER: 100% means 100% - not 99%, not "mostly", not "should be". VALIDATE RUTHLESSLY.