31472b5413
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate. ISSUES CLOSED: #1232
64 lines
3.4 KiB
Gherkin
64 lines
3.4 KiB
Gherkin
Feature: Correction Service Coverage R3
|
||
Additional scenarios targeting remaining uncovered lines in
|
||
correction_service.py:
|
||
- Line 137: mode without .value attribute in event emission
|
||
- Lines 245-247: oversized tree/DAG rejection in analyze_impact
|
||
- Line 351: dry-run report restoring a pre-existing impact
|
||
- Lines 1060-1063, 1065: sibling isolation violation in validate_subtree_isolation
|
||
|
||
Background:
|
||
Given a cscov3 fresh correction service
|
||
|
||
# -------------------------------------------------------------------
|
||
# Line 137 – _emit_correction_applied: mode without .value attribute
|
||
# -------------------------------------------------------------------
|
||
|
||
Scenario: Event emission falls back to str(mode) when mode has no .value attribute
|
||
Given a cscov3 correction service with a working event bus
|
||
And a cscov3 REVERT correction request for plan "plan-ev" targeting "dec-ev"
|
||
And the cscov3 correction request mode is patched to a plain string "revert"
|
||
When I cscov3 execute the revert correction
|
||
Then the cscov3 event bus should have received 1 event
|
||
And the cscov3 emitted event details mode should be "revert"
|
||
|
||
# -------------------------------------------------------------------
|
||
# Lines 245-247 – analyze_impact: oversized tree+DAG rejection
|
||
# -------------------------------------------------------------------
|
||
|
||
Scenario: analyze_impact rejects oversized decision tree
|
||
Given a cscov3 revert correction for plan "plan-big" targeting "root-big"
|
||
When I cscov3 analyze impact with a tree exceeding the max node limit
|
||
Then a cscov3 ValidationError should have been raised
|
||
And the cscov3 error message should contain "too large"
|
||
|
||
Scenario: analyze_impact rejects oversized influence DAG
|
||
Given a cscov3 revert correction for plan "plan-dag" targeting "root-dag"
|
||
When I cscov3 analyze impact with a DAG exceeding the max node limit
|
||
Then a cscov3 ValidationError should have been raised
|
||
And the cscov3 error message should contain "too large"
|
||
|
||
# -------------------------------------------------------------------
|
||
# Line 351 – generate_dry_run_report: restoring pre-existing impact
|
||
# -------------------------------------------------------------------
|
||
|
||
Scenario: Dry-run report restores a pre-existing cached impact
|
||
Given a cscov3 revert correction for plan "plan-dr" targeting "root-dr"
|
||
And the cscov3 correction already has a cached impact with 2 affected decisions
|
||
When I cscov3 generate a dry-run report with adjacency "root-dr->child1,child2,child3"
|
||
Then the cscov3 dry-run report should have been generated
|
||
And the cscov3 original cached impact should be restored with 2 affected decisions
|
||
|
||
# -------------------------------------------------------------------
|
||
# Lines 1060-1063, 1065 – validate_subtree_isolation: sibling violation
|
||
# -------------------------------------------------------------------
|
||
|
||
Scenario: Sibling isolation violation returns false
|
||
Given a cscov3 tree where sibling is reachable from target
|
||
When I cscov3 validate subtree isolation for target "target" on that tree
|
||
Then the cscov3 isolation result should be false
|
||
|
||
Scenario: No sibling isolation violation returns true
|
||
Given a cscov3 tree where siblings are not reachable from target
|
||
When I cscov3 validate subtree isolation for target "B" on that tree
|
||
Then the cscov3 isolation result should be true
|