Files
cleveragents-core/features/cow_sandbox_coverage_r3.feature
freemo 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
test(coverage): add Behave scenarios for 39 under-covered modules
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.

ISSUES CLOSED: #1232
2026-03-31 21:47:12 +00:00

32 lines
1.6 KiB
Gherkin

Feature: CopyOnWriteSandbox coverage round 3
Covers remaining uncovered lines in copy_on_write.py:
- Lines 263-265: backup_directory failure during commit cleans up and re-raises
- Lines 297-302: safe_restore failure during commit error recovery logs warning
- Lines 430-432: cleanup removes pre_commit_backup when it exists
Scenario: Commit fails when backup_directory raises during pre-commit backup
Given a cowcov3 test directory is set up
And a cowcov3 sandbox is created and has changes
And cowcov3 backup_directory is patched to raise an OSError
When cowcov3 commit is attempted
Then cowcov3 a SandboxCommitError should be raised
And cowcov3 the temporary backup dir should have been cleaned up
Scenario: Commit error recovery logs warning when safe_restore fails
Given a cowcov3 test directory is set up
And a cowcov3 sandbox is created and has changes
And cowcov3 copy phase is patched to fail after backup succeeds
And cowcov3 safe_restore is patched to raise an OSError
When cowcov3 commit is attempted
Then cowcov3 a SandboxCommitError should be raised
And cowcov3 the safe_restore failure should have been logged as a warning
And cowcov3 the pre_commit_backup should be preserved for manual recovery
Scenario: Cleanup removes an existing pre_commit_backup directory
Given a cowcov3 test directory is set up
And a cowcov3 sandbox is created and has changes
And cowcov3 the sandbox has a pre_commit_backup directory
When cowcov3 cleanup is called
Then cowcov3 the pre_commit_backup directory should be removed
And cowcov3 the sandbox status should be CLEANED_UP