Manual Baseline Check Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: MANUAL_BASELINE rule for validating automatic baseline check configuration Domain: RULES-BASELINE Precedence: Part of Run Analysis Workflow
Statement
The system shall validate whether run targets have automatic baseline checking enabled and apply errors when manual baseline intervention is required.
When a run target has automatic baseline check disabled, the rule applies the MANUAL_BASELINE_CHECK_WELL error to all wells associated with that target and the MANUAL_BASELINE_CHECK_TARGET error to the run target itself. This ensures users are notified when manual baseline correction is needed before results can be finalized.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-BASELINE-001 | Applies well-level error when target has automatic baseline disabled | HIGH | Draft |
| REQ-RULES-BASELINE-002 | Applies target-level error when automatic baseline disabled | HIGH | Draft |
Key Integration Points: Run Target Configuration, Well Error System, Run Target Error System
Rule Summary
| Property | Value |
|---|---|
| Name | MANUAL_BASELINE |
| Triggers | When evaluating run targets during analysis |
| Output | Sets error codes on wells and run targets |
Rule Flowchart (Illustrative)
This diagram illustrates the rule evaluation logic. Each run target is evaluated independently based on its automatic baseline check setting.
Definitions
| Term | Definition |
|---|---|
| Run Target | A configured target within a run that specifies analysis parameters including baseline check mode |
| Automatic Baseline Check | A boolean property on run targets that determines whether baseline checking is performed automatically or requires manual intervention |
| Well | An individual sample position in a run plate that is associated with a run target through an observation |
| Observation | The association between a well and a run target |
Assumptions
- The MANUAL_BASELINE rule is executed as part of the run analysis workflow
- Run targets have the
automatic_baseline_checkproperty configured - Wells have observations that associate them with specific run targets
Requirements
Well-Level Error Application (REQ-RULES-BASELINE-001)
FR-BASELINE-001: Apply Well-Level Manual Baseline Error
The system shall apply the MANUAL_BASELINE_CHECK_WELL error to any well whose associated run target has automatic baseline check disabled.
Acceptance Criteria
Baseline Check Enabled (No Error):
- When a run target has automatic_baseline_check set to true, wells associated with that target shall not receive the MANUAL_BASELINE_CHECK_WELL error
Baseline Check Disabled (Error Applied):
- When a run target has automatic_baseline_check set to false, all wells associated with that target shall receive the MANUAL_BASELINE_CHECK_WELL error
Scope and Independence:
- Wells associated with different targets shall be evaluated independently based on their target's baseline check setting
- The error shall be applied during rule analysis execution
Error Specification:
- The system shall use error code MANUAL_BASELINE_CHECK_WELL
- The system shall apply the error at the Well level
- The system shall trigger when run_target.automatic_baseline_check == false
Trace: Source: 3.0.0-Manual / Automatic Baseline Check Rule (Row 1) | Jira: BT-4074 | Tests: BT-4093 | Related: REQ-RULES-BASELINE-002
Target-Level Error Application (REQ-RULES-BASELINE-002)
FR-BASELINE-002: Apply Target-Level Manual Baseline Error
The system shall apply the MANUAL_BASELINE_CHECK_TARGET error to any run target that has automatic baseline check disabled.
Acceptance Criteria
Baseline Check Enabled (No Error):
- When a run target has automatic_baseline_check set to true, that run target shall not receive the MANUAL_BASELINE_CHECK_TARGET error
Baseline Check Disabled (Error Applied):
- When a run target has automatic_baseline_check set to false, that run target shall receive the MANUAL_BASELINE_CHECK_TARGET error
Scope and Independence:
- Each run target shall be evaluated independently
- The error shall be applied during rule analysis execution
Error Specification:
- The system shall use error code MANUAL_BASELINE_CHECK_TARGET
- The system shall apply the error at the Run Target level
- The system shall trigger when run_target.automatic_baseline_check == false
Trace: Source: 3.0.0-Manual / Automatic Baseline Check Rule (Row 2) | Jira: BT-4074 | Tests: BT-4093 | Related: REQ-RULES-BASELINE-001
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
automatic_baseline_check | true | Determines whether baseline checking is performed automatically for a run target | REQ-RULES-BASELINE-001, REQ-RULES-BASELINE-002 |
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/SbcheckRule.php |
Note: The class is named SbcheckRule but implements the MANUAL_BASELINE rule functionality.
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-BASELINE-001 | Apply Well-Level Manual Baseline Error | Test | SbcheckRule | BT-4093 | Draft |
| REQ-RULES-BASELINE-002 | Apply Target-Level Manual Baseline Error | Test | SbcheckRule | BT-4093 | Draft |
Notes
- Both REQ-RULES-BASELINE-001 and REQ-RULES-BASELINE-002 share the same triggering condition but apply errors to different entity levels (well vs run target)
- The well-level and target-level errors are applied together when the condition is met
- Epic: BT-4063 - Viracor Phase 2A: Automated baseline check
- X-ray Test: BT-4093 - Verify the MANUAL_BASELINE rule (regression)
Acceptance Tests
Test: REQ-RULES-BASELINE-001
Test: Automatic baseline enabled - no well error
Given: A run with the following configuration:
| Entity | Property | Value |
| Target A | automatic_baseline_check | true |
| Well A1 | observation target | Target A |
| Well A2 | observation target | Target A |
When: The run is analyzed through the MANUAL_BASELINE rule
Then: Well A1 shall not receive an error
And: Well A2 shall not receive an error
Test: Automatic baseline disabled - well error applied
Given: A run with the following configuration:
| Entity | Property | Value |
| Target A | automatic_baseline_check | false |
| Target B | automatic_baseline_check | true |
| Well A1 | observation target | Target A |
| Well A2 | observation target | Target A |
| Well A3 | observation target | Target B |
When: The run is analyzed through the MANUAL_BASELINE rule
Then: Well A1 shall receive error MANUAL_BASELINE_CHECK_WELL
And: Well A2 shall receive error MANUAL_BASELINE_CHECK_WELL
And: Well A3 shall not receive an error
Test: REQ-RULES-BASELINE-002
Test: Automatic baseline enabled - no target error
Given: A run with the following configuration:
| Entity | Property | Value |
| Target A | automatic_baseline_check | true |
When: The run is analyzed through the MANUAL_BASELINE rule
Then: Run target A shall not receive an error
Test: Mixed baseline settings - selective target error
Given: A run with the following configuration:
| Entity | Property | Value |
| Target A | automatic_baseline_check | false |
| Target B | automatic_baseline_check | true |
When: The run is analyzed through the MANUAL_BASELINE rule
Then: Run target A shall receive error MANUAL_BASELINE_CHECK_TARGET
And: Run target B shall not receive an error
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Run Analysis Rules |
Appendix: Process Artifacts
Completion Checklist
- All requirements are capability-level (describe behavior, not UI)
- Requirement variants consolidated (no requirement explosion)
- UI details are fully demoted to non-normative section
- Configuration options are not encoded as requirements
- Acceptance criteria describe behavior, not UI mechanics
- Every requirement has acceptance criteria and source traceability
- Error handling addressed for I/O, validation, and external system requirements
- Open questions documented with owners assigned
- Consolidations documented in Reviewer Notes with reversibility info
- Module can survive a full UI redesign unchanged
- Refinements do not introduce new capabilities
- Traceability matrix is complete
Reviewer Notes
No Consolidation Applied
REQ-RULES-BASELINE-001 and REQ-RULES-BASELINE-002 were preserved as separate requirements because:
| Requirement | Entity Level | Error Code | Justification |
|---|---|---|---|
| REQ-RULES-BASELINE-001 | Well | MANUAL_BASELINE_CHECK_WELL | Distinct testable behavior at well level |
| REQ-RULES-BASELINE-002 | Run Target | MANUAL_BASELINE_CHECK_TARGET | Distinct testable behavior at target level |
Rationale: This is a RULES domain where each requirement operates on different entity levels (Well vs Run Target) with different error codes. Each represents a distinct testable system behavior that can be independently verified.
Reversibility: Not applicable - no consolidation performed.
Source Reference: output/pilot/rules/rule-baseline-check/rule-baseline-check-restructured.md