STD: Inhibition - Qualitative Rule (PICQUAL)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/rules/rule-inhibition-qualitative.mdRule Name: PICQUAL Domain: RULES-INHQUAL
Overview
This document specifies tests for the Inhibition - Qualitative (PICQUAL) rule using decision tables and test vectors. The rule evaluates qualitative sample wells for suspected inhibition by examining Internal Control (IC) cycle threshold values and assigns appropriate error codes based on sample test history.
Rule Characteristics:
- Pure business logic (no UI)
- Sequential condition evaluation (IC CT → non-IC CT → quantity bypass → repeat/first-run)
- Two distinct error codes based on sample history
- Configurable thresholds (IC CT = 35, Quantity Cutoff = 10,000)
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-INHQUAL-001 | Detect Inhibition in Qualitative Wells | 8 | 10 | 100% | None |
| REQ-RULES-INHQUAL-002 | Bypass Repeat Check When Quantity Meets Cutoff | 4 | 6 | 100% | None |
Totals: 2 REQs, 12 Conditions, 16 Test Vectors, 100% Coverage
Input Variables
| Variable | Type | Valid Values | Description |
|---|---|---|---|
obs.target | string | IC, Non-IC | Observation target type |
obs.ct | float | numeric (null if undetermined) | Cycle threshold value |
obs.classification | string | Pos, Neg, Amb, ... | Observation classification |
obs.quantity | float | numeric | Quantified value for observation |
sample.mix_tested_before | bool | true, false | Whether Sample/Mix combination has been tested previously |
config.ic_ct_threshold | int | 35 (default) | IC CT pass threshold |
config.cutoff | float | 10,000 (default) | CT cutoff for non-IC observations |
config.quantity_cutoff | float | 10,000 (default) | Quantity threshold for bypass |
Output Variables
| Variable | Type | Description |
|---|---|---|
error_code | string? | null, ICQUAL_INHN, or ICQUAL_FIRST_RUN |
repeat_testing_flag | bool | Whether sample is marked for repeat testing |
REQ-RULES-INHQUAL-001: Detect Inhibition in Qualitative Wells
Acceptance Criteria Summary
| AC ID | Condition | Expected Outcome |
|---|---|---|
| AC-01 | IC CT <= 35 | No error |
| AC-02 | IC CT > 35 AND non-IC CT < CutOff | No error |
| AC-03 | IC CT > 35 AND no non-IC CT < CutOff AND repeat sample | Error: ICQUAL_INHN |
| AC-04 | IC CT > 35 AND no non-IC CT < CutOff AND first run | Error: ICQUAL_FIRST_RUN |
| AC-05 | Rule mapped to IC target | Configuration validation |
| AC-06 | Evaluation order: IC CT → non-IC CT → repeat/first-run | Sequential processing |
Decision Table: IC CT Threshold Evaluation
| TV | ic_ct | expected_error | early_exit | Covers |
|---|---|---|---|---|
| TV-001-001 | 35 | null | true | AC-01: IC CT at threshold boundary (pass) |
| TV-001-002 | 34 | null | true | AC-01: IC CT below threshold (pass) |
| TV-001-003 | 36 | (continue) | false | AC-01: IC CT above threshold (fail, continue evaluation) |
| TV-001-004 | 0 | null | true | AC-01: IC CT minimum boundary (pass) |
Decision Table: Non-IC Amplification Check
Precondition: IC CT > 35
| TV | non_ic_ct | cutoff | expected_error | early_exit | Covers |
|---|---|---|---|---|---|
| TV-001-005 | 30 | 35 | null | true | AC-02: Non-IC CT below cutoff (pass) |
| TV-001-006 | 34.9 | 35 | null | true | AC-02: Non-IC CT just below cutoff (pass) |
| TV-001-007 | 35 | 35 | (continue) | false | AC-02: Non-IC CT at cutoff (fail, continue) |
| TV-001-008 | 40 | 35 | (continue) | false | AC-02: Non-IC CT above cutoff (fail, continue) |
Decision Table: Repeat/First-Run Error Assignment
Precondition: IC CT > 35 AND no non-IC CT < CutOff AND quantity < quantity_cutoff
| TV | mix_tested_before | expected_error | repeat_flag | Covers |
|---|---|---|---|---|
| TV-001-009 | true | ICQUAL_INHN | false | AC-03: Repeat sample inhibited |
| TV-001-010 | false | ICQUAL_FIRST_RUN | true | AC-04: First run inhibited |
Decision Table: Complete Flow (End-to-End)
| TV | ic_ct | non_ic_ct | quantity | qty_cutoff | mix_tested | expected_error | Covers |
|---|---|---|---|---|---|---|---|
| TV-001-011 | 35 | N/A | N/A | 10000 | N/A | null | AC-01: IC passes |
| TV-001-012 | 36 | 30 | N/A | 10000 | N/A | null | AC-02: Non-IC passes |
| TV-001-013 | 36 | 40 | 15000 | 10000 | N/A | null | AC (REQ-002): Quantity bypass |
| TV-001-014 | 36 | 40 | 5000 | 10000 | true | ICQUAL_INHN | AC-03: Repeat fails |
| TV-001-015 | 36 | 40 | 5000 | 10000 | false | ICQUAL_FIRST_RUN | AC-04: First run fails |
REQ-RULES-INHQUAL-002: Bypass Repeat Check When Quantity Meets Cutoff
This quantity bypass behavior belongs to the PICQUAL (qualitative inhibition) rule. Do not confuse it with PICQUANT (quantitative inhibition, see std-rule-inhibition-quantification.md), which has separate quantity-based evaluation logic. In PICQUAL, quantity >= cutoff bypasses the repeat/first-run check entirely (no error assigned); in PICQUANT, quantity evaluation serves a different purpose (evaluating quantitative sample inhibition).
Acceptance Criteria Summary
| AC ID | Condition | Expected Outcome |
|---|---|---|
| AC-01 | Quantity >= cutoff (10,000) | Skip repeat/first-run checks, no error |
| AC-02 | Quantity at boundary (10,000) | No error |
| AC-03 | Quantity above boundary (10,001) | No error |
| AC-04 | Default cutoff = 10,000 | Configuration validation |
Decision Table: Quantity Bypass Evaluation
Precondition: IC CT > 35 AND no non-IC CT < CutOff
| TV | quantity | quantity_cutoff | mix_tested_before | expected_error | Covers |
|---|---|---|---|---|---|
| TV-002-001 | 10000 | 10000 | true | null | AC-01, AC-02: Quantity at boundary (bypass) |
| TV-002-002 | 10000 | 10000 | false | null | AC-01, AC-02: Quantity at boundary (bypass, first run) |
| TV-002-003 | 10001 | 10000 | true | null | AC-01, AC-03: Quantity above boundary (bypass) |
| TV-002-004 | 10001 | 10000 | false | null | AC-01, AC-03: Quantity above boundary (bypass, first run) |
| TV-002-005 | 9999 | 10000 | true | ICQUAL_INHN | AC-01: Below cutoff, repeat sample |
| TV-002-006 | 9999 | 10000 | false | ICQUAL_FIRST_RUN | AC-01: Below cutoff, first run |
Decision Table: Configurable Cutoff Verification
| TV | quantity | quantity_cutoff | expected_error | Covers |
|---|---|---|---|---|
| TV-002-007 | 5000 | 5000 | null | AC-04: Custom cutoff at boundary |
| TV-002-008 | 4999 | 5000 | (continue) | AC-04: Custom cutoff below boundary |
Boundary Value Analysis
IC CT Threshold Boundaries
| TV | ic_ct | Note | Expected |
|---|---|---|---|
| TV-BND-001 | 34 | Below threshold | Pass |
| TV-BND-002 | 35 | At threshold | Pass |
| TV-BND-003 | 36 | Above threshold | Continue |
| TV-BND-004 | 35.0001 | Just above (float precision) | Continue |
Quantity Cutoff Boundaries
| TV | quantity | Note | Expected |
|---|---|---|---|
| TV-BND-005 | 9999 | Below cutoff | Continue to repeat check |
| TV-BND-006 | 10000 | At cutoff | Bypass |
| TV-BND-007 | 10001 | Above cutoff | Bypass |
Error Handling
| Test Vector | Scenario | Expected Behavior |
|---|---|---|
| TC-INHQUAL-ERR-001 | Well has no IC observation | Rule not triggered |
| TC-INHQUAL-ERR-002 | IC CT is null/undefined | Rule not triggered |
| TC-INHQUAL-ERR-003 | No non-IC observations in well | Proceed to quantity/repeat check |
Traceability to Existing Tests
| Requirement | Jira Tests | Automation Status |
|---|---|---|
| REQ-RULES-INHQUAL-001 | BT-5189, BT-5191, BT-5661 | Automated |
| REQ-RULES-INHQUAL-002 | None (Gap - fixtures required) | Not Automated |
Note: Original references to BT-674 and BT-4491 were incorrect. BT-674 tests CONTROL_FAIL rule. BT-4491 is a task for PICQUANT (quantitative) rule, not PICQUAL (qualitative).
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|---|---|---|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Verification Checklist
- All condition combinations have test vectors
- Boundary values tested for IC CT threshold (35)
- Boundary values tested for quantity cutoff (10,000)
- Error codes verified (ICQUAL_INHN, ICQUAL_FIRST_RUN)
- Early exit paths verified (IC pass, non-IC pass, quantity bypass)
- Evaluation order verified
- Configuration validation included