Skip to main content
Version: 3.0.1

STD: WCAF Rule (Multiple Control Failures)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-wcaf.md Rule Name: WCAF Domain: RULES-WCAF


Overview

This document specifies tests for the WCAF (Multiple Control Failures) rule using decision tables and test vectors. The rule detects when two or more control wells have failed in a run, marking affected wells for replating with an error message.

Rule Characteristics:

  • Pure business logic (run-level QC rule)
  • Threshold-based detection (2+ failures)
  • Exclusion filtering (unknown mix wells)
  • Dynamic clearing on error resolution
  • Complements CONTROL_FAIL rule

Test Method: TM-API (per Test Plan Section 3.3 - Rules use automated API tests)

Verification Approach: Rule verification is performed using data-driven test vectors. Each row in a decision table represents a complete verification scenario with defined inputs and expected outputs. This format enables exhaustive condition coverage while remaining concise and auditable.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-WCAF-001Detect and Mark Multiple Control Failures812100%None
REQ-RULES-WCAF-002Exclude Unknown Mix Wells from Failure Counting48100%None
REQ-RULES-WCAF-003Clear Error When Failures Reduce Below Threshold510100%None

Totals: 3 REQs, 17 Conditions, 30 Test Vectors, 100% Coverage


Input/Output Variables

Global Input Variables

VariableTypeValid ValuesDescription
control_wellsarrayWell objectsControl wells in the run
well.statusenumPASSED, FAILEDControl well QC status
well.mix_statusenumknown, unknownWhether mix is identifiable
well.has_wcaf_errorbooltrue, falseWhether WCAF error is applied
well.has_original_errorbooltrue, falseWhether original control error exists
thresholdint2 (default)Number of failures to trigger WCAF

Global Output Variables

VariableTypeDescription
wcaf_triggeredboolWhether WCAF rule fired
error_messagestring?"Well should be replated due to multiple qc errors" or null
affected_wellsarrayWells marked with WCAF error
wcaf_clearedboolWhether WCAF error was removed

REQ-RULES-WCAF-001: Detect and Mark Multiple Control Failures

Input Variables

VariableTypeValid ValuesDescription
countable_failuresint0, 1, 2, 3+Control failures with known mix
total_controlsint0, 1, 2+Total control wells in run
thresholdint2Failure threshold

Output Variables

VariableTypeDescription
wcaf_triggeredboolRule fires when countable_failures >= threshold
error_messagestring?Error text or null
patient_samples_failedboolPatient samples fail by association

Decision Table: Threshold Evaluation

TVcountable_failuresthresholdwcaf_triggerederror_messageCovers
TV-001-00102falsenullAC: 0 failures < threshold
TV-001-00212falsenullAC: 1 failure < threshold
TV-001-00322true"Well should be replated due to multiple qc errors"AC: Exactly 2 = threshold
TV-001-00432true"Well should be replated due to multiple qc errors"AC: 3 failures > threshold
TV-001-00552true"Well should be replated due to multiple qc errors"AC: Many failures > threshold

Decision Table: Run-Level Scope

TVtotal_controlscontrol_statusescountable_failureswcaf_triggeredCovers
TV-001-0060[]0falseAC: No controls = no trigger
TV-001-0071[FAILED]1falseAC: Single control failure
TV-001-0083[FAILED, FAILED, PASSED]2trueAC: 2 of 3 controls failed
TV-001-0093[PASSED, PASSED, PASSED]0falseAC: All controls pass

Decision Table: Patient Sample Association

TVwcaf_triggeredpatient_wells_presentpatient_samples_failedCovers
TV-001-010truetruetrueAC: Patients fail by association
TV-001-011falsetruefalseAC: No WCAF = patients unaffected
TV-001-012truefalseN/AAC: No patients present

REQ-RULES-WCAF-002: Exclude Unknown Mix Wells from Failure Counting

Input Variables

VariableTypeValid ValuesDescription
well.statusenumPASSED, FAILEDControl well QC status
well.mix_statusenumknown, unknownMix identifiability

Output Variables

VariableTypeDescription
counted_toward_thresholdboolWhether failure counts

Decision Table: Mix Status Exclusion

TVwell.statuswell.mix_statuscounted_toward_thresholdCovers
TV-002-001FAILEDknowntrueAC: Known mix failure counts
TV-002-002FAILEDunknownfalseAC: Unknown mix excluded
TV-002-003PASSEDknownfalseAC: Passed well not counted
TV-002-004PASSEDunknownfalseAC: Passed unknown not counted

Decision Table: Combined Scenario - Mixed Known/Unknown

TVknown_failuresunknown_failurescountable_totalwcaf_triggeredCovers
TV-002-005111falseAC: 1 known + 1 unknown = 1 countable
TV-002-006212trueAC: 2 known + 1 unknown = 2 countable
TV-002-007030falseAC: 0 known + 3 unknown = 0 countable
TV-002-008202trueAC: 2 known + 0 unknown = 2 countable

REQ-RULES-WCAF-003: Clear Error When Failures Reduce Below Threshold

Input Variables

VariableTypeValid ValuesDescription
initial_failuresint2+Failures before resolution
resolved_countint1+Number of errors resolved
remaining_failuresint0+Failures after resolution
wcaf_error_presentbooltrueWCAF error exists before action

Output Variables

VariableTypeDescription
wcaf_clearedboolWCAF error removed
original_error_retainedboolOriginal control error kept

Decision Table: Re-evaluation After Resolution

TVinitial_failuresresolved_countremaining_failureswcaf_clearedCovers
TV-003-001211trueAC: 2->1 = below threshold, clear
TV-003-002312falseAC: 3->2 = at threshold, keep
TV-003-003321trueAC: 3->1 = below threshold, clear
TV-003-004422falseAC: 4->2 = at threshold, keep
TV-003-005202falseAC: No resolution = keep

Decision Table: WCAF Error Not Self-Counting

TVcontrol_failureswcaf_errors_on_wellscounted_failuresCovers
TV-003-006222AC: WCAF errors not counted as failures
TV-003-007111AC: Only original errors counted

Decision Table: Original Error Retention

TVwcaf_clearedoriginal_error_presentoriginal_error_retainedCovers
TV-003-008truetruetrueAC: Original error kept when WCAF clears
TV-003-009falsetruetrueAC: Original error always retained
TV-003-010truefalseN/AAC: No original error to retain

Error Handling Test Vectors

Decision Table: Edge Cases

TVScenarioInput StateExpected BehaviorCovers
TV-ERR-001Undetermined statuswell.status = UNKNOWNSkip well, log warningAC: Unable to determine status
TV-ERR-002Empty runcontrol_wells = []No trigger (0 < 2)AC: No controls in run

Traceability to Existing Tests

RequirementJira TestsAutomation StatusConfig
REQ-RULES-WCAF-001BT-5248 (14 TVs)Automatedv2
REQ-RULES-WCAF-002BT-5248, BT-5300Automatedv2
REQ-RULES-WCAF-003BT-5300 (4 TVs)Automatedv2

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityRemediation
None-All requirements have existing test coverage--

Coverage Notes

  1. BT-5248 covers core WCAF detection with 14 test vectors including threshold evaluation and unknown mix exclusion
  2. BT-5300 covers error clearing scenarios with 4 test vectors for resolution behavior

All acceptance criteria from the SRS have corresponding test vectors. No gaps identified. Note: Both tests use v2 configs.