STD: WDCLSC Invert Sigmoid Rule (WDCLSCINVSIG)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-wdclsc-invert-sigmoid.md
Rule Name: WDCLSC_INVERT_SIGMOID_POS
Domain: RULES-WDCLSCINVSIG
Overview
This document specifies tests for the WDCLSC Invert Sigmoid rule using decision tables and test vectors. The rule validates CLS discrepancies between DXAI and machine classifications on Control wells while considering sigmoid curve patterns, with intelligent skip conditions to reduce false-positive discrepancy errors.
Rule Characteristics:
- Pure business logic (no UI)
- Sequential skip condition evaluation (min fluorescence -> sigmoid pattern -> max CT)
- Control well specific
- Configuration-driven thresholds
Test Method: TM-API (per Test Plan §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 rule has three sequential skip conditions, each with distinct triggering logic. Test vectors cover all condition combinations including boundary cases and error handling.
Coverage Summary
| REQ ID | Title | Conditions | Test Vectors | Coverage | Gaps |
|---|
| REQ-RULES-WDCLSCINVSIG-001 | Sigmoid Pattern Skip | 6 | 8 | 100% | None |
| REQ-RULES-WDCLSCINVSIG-002 | Maximum CT Skip | 5 | 7 | 100% | None |
| REQ-RULES-WDCLSCINVSIG-003 | Minimum Fluorescence Skip | 4 | 6 | 100% | None |
Totals: 3 REQs, 15 Conditions, 21 Test Vectors, 100% Coverage
| Variable | Type | Valid Values | Description |
|---|
obs.readings | array | float[], empty | Fluorescence readings over amplification cycles |
obs.max_reading | float | numeric | Maximum value from readings array |
obs.sigmoid_pattern | string | downward, upward, undetermined | Detected sigmoid curve pattern |
obs.final_cls | string | positive, negative | Final classification result |
obs.final_ct | float | numeric, null | Final cycle threshold value |
config.minimum_fluorescence_to_positive | float | numeric, missing | Min fluorescence threshold for rule execution |
config.max_ct_for_cls_discrepancy | float? | numeric, null | Max CT above which discrepancy is skipped |
Output Variables
| Variable | Type | Description |
|---|
rule_skipped | bool | Rule did not execute (min fluorescence not met) |
discrepancy_error_assigned | bool | CLS discrepancy error was assigned to observation |
REQ-RULES-WDCLSCINVSIG-003: Minimum Fluorescence Skip
This requirement is evaluated FIRST in execution order. When the maximum reading is below the threshold, the entire rule is skipped.
Decision Table: Threshold Comparison
| TV | max_reading | min_fluor_config | rule_skipped | Covers |
|---|
| TV-003-001 | 99 | 100 | true | AC: Below threshold - skip rule |
| TV-003-002 | 100 | 100 | false | AC: At threshold - execute rule (boundary) |
| TV-003-003 | 101 | 100 | false | AC: Above threshold - execute rule |
Decision Table: Error Handling
| TV | readings | min_fluor_config | rule_skipped | Covers |
|---|
| TV-003-004 | [] (empty) | 100 | true | AC: Empty readings - skip rule |
| TV-003-005 | [50, 75, 100] | missing | false | AC: Missing config - proceed with rule |
| TV-003-006 | [50, 75, 100] | 100 | false | AC: Normal case - max=100, threshold=100 |
REQ-RULES-WDCLSCINVSIG-001: Sigmoid Pattern Skip
This requirement is evaluated SECOND. When sigmoid pattern is downward AND final classification is negative, the discrepancy error is skipped.
Decision Table: Sigmoid + Classification Matrix
| TV | sigmoid_pattern | final_cls | discrepancy_error_assigned | Covers |
|---|
| TV-001-001 | downward | negative | false | AC: Skip - both conditions met |
| TV-001-002 | downward | positive | true | AC: Error - wrong classification |
| TV-001-003 | upward | negative | true | AC: Error - wrong pattern |
| TV-001-004 | upward | positive | true | AC: Error - neither skip condition |
Decision Table: Undetermined Pattern
| TV | sigmoid_pattern | final_cls | discrepancy_error_assigned | Covers |
|---|
| TV-001-005 | undetermined | negative | true | AC: Undetermined = no skip |
| TV-001-006 | undetermined | positive | true | AC: Undetermined = no skip |
Decision Table: Error Handling
| TV | readings | sigmoid_pattern | discrepancy_error_assigned | Covers |
|---|
| TV-001-007 | missing | N/A | (proceeds to CT check) | AC: Missing readings - skip sigmoid eval |
| TV-001-008 | [] (empty) | N/A | (proceeds to CT check) | AC: Empty readings - skip sigmoid eval |
REQ-RULES-WDCLSCINVSIG-002: Maximum CT Skip
This requirement is evaluated THIRD (after sigmoid check fails to skip). When final CT >= max threshold, the discrepancy error is skipped.
Decision Table: CT Threshold Comparison
| TV | max_ct_config | final_ct | discrepancy_error_assigned | Covers |
|---|
| TV-002-001 | 35 | 36 | false | AC: CT > threshold - skip error |
| TV-002-002 | 36 | 36 | false | AC: CT = threshold - skip error (boundary) |
| TV-002-003 | 37 | 36 | true | AC: CT < threshold - assign error |
Decision Table: Null Configuration
| TV | max_ct_config | final_ct | discrepancy_error_assigned | Covers |
|---|
| TV-002-004 | null | 36 | true | AC: Null config - no skip, assign error |
| TV-002-005 | null | 100 | true | AC: Null config - any CT assigns error |
Decision Table: Error Handling
| TV | max_ct_config | final_ct | discrepancy_error_assigned | Covers |
|---|
| TV-002-006 | 35 | invalid | true | AC: Invalid CT - log warning, assign error |
| TV-002-007 | missing | 36 | true | AC: Missing config - default behavior, assign error |
Combined Execution Order Test
This section verifies the sequential evaluation order: REQ-003 -> REQ-001 -> REQ-002.
Decision Table: Full Execution Flow
| TV | max_reading | min_fluor | sigmoid | final_cls | max_ct_cfg | final_ct | rule_skipped | error_assigned | Covers |
|---|
| TV-FLOW-001 | 50 | 100 | N/A | N/A | N/A | N/A | true | false | REQ-003: Rule skipped at fluorescence check |
| TV-FLOW-002 | 100 | 100 | downward | negative | 35 | 30 | false | false | REQ-001: Skipped at sigmoid check |
| TV-FLOW-003 | 100 | 100 | upward | negative | 35 | 36 | false | false | REQ-002: Skipped at CT check |
| TV-FLOW-004 | 100 | 100 | upward | negative | 37 | 36 | false | true | All checks pass - error assigned |
| TV-FLOW-005 | 100 | 100 | upward | positive | null | 36 | false | true | All checks pass - error assigned |
Traceability to Existing Tests
| Requirement | Jira Tests | Automation Status |
|---|
| REQ-RULES-WDCLSCINVSIG-001 | BT-5220 | Automated |
| REQ-RULES-WDCLSCINVSIG-002 | BT-5237 | Automated |
| REQ-RULES-WDCLSCINVSIG-003 | Pending | Gap |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| GAP-001 | REQ-RULES-WDCLSCINVSIG-003 | No Jira test ticket for minimum fluorescence skip | High | TBD |
- GAP-001: Create test ticket covering TV-003-001 through TV-003-006 for minimum fluorescence threshold validation