Skip to main content
Version: Next

STD: Negative Sigmoid Rule (NEGSIGMOID)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-negative-sigmoid.md Rule Name: NEGATIVE_SIGMOID Domain: RULES-NEGSIGMOID


Overview

This document specifies tests for the Negative Sigmoid rule using decision tables and test vectors. The rule validates sigmoid curve patterns for wells with negative final classifications, flagging wells that exhibit upward sigmoid patterns (characteristic of positive amplification) as having invalid behavior.

Rule Characteristics:

  • Pure business logic (no UI)
  • Binary pattern classification (upward/downward sigmoid)
  • Two skip conditions (resolution code, manual classification)
  • Dual error code assignment (well-level and target-level)

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-NEGSIGMOID-001Validate Negative Well Sigmoid Pattern46100%None
REQ-RULES-NEGSIGMOID-002Skip Rule When Resolution Code Applied22100%None
REQ-RULES-NEGSIGMOID-003Skip Rule When Manual Classification Present22100%None

Totals: 3 REQs, 8 Conditions, 10 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
well.final_classificationenumPositive, NegativeFinal classification assigned to the well
well.sigmoid_patternenumUpward, Downward, NoneDetected sigmoid curve pattern from readings
well.resolution_codestring?null, NEGATIVE_SIGMOID, ...Resolution code applied to the well
well.manual_classificationenum?null, Positive, NegativeManual classification override, if any
well.readingsarray?[], [...]Well readings data (null/empty triggers skip)

Output Variables

VariableTypeDescription
well.error_codestring?INCORRECT_NEGATIVE_SIGMOID if rule triggers, null otherwise
target.error_codestring?INCORRECT_NEGATIVE_SIGMOID_TARGET if rule triggers, null otherwise
rule.appliedboolWhether the rule executed (vs skipped)

REQ-RULES-NEGSIGMOID-001: Validate Negative Well Sigmoid Pattern

Decision Table: Core Validation Logic

This table covers all combinations of classification and sigmoid pattern, determining when error codes are assigned.

TVfinal_classificationsigmoid_patternwell.error_codetarget.error_codeCovers
TV-001-001NegativeUpwardINCORRECT_NEGATIVE_SIGMOIDINCORRECT_NEGATIVE_SIGMOID_TARGETAC: Upward sigmoid + Negative = error assigned
TV-001-002PositiveUpwardnullnullAC: Positive classification = no error (regardless of pattern)
TV-001-003NegativeDownwardnullnullAC: Downward sigmoid = no error (valid pattern for negative)
TV-001-004PositiveDownwardnullnullAC: Positive + Downward = no error (not applicable)

Decision Table: Error Handling (Missing Data)

TVreadingsfinal_classificationrule.appliedCovers
TV-001-005null/emptyNegativefalseAC: Missing readings = skip validation
TV-001-006[...]nullfalseAC: Missing classification = skip validation

REQ-RULES-NEGSIGMOID-002: Skip Rule When Resolution Code Applied

Decision Table: Resolution Code Bypass

This table verifies the resolution code skip behavior. Base condition assumes upward sigmoid + negative classification (would normally trigger).

TVresolution_codewell.error_codetarget.error_codeCovers
TV-002-001NEGATIVE_SIGMOIDnullnullAC: Resolution applied = skip, no error
TV-002-002nullINCORRECT_NEGATIVE_SIGMOIDINCORRECT_NEGATIVE_SIGMOID_TARGETAC: No resolution = rule triggers

REQ-RULES-NEGSIGMOID-003: Skip Rule When Manual Classification Present

Decision Table: Manual Classification Bypass

This table verifies the manual classification skip behavior. Base condition assumes upward sigmoid + negative classification (would normally trigger).

TVmanual_classificationwell.error_codetarget.error_codeCovers
TV-003-001Negative (any value)nullnullAC: Manual classification present = skip, no error
TV-003-002nullINCORRECT_NEGATIVE_SIGMOIDINCORRECT_NEGATIVE_SIGMOID_TARGETAC: No manual classification = rule triggers

Combined Condition Matrix

The following matrix shows the complete evaluation priority when multiple conditions are present.

TVfinal_clssigmoidresolution_codemanual_clserror_assignedReason
TV-COMB-001PositiveUpwardnullnullNoClassification filter (REQ-001)
TV-COMB-002NegativeDownwardnullnullNoPattern filter (REQ-001)
TV-COMB-003NegativeUpwardNEGATIVE_SIGMOIDnullNoResolution skip (REQ-002)
TV-COMB-004NegativeUpwardnullNegativeNoManual skip (REQ-003)
TV-COMB-005NegativeUpwardNEGATIVE_SIGMOIDNegativeNoBoth skips present
TV-COMB-006NegativeUpwardnullnullYesAll conditions met

Rule Identity Verification

TVPropertyExpected ValueCovers
TV-ID-001Rule nameNEGATIVE_SIGMOIDAC: Rule identity
TV-ID-002Well error codeINCORRECT_NEGATIVE_SIGMOIDAC: Well-level error code identity
TV-ID-003Target error codeINCORRECT_NEGATIVE_SIGMOID_TARGETAC: Target-level error code identity

Traceability to SRS Test Scenarios

SRS Test IDSTD Test VectorCoverage
NEGSIGMOID-001TV-001-001Error for Upward Sigmoid with Negative Classification
NEGSIGMOID-002TV-001-002No Error for Upward Sigmoid with Positive Classification
NEGSIGMOID-003TV-001-003No Error for Downward Sigmoid with Negative Classification
NEGSIGMOID-004TV-001-004No Error for Downward Sigmoid with Positive Classification
NEGSIGMOID-005TV-002-001Skip When Resolution Applied
NEGSIGMOID-006TV-003-001Skip When Manual Classification Present

Traceability to Existing Tests

RequirementJira TestsAutomation Status
REQ-RULES-NEGSIGMOID-001BT-5020Automated
REQ-RULES-NEGSIGMOID-002BT-5020Automated
REQ-RULES-NEGSIGMOID-003BT-5020Automated

Supplementary Gap-Fill Tests

TCDescriptionCovers
TC-NEGSIGMOID-COMP-003Resolution code NEGATIVE_SIGMOID suppresses error (composite coverage)Combined TV-002-001 + resolution bypass
TC-NEGSIGMOID-COMP-005Both resolution code and manual classification suppress error (duplicate coverage)Combined TV-002-001 + TV-003-001

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All test vectors have corresponding Jira test coverage--

Notes

  • All requirements are covered by the existing test ticket BT-5020
  • Rule is part of the sigmoid rule separation (BT-5015 Epic)
  • Companion rule POSITIVE_SIGMOID has separate STD