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 ID | Title | Conditions | Test Vectors | Coverage | Gaps |
|---|
| REQ-RULES-NEGSIGMOID-001 | Validate Negative Well Sigmoid Pattern | 4 | 6 | 100% | None |
| REQ-RULES-NEGSIGMOID-002 | Skip Rule When Resolution Code Applied | 2 | 2 | 100% | None |
| REQ-RULES-NEGSIGMOID-003 | Skip Rule When Manual Classification Present | 2 | 2 | 100% | None |
Totals: 3 REQs, 8 Conditions, 10 Test Vectors, 100% Coverage
| Variable | Type | Valid Values | Description |
|---|
well.final_classification | enum | Positive, Negative | Final classification assigned to the well |
well.sigmoid_pattern | enum | Upward, Downward, None | Detected sigmoid curve pattern from readings |
well.resolution_code | string? | null, NEGATIVE_SIGMOID, ... | Resolution code applied to the well |
well.manual_classification | enum? | null, Positive, Negative | Manual classification override, if any |
well.readings | array? | [], [...] | Well readings data (null/empty triggers skip) |
Output Variables
| Variable | Type | Description |
|---|
well.error_code | string? | INCORRECT_NEGATIVE_SIGMOID if rule triggers, null otherwise |
target.error_code | string? | INCORRECT_NEGATIVE_SIGMOID_TARGET if rule triggers, null otherwise |
rule.applied | bool | Whether 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.
| TV | final_classification | sigmoid_pattern | well.error_code | target.error_code | Covers |
|---|
| TV-001-001 | Negative | Upward | INCORRECT_NEGATIVE_SIGMOID | INCORRECT_NEGATIVE_SIGMOID_TARGET | AC: Upward sigmoid + Negative = error assigned |
| TV-001-002 | Positive | Upward | null | null | AC: Positive classification = no error (regardless of pattern) |
| TV-001-003 | Negative | Downward | null | null | AC: Downward sigmoid = no error (valid pattern for negative) |
| TV-001-004 | Positive | Downward | null | null | AC: Positive + Downward = no error (not applicable) |
Decision Table: Error Handling (Missing Data)
| TV | readings | final_classification | rule.applied | Covers |
|---|
| TV-001-005 | null/empty | Negative | false | AC: Missing readings = skip validation |
| TV-001-006 | [...] | null | false | AC: 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).
| TV | resolution_code | well.error_code | target.error_code | Covers |
|---|
| TV-002-001 | NEGATIVE_SIGMOID | null | null | AC: Resolution applied = skip, no error |
| TV-002-002 | null | INCORRECT_NEGATIVE_SIGMOID | INCORRECT_NEGATIVE_SIGMOID_TARGET | AC: 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).
| TV | manual_classification | well.error_code | target.error_code | Covers |
|---|
| TV-003-001 | Negative (any value) | null | null | AC: Manual classification present = skip, no error |
| TV-003-002 | null | INCORRECT_NEGATIVE_SIGMOID | INCORRECT_NEGATIVE_SIGMOID_TARGET | AC: No manual classification = rule triggers |
Combined Condition Matrix
The following matrix shows the complete evaluation priority when multiple conditions are present.
| TV | final_cls | sigmoid | resolution_code | manual_cls | error_assigned | Reason |
|---|
| TV-COMB-001 | Positive | Upward | null | null | No | Classification filter (REQ-001) |
| TV-COMB-002 | Negative | Downward | null | null | No | Pattern filter (REQ-001) |
| TV-COMB-003 | Negative | Upward | NEGATIVE_SIGMOID | null | No | Resolution skip (REQ-002) |
| TV-COMB-004 | Negative | Upward | null | Negative | No | Manual skip (REQ-003) |
| TV-COMB-005 | Negative | Upward | NEGATIVE_SIGMOID | Negative | No | Both skips present |
| TV-COMB-006 | Negative | Upward | null | null | Yes | All conditions met |
Rule Identity Verification
| TV | Property | Expected Value | Covers |
|---|
| TV-ID-001 | Rule name | NEGATIVE_SIGMOID | AC: Rule identity |
| TV-ID-002 | Well error code | INCORRECT_NEGATIVE_SIGMOID | AC: Well-level error code identity |
| TV-ID-003 | Target error code | INCORRECT_NEGATIVE_SIGMOID_TARGET | AC: Target-level error code identity |
Traceability to SRS Test Scenarios
| SRS Test ID | STD Test Vector | Coverage |
|---|
| NEGSIGMOID-001 | TV-001-001 | Error for Upward Sigmoid with Negative Classification |
| NEGSIGMOID-002 | TV-001-002 | No Error for Upward Sigmoid with Positive Classification |
| NEGSIGMOID-003 | TV-001-003 | No Error for Downward Sigmoid with Negative Classification |
| NEGSIGMOID-004 | TV-001-004 | No Error for Downward Sigmoid with Positive Classification |
| NEGSIGMOID-005 | TV-002-001 | Skip When Resolution Applied |
| NEGSIGMOID-006 | TV-003-001 | Skip When Manual Classification Present |
Traceability to Existing Tests
| Requirement | Jira Tests | Automation Status |
|---|
| REQ-RULES-NEGSIGMOID-001 | BT-5020 | Automated |
| REQ-RULES-NEGSIGMOID-002 | BT-5020 | Automated |
| REQ-RULES-NEGSIGMOID-003 | BT-5020 | Automated |
Supplementary Gap-Fill Tests
| TC | Description | Covers |
|---|
| TC-NEGSIGMOID-COMP-003 | Resolution code NEGATIVE_SIGMOID suppresses error (composite coverage) | Combined TV-002-001 + resolution bypass |
| TC-NEGSIGMOID-COMP-005 | Both resolution code and manual classification suppress error (duplicate coverage) | Combined TV-002-001 + TV-003-001 |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| 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