Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-amb.md
Rule Name: AMB
Domain: RULES-AMB
Overview
This document specifies tests for the AMB rule using decision tables and test vectors. The rule processes observations with ambiguous (Amb) classification results by assigning the CLASSIFICATION problem, displaying visual indicators, and enabling resolution through structured resolution codes.
Rule Characteristics:
- Operates at observation level (not well level)
- Three resolution code variants (AMB,SETPOS / AMB,SETNEG / AMB)
- Manual resolution prohibited
- Visual flagging for user awareness
Test Method: TM-API (per Test Plan - 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. Visual flagging (REQ-RULES-AMB-002) requires TM-UI verification for display aspects.
Coverage Summary
| REQ ID | Title | Conditions | Test Vectors | Coverage | Gaps | Automation Status |
|---|
| REQ-RULES-AMB-001 | Problem Assignment | 4 | 4 | 100% | None | Automated |
| REQ-RULES-AMB-002 | Visual Flagging | 3 | 3 | 100% | None | Automated |
| REQ-RULES-AMB-003 | Resolution Processing | 8 | 8 | 100% | None | Automated |
| REQ-RULES-AMB-004 | Manual Resolution Constraint | 2 | 2 | 100% | None | Automated |
Totals: 4 REQs, 17 Conditions, 17 Test Vectors, 100% Coverage
REQ-RULES-AMB-001: Problem Assignment
| Variable | Type | Valid Values | Description |
|---|
obs.final_cls | string | Pos, Neg, Amb | Observation classification |
well.observations | array | [...] | Observations in the well |
config.preferred_provider | string | dxai | Rule provider |
Output Variables
| Variable | Type | Description |
|---|
obs.problem | string? | Problem flag (CLASSIFICATION or null) |
well.outcome | string? | Well-level outcome (should remain unset) |
Decision Table: AMB Detection and Problem Assignment
| TV | obs.final_cls | expected obs.problem | expected well.outcome | Covers |
|---|
| TV-AMB-001-001 | Amb | CLASSIFICATION | null | AC: AMB observation gets CLASSIFICATION problem |
| TV-AMB-001-002 | Pos | null | null | AC: Non-AMB observation skipped |
| TV-AMB-001-003 | Neg | null | null | AC: Non-AMB observation skipped |
| TV-AMB-001-004 | Amb | CLASSIFICATION | null | AC: Well outcome not set for AMB |
Notes:
- TV-AMB-001-001 and TV-AMB-001-004 verify the same positive case but emphasize different acceptance criteria
- Each observation is processed independently within the well
REQ-RULES-AMB-002: Visual Flagging
| Variable | Type | Valid Values | Description |
|---|
obs.final_cls | string | Amb | Observation classification |
user.role | string | Client Admin, Junior User, ... | User role |
Output Variables
| Variable | Type | Description |
|---|
obs.display_flagged | bool | Visual flag displayed |
Decision Table: Visual Flag Display
| TV | obs.final_cls | user.role | expected display_flagged | Covers |
|---|
| TV-AMB-002-001 | Amb | Client Admin | true | AC: AMB flagged for Client Admin |
| TV-AMB-002-002 | Amb | Junior User | true | AC: AMB flagged for Junior User |
| TV-AMB-002-003 | Pos | Client Admin | false | AC: Non-AMB not flagged |
Notes:
- Visual flagging verification requires TM-UI for display confirmation
- Flag displayed as red indicator per UI Notes
REQ-RULES-AMB-003: Resolution Processing
| Variable | Type | Valid Values | Description |
|---|
well.error_code | string | AMB, null | Well error code |
well.resolution_codes | string | AMB,SETPOS / AMB,SETNEG / AMB / null | Resolution code applied |
obs.final_cls | string | Amb | Observation classification (pre-resolution) |
obs.problems | array | [CLASSIFICATION] | Observation problems (pre-resolution) |
Output Variables
| Variable | Type | Description |
|---|
well.error_code | string? | Well error code (post-resolution) |
obs.final_cls | string | Observation classification (post-resolution) |
obs.problems | array | Observation problems (post-resolution) |
Decision Table: Resolution Code Processing
| TV | well.resolution_codes | obs.final_cls (input) | expected obs.final_cls | expected well.error_code | expected obs.problems | Covers |
|---|
| TV-AMB-003-001 | AMB,SETPOS | Amb | Pos | null | [] | AC: SETPOS changes to Positive |
| TV-AMB-003-002 | AMB,SETNEG | Amb | Neg | null | [] | AC: SETNEG changes to Negative |
| TV-AMB-003-003 | AMB | Amb | Amb | null | [] | AC: AMB clears error, keeps Amb |
| TV-AMB-003-004 | null | Amb | Amb | AMB | [CLASSIFICATION] | AC: No resolution leaves flagged |
Decision Table: Non-AMB Observation Isolation
| TV | obs.final_cls (input) | well.resolution_codes | other_obs.final_cls (input) | expected other_obs.final_cls | Covers |
|---|
| TV-AMB-003-005 | Amb | AMB,SETNEG | Pos | Pos | AC: Non-AMB obs preserved |
| TV-AMB-003-006 | Amb | AMB,SETPOS | Neg | Neg | AC: Non-AMB obs preserved |
Decision Table: Invalid Resolution Handling
| TV | well.resolution_codes | obs.final_cls (input) | expected obs.final_cls | expected state | Covers |
|---|
| TV-AMB-003-007 | INVALID_CODE | Amb | Amb | unchanged | AC: Invalid code rejected |
| TV-AMB-003-008 | AMB,SETPOS | Pos | Pos | unchanged | AC: Non-AMB obs not processed |
REQ-RULES-AMB-004: Manual Resolution Constraint
| Variable | Type | Valid Values | Description |
|---|
obs.problems | array | [CLASSIFICATION] | AMB-flagged observation |
resolution_method | string | manual, resolution_code | How resolution is attempted |
Output Variables
| Variable | Type | Description |
|---|
resolution_allowed | bool | Whether resolution is permitted |
Decision Table: Manual Resolution Prevention
| TV | obs.problems | resolution_method | expected resolution_allowed | Covers |
|---|
| TV-AMB-004-001 | [CLASSIFICATION] | manual | false | AC: Manual entry rejected |
| TV-AMB-004-002 | [CLASSIFICATION] | resolution_code | true | AC: Resolution code permitted |
Notes:
- UI affordance for prevention TBD per OQ-01 in SRS
- System shall reject manual resolution attempts
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|
| REQ-RULES-AMB-001 | BT-3880 | Existing |
| REQ-RULES-AMB-002 | Pending | Gap |
| REQ-RULES-AMB-003 | Pending | Gap |
| REQ-RULES-AMB-004 | Pending | Gap |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| GAP-001 | REQ-RULES-AMB-002 | No Jira test ticket for visual flagging | Medium | TBD |
| GAP-002 | REQ-RULES-AMB-003 | No Jira test ticket for resolution processing | High | TBD |
| GAP-003 | REQ-RULES-AMB-004 | No Jira test ticket for manual resolution constraint | High | TBD |
- GAP-001: Create test ticket covering TV-AMB-002-001 through TV-AMB-002-003 (TM-UI required)
- GAP-002: Create test ticket covering TV-AMB-003-001 through TV-AMB-003-008
- GAP-003: Create test ticket covering TV-AMB-004-001 through TV-AMB-004-002