Skip to main content
Version: Next

STD: WDCLSC Rule (Well Discrepant Classification Control)

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


Overview

This document specifies tests for the WDCLSC rule using decision tables and test vectors. The rule detects classification discrepancies between pcr.ai and machine classification on control wells.

Rule Characteristics:

  • Pure business logic (no UI)
  • Sequential evaluation (fluorescence check, then CT check, then comparison)
  • Two exemption/skip conditions with specific boundary behaviors
  • Applies only to control wells

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. The evaluation order (fluorescence first, CT second, comparison last) is tested through combined condition scenarios.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-WDCLSC-001Core Classification Discrepancy Detection46100%None
REQ-RULES-WDCLSC-002Max CT Threshold Exemption56100%None
REQ-RULES-WDCLSC-003Minimum Fluorescence Skip Condition34100%None

Totals: 3 REQs, 12 Conditions, 16 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
well.typestringControl, Sample, NEC, PECWell designation type
obs.pcraiClsstringPositive, Negative, Ambiguouspcr.ai classification result
obs.machineClsstringPositive, Negative, AmbiguousMachine classification result
obs.final_ctfloatnumericFinal cycle threshold value
obs.readingsarray[float, ...]Fluorescence readings array
target.max_ct_for_cls_discrepancyfloat?null, numericMax CT threshold for exemption
target.minimum_fluorescence_to_positivefloatnumericMinimum fluorescence threshold

Output Variables

VariableTypeDescription
rule.executedboolWhether the rule was evaluated (not skipped)
well.discrepancy_errorboolWhether discrepancy error was applied

REQ-RULES-WDCLSC-001: Core Classification Discrepancy Detection

Acceptance Criteria Mapping

AC IDAcceptance CriteriaTest Vectors
AC-001-1Rule applies only to Control wellsTV-001-001, TV-001-002
AC-001-2When pcr.ai differs from machine, apply discrepancy errorTV-001-003, TV-001-004
AC-001-3When pcr.ai matches machine, no discrepancy errorTV-001-005, TV-001-006

Decision Table: Well Type Scope

TVwell.typerule_appliesCovers
TV-001-001ControltrueAC-001-1: Control wells in scope
TV-001-002SamplefalseAC-001-1: Non-control wells out of scope

Decision Table: Classification Comparison

Preconditions: well.type = Control, no skip/exemption conditions apply

TVobs.pcraiClsobs.machineClsdiscrepancy_errorCovers
TV-001-003PositiveNegativetrueAC-001-2: Classifications differ
TV-001-004NegativePositivetrueAC-001-2: Classifications differ (inverse)
TV-001-005PositivePositivefalseAC-001-3: Classifications match
TV-001-006NegativeNegativefalseAC-001-3: Classifications match

REQ-RULES-WDCLSC-002: Max CT Threshold Exemption

Acceptance Criteria Mapping

AC IDAcceptance CriteriaTest Vectors
AC-002-1Uses config parameter target.max_ct_for_cls_discrepancyTV-002-001 through TV-002-006
AC-002-2When config is null, exemption does not applyTV-002-001
AC-002-3final_ct > threshold: exempt (no error)TV-002-002
AC-002-4final_ct = threshold: exempt (no error, boundary)TV-002-003
AC-002-5final_ct < threshold: exemption does not applyTV-002-004

Decision Table: Max CT Exemption

Preconditions: well.type = Control, max(readings) >= minimum_fluorescence_to_positive, classifications differ

TVmax_ct_for_cls_discrepancyobs.final_ctexemptdiscrepancy_errorCovers
TV-002-001null36falsetrueAC-002-2: Config null, no exemption
TV-002-0023536truefalseAC-002-3: CT exceeds threshold
TV-002-0033636truefalseAC-002-4: CT equals threshold (boundary)
TV-002-0043736falsetrueAC-002-5: CT below threshold
TV-002-0053535.001truefalseAC-002-3: CT marginally above
TV-002-0063534.999falsetrueAC-002-5: CT marginally below

REQ-RULES-WDCLSC-003: Minimum Fluorescence Skip Condition

Acceptance Criteria Mapping

AC IDAcceptance CriteriaTest Vectors
AC-003-1Uses config parameter target.minimum_fluorescence_to_positiveTV-003-001 through TV-003-004
AC-003-2max(readings) < threshold: rule skipped entirelyTV-003-001
AC-003-3max(readings) >= threshold: rule proceedsTV-003-002, TV-003-003

Decision Table: Minimum Fluorescence Skip

Preconditions: well.type = Control

TVminimum_fluorescence_to_positivemax(obs.readings)rule_executeddiscrepancy_errorCovers
TV-003-00110099falsefalseAC-003-2: Below threshold, skipped
TV-003-002100100truedepends on CLSAC-003-3: At threshold (boundary), proceeds
TV-003-003100101truedepends on CLSAC-003-3: Above threshold, proceeds
TV-003-00410050falsefalseAC-003-2: Well below threshold

Combined Scenario Testing

Decision Table: Evaluation Order Verification

These vectors verify that evaluation order is: fluorescence check first, then CT check, then classification comparison.

TVmax(readings)min_fluorfinal_ctmax_ct_cfgpcraiClsmachineClsrule_execerrorCovers
TV-CMB-001501003635PosNegfalsefalseFluor skip overrides CT exemption check
TV-CMB-0021501003635PosNegtruefalseCT exemption applies when fluor passes
TV-CMB-0031501003435PosNegtruetrueNo exemption, error applied
TV-CMB-00415010034nullPosPostruefalseCLS match, no error

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-WDCLSC-001PendingGap
REQ-RULES-WDCLSC-002BT-5229Existing
REQ-RULES-WDCLSC-003PendingGap

Automation Status

REQ IDStatusNotes
REQ-RULES-WDCLSC-001AutomatedCore rule logic
REQ-RULES-WDCLSC-002AutomatedCT exemption logic
REQ-RULES-WDCLSC-003AutomatedFluorescence skip logic

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
GAP-001REQ-RULES-WDCLSC-001No Jira test ticket for core discrepancy detectionHighTBD
GAP-002REQ-RULES-WDCLSC-003No Jira test ticket for minimum fluorescence skipMediumTBD

Remediation Plan

  1. GAP-001: Create test ticket covering TV-001-001 through TV-001-006
  2. GAP-002: Create test ticket covering TV-003-001 through TV-003-004