Skip to main content
Version: 3.0.1

STD: CC Rule (BCC - Curve Control)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-cc.md Rule Name: BCC (Curve Control) Domain: RULES-CC


Overview

This document specifies tests for the BCC (Curve Control) rule using decision tables and test vectors. The rule validates that positive classifications have CT values within configured control range bounds, with explicit error handling for missing configuration.

Rule Characteristics:

  • Pure business logic (no UI)
  • Sequential validation (config check → classification check → CT bounds check)
  • Dual-level error application (well and target)
  • Explicit failure on missing configuration

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. This format enables exhaustive condition coverage while remaining concise and auditable.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-CC-001Validate Curve Control via Classification and CT Bounds612100%None
REQ-RULES-CC-002Set Error When Control Range Configuration Missing34100%None

Totals: 2 REQs, 9 Conditions, 16 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
config.existsbooltrue, falseControl range settings exist for role-to-target mapping
config.upper_boundfloatnumericMaximum acceptable CT value
config.lower_boundfloatnumericMinimum acceptable CT value
obs.classificationstringPositive, NegativeObservation classification result
obs.ctfloatnumericObservation CT (Cycle Threshold) value
obs.role_to_target_mappingstringanyLinks observation to control range settings

Output Variables

VariableTypeDescription
well.error_codestring?Error code set on well (null if pass)
target.error_codestring?Error code set on target (null if pass)
rule.passedboolWhether the rule passed validation

REQ-RULES-CC-001: Validate Curve Control via Classification and CT Bounds

Acceptance Criteria Summary

AC IDDescription
AC-001-AValidation sequence: classification check → upper bound check → lower bound check
AC-001-BNegative classification fails with FAILED_POS error codes
AC-001-CCT > upper bound fails with CONTROL_OUT_OF_RANGE_HIGH error codes
AC-001-DCT < lower bound fails with CONTROL_OUT_OF_RANGE_LOW error codes
AC-001-ECT bounds check uses inclusive comparison (>= lower AND <= upper)
AC-001-FPass when classification is positive AND CT is within bounds
AC-001-GError codes applied at both well (_WELL) and target (_TARGET) levels

Decision Table: Classification Check

TVclassificationwell_errortarget_errorpassedCovers
TV-001-001NegativeFAILED_POS_WELLFAILED_POS_TARGETfalseAC-001-B, AC-001-G
TV-001-002Positive(proceed to CT check)(proceed to CT check)(depends)AC-001-A

Decision Table: CT Upper Bound Check

Precondition: classification = Positive, config.exists = true

TVctupper_boundwell_errortarget_errorpassedCovers
TV-001-0033530CONTROL_OUT_OF_RANGE_HIGH_WELLCONTROL_OUT_OF_RANGE_HIGH_TARGETfalseAC-001-C, AC-001-G
TV-001-0043030nullnull(proceed)AC-001-E (boundary inclusive)
TV-001-0052930nullnull(proceed)AC-001-A

Decision Table: CT Lower Bound Check

Precondition: classification = Positive, config.exists = true, CT <= upper_bound

TVctlower_boundwell_errortarget_errorpassedCovers
TV-001-0061520CONTROL_OUT_OF_RANGE_LOW_WELLCONTROL_OUT_OF_RANGE_LOW_TARGETfalseAC-001-D, AC-001-G
TV-001-0072020nullnulltrueAC-001-E (boundary inclusive)
TV-001-0082120nullnulltrueAC-001-F

Decision Table: Complete Validation Scenarios

TVclassificationctlower_boundupper_boundwell_errortarget_errorpassedCovers
TV-001-009Negative252030FAILED_POS_WELLFAILED_POS_TARGETfalseAC-001-B: Classification checked first
TV-001-010Positive352030CONTROL_OUT_OF_RANGE_HIGH_WELLCONTROL_OUT_OF_RANGE_HIGH_TARGETfalseAC-001-C: CT above upper
TV-001-011Positive152030CONTROL_OUT_OF_RANGE_LOW_WELLCONTROL_OUT_OF_RANGE_LOW_TARGETfalseAC-001-D: CT below lower
TV-001-012Positive252030nullnulltrueAC-001-F: All conditions pass

REQ-RULES-CC-002: Set Error When Control Range Configuration Missing

Acceptance Criteria Summary

AC IDDescription
AC-002-AControl range settings keyed by role-to-target mapping
AC-002-BCC_LIMITS_MISSED error set when no matching config for observation's mapping
AC-002-CError set regardless of classification status
AC-002-DRule shall not attempt CT bound validation when config missing
AC-002-ERule explicitly fails (no defaults or silent pass)

Decision Table: Missing Configuration

TVconfig.existsobs.role_to_target_mappingclassificationwell_errorct_validation_attemptedpassedCovers
TV-002-001falsemap_BPositiveCC_LIMITS_MISSEDfalsefalseAC-002-B, AC-002-C, AC-002-D
TV-002-002falsemap_BNegativeCC_LIMITS_MISSEDfalsefalseAC-002-C: Error regardless of classification
TV-002-003truemap_APositivenulltrue(depends)AC-002-A: Config matched, proceed normally
TV-002-004truemap_ANegativeFAILED_POS_WELLtruefalseNormal flow when config exists

Decision Table: Configuration Lookup Priority

Validates that missing config check happens before any other validation.

TVconfig.existsclassificationctexpected_errorCovers
TV-002-005falsePositive25 (valid)CC_LIMITS_MISSEDAC-002-D: Config checked first
TV-002-006falsePositive100 (invalid)CC_LIMITS_MISSEDAC-002-E: No CT check attempted

Traceability to Existing Tests

RequirementJira TestsAutomation Status
REQ-RULES-CC-001BT-1333, BT-2119Automated
REQ-RULES-CC-002BT-4167Automated

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All acceptance criteria covered by test vectors--

Boundary Value Analysis

BoundaryTest VectorsStatus
CT = upper_bound (inclusive)TV-001-004Covered
CT = lower_bound (inclusive)TV-001-007Covered
CT = upper_bound + 1TV-001-003Covered
CT = lower_bound - 1TV-001-006Covered