STD: Manual Baseline Check Rule (BASELINE)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-baseline-check.md
Rule Name: MANUAL_BASELINE
Domain: RULES-BASELINE
Overview
This document specifies tests for the Manual Baseline Check rule using decision tables and test vectors. The rule evaluates run targets to determine if automatic baseline checking is enabled, applying error codes when manual baseline intervention is required.
Rule Characteristics:
- Pure business logic (no UI)
- Single boolean condition per target
- Dual-level error application (well and target)
- Independent target evaluation
Test Method: TM-API (per Test Plan Section 3.3 - Rules use automated API tests)
Automation Status: Automated
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-BASELINE-001 | Well-Level Error Application | 4 | 8 | 100% | None |
| REQ-RULES-BASELINE-002 | Target-Level Error Application | 4 | 6 | 100% | None |
Totals: 2 REQs, 8 Conditions, 14 Test Vectors, 100% Coverage
| Variable | Type | Valid Values | Description |
|---|
run_target.automatic_baseline_check | boolean | true, false | Whether automatic baseline checking is enabled for the target |
well.observation.run_target | reference | Run Target entity | The run target associated with a well via observation |
Output Variables
| Variable | Type | Description |
|---|
well.error_code | string | MANUAL_BASELINE_CHECK_WELL when condition met |
run_target.error_code | string | MANUAL_BASELINE_CHECK_TARGET when condition met |
REQ-RULES-BASELINE-001: Well-Level Error Application
Decision Table: Single Target - Well Error Application
| TV | automatic_baseline_check | well_error_applied | error_code | Covers |
|---|
| TV-001-001 | true | false | null | AC: Baseline enabled - no error |
| TV-001-002 | false | true | MANUAL_BASELINE_CHECK_WELL | AC: Baseline disabled - error applied |
Decision Table: Multiple Wells - Same Target
| TV | automatic_baseline_check | wells | well_A1_error | well_A2_error | Covers |
|---|
| TV-001-003 | true | [A1, A2] | false | false | AC: No wells receive error when enabled |
| TV-001-004 | false | [A1, A2] | true | true | AC: All wells receive error when disabled |
Decision Table: Multiple Targets - Well Independence
| TV | target_A.auto_baseline | target_B.auto_baseline | well_A1 (Target A) | well_A2 (Target A) | well_A3 (Target B) | Covers |
|---|
| TV-001-005 | false | true | MANUAL_BASELINE_CHECK_WELL | MANUAL_BASELINE_CHECK_WELL | null | AC: Wells evaluated per target setting |
| TV-001-006 | true | false | null | null | MANUAL_BASELINE_CHECK_WELL | AC: Independence - only affected target's wells |
| TV-001-007 | false | false | MANUAL_BASELINE_CHECK_WELL | MANUAL_BASELINE_CHECK_WELL | MANUAL_BASELINE_CHECK_WELL | AC: All wells when both disabled |
| TV-001-008 | true | true | null | null | null | AC: No wells when both enabled |
REQ-RULES-BASELINE-002: Target-Level Error Application
Decision Table: Single Target - Target Error Application
| TV | automatic_baseline_check | target_error_applied | error_code | Covers |
|---|
| TV-002-001 | true | false | null | AC: Baseline enabled - no error |
| TV-002-002 | false | true | MANUAL_BASELINE_CHECK_TARGET | AC: Baseline disabled - error applied |
Decision Table: Multiple Targets - Independence
| TV | target_A.auto_baseline | target_B.auto_baseline | target_A_error | target_B_error | Covers |
|---|
| TV-002-003 | false | true | MANUAL_BASELINE_CHECK_TARGET | null | AC: Selective error - A disabled |
| TV-002-004 | true | false | null | MANUAL_BASELINE_CHECK_TARGET | AC: Selective error - B disabled |
| TV-002-005 | false | false | MANUAL_BASELINE_CHECK_TARGET | MANUAL_BASELINE_CHECK_TARGET | AC: Both receive error when disabled |
| TV-002-006 | true | true | null | null | AC: Neither receives error when enabled |
Combined Scenarios
Decision Table: Coordinated Well and Target Errors
Verifies that REQ-RULES-BASELINE-001 and REQ-RULES-BASELINE-002 fire together when condition is met.
| TV | automatic_baseline_check | target_error | well_error (all associated wells) | Covers |
|---|
| TV-CMB-001 | false | MANUAL_BASELINE_CHECK_TARGET | MANUAL_BASELINE_CHECK_WELL | REQ-001 + REQ-002: Both errors applied together |
| TV-CMB-002 | true | null | null | REQ-001 + REQ-002: Neither error applied |
Boundary and Edge Cases
Decision Table: Edge Cases
| TV | Scenario | automatic_baseline_check | Expected Behavior | Covers |
|---|
| TV-EDGE-001 | Target with no associated wells | false | Target error applied, no well errors (no wells to error) | AC: Error applied at target level regardless of wells |
| TV-EDGE-002 | Well with multiple observations to same target | false | Well receives error once | AC: Error idempotency |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|
| REQ-RULES-BASELINE-001 | BT-4093 | Existing |
| REQ-RULES-BASELINE-002 | BT-4093 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Coverage Notes
- The MANUAL_BASELINE rule has straightforward boolean logic with complete coverage
- Existing Jira test BT-4093 covers the rule regression testing
- Edge cases (TV-EDGE-001, TV-EDGE-002) verify implementation robustness