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
58 lines
3.3 KiB
Gherkin
58 lines
3.3 KiB
Gherkin
Feature: Fix-then-Revalidate coverage round 3
|
|
As a developer
|
|
I want to cover remaining uncovered lines in FixThenRevalidateOrchestrator
|
|
So that code coverage meets the target threshold
|
|
|
|
# Covers line 354: get_retry_count returns value from existing plan entry
|
|
Scenario: ftrcov3 get_retry_count returns count when plan has existing retries
|
|
Given a ftrcov3 orchestrator with max_retries 3
|
|
And the ftrcov3 internal retry count for plan "P-SEED" validation "check-seed" resource "RES0001" is set to 2
|
|
Then the ftrcov3 get_retry_count for plan "P-SEED" validation "check-seed" resource "RES0001" should be 2
|
|
|
|
# Covers line 576: break when current >= max_retries inside _fix_single_validation
|
|
# Covers lines 765-769, 771: not-attempted warning path
|
|
# Also covers line 354 via get_retry_count call at line 768
|
|
Scenario: ftrcov3 pre-exhausted retry budget causes immediate break and warning
|
|
Given a ftrcov3 orchestrator with max_retries 1
|
|
And the ftrcov3 internal retry count for plan "P-PREEX" validation "check-preex" resource "RES0001" is set to 1
|
|
And a ftrcov3 required validation "check-preex" that fails
|
|
And a ftrcov3 fix callback that always succeeds
|
|
And a ftrcov3 revalidate callback that never passes
|
|
When the ftrcov3 fix loop runs for plan "P-PREEX"
|
|
Then the ftrcov3 result should have final_passed False
|
|
And the ftrcov3 result should need user escalation
|
|
And the ftrcov3 result should have validation_attempts 0
|
|
|
|
# Covers line 650: non-string fix_description is coerced via str()
|
|
Scenario: ftrcov3 fix callback returning non-string value is coerced to string
|
|
Given a ftrcov3 orchestrator with max_retries 1
|
|
And a ftrcov3 required validation "check-coerce" that fails
|
|
And a ftrcov3 fix callback that returns an integer
|
|
And a ftrcov3 revalidate callback that passes after 1 fix
|
|
When the ftrcov3 fix loop runs for plan "P-COERCE"
|
|
Then the ftrcov3 result should have final_passed True
|
|
And the ftrcov3 result should have validation_attempts 1
|
|
And the ftrcov3 fix history record 1 fix_description should contain "42"
|
|
|
|
# Covers lines 765-769, 771 via max_retries=0 path (range(0) never enters loop)
|
|
Scenario: ftrcov3 max retries zero means no fix attempts and logs warning
|
|
Given a ftrcov3 orchestrator with max_retries 0
|
|
And a ftrcov3 required validation "check-zero" that fails
|
|
And a ftrcov3 fix callback that always succeeds
|
|
And a ftrcov3 revalidate callback that never passes
|
|
When the ftrcov3 fix loop runs for plan "P-ZERO"
|
|
Then the ftrcov3 result should have final_passed False
|
|
And the ftrcov3 result should need user escalation
|
|
And the ftrcov3 result should have validation_attempts 0
|
|
|
|
# Covers line 808: circuit breaker return in _emit_event after 5 consecutive failures
|
|
Scenario: ftrcov3 event bus circuit breaker silences emissions after consecutive failures
|
|
Given a ftrcov3 orchestrator with max_retries 3 and a failing event bus
|
|
And a ftrcov3 required validation "check-cb1" that fails
|
|
And a ftrcov3 required validation "check-cb2" that fails
|
|
And a ftrcov3 fix callback that always succeeds
|
|
And a ftrcov3 revalidate callback that never passes
|
|
When the ftrcov3 fix loop runs for plan "P-CIRCUIT"
|
|
Then the ftrcov3 result should have final_passed False
|
|
And the ftrcov3 event bus consecutive failures should be at least 5
|