run-all-tests.log
Rama main · réplica de lectura del repositorio original.
Logs directory: /tmp/vpn-switch-test-results-20260203-153644
==> Running tests on FreeBSD (local)
==> vpn-switch-unit-test.sh (minimal profile)
==> vpn-switch-unit-test.sh (all profile)
==> vpn-switch-integration-test.sh (minimal profile)
==> vpn-switch-integration-test.sh (all profile)
==> vpn-switch-architecture-test.sh (minimal profile)
==> vpn-switch-architecture-test.sh (all profile)
================================================================================
Test Results Summary - Tue Feb 3 19:44:51 CET 2026
================================================================================
Status | Platform | Test Suite | Profile | Tests | Assert | Passed | Failed
-------|----------|-------------------------------------|---------|-------|--------|--------|-------
PASS | FreeBSD | vpn-switch-unit-test.sh | minimal | 146 | 371 | 371 | 0
PASS | FreeBSD | vpn-switch-unit-test.sh | all | 146 | 371 | 371 | 0
PASS | FreeBSD | vpn-switch-integration-test.sh | minimal | 12 | 296 | 296 | 0
PASS | FreeBSD | vpn-switch-integration-test.sh | all | 12 | 296 | 296 | 0
PASS | FreeBSD | vpn-switch-architecture-test.sh | minimal | 238 | 412 | 412 | 0
PASS | FreeBSD | vpn-switch-architecture-test.sh | all | 238 | 408 | 408 | 0
================================================================================
ALL TESTS PASSED
Total: 792 tests, 2154 assertions (2154 passed, 0 failed)
Detailed logs saved to: /tmp/vpn-switch-test-results-20260203-153644
Logs directory: /tmp/vpn-switch-test-results-20260203-153649
==> Running tests on Debian (brj@calabria.local)
==> Syncing code to remote...
==> Setting platform symlink...
==> vpn-switch-unit-test.sh (minimal profile)
==> vpn-switch-unit-test.sh (all profile)
==> vpn-switch-integration-test.sh (minimal profile)
==> vpn-switch-integration-test.sh (all profile)
==> vpn-switch-architecture-test.sh (minimal profile)
==> vpn-switch-architecture-test.sh (all profile)
================================================================================
Test Results Summary - Tue Feb 3 20:48:02 CET 2026
================================================================================
Status | Platform | Test Suite | Profile | Tests | Assert | Passed | Failed
-------|----------|-------------------------------------|---------|-------|--------|--------|-------
PASS | Debian | vpn-switch-unit-test.sh | minimal | 146 | 371 | 371 | 0
PASS | Debian | vpn-switch-unit-test.sh | all | 146 | 371 | 371 | 0
PASS | Debian | vpn-switch-integration-test.sh | minimal | 12 | 296 | 296 | 0
PASS | Debian | vpn-switch-integration-test.sh | all | 12 | 296 | 296 | 0
PASS | Debian | vpn-switch-architecture-test.sh | minimal | 238 | 410 | 410 | 0
PASS | Debian | vpn-switch-architecture-test.sh | all | 238 | 410 | 410 | 0
================================================================================
ALL TESTS PASSED
Total: 792 tests, 2154 assertions (2154 passed, 0 failed)
Detailed logs saved to: /tmp/vpn-switch-test-results-20260203-153649
========================================
vpn-switch Architecture Test Suite
========================================
Testing architectural rules for combinator functions
Profile: all
Running Combinator Tests
========================================
Found 28 combinator functions
TEST 1: Combinator: __session_exists1 - validate syntax with variations
✓ __session_exists1: Valid combinator syntax (all variations)
TEST 2: Combinator: __session_conflicts2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-1]
✓ __session_conflicts2: Valid combinator syntax (all variations)
TEST 3: Combinator: __interface_check1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-2]
✓ __interface_check1: Valid combinator syntax (all variations)
TEST 4: Combinator: __stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-3]
✓ __stop1: Valid combinator syntax (all variations)
TEST 5: Combinator: __import1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-4]
✓ __import1: Valid combinator syntax (all variations)
TEST 6: Combinator: __start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-5]
✓ __start1: Valid combinator syntax (all variations)
TEST 7: Combinator: __start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-6]
✓ __start0: Valid combinator syntax (all variations)
TEST 8: Combinator: __bootstrap1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-7]
✓ __bootstrap1: Valid combinator syntax (all variations)
TEST 9: Combinator: __environment_cache0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-8]
✓ __environment_cache0: Valid combinator syntax (all variations)
TEST 10: Combinator: __phases_lift1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-9]
✓ __phases_lift1: Valid combinator syntax (all variations)
TEST 11: Combinator: __init0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-10]
✓ __init0: Valid combinator syntax (all variations)
TEST 12: Combinator: __batch1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-11]
✓ __batch1: Valid combinator syntax (all variations)
TEST 13: Combinator: __restore1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-12]
✓ __restore1: Valid combinator syntax (all variations)
TEST 14: Combinator: __openvpn_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-13]
✓ __openvpn_start0: Valid combinator syntax (all variations)
TEST 15: Combinator: __openvpn_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-14]
✓ __openvpn_start1: Valid combinator syntax (all variations)
TEST 16: Combinator: __openvpn_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-15]
✓ __openvpn_stop1: Valid combinator syntax (all variations)
TEST 17: Combinator: __openvpn_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-16]
✓ __openvpn_add2: Valid combinator syntax (all variations)
TEST 18: Combinator: __openvpn_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-17]
✓ __openvpn_help0: Valid combinator syntax (all variations)
TEST 19: Combinator: __session_disconnect1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-18]
✓ __session_disconnect1: Valid combinator syntax (all variations)
TEST 20: Combinator: __session_show0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-19]
✓ __session_show0: Valid combinator syntax (all variations)
TEST 21: Combinator: __session_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-20]
✓ __session_start0: Valid combinator syntax (all variations)
TEST 22: Combinator: __session_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-21]
✓ __session_start1: Valid combinator syntax (all variations)
TEST 23: Combinator: __session_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-22]
✓ __session_help0: Valid combinator syntax (all variations)
TEST 24: Combinator: __wireguard_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-23]
✓ __wireguard_start0: Valid combinator syntax (all variations)
TEST 25: Combinator: __wireguard_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-24]
✓ __wireguard_start1: Valid combinator syntax (all variations)
TEST 26: Combinator: __wireguard_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-25]
✓ __wireguard_stop1: Valid combinator syntax (all variations)
TEST 27: Combinator: __wireguard_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-26]
✓ __wireguard_add2: Valid combinator syntax (all variations)
TEST 28: Combinator: __wireguard_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-27]
✓ __wireguard_help0: Valid combinator syntax (all variations)
Running Batch Combinator Tests
========================================
Found 26 batch combinator functions
TEST 29: Batch Combinator: ___session_prepare3 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-28]
✓ ___session_prepare3: Valid batch combinator syntax (all variations)
TEST 30: Batch Combinator: ___stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-29]
✓ ___stop0: Valid batch combinator syntax (all variations)
TEST 31: Batch Combinator: ___phases_sync1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-30]
✓ ___phases_sync1: Valid batch combinator syntax (all variations)
TEST 32: Batch Combinator: ___phases_sync0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-31]
✓ ___phases_sync0: Valid batch combinator syntax (all variations)
TEST 33: Batch Combinator: ___list0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-32]
✓ ___list0: Valid batch combinator syntax (all variations)
TEST 34: Batch Combinator: ___bootstrap2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-33]
✓ ___bootstrap2: Valid batch combinator syntax (all variations)
TEST 35: Batch Combinator: ___init1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-34]
✓ ___init1: Valid batch combinator syntax (all variations)
TEST 36: Batch Combinator: ___dumpenv1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-35]
✓ ___dumpenv1: Valid batch combinator syntax (all variations)
TEST 37: Batch Combinator: ___dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-36]
✓ ___dump0: Valid batch combinator syntax (all variations)
TEST 38: Batch Combinator: ___batch0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-37]
✓ ___batch0: Valid batch combinator syntax (all variations)
TEST 39: Batch Combinator: ___environment_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-38]
✓ ___environment_inspect0: Valid batch combinator syntax (all variations)
TEST 40: Batch Combinator: ___inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-39]
✓ ___inspect0: Valid batch combinator syntax (all variations)
TEST 41: Batch Combinator: ___openvpn_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-40]
✓ ___openvpn_create1: Valid batch combinator syntax (all variations)
TEST 42: Batch Combinator: ___openvpn_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-41]
✓ ___openvpn_stop0: Valid batch combinator syntax (all variations)
TEST 43: Batch Combinator: ___openvpn_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-42]
✓ ___openvpn_inspect0: Valid batch combinator syntax (all variations)
TEST 44: Batch Combinator: ___openvpn_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-43]
✓ ___openvpn_clean0: Valid batch combinator syntax (all variations)
TEST 45: Batch Combinator: ___openvpn_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-44]
✓ ___openvpn_dump0: Valid batch combinator syntax (all variations)
TEST 46: Batch Combinator: ___session_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-45]
✓ ___session_dump0: Valid batch combinator syntax (all variations)
TEST 47: Batch Combinator: ___session_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-46]
✓ ___session_inspect0: Valid batch combinator syntax (all variations)
TEST 48: Batch Combinator: ___validate0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-47]
✓ ___validate0: Valid batch combinator syntax (all variations)
TEST 49: Batch Combinator: ___wireguard_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-48]
✓ ___wireguard_create1: Valid batch combinator syntax (all variations)
TEST 50: Batch Combinator: ___wireguard_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-49]
✓ ___wireguard_inspect0: Valid batch combinator syntax (all variations)
TEST 51: Batch Combinator: ___wireguard_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-50]
✓ ___wireguard_stop0: Valid batch combinator syntax (all variations)
TEST 52: Batch Combinator: ___wireguard_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-51]
✓ ___wireguard_clean0: Valid batch combinator syntax (all variations)
TEST 53: Batch Combinator: ___wireguard_clean1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-52]
✓ ___wireguard_clean1: Valid batch combinator syntax (all variations)
TEST 54: Batch Combinator: ___wireguard_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.40159/test-53]
✓ ___wireguard_dump0: Valid batch combinator syntax (all variations)
Running Terminal Function Tests
========================================
Found 83 terminal functions
TEST 55: Terminal: _session_create1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-54]
✓ _session_create1: Valid terminal function output (all variations)
TEST 56: Terminal: _interface_destroy1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-55]
✓ _interface_destroy1: Valid terminal function output (all variations)
TEST 57: Terminal: _session_populate3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-56]
✓ _session_populate3: Valid terminal function output (all variations)
TEST 58: Terminal: _phases_copy0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-57]
✓ _phases_copy0: Valid terminal function output (all variations)
TEST 59: Terminal: _link2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-58]
✓ _link2: Valid terminal function output (all variations)
TEST 60: Terminal: _remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-59]
✓ _remove1: Valid terminal function output (all variations)
TEST 61: Terminal: _error1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-60]
✓ _error1: Valid terminal function output (all variations)
TEST 62: Terminal: _error2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-61]
✓ _error2: Valid terminal function output (all variations)
TEST 63: Terminal: _error3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-62]
✓ _error3: Valid terminal function output (all variations)
TEST 64: Terminal: _fail2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-63]
✓ _fail2: Valid terminal function output (all variations)
TEST 65: Terminal: _log1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-64]
✓ _log1: Valid terminal function output (all variations)
TEST 66: Terminal: _log2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-65]
✓ _log2: Valid terminal function output (all variations)
TEST 67: Terminal: _log3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-66]
✓ _log3: Valid terminal function output (all variations)
TEST 68: Terminal: _lift1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-67]
✓ _lift1: Valid terminal function output (all variations)
TEST 69: Terminal: _database_init0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-68]
✓ _database_init0: Valid terminal function output (all variations)
TEST 70: Terminal: _environment_init1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-69]
✓ _environment_init1: Valid terminal function output (all variations)
TEST 71: Terminal: _environment_cache1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-70]
✓ _environment_cache1: Valid terminal function output (all variations)
TEST 72: Terminal: _lift3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-71]
✓ _lift3: Valid terminal function output (all variations)
TEST 73: Terminal: _setenv2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-72]
✓ _setenv2: Valid terminal function output (all variations)
TEST 74: Terminal: _getenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-73]
✓ _getenv1: Valid terminal function output (all variations)
TEST 75: Terminal: _unsetenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-74]
✓ _unsetenv1: Valid terminal function output (all variations)
Skipped: _cat1 (requires special setup)
TEST 76: Terminal: _batch2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-75]
✓ _batch2: Valid terminal function output (all variations)
TEST 77: Terminal: _printenv0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-76]
✓ _printenv0: Valid terminal function output (all variations)
TEST 78: Terminal: _status0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-77]
✓ _status0: Valid terminal function output (all variations)
TEST 79: Terminal: _help0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-78]
✓ _help0: Valid terminal function output (all variations)
TEST 80: Terminal: _help1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-79]
✓ _help1: Valid terminal function output (all variations)
TEST 81: Terminal: _database_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-80]
✓ _database_enumerate0: Valid terminal function output (all variations)
TEST 82: Terminal: _system_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-81]
✓ _system_inspect0: Valid terminal function output (all variations)
TEST 83: Terminal: _logs_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-82]
✓ _logs_inspect0: Valid terminal function output (all variations)
TEST 84: Terminal: _phases_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-83]
✓ _phases_inspect0: Valid terminal function output (all variations)
TEST 85: Terminal: _summary_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-84]
✓ _summary_inspect0: Valid terminal function output (all variations)
TEST 86: Terminal: _prologue_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-85]
✓ _prologue_inspect0: Valid terminal function output (all variations)
TEST 87: Terminal: _openvpn_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-86]
✓ _openvpn_patch2: Valid terminal function output (all variations)
TEST 88: Terminal: _openvpn_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-87]
✓ _openvpn_configure1: Valid terminal function output (all variations)
TEST 89: Terminal: _openvpn_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-88]
✓ _openvpn_connect1: Valid terminal function output (all variations)
TEST 90: Terminal: _openvpn_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-89]
✓ _openvpn_disconnect1: Valid terminal function output (all variations)
TEST 91: Terminal: _openvpn_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-90]
✓ _openvpn_patch1: Valid terminal function output (all variations)
TEST 92: Terminal: _openvpn_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-91]
✓ _openvpn_enumerate0: Valid terminal function output (all variations)
TEST 93: Terminal: _openvpn_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-92]
✓ _openvpn_import1: Valid terminal function output (all variations)
TEST 94: Terminal: _openvpn_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-93]
✓ _openvpn_list0: Valid terminal function output (all variations)
TEST 95: Terminal: _openvpn_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-94]
✓ _openvpn_list1: Valid terminal function output (all variations)
TEST 96: Terminal: _openvpn_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-95]
✓ _openvpn_add1: Valid terminal function output (all variations)
TEST 97: Terminal: _openvpn_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-96]
✓ _openvpn_add3: Valid terminal function output (all variations)
TEST 98: Terminal: _openvpn_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-97]
✓ _openvpn_link2: Valid terminal function output (all variations)
TEST 99: Terminal: _openvpn_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-98]
✓ _openvpn_remove1: Valid terminal function output (all variations)
TEST 100: Terminal: _openvpn_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-99]
✓ _openvpn_remove2: Valid terminal function output (all variations)
TEST 101: Terminal: _openvpn_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-100]
✓ _openvpn_validate0: Valid terminal function output (all variations)
TEST 102: Terminal: _openvpn_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-101]
✓ _openvpn_info1: Valid terminal function output (all variations)
TEST 103: Terminal: _session_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-102]
✓ _session_list0: Valid terminal function output (all variations)
TEST 104: Terminal: _session_show1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-103]
✓ _session_show1: Valid terminal function output (all variations)
TEST 105: Terminal: _session_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-104]
✓ _session_remove1: Valid terminal function output (all variations)
TEST 106: Terminal: _session_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-105]
✓ _session_connect1: Valid terminal function output (all variations)
TEST 107: Terminal: _session_save0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-106]
✓ _session_save0: Valid terminal function output (all variations)
TEST 108: Terminal: _session_save1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-107]
✓ _session_save1: Valid terminal function output (all variations)
TEST 109: Terminal: _session_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-108]
✓ _session_clean0: Valid terminal function output (all variations)
TEST 110: Terminal: _session_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-109]
✓ _session_validate0: Valid terminal function output (all variations)
TEST 111: Terminal: _session_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-110]
✓ _session_enumerate0: Valid terminal function output (all variations)
TEST 112: Terminal: _session_describe0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-111]
✓ _session_describe0: Valid terminal function output (all variations)
TEST 113: Terminal: _logs_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-112]
✓ _logs_validate0: Valid terminal function output (all variations)
TEST 114: Terminal: _logs_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-113]
✓ _logs_clean0: Valid terminal function output (all variations)
TEST 115: Terminal: _phases_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-114]
✓ _phases_validate0: Valid terminal function output (all variations)
TEST 116: Terminal: _database_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-115]
✓ _database_validate0: Valid terminal function output (all variations)
TEST 117: Terminal: _binaries_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-116]
✓ _binaries_validate0: Valid terminal function output (all variations)
TEST 118: Terminal: _network_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-117]
✓ _network_validate0: Valid terminal function output (all variations)
TEST 119: Terminal: _permissions_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-118]
✓ _permissions_validate0: Valid terminal function output (all variations)
TEST 120: Terminal: _environment_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-119]
✓ _environment_validate0: Valid terminal function output (all variations)
TEST 121: Terminal: _wireguard_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-120]
✓ _wireguard_patch2: Valid terminal function output (all variations)
TEST 122: Terminal: _wireguard_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-121]
✓ _wireguard_configure1: Valid terminal function output (all variations)
TEST 123: Terminal: _wireguard_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-122]
✓ _wireguard_connect1: Valid terminal function output (all variations)
TEST 124: Terminal: _wireguard_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-123]
✓ _wireguard_disconnect1: Valid terminal function output (all variations)
TEST 125: Terminal: _wireguard_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-124]
✓ _wireguard_enumerate0: Valid terminal function output (all variations)
TEST 126: Terminal: _wireguard_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-125]
✓ _wireguard_import1: Valid terminal function output (all variations)
TEST 127: Terminal: _wireguard_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-126]
✓ _wireguard_list0: Valid terminal function output (all variations)
TEST 128: Terminal: _wireguard_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-127]
✓ _wireguard_list1: Valid terminal function output (all variations)
TEST 129: Terminal: _wireguard_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-128]
✓ _wireguard_add1: Valid terminal function output (all variations)
TEST 130: Terminal: _wireguard_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-129]
✓ _wireguard_add3: Valid terminal function output (all variations)
TEST 131: Terminal: _wireguard_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-130]
✓ _wireguard_link2: Valid terminal function output (all variations)
TEST 132: Terminal: _wireguard_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-131]
✓ _wireguard_remove1: Valid terminal function output (all variations)
TEST 133: Terminal: _wireguard_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-132]
✓ _wireguard_remove2: Valid terminal function output (all variations)
TEST 134: Terminal: _wireguard_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-133]
✓ _wireguard_validate0: Valid terminal function output (all variations)
TEST 135: Terminal: _wireguard_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-134]
✓ _wireguard_patch1: Valid terminal function output (all variations)
TEST 136: Terminal: _wireguard_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.40159/test-135]
✓ _wireguard_info1: Valid terminal function output (all variations)
Running Error Propagation Tests (KEEP_GOING)
========================================
TEST 137: Batch Error Propagation - test _batch2 with failing commands [db: /tmp/vpn-switch-arch-test.40159/test-136]
TEST 138: Sub-test: KEEP_GOING=0 (fail-fast mode) [db: /tmp/vpn-switch-arch-test.40159/test-137]
✓ KEEP_GOING=0: Batch execution stopped on first error
TEST 139: Sub-test: KEEP_GOING=1 (continue mode) [db: /tmp/vpn-switch-arch-test.40159/test-137]
✓ KEEP_GOING=1: Batch execution completed despite errors
✓ KEEP_GOING=1: All commands were executed (count=3)
TEST 140: Recursive Batch Error Propagation - test chained _batch2 calls [db: /tmp/vpn-switch-arch-test.40159/test-137]
✓ Recursive fail-fast: Command 3 in batch 3 was not executed
✓ Recursive fail-fast: Batch 2 stopped after error in batch 3
✓ Recursive fail-fast: Batch 1 stopped after error in nested batch
✓ Recursive continue: Batch 2 continued after error in batch 3
✓ Recursive continue: Batch 1 continued after error in nested batch
TEST 141: Batch KEEP_GOING with Realistic Dump File [db: /tmp/vpn-switch-arch-test.40159/test-140]
✓ Created realistic batch file with 8 commands
✓ Selected command at position 6/8 for failure injection
TEST 142: Sub-test: KEEP_GOING=0 at position 6/8 [db: /tmp/vpn-switch-arch-test.40159/test-141]
✓ KEEP_GOING=0: Stopped at or before position 6 (executed 6 commands)
✓ KEEP_GOING=0: Error stop message present
TEST 143: Sub-test: KEEP_GOING=1 at position 6/8 [db: /tmp/vpn-switch-arch-test.40159/test-141]
✓ KEEP_GOING=1: All commands executed (8/8)
✓ KEEP_GOING=1: Completion message present
✓ KEEP_GOING=1: Failure markers present in output
Running Batch Combinator Error Propagation Tests
========================================
Testing ALL batch combinators with error injection and KEEP_GOING validation
Found 26 batch combinator functions
TEST 144: Batch Transitive Hull: ___session_prepare3 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-141]
TEST 145: Sub-test: Walk command tree for '___session_prepare3' (command: session_prepare) [db: /tmp/vpn-switch-arch-test.40159/test-144]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 146: Batch Transitive Hull: ___stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-144]
TEST 147: Sub-test: Walk command tree for '___stop0' (command: stop) [db: /tmp/vpn-switch-arch-test.40159/test-146]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 148: Sub-test: Inject failure at node '___stop0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-146]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 149: Batch Transitive Hull: ___phases_sync1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-146]
TEST 150: Sub-test: Walk command tree for '___phases_sync1' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.40159/test-149]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 151: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-149]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 152: Batch Transitive Hull: ___phases_sync0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-149]
TEST 153: Sub-test: Walk command tree for '___phases_sync0' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.40159/test-152]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 154: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-152]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 155: Batch Transitive Hull: ___list0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-152]
TEST 156: Sub-test: Walk command tree for '___list0' (command: list) [db: /tmp/vpn-switch-arch-test.40159/test-155]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 157: Sub-test: Inject failure at node '___list0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-155]
✓ KEEP_GOING affects output: fail-fast= 2 lines, continue= 2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 158: Batch Transitive Hull: ___bootstrap2 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-155]
TEST 159: Sub-test: Walk command tree for '___bootstrap2' (command: bootstrap) [db: /tmp/vpn-switch-arch-test.40159/test-158]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 6 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 160: Batch Transitive Hull: ___init1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-158]
TEST 161: Sub-test: Walk command tree for '___init1' (command: init) [db: /tmp/vpn-switch-arch-test.40159/test-160]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 162: Sub-test: Inject failure at node '__init0' (node 1/1) [db: /tmp/vpn-switch-arch-test.40159/test-160]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 163: Batch Transitive Hull: ___dumpenv1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-160]
TEST 164: Sub-test: Walk command tree for '___dumpenv1' (command: dumpenv) [db: /tmp/vpn-switch-arch-test.40159/test-163]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 165: Batch Transitive Hull: ___dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-163]
TEST 166: Sub-test: Walk command tree for '___dump0' (command: dump) [db: /tmp/vpn-switch-arch-test.40159/test-165]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 167: Sub-test: Inject failure at node '___dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-165]
✓ KEEP_GOING affects output: fail-fast= 17 lines, continue= 17 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
TEST 168: Batch Transitive Hull: ___batch0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-165]
TEST 169: Sub-test: Walk command tree for '___batch0' (command: batch) [db: /tmp/vpn-switch-arch-test.40159/test-168]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 170: Sub-test: Inject failure at node '___batch0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-168]
✓ KEEP_GOING affects output: fail-fast= 2 lines, continue= 2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 171: Batch Transitive Hull: ___environment_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-168]
TEST 172: Sub-test: Walk command tree for '___environment_inspect0' (command: environment_inspect) [db: /tmp/vpn-switch-arch-test.40159/test-171]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 173: Sub-test: Inject failure at node '___environment_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-171]
✓ KEEP_GOING affects output: fail-fast= 3 lines, continue= 3 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 174: Batch Transitive Hull: ___inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-171]
TEST 175: Sub-test: Walk command tree for '___inspect0' (command: inspect) [db: /tmp/vpn-switch-arch-test.40159/test-174]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 176: Sub-test: Inject failure at node '___inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-174]
✓ KEEP_GOING affects output: fail-fast= 12 lines, continue= 12 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 177: Batch Transitive Hull: ___openvpn_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-174]
TEST 178: Sub-test: Walk command tree for '___openvpn_create1' (command: openvpn_create) [db: /tmp/vpn-switch-arch-test.40159/test-177]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 179: Batch Transitive Hull: ___openvpn_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-177]
TEST 180: Sub-test: Walk command tree for '___openvpn_stop0' (command: openvpn_stop) [db: /tmp/vpn-switch-arch-test.40159/test-179]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 181: Sub-test: Inject failure at node '___openvpn_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.40159/test-179]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 182: Batch Transitive Hull: ___openvpn_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-179]
TEST 183: Sub-test: Walk command tree for '___openvpn_inspect0' (command: openvpn_inspect) [db: /tmp/vpn-switch-arch-test.40159/test-182]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 184: Sub-test: Inject failure at node '___openvpn_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-182]
✓ KEEP_GOING affects output: fail-fast= 7 lines, continue= 7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 185: Batch Transitive Hull: ___openvpn_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-182]
TEST 186: Sub-test: Walk command tree for '___openvpn_clean0' (command: openvpn_clean) [db: /tmp/vpn-switch-arch-test.40159/test-185]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 187: Batch Transitive Hull: ___openvpn_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-185]
TEST 188: Sub-test: Walk command tree for '___openvpn_dump0' (command: openvpn_dump) [db: /tmp/vpn-switch-arch-test.40159/test-187]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 189: Sub-test: Inject failure at node '___openvpn_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-187]
✓ KEEP_GOING affects output: fail-fast= 20 lines, continue= 20 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 190: Batch Transitive Hull: ___session_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-187]
TEST 191: Sub-test: Walk command tree for '___session_dump0' (command: session_dump) [db: /tmp/vpn-switch-arch-test.40159/test-190]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 192: Sub-test: Inject failure at node '___session_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-190]
✓ KEEP_GOING affects output: fail-fast= 41 lines, continue= 41 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 193: Batch Transitive Hull: ___session_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-190]
TEST 194: Sub-test: Walk command tree for '___session_inspect0' (command: session_inspect) [db: /tmp/vpn-switch-arch-test.40159/test-193]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 195: Sub-test: Inject failure at node '___session_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-193]
✓ KEEP_GOING affects output: fail-fast= 5 lines, continue= 5 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 196: Batch Transitive Hull: ___validate0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-193]
TEST 197: Sub-test: Walk command tree for '___validate0' (command: validate) [db: /tmp/vpn-switch-arch-test.40159/test-196]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 198: Sub-test: Inject failure at node '___validate0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-196]
✓ KEEP_GOING affects output: fail-fast= 10 lines, continue= 10 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 199: Batch Transitive Hull: ___wireguard_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-196]
TEST 200: Sub-test: Walk command tree for '___wireguard_create1' (command: wireguard_create) [db: /tmp/vpn-switch-arch-test.40159/test-199]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 201: Batch Transitive Hull: ___wireguard_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-199]
TEST 202: Sub-test: Walk command tree for '___wireguard_inspect0' (command: wireguard_inspect) [db: /tmp/vpn-switch-arch-test.40159/test-201]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 203: Sub-test: Inject failure at node '___wireguard_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-201]
✓ KEEP_GOING affects output: fail-fast= 7 lines, continue= 7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 204: Batch Transitive Hull: ___wireguard_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-201]
TEST 205: Sub-test: Walk command tree for '___wireguard_stop0' (command: wireguard_stop) [db: /tmp/vpn-switch-arch-test.40159/test-204]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 206: Sub-test: Inject failure at node '___wireguard_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.40159/test-204]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 207: Batch Transitive Hull: ___wireguard_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-204]
TEST 208: Sub-test: Walk command tree for '___wireguard_clean0' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.40159/test-207]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 209: Batch Transitive Hull: ___wireguard_clean1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-207]
TEST 210: Sub-test: Walk command tree for '___wireguard_clean1' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.40159/test-209]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 211: Batch Transitive Hull: ___wireguard_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.40159/test-209]
TEST 212: Sub-test: Walk command tree for '___wireguard_dump0' (command: wireguard_dump) [db: /tmp/vpn-switch-arch-test.40159/test-211]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 213: Sub-test: Inject failure at node '___wireguard_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.40159/test-211]
✓ KEEP_GOING affects output: fail-fast= 42 lines, continue= 42 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
Running Batch Combinator KEEP_GOING Precise Tests
========================================
Testing ALL batch combinators with precise architectural KEEP_GOING validation
Found 26 batch combinator functions
TEST 214: Batch KEEP_GOING Precise: ___session_prepare3 [db: /tmp/vpn-switch-arch-test.40159/test-211]
✓ Captured 175 command lines from ___session_prepare3
✓ Selected 95 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 215: Batch KEEP_GOING Precise: ___stop0 [db: /tmp/vpn-switch-arch-test.40159/test-214]
✓ Captured 2 command lines from ___stop0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
Note: Not all commands attempted (0/2)
Note: This may indicate KEEP_GOING=0 or execution stopped early
Skipped: ___phases_sync1 (requires phase template setup)
Skipped: ___phases_sync0 (requires phase template setup)
TEST 216: Batch KEEP_GOING Precise: ___list0 [db: /tmp/vpn-switch-arch-test.40159/test-215]
✓ Captured 2 command lines from ___list0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
✓ KEEP_GOING=1: All commands attempted (2/2)
TEST 217: Batch KEEP_GOING Precise: ___bootstrap2 [db: /tmp/vpn-switch-arch-test.40159/test-216]
✓ Captured 73 command lines from ___bootstrap2
✓ Selected 67 random line(s) for failure injection
Skipped: No functions were injected with failures
Skipped: ___init1 (complex initialization logic)
TEST 218: Batch KEEP_GOING Precise: ___dumpenv1 [db: /tmp/vpn-switch-arch-test.40159/test-217]
✓ Captured 175 command lines from ___dumpenv1
✓ Selected 62 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 219: Batch KEEP_GOING Precise: ___dump0 [db: /tmp/vpn-switch-arch-test.40159/test-218]
✓ Captured 5 command lines from ___dump0
✓ Selected 4 random line(s) for failure injection
✓ Injected failures into 3 function(s)
Note: Not all commands attempted (3/5)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 220: Batch KEEP_GOING Precise: ___batch0 [db: /tmp/vpn-switch-arch-test.40159/test-219]
✓ Captured 2 command lines from ___batch0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 221: Batch KEEP_GOING Precise: ___environment_inspect0 [db: /tmp/vpn-switch-arch-test.40159/test-220]
✓ Captured 2 command lines from ___environment_inspect0
✓ Selected 2 random line(s) for failure injection
✓ Injected failures into 2 function(s)
Note: Not all commands attempted (2/3)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 222: Batch KEEP_GOING Precise: ___inspect0 [db: /tmp/vpn-switch-arch-test.40159/test-221]
✓ Captured 12 command lines from ___inspect0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 223: Batch KEEP_GOING Precise: ___openvpn_create1 [db: /tmp/vpn-switch-arch-test.40159/test-222]
✓ Captured 175 command lines from ___openvpn_create1
✓ Selected 52 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 224: Batch KEEP_GOING Precise: ___openvpn_stop0 [db: /tmp/vpn-switch-arch-test.40159/test-223]
✓ Captured 1 command lines from ___openvpn_stop0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 225: Batch KEEP_GOING Precise: ___openvpn_inspect0 [db: /tmp/vpn-switch-arch-test.40159/test-224]
✓ Captured 3 command lines from ___openvpn_inspect0
✓ Selected 2 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 226: Batch KEEP_GOING Precise: ___openvpn_clean0 [db: /tmp/vpn-switch-arch-test.40159/test-225]
✓ Captured 3 command lines from ___openvpn_clean0
✓ Selected 3 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 227: Batch KEEP_GOING Precise: ___openvpn_dump0 [db: /tmp/vpn-switch-arch-test.40159/test-226]
✓ Captured 13 command lines from ___openvpn_dump0
✓ Selected 13 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 228: Batch KEEP_GOING Precise: ___session_dump0 [db: /tmp/vpn-switch-arch-test.40159/test-227]
✓ Captured 40 command lines from ___session_dump0
✓ Selected 10 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 229: Batch KEEP_GOING Precise: ___session_inspect0 [db: /tmp/vpn-switch-arch-test.40159/test-228]
✓ Captured 4 command lines from ___session_inspect0
✓ Selected 3 random line(s) for failure injection
✓ Injected failures into 3 function(s)
Note: Not all commands attempted (3/4)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 230: Batch KEEP_GOING Precise: ___validate0 [db: /tmp/vpn-switch-arch-test.40159/test-229]
✓ Captured 10 command lines from ___validate0
✓ Selected 10 random line(s) for failure injection
✓ Injected failures into 10 function(s)
Note: Not all commands attempted (10/11)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 231: Batch KEEP_GOING Precise: ___wireguard_create1 [db: /tmp/vpn-switch-arch-test.40159/test-230]
✓ Captured 175 command lines from ___wireguard_create1
✓ Selected 8 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 232: Batch KEEP_GOING Precise: ___wireguard_inspect0 [db: /tmp/vpn-switch-arch-test.40159/test-231]
✓ Captured 3 command lines from ___wireguard_inspect0
✓ Selected 3 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 233: Batch KEEP_GOING Precise: ___wireguard_stop0 [db: /tmp/vpn-switch-arch-test.40159/test-232]
✓ Captured 1 command lines from ___wireguard_stop0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 234: Batch KEEP_GOING Precise: ___wireguard_clean0 [db: /tmp/vpn-switch-arch-test.40159/test-233]
✓ Captured 9 command lines from ___wireguard_clean0
✓ Selected 9 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 235: Batch KEEP_GOING Precise: ___wireguard_clean1 [db: /tmp/vpn-switch-arch-test.40159/test-234]
✓ Captured 9 command lines from ___wireguard_clean1
✓ Selected 7 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 236: Batch KEEP_GOING Precise: ___wireguard_dump0 [db: /tmp/vpn-switch-arch-test.40159/test-235]
✓ Captured 34 command lines from ___wireguard_dump0
✓ Selected 11 random line(s) for failure injection
Skipped: No functions were injected with failures
Running Static Analysis Tests
========================================
Testing architecture violation scanner
TEST 237: Architecture Violation Scanner [db: /tmp/vpn-switch-arch-test.40159/test-236]
✓ Scanner executed successfully (exit code: 0)
Found: \033[0;31m1\033[0m total violations
✓ Scanner detection working (violations found as expected)
✓ Scanner detects MODIFY_* variable usage
Running Read-Only Database Tests
========================================
Testing that functions don't modify database at generation time
TEST 238: Read-Only Database: All functions [db: /tmp/vpn-switch-arch-test.40159/test-236]
Testing terminal functions...
✓ _session_create1: No permission errors on read-only database
✓ _interface_destroy1: No permission errors on read-only database
✓ _session_populate3: No permission errors on read-only database
✓ _link2: No permission errors on read-only database
✓ _remove1: No permission errors on read-only database
✓ _error1: No permission errors on read-only database
✓ _error2: No permission errors on read-only database
✓ _error3: No permission errors on read-only database
✓ _fail2: No permission errors on read-only database
✓ _log1: No permission errors on read-only database
✓ _log2: No permission errors on read-only database
✓ _log3: No permission errors on read-only database
✓ _lift1: No permission errors on read-only database
✓ _lift3: No permission errors on read-only database
Warning: setenv2: output differs between writable/readonly (but compliant)
✓ _setenv2: No permission errors on read-only database
✓ _getenv1: No permission errors on read-only database
✓ _unsetenv1: No permission errors on read-only database
✓ _printenv0: No permission errors on read-only database
Warning: status0: output differs between writable/readonly (but compliant)
✓ _status0: No permission errors on read-only database
✓ _help0: No permission errors on read-only database
✓ _help1: No permission errors on read-only database
Warning: database_enumerate0: output differs between writable/readonly (but compliant)
✓ _database_enumerate0: No permission errors on read-only database
✓ _system_inspect0: No permission errors on read-only database
Warning: logs_inspect0: output differs between writable/readonly (but compliant)
✓ _logs_inspect0: No permission errors on read-only database
✓ _phases_inspect0: No permission errors on read-only database
✓ _summary_inspect0: No permission errors on read-only database
✓ _prologue_inspect0: No permission errors on read-only database
✓ _openvpn_patch2: No permission errors on read-only database
✓ _openvpn_configure1: No permission errors on read-only database
✓ _openvpn_connect1: No permission errors on read-only database
✓ _openvpn_disconnect1: No permission errors on read-only database
✓ _openvpn_patch1: No permission errors on read-only database
Warning: openvpn_enumerate0: output differs between writable/readonly (but compliant)
✓ _openvpn_enumerate0: No permission errors on read-only database
✓ _openvpn_import1: No permission errors on read-only database
✓ _openvpn_list0: No permission errors on read-only database
✓ _openvpn_list1: No permission errors on read-only database
✓ _openvpn_add1: No permission errors on read-only database
✓ _openvpn_add3: No permission errors on read-only database
✓ _openvpn_link2: No permission errors on read-only database
✓ _openvpn_remove1: No permission errors on read-only database
✓ _openvpn_remove2: No permission errors on read-only database
✓ _openvpn_validate0: No permission errors on read-only database
✓ _openvpn_info1: No permission errors on read-only database
✓ _session_list0: No permission errors on read-only database
✓ _session_show1: No permission errors on read-only database
✓ _session_remove1: No permission errors on read-only database
✓ _session_connect1: No permission errors on read-only database
✓ _session_save0: No permission errors on read-only database
✓ _session_save1: No permission errors on read-only database
✓ _session_clean0: No permission errors on read-only database
✓ _session_validate0: No permission errors on read-only database
✓ _session_enumerate0: No permission errors on read-only database
✓ _session_describe0: No permission errors on read-only database
✓ _logs_validate0: No permission errors on read-only database
✓ _logs_clean0: No permission errors on read-only database
✓ _phases_validate0: No permission errors on read-only database
✓ _database_validate0: No permission errors on read-only database
✓ _binaries_validate0: No permission errors on read-only database
✓ _network_validate0: No permission errors on read-only database
✓ _permissions_validate0: No permission errors on read-only database
✓ _environment_validate0: No permission errors on read-only database
✓ _wireguard_patch2: No permission errors on read-only database
✓ _wireguard_configure1: No permission errors on read-only database
✓ _wireguard_connect1: No permission errors on read-only database
✓ _wireguard_disconnect1: No permission errors on read-only database
Warning: wireguard_enumerate0: output differs between writable/readonly (but compliant)
✓ _wireguard_enumerate0: No permission errors on read-only database
✓ _wireguard_import1: No permission errors on read-only database
✓ _wireguard_list0: No permission errors on read-only database
✓ _wireguard_list1: No permission errors on read-only database
✓ _wireguard_add1: No permission errors on read-only database
✓ _wireguard_add3: No permission errors on read-only database
✓ _wireguard_link2: No permission errors on read-only database
✓ _wireguard_remove1: No permission errors on read-only database
✓ _wireguard_remove2: No permission errors on read-only database
✓ _wireguard_validate0: No permission errors on read-only database
✓ _wireguard_patch1: No permission errors on read-only database
✓ _wireguard_info1: No permission errors on read-only database
Testing combinator functions...
✓ __session_exists1: No permission errors on read-only database
✓ __session_conflicts2: No permission errors on read-only database
✓ __interface_check1: No permission errors on read-only database
✓ __stop1: No permission errors on read-only database
✓ __import1: No permission errors on read-only database
✓ __start1: No permission errors on read-only database
✓ __start0: No permission errors on read-only database
✓ __bootstrap1: No permission errors on read-only database
✓ __environment_cache0: No permission errors on read-only database
✓ __phases_lift1: No permission errors on read-only database
✓ __init0: No permission errors on read-only database
✓ __batch1: No permission errors on read-only database
✓ __restore1: No permission errors on read-only database
Warning: openvpn_start0: output differs between writable/readonly (but compliant)
✓ __openvpn_start0: No permission errors on read-only database
✓ __openvpn_start1: No permission errors on read-only database
✓ __openvpn_stop1: No permission errors on read-only database
✓ __openvpn_add2: No permission errors on read-only database
✓ __openvpn_help0: No permission errors on read-only database
✓ __session_disconnect1: No permission errors on read-only database
✓ __session_show0: No permission errors on read-only database
✓ __session_start0: No permission errors on read-only database
✓ __session_start1: No permission errors on read-only database
✓ __session_help0: No permission errors on read-only database
Warning: wireguard_start0: output differs between writable/readonly (but compliant)
✓ __wireguard_start0: No permission errors on read-only database
✓ __wireguard_start1: No permission errors on read-only database
✓ __wireguard_stop1: No permission errors on read-only database
✓ __wireguard_add2: No permission errors on read-only database
✓ __wireguard_help0: No permission errors on read-only database
Testing batch combinator functions...
✓ ___session_prepare3: No permission errors on read-only database
✓ ___stop0: No permission errors on read-only database
✓ ___phases_sync1: No permission errors on read-only database
✓ ___phases_sync0: No permission errors on read-only database
✓ ___list0: No permission errors on read-only database
✓ ___dumpenv1: No permission errors on read-only database
Warning: dump0: output differs between writable/readonly (but compliant)
✓ ___dump0: No permission errors on read-only database
Warning: batch0: output differs between writable/readonly (but compliant)
✓ ___batch0: No permission errors on read-only database
✓ ___environment_inspect0: No permission errors on read-only database
✓ ___inspect0: No permission errors on read-only database
Warning: openvpn_create1: output differs between writable/readonly (but compliant)
✓ ___openvpn_create1: No permission errors on read-only database
✓ ___openvpn_stop0: No permission errors on read-only database
✓ ___openvpn_inspect0: No permission errors on read-only database
✓ ___openvpn_clean0: No permission errors on read-only database
✓ ___openvpn_dump0: No permission errors on read-only database
✓ ___session_dump0: No permission errors on read-only database
✓ ___session_inspect0: No permission errors on read-only database
✓ ___validate0: No permission errors on read-only database
Warning: wireguard_create1: output differs between writable/readonly (but compliant)
✓ ___wireguard_create1: No permission errors on read-only database
✓ ___wireguard_inspect0: No permission errors on read-only database
✓ ___wireguard_stop0: No permission errors on read-only database
✓ ___wireguard_clean0: No permission errors on read-only database
✓ ___wireguard_clean1: No permission errors on read-only database
✓ ___wireguard_dump0: No permission errors on read-only database
Summary: Tested 129 functions, skipped 8
========================================
Architecture Test Summary
========================================
Test Functions: 238
Total Assertions: 408
Passed Assertions: 408
Failed Assertions: 0
ALL TESTS PASSED
Cleaning up test databases...
Done.
========================================
vpn-switch Architecture Test Suite
========================================
Testing architectural rules for combinator functions
Profile: minimal
Running Combinator Tests
========================================
Found 28 combinator functions
TEST 1: Combinator: __session_exists1 - validate syntax with variations
✓ __session_exists1: Valid combinator syntax (all variations)
TEST 2: Combinator: __session_conflicts2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-1]
✓ __session_conflicts2: Valid combinator syntax (all variations)
TEST 3: Combinator: __interface_check1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-2]
✓ __interface_check1: Valid combinator syntax (all variations)
TEST 4: Combinator: __stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-3]
✓ __stop1: Valid combinator syntax (all variations)
TEST 5: Combinator: __import1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-4]
✓ __import1: Valid combinator syntax (all variations)
TEST 6: Combinator: __start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-5]
✓ __start1: Valid combinator syntax (all variations)
TEST 7: Combinator: __start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-6]
✓ __start0: Valid combinator syntax (all variations)
TEST 8: Combinator: __bootstrap1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-7]
✓ __bootstrap1: Valid combinator syntax (all variations)
TEST 9: Combinator: __environment_cache0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-8]
✓ __environment_cache0: Valid combinator syntax (all variations)
TEST 10: Combinator: __phases_lift1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-9]
✓ __phases_lift1: Valid combinator syntax (all variations)
TEST 11: Combinator: __init0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-10]
✓ __init0: Valid combinator syntax (all variations)
TEST 12: Combinator: __batch1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-11]
✓ __batch1: Valid combinator syntax (all variations)
TEST 13: Combinator: __restore1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-12]
✓ __restore1: Valid combinator syntax (all variations)
TEST 14: Combinator: __openvpn_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-13]
✓ __openvpn_start0: Valid combinator syntax (all variations)
TEST 15: Combinator: __openvpn_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-14]
✓ __openvpn_start1: Valid combinator syntax (all variations)
TEST 16: Combinator: __openvpn_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-15]
✓ __openvpn_stop1: Valid combinator syntax (all variations)
TEST 17: Combinator: __openvpn_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-16]
✓ __openvpn_add2: Valid combinator syntax (all variations)
TEST 18: Combinator: __openvpn_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-17]
✓ __openvpn_help0: Valid combinator syntax (all variations)
TEST 19: Combinator: __session_disconnect1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-18]
✓ __session_disconnect1: Valid combinator syntax (all variations)
TEST 20: Combinator: __session_show0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-19]
✓ __session_show0: Valid combinator syntax (all variations)
TEST 21: Combinator: __session_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-20]
✓ __session_start0: Valid combinator syntax (all variations)
TEST 22: Combinator: __session_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-21]
✓ __session_start1: Valid combinator syntax (all variations)
TEST 23: Combinator: __session_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-22]
✓ __session_help0: Valid combinator syntax (all variations)
TEST 24: Combinator: __wireguard_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-23]
✓ __wireguard_start0: Valid combinator syntax (all variations)
TEST 25: Combinator: __wireguard_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-24]
✓ __wireguard_start1: Valid combinator syntax (all variations)
TEST 26: Combinator: __wireguard_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-25]
✓ __wireguard_stop1: Valid combinator syntax (all variations)
TEST 27: Combinator: __wireguard_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-26]
✓ __wireguard_add2: Valid combinator syntax (all variations)
TEST 28: Combinator: __wireguard_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-27]
✓ __wireguard_help0: Valid combinator syntax (all variations)
Running Batch Combinator Tests
========================================
Found 26 batch combinator functions
TEST 29: Batch Combinator: ___session_prepare3 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-28]
✓ ___session_prepare3: Valid batch combinator syntax (all variations)
TEST 30: Batch Combinator: ___stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-29]
✓ ___stop0: Valid batch combinator syntax (all variations)
TEST 31: Batch Combinator: ___phases_sync1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-30]
✓ ___phases_sync1: Valid batch combinator syntax (all variations)
TEST 32: Batch Combinator: ___phases_sync0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-31]
✓ ___phases_sync0: Valid batch combinator syntax (all variations)
TEST 33: Batch Combinator: ___list0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-32]
✓ ___list0: Valid batch combinator syntax (all variations)
TEST 34: Batch Combinator: ___bootstrap2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-33]
✓ ___bootstrap2: Valid batch combinator syntax (all variations)
TEST 35: Batch Combinator: ___init1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-34]
✓ ___init1: Valid batch combinator syntax (all variations)
TEST 36: Batch Combinator: ___dumpenv1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-35]
✓ ___dumpenv1: Valid batch combinator syntax (all variations)
TEST 37: Batch Combinator: ___dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-36]
✓ ___dump0: Valid batch combinator syntax (all variations)
TEST 38: Batch Combinator: ___batch0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-37]
✓ ___batch0: Valid batch combinator syntax (all variations)
TEST 39: Batch Combinator: ___environment_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-38]
✓ ___environment_inspect0: Valid batch combinator syntax (all variations)
TEST 40: Batch Combinator: ___inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-39]
✓ ___inspect0: Valid batch combinator syntax (all variations)
TEST 41: Batch Combinator: ___openvpn_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-40]
✓ ___openvpn_create1: Valid batch combinator syntax (all variations)
TEST 42: Batch Combinator: ___openvpn_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-41]
✓ ___openvpn_stop0: Valid batch combinator syntax (all variations)
TEST 43: Batch Combinator: ___openvpn_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-42]
✓ ___openvpn_inspect0: Valid batch combinator syntax (all variations)
TEST 44: Batch Combinator: ___openvpn_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-43]
✓ ___openvpn_clean0: Valid batch combinator syntax (all variations)
TEST 45: Batch Combinator: ___openvpn_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-44]
✓ ___openvpn_dump0: Valid batch combinator syntax (all variations)
TEST 46: Batch Combinator: ___session_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-45]
✓ ___session_dump0: Valid batch combinator syntax (all variations)
TEST 47: Batch Combinator: ___session_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-46]
✓ ___session_inspect0: Valid batch combinator syntax (all variations)
TEST 48: Batch Combinator: ___validate0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-47]
✓ ___validate0: Valid batch combinator syntax (all variations)
TEST 49: Batch Combinator: ___wireguard_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-48]
✓ ___wireguard_create1: Valid batch combinator syntax (all variations)
TEST 50: Batch Combinator: ___wireguard_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-49]
✓ ___wireguard_inspect0: Valid batch combinator syntax (all variations)
TEST 51: Batch Combinator: ___wireguard_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-50]
✓ ___wireguard_stop0: Valid batch combinator syntax (all variations)
TEST 52: Batch Combinator: ___wireguard_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-51]
✓ ___wireguard_clean0: Valid batch combinator syntax (all variations)
TEST 53: Batch Combinator: ___wireguard_clean1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-52]
✓ ___wireguard_clean1: Valid batch combinator syntax (all variations)
TEST 54: Batch Combinator: ___wireguard_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.18197/test-53]
✓ ___wireguard_dump0: Valid batch combinator syntax (all variations)
Running Terminal Function Tests
========================================
Found 83 terminal functions
TEST 55: Terminal: _session_create1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-54]
✓ _session_create1: Valid terminal function output (all variations)
TEST 56: Terminal: _interface_destroy1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-55]
✓ _interface_destroy1: Valid terminal function output (all variations)
TEST 57: Terminal: _session_populate3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-56]
✓ _session_populate3: Valid terminal function output (all variations)
TEST 58: Terminal: _phases_copy0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-57]
✓ _phases_copy0: Valid terminal function output (all variations)
TEST 59: Terminal: _link2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-58]
✓ _link2: Valid terminal function output (all variations)
TEST 60: Terminal: _remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-59]
✓ _remove1: Valid terminal function output (all variations)
TEST 61: Terminal: _error1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-60]
✓ _error1: Valid terminal function output (all variations)
TEST 62: Terminal: _error2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-61]
✓ _error2: Valid terminal function output (all variations)
TEST 63: Terminal: _error3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-62]
✓ _error3: Valid terminal function output (all variations)
TEST 64: Terminal: _fail2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-63]
✓ _fail2: Valid terminal function output (all variations)
TEST 65: Terminal: _log1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-64]
✓ _log1: Valid terminal function output (all variations)
TEST 66: Terminal: _log2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-65]
✓ _log2: Valid terminal function output (all variations)
TEST 67: Terminal: _log3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-66]
✓ _log3: Valid terminal function output (all variations)
TEST 68: Terminal: _lift1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-67]
✓ _lift1: Valid terminal function output (all variations)
TEST 69: Terminal: _database_init0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-68]
✓ _database_init0: Valid terminal function output (all variations)
TEST 70: Terminal: _environment_init1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-69]
✓ _environment_init1: Valid terminal function output (all variations)
TEST 71: Terminal: _environment_cache1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-70]
✓ _environment_cache1: Valid terminal function output (all variations)
TEST 72: Terminal: _lift3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-71]
✓ _lift3: Valid terminal function output (all variations)
TEST 73: Terminal: _setenv2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-72]
✓ _setenv2: Valid terminal function output (all variations)
TEST 74: Terminal: _getenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-73]
✓ _getenv1: Valid terminal function output (all variations)
TEST 75: Terminal: _unsetenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-74]
✓ _unsetenv1: Valid terminal function output (all variations)
Skipped: _cat1 (requires special setup)
TEST 76: Terminal: _batch2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-75]
✓ _batch2: Valid terminal function output (all variations)
TEST 77: Terminal: _printenv0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-76]
✓ _printenv0: Valid terminal function output (all variations)
TEST 78: Terminal: _status0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-77]
✓ _status0: Valid terminal function output (all variations)
TEST 79: Terminal: _help0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-78]
✓ _help0: Valid terminal function output (all variations)
TEST 80: Terminal: _help1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-79]
✓ _help1: Valid terminal function output (all variations)
TEST 81: Terminal: _database_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-80]
✓ _database_enumerate0: Valid terminal function output (all variations)
TEST 82: Terminal: _system_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-81]
✓ _system_inspect0: Valid terminal function output (all variations)
TEST 83: Terminal: _logs_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-82]
✓ _logs_inspect0: Valid terminal function output (all variations)
TEST 84: Terminal: _phases_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-83]
✓ _phases_inspect0: Valid terminal function output (all variations)
TEST 85: Terminal: _summary_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-84]
✓ _summary_inspect0: Valid terminal function output (all variations)
TEST 86: Terminal: _prologue_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-85]
✓ _prologue_inspect0: Valid terminal function output (all variations)
TEST 87: Terminal: _openvpn_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-86]
✓ _openvpn_patch2: Valid terminal function output (all variations)
TEST 88: Terminal: _openvpn_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-87]
✓ _openvpn_configure1: Valid terminal function output (all variations)
TEST 89: Terminal: _openvpn_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-88]
✓ _openvpn_connect1: Valid terminal function output (all variations)
TEST 90: Terminal: _openvpn_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-89]
✓ _openvpn_disconnect1: Valid terminal function output (all variations)
TEST 91: Terminal: _openvpn_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-90]
✓ _openvpn_patch1: Valid terminal function output (all variations)
TEST 92: Terminal: _openvpn_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-91]
✓ _openvpn_enumerate0: Valid terminal function output (all variations)
TEST 93: Terminal: _openvpn_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-92]
✓ _openvpn_import1: Valid terminal function output (all variations)
TEST 94: Terminal: _openvpn_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-93]
✓ _openvpn_list0: Valid terminal function output (all variations)
TEST 95: Terminal: _openvpn_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-94]
✓ _openvpn_list1: Valid terminal function output (all variations)
TEST 96: Terminal: _openvpn_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-95]
✓ _openvpn_add1: Valid terminal function output (all variations)
TEST 97: Terminal: _openvpn_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-96]
✓ _openvpn_add3: Valid terminal function output (all variations)
TEST 98: Terminal: _openvpn_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-97]
✓ _openvpn_link2: Valid terminal function output (all variations)
TEST 99: Terminal: _openvpn_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-98]
✓ _openvpn_remove1: Valid terminal function output (all variations)
TEST 100: Terminal: _openvpn_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-99]
✓ _openvpn_remove2: Valid terminal function output (all variations)
TEST 101: Terminal: _openvpn_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-100]
✓ _openvpn_validate0: Valid terminal function output (all variations)
TEST 102: Terminal: _openvpn_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-101]
✓ _openvpn_info1: Valid terminal function output (all variations)
TEST 103: Terminal: _session_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-102]
✓ _session_list0: Valid terminal function output (all variations)
TEST 104: Terminal: _session_show1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-103]
✓ _session_show1: Valid terminal function output (all variations)
TEST 105: Terminal: _session_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-104]
✓ _session_remove1: Valid terminal function output (all variations)
TEST 106: Terminal: _session_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-105]
✓ _session_connect1: Valid terminal function output (all variations)
TEST 107: Terminal: _session_save0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-106]
✓ _session_save0: Valid terminal function output (all variations)
TEST 108: Terminal: _session_save1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-107]
✓ _session_save1: Valid terminal function output (all variations)
TEST 109: Terminal: _session_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-108]
✓ _session_clean0: Valid terminal function output (all variations)
TEST 110: Terminal: _session_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-109]
✓ _session_validate0: Valid terminal function output (all variations)
TEST 111: Terminal: _session_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-110]
✓ _session_enumerate0: Valid terminal function output (all variations)
TEST 112: Terminal: _session_describe0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-111]
✓ _session_describe0: Valid terminal function output (all variations)
TEST 113: Terminal: _logs_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-112]
✓ _logs_validate0: Valid terminal function output (all variations)
TEST 114: Terminal: _logs_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-113]
✓ _logs_clean0: Valid terminal function output (all variations)
TEST 115: Terminal: _phases_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-114]
✓ _phases_validate0: Valid terminal function output (all variations)
TEST 116: Terminal: _database_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-115]
✓ _database_validate0: Valid terminal function output (all variations)
TEST 117: Terminal: _binaries_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-116]
✓ _binaries_validate0: Valid terminal function output (all variations)
TEST 118: Terminal: _network_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-117]
✓ _network_validate0: Valid terminal function output (all variations)
TEST 119: Terminal: _permissions_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-118]
✓ _permissions_validate0: Valid terminal function output (all variations)
TEST 120: Terminal: _environment_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-119]
✓ _environment_validate0: Valid terminal function output (all variations)
TEST 121: Terminal: _wireguard_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-120]
✓ _wireguard_patch2: Valid terminal function output (all variations)
TEST 122: Terminal: _wireguard_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-121]
✓ _wireguard_configure1: Valid terminal function output (all variations)
TEST 123: Terminal: _wireguard_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-122]
✓ _wireguard_connect1: Valid terminal function output (all variations)
TEST 124: Terminal: _wireguard_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-123]
✓ _wireguard_disconnect1: Valid terminal function output (all variations)
TEST 125: Terminal: _wireguard_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-124]
✓ _wireguard_enumerate0: Valid terminal function output (all variations)
TEST 126: Terminal: _wireguard_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-125]
✓ _wireguard_import1: Valid terminal function output (all variations)
TEST 127: Terminal: _wireguard_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-126]
✓ _wireguard_list0: Valid terminal function output (all variations)
TEST 128: Terminal: _wireguard_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-127]
✓ _wireguard_list1: Valid terminal function output (all variations)
TEST 129: Terminal: _wireguard_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-128]
✓ _wireguard_add1: Valid terminal function output (all variations)
TEST 130: Terminal: _wireguard_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-129]
✓ _wireguard_add3: Valid terminal function output (all variations)
TEST 131: Terminal: _wireguard_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-130]
✓ _wireguard_link2: Valid terminal function output (all variations)
TEST 132: Terminal: _wireguard_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-131]
✓ _wireguard_remove1: Valid terminal function output (all variations)
TEST 133: Terminal: _wireguard_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-132]
✓ _wireguard_remove2: Valid terminal function output (all variations)
TEST 134: Terminal: _wireguard_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-133]
✓ _wireguard_validate0: Valid terminal function output (all variations)
TEST 135: Terminal: _wireguard_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-134]
✓ _wireguard_patch1: Valid terminal function output (all variations)
TEST 136: Terminal: _wireguard_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.18197/test-135]
✓ _wireguard_info1: Valid terminal function output (all variations)
Running Error Propagation Tests (KEEP_GOING)
========================================
TEST 137: Batch Error Propagation - test _batch2 with failing commands [db: /tmp/vpn-switch-arch-test.18197/test-136]
TEST 138: Sub-test: KEEP_GOING=0 (fail-fast mode) [db: /tmp/vpn-switch-arch-test.18197/test-137]
✓ KEEP_GOING=0: Batch execution stopped on first error
TEST 139: Sub-test: KEEP_GOING=1 (continue mode) [db: /tmp/vpn-switch-arch-test.18197/test-137]
✓ KEEP_GOING=1: Batch execution completed despite errors
✓ KEEP_GOING=1: All commands were executed (count=3)
TEST 140: Recursive Batch Error Propagation - test chained _batch2 calls [db: /tmp/vpn-switch-arch-test.18197/test-137]
✓ Recursive fail-fast: Command 3 in batch 3 was not executed
✓ Recursive fail-fast: Batch 2 stopped after error in batch 3
✓ Recursive fail-fast: Batch 1 stopped after error in nested batch
✓ Recursive continue: Batch 2 continued after error in batch 3
✓ Recursive continue: Batch 1 continued after error in nested batch
TEST 141: Batch KEEP_GOING with Realistic Dump File [db: /tmp/vpn-switch-arch-test.18197/test-140]
✓ Created realistic batch file with 8 commands
✓ Selected command at position 5/8 for failure injection
TEST 142: Sub-test: KEEP_GOING=0 at position 5/8 [db: /tmp/vpn-switch-arch-test.18197/test-141]
✓ KEEP_GOING=0: Stopped at or before position 5 (executed 5 commands)
✓ KEEP_GOING=0: Error stop message present
TEST 143: Sub-test: KEEP_GOING=1 at position 5/8 [db: /tmp/vpn-switch-arch-test.18197/test-141]
✓ KEEP_GOING=1: All commands executed (8/8)
✓ KEEP_GOING=1: Completion message present
✓ KEEP_GOING=1: Failure markers present in output
Running Batch Combinator Error Propagation Tests
========================================
Testing ALL batch combinators with error injection and KEEP_GOING validation
Found 26 batch combinator functions
TEST 144: Batch Transitive Hull: ___session_prepare3 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-141]
TEST 145: Sub-test: Walk command tree for '___session_prepare3' (command: session_prepare) [db: /tmp/vpn-switch-arch-test.18197/test-144]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 146: Batch Transitive Hull: ___stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-144]
TEST 147: Sub-test: Walk command tree for '___stop0' (command: stop) [db: /tmp/vpn-switch-arch-test.18197/test-146]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 148: Sub-test: Inject failure at node '___stop0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-146]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 149: Batch Transitive Hull: ___phases_sync1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-146]
TEST 150: Sub-test: Walk command tree for '___phases_sync1' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.18197/test-149]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 151: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-149]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 152: Batch Transitive Hull: ___phases_sync0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-149]
TEST 153: Sub-test: Walk command tree for '___phases_sync0' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.18197/test-152]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 154: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-152]
✓ KEEP_GOING affects output: fail-fast= 4 lines, continue= 4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 155: Batch Transitive Hull: ___list0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-152]
TEST 156: Sub-test: Walk command tree for '___list0' (command: list) [db: /tmp/vpn-switch-arch-test.18197/test-155]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 157: Sub-test: Inject failure at node '___list0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-155]
✓ KEEP_GOING affects output: fail-fast= 2 lines, continue= 2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 158: Batch Transitive Hull: ___bootstrap2 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-155]
TEST 159: Sub-test: Walk command tree for '___bootstrap2' (command: bootstrap) [db: /tmp/vpn-switch-arch-test.18197/test-158]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 6 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 160: Batch Transitive Hull: ___init1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-158]
TEST 161: Sub-test: Walk command tree for '___init1' (command: init) [db: /tmp/vpn-switch-arch-test.18197/test-160]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 162: Sub-test: Inject failure at node '__init0' (node 1/1) [db: /tmp/vpn-switch-arch-test.18197/test-160]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 163: Batch Transitive Hull: ___dumpenv1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-160]
TEST 164: Sub-test: Walk command tree for '___dumpenv1' (command: dumpenv) [db: /tmp/vpn-switch-arch-test.18197/test-163]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 165: Batch Transitive Hull: ___dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-163]
TEST 166: Sub-test: Walk command tree for '___dump0' (command: dump) [db: /tmp/vpn-switch-arch-test.18197/test-165]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 167: Sub-test: Inject failure at node '___dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-165]
✓ KEEP_GOING affects output: fail-fast= 17 lines, continue= 17 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
TEST 168: Batch Transitive Hull: ___batch0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-165]
TEST 169: Sub-test: Walk command tree for '___batch0' (command: batch) [db: /tmp/vpn-switch-arch-test.18197/test-168]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 170: Sub-test: Inject failure at node '___batch0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-168]
✓ KEEP_GOING affects output: fail-fast= 2 lines, continue= 2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 171: Batch Transitive Hull: ___environment_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-168]
TEST 172: Sub-test: Walk command tree for '___environment_inspect0' (command: environment_inspect) [db: /tmp/vpn-switch-arch-test.18197/test-171]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 173: Sub-test: Inject failure at node '___environment_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-171]
✓ KEEP_GOING affects output: fail-fast= 3 lines, continue= 3 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 174: Batch Transitive Hull: ___inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-171]
TEST 175: Sub-test: Walk command tree for '___inspect0' (command: inspect) [db: /tmp/vpn-switch-arch-test.18197/test-174]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 176: Sub-test: Inject failure at node '___inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-174]
✓ KEEP_GOING affects output: fail-fast= 12 lines, continue= 12 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 177: Batch Transitive Hull: ___openvpn_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-174]
TEST 178: Sub-test: Walk command tree for '___openvpn_create1' (command: openvpn_create) [db: /tmp/vpn-switch-arch-test.18197/test-177]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 179: Batch Transitive Hull: ___openvpn_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-177]
TEST 180: Sub-test: Walk command tree for '___openvpn_stop0' (command: openvpn_stop) [db: /tmp/vpn-switch-arch-test.18197/test-179]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 181: Sub-test: Inject failure at node '___openvpn_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.18197/test-179]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 182: Batch Transitive Hull: ___openvpn_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-179]
TEST 183: Sub-test: Walk command tree for '___openvpn_inspect0' (command: openvpn_inspect) [db: /tmp/vpn-switch-arch-test.18197/test-182]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 184: Sub-test: Inject failure at node '___openvpn_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-182]
✓ KEEP_GOING affects output: fail-fast= 7 lines, continue= 7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 185: Batch Transitive Hull: ___openvpn_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-182]
TEST 186: Sub-test: Walk command tree for '___openvpn_clean0' (command: openvpn_clean) [db: /tmp/vpn-switch-arch-test.18197/test-185]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 187: Batch Transitive Hull: ___openvpn_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-185]
TEST 188: Sub-test: Walk command tree for '___openvpn_dump0' (command: openvpn_dump) [db: /tmp/vpn-switch-arch-test.18197/test-187]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 189: Sub-test: Inject failure at node '___openvpn_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-187]
✓ KEEP_GOING affects output: fail-fast= 20 lines, continue= 20 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 190: Batch Transitive Hull: ___session_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-187]
TEST 191: Sub-test: Walk command tree for '___session_dump0' (command: session_dump) [db: /tmp/vpn-switch-arch-test.18197/test-190]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 192: Sub-test: Inject failure at node '___session_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-190]
✓ KEEP_GOING affects output: fail-fast= 41 lines, continue= 41 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 193: Batch Transitive Hull: ___session_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-190]
TEST 194: Sub-test: Walk command tree for '___session_inspect0' (command: session_inspect) [db: /tmp/vpn-switch-arch-test.18197/test-193]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 195: Sub-test: Inject failure at node '___session_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-193]
✓ KEEP_GOING affects output: fail-fast= 5 lines, continue= 5 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 196: Batch Transitive Hull: ___validate0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-193]
TEST 197: Sub-test: Walk command tree for '___validate0' (command: validate) [db: /tmp/vpn-switch-arch-test.18197/test-196]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 198: Sub-test: Inject failure at node '___validate0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-196]
✓ KEEP_GOING affects output: fail-fast= 10 lines, continue= 10 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 199: Batch Transitive Hull: ___wireguard_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-196]
TEST 200: Sub-test: Walk command tree for '___wireguard_create1' (command: wireguard_create) [db: /tmp/vpn-switch-arch-test.18197/test-199]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 201: Batch Transitive Hull: ___wireguard_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-199]
TEST 202: Sub-test: Walk command tree for '___wireguard_inspect0' (command: wireguard_inspect) [db: /tmp/vpn-switch-arch-test.18197/test-201]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 203: Sub-test: Inject failure at node '___wireguard_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-201]
✓ KEEP_GOING affects output: fail-fast= 7 lines, continue= 7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 204: Batch Transitive Hull: ___wireguard_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-201]
TEST 205: Sub-test: Walk command tree for '___wireguard_stop0' (command: wireguard_stop) [db: /tmp/vpn-switch-arch-test.18197/test-204]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 206: Sub-test: Inject failure at node '___wireguard_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.18197/test-204]
✓ KEEP_GOING affects output: fail-fast= 1 lines, continue= 1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 207: Batch Transitive Hull: ___wireguard_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-204]
TEST 208: Sub-test: Walk command tree for '___wireguard_clean0' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.18197/test-207]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 209: Batch Transitive Hull: ___wireguard_clean1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-207]
TEST 210: Sub-test: Walk command tree for '___wireguard_clean1' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.18197/test-209]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 211: Batch Transitive Hull: ___wireguard_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.18197/test-209]
TEST 212: Sub-test: Walk command tree for '___wireguard_dump0' (command: wireguard_dump) [db: /tmp/vpn-switch-arch-test.18197/test-211]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 213: Sub-test: Inject failure at node '___wireguard_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.18197/test-211]
✓ KEEP_GOING affects output: fail-fast= 42 lines, continue= 42 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
Running Batch Combinator KEEP_GOING Precise Tests
========================================
Testing ALL batch combinators with precise architectural KEEP_GOING validation
Found 26 batch combinator functions
TEST 214: Batch KEEP_GOING Precise: ___session_prepare3 [db: /tmp/vpn-switch-arch-test.18197/test-211]
✓ Captured 143 command lines from ___session_prepare3
✓ Selected 112 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 215: Batch KEEP_GOING Precise: ___stop0 [db: /tmp/vpn-switch-arch-test.18197/test-214]
✓ Captured 2 command lines from ___stop0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
✓ KEEP_GOING=1: All commands attempted (2/2)
Skipped: ___phases_sync1 (requires phase template setup)
Skipped: ___phases_sync0 (requires phase template setup)
TEST 216: Batch KEEP_GOING Precise: ___list0 [db: /tmp/vpn-switch-arch-test.18197/test-215]
✓ Captured 2 command lines from ___list0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
✓ KEEP_GOING=1: All commands attempted (2/2)
TEST 217: Batch KEEP_GOING Precise: ___bootstrap2 [db: /tmp/vpn-switch-arch-test.18197/test-216]
✓ Captured 73 command lines from ___bootstrap2
✓ Selected 45 random line(s) for failure injection
Skipped: No functions were injected with failures
Skipped: ___init1 (complex initialization logic)
TEST 218: Batch KEEP_GOING Precise: ___dumpenv1 [db: /tmp/vpn-switch-arch-test.18197/test-217]
✓ Captured 143 command lines from ___dumpenv1
✓ Selected 139 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 219: Batch KEEP_GOING Precise: ___dump0 [db: /tmp/vpn-switch-arch-test.18197/test-218]
✓ Captured 5 command lines from ___dump0
✓ Selected 3 random line(s) for failure injection
✓ Injected failures into 1 function(s)
Note: Not all commands attempted (3/5)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 220: Batch KEEP_GOING Precise: ___batch0 [db: /tmp/vpn-switch-arch-test.18197/test-219]
✓ Captured 2 command lines from ___batch0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 221: Batch KEEP_GOING Precise: ___environment_inspect0 [db: /tmp/vpn-switch-arch-test.18197/test-220]
✓ Captured 2 command lines from ___environment_inspect0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
✓ KEEP_GOING=1: All commands attempted (2/2)
TEST 222: Batch KEEP_GOING Precise: ___inspect0 [db: /tmp/vpn-switch-arch-test.18197/test-221]
✓ Captured 12 command lines from ___inspect0
✓ Selected 5 random line(s) for failure injection
✓ Injected failures into 5 function(s)
Note: Not all commands attempted (10/12)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 223: Batch KEEP_GOING Precise: ___openvpn_create1 [db: /tmp/vpn-switch-arch-test.18197/test-222]
✓ Captured 143 command lines from ___openvpn_create1
✓ Selected 140 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 224: Batch KEEP_GOING Precise: ___openvpn_stop0 [db: /tmp/vpn-switch-arch-test.18197/test-223]
✓ Captured 1 command lines from ___openvpn_stop0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 225: Batch KEEP_GOING Precise: ___openvpn_inspect0 [db: /tmp/vpn-switch-arch-test.18197/test-224]
✓ Captured 3 command lines from ___openvpn_inspect0
✓ Selected 2 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 226: Batch KEEP_GOING Precise: ___openvpn_clean0 [db: /tmp/vpn-switch-arch-test.18197/test-225]
✓ Captured 3 command lines from ___openvpn_clean0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 227: Batch KEEP_GOING Precise: ___openvpn_dump0 [db: /tmp/vpn-switch-arch-test.18197/test-226]
✓ Captured 13 command lines from ___openvpn_dump0
✓ Selected 4 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 228: Batch KEEP_GOING Precise: ___session_dump0 [db: /tmp/vpn-switch-arch-test.18197/test-227]
✓ Captured 40 command lines from ___session_dump0
✓ Selected 30 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 229: Batch KEEP_GOING Precise: ___session_inspect0 [db: /tmp/vpn-switch-arch-test.18197/test-228]
✓ Captured 4 command lines from ___session_inspect0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
Note: Not all commands attempted (3/4)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 230: Batch KEEP_GOING Precise: ___validate0 [db: /tmp/vpn-switch-arch-test.18197/test-229]
✓ Captured 10 command lines from ___validate0
✓ Selected 2 random line(s) for failure injection
✓ Injected failures into 2 function(s)
✓ KEEP_GOING=1: All commands attempted (10/10)
TEST 231: Batch KEEP_GOING Precise: ___wireguard_create1 [db: /tmp/vpn-switch-arch-test.18197/test-230]
✓ Captured 143 command lines from ___wireguard_create1
✓ Selected 125 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 232: Batch KEEP_GOING Precise: ___wireguard_inspect0 [db: /tmp/vpn-switch-arch-test.18197/test-231]
✓ Captured 3 command lines from ___wireguard_inspect0
✓ Selected 3 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 233: Batch KEEP_GOING Precise: ___wireguard_stop0 [db: /tmp/vpn-switch-arch-test.18197/test-232]
✓ Captured 1 command lines from ___wireguard_stop0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 234: Batch KEEP_GOING Precise: ___wireguard_clean0 [db: /tmp/vpn-switch-arch-test.18197/test-233]
✓ Captured 9 command lines from ___wireguard_clean0
✓ Selected 6 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 235: Batch KEEP_GOING Precise: ___wireguard_clean1 [db: /tmp/vpn-switch-arch-test.18197/test-234]
✓ Captured 9 command lines from ___wireguard_clean1
✓ Selected 6 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 236: Batch KEEP_GOING Precise: ___wireguard_dump0 [db: /tmp/vpn-switch-arch-test.18197/test-235]
✓ Captured 34 command lines from ___wireguard_dump0
✓ Selected 22 random line(s) for failure injection
Skipped: No functions were injected with failures
Running Static Analysis Tests
========================================
Testing architecture violation scanner
TEST 237: Architecture Violation Scanner [db: /tmp/vpn-switch-arch-test.18197/test-236]
✓ Scanner executed successfully (exit code: 0)
Found: \033[0;31m1\033[0m total violations
✓ Scanner detection working (violations found as expected)
✓ Scanner detects MODIFY_* variable usage
Running Read-Only Database Tests
========================================
Testing that functions don't modify database at generation time
TEST 238: Read-Only Database: All functions [db: /tmp/vpn-switch-arch-test.18197/test-236]
Testing terminal functions...
✓ _session_create1: No permission errors on read-only database
✓ _interface_destroy1: No permission errors on read-only database
✓ _session_populate3: No permission errors on read-only database
✓ _link2: No permission errors on read-only database
✓ _remove1: No permission errors on read-only database
✓ _error1: No permission errors on read-only database
✓ _error2: No permission errors on read-only database
✓ _error3: No permission errors on read-only database
✓ _fail2: No permission errors on read-only database
✓ _log1: No permission errors on read-only database
✓ _log2: No permission errors on read-only database
✓ _log3: No permission errors on read-only database
✓ _lift1: No permission errors on read-only database
✓ _lift3: No permission errors on read-only database
Warning: setenv2: output differs between writable/readonly (but compliant)
✓ _setenv2: No permission errors on read-only database
✓ _getenv1: No permission errors on read-only database
✓ _unsetenv1: No permission errors on read-only database
✓ _printenv0: No permission errors on read-only database
Warning: status0: output differs between writable/readonly (but compliant)
✓ _status0: No permission errors on read-only database
✓ _help0: No permission errors on read-only database
✓ _help1: No permission errors on read-only database
Warning: database_enumerate0: output differs between writable/readonly (but compliant)
✓ _database_enumerate0: No permission errors on read-only database
✓ _system_inspect0: No permission errors on read-only database
Warning: logs_inspect0: output differs between writable/readonly (but compliant)
✓ _logs_inspect0: No permission errors on read-only database
✓ _phases_inspect0: No permission errors on read-only database
✓ _summary_inspect0: No permission errors on read-only database
✓ _prologue_inspect0: No permission errors on read-only database
✓ _openvpn_patch2: No permission errors on read-only database
✓ _openvpn_configure1: No permission errors on read-only database
✓ _openvpn_connect1: No permission errors on read-only database
✓ _openvpn_disconnect1: No permission errors on read-only database
✓ _openvpn_patch1: No permission errors on read-only database
Warning: openvpn_enumerate0: output differs between writable/readonly (but compliant)
✓ _openvpn_enumerate0: No permission errors on read-only database
✓ _openvpn_import1: No permission errors on read-only database
✓ _openvpn_list0: No permission errors on read-only database
✓ _openvpn_list1: No permission errors on read-only database
✓ _openvpn_add1: No permission errors on read-only database
✓ _openvpn_add3: No permission errors on read-only database
✓ _openvpn_link2: No permission errors on read-only database
✓ _openvpn_remove1: No permission errors on read-only database
✓ _openvpn_remove2: No permission errors on read-only database
✓ _openvpn_validate0: No permission errors on read-only database
✓ _openvpn_info1: No permission errors on read-only database
✓ _session_list0: No permission errors on read-only database
✓ _session_show1: No permission errors on read-only database
✓ _session_remove1: No permission errors on read-only database
✓ _session_connect1: No permission errors on read-only database
✓ _session_save0: No permission errors on read-only database
✓ _session_save1: No permission errors on read-only database
✓ _session_clean0: No permission errors on read-only database
✓ _session_validate0: No permission errors on read-only database
✓ _session_enumerate0: No permission errors on read-only database
✓ _session_describe0: No permission errors on read-only database
✓ _logs_validate0: No permission errors on read-only database
✓ _logs_clean0: No permission errors on read-only database
✓ _phases_validate0: No permission errors on read-only database
✓ _database_validate0: No permission errors on read-only database
✓ _binaries_validate0: No permission errors on read-only database
✓ _network_validate0: No permission errors on read-only database
✓ _permissions_validate0: No permission errors on read-only database
✓ _environment_validate0: No permission errors on read-only database
✓ _wireguard_patch2: No permission errors on read-only database
✓ _wireguard_configure1: No permission errors on read-only database
✓ _wireguard_connect1: No permission errors on read-only database
✓ _wireguard_disconnect1: No permission errors on read-only database
Warning: wireguard_enumerate0: output differs between writable/readonly (but compliant)
✓ _wireguard_enumerate0: No permission errors on read-only database
✓ _wireguard_import1: No permission errors on read-only database
✓ _wireguard_list0: No permission errors on read-only database
✓ _wireguard_list1: No permission errors on read-only database
✓ _wireguard_add1: No permission errors on read-only database
✓ _wireguard_add3: No permission errors on read-only database
✓ _wireguard_link2: No permission errors on read-only database
✓ _wireguard_remove1: No permission errors on read-only database
✓ _wireguard_remove2: No permission errors on read-only database
✓ _wireguard_validate0: No permission errors on read-only database
✓ _wireguard_patch1: No permission errors on read-only database
✓ _wireguard_info1: No permission errors on read-only database
Testing combinator functions...
✓ __session_exists1: No permission errors on read-only database
✓ __session_conflicts2: No permission errors on read-only database
✓ __interface_check1: No permission errors on read-only database
✓ __stop1: No permission errors on read-only database
✓ __import1: No permission errors on read-only database
✓ __start1: No permission errors on read-only database
✓ __start0: No permission errors on read-only database
✓ __bootstrap1: No permission errors on read-only database
✓ __environment_cache0: No permission errors on read-only database
✓ __phases_lift1: No permission errors on read-only database
✓ __init0: No permission errors on read-only database
✓ __batch1: No permission errors on read-only database
✓ __restore1: No permission errors on read-only database
Warning: openvpn_start0: output differs between writable/readonly (but compliant)
✓ __openvpn_start0: No permission errors on read-only database
✓ __openvpn_start1: No permission errors on read-only database
✓ __openvpn_stop1: No permission errors on read-only database
✓ __openvpn_add2: No permission errors on read-only database
✓ __openvpn_help0: No permission errors on read-only database
✓ __session_disconnect1: No permission errors on read-only database
✓ __session_show0: No permission errors on read-only database
✓ __session_start0: No permission errors on read-only database
✓ __session_start1: No permission errors on read-only database
✓ __session_help0: No permission errors on read-only database
Warning: wireguard_start0: output differs between writable/readonly (but compliant)
✓ __wireguard_start0: No permission errors on read-only database
✓ __wireguard_start1: No permission errors on read-only database
✓ __wireguard_stop1: No permission errors on read-only database
✓ __wireguard_add2: No permission errors on read-only database
✓ __wireguard_help0: No permission errors on read-only database
Testing batch combinator functions...
✓ ___session_prepare3: No permission errors on read-only database
✓ ___stop0: No permission errors on read-only database
✓ ___phases_sync1: No permission errors on read-only database
✓ ___phases_sync0: No permission errors on read-only database
✓ ___list0: No permission errors on read-only database
✓ ___dumpenv1: No permission errors on read-only database
✓ ___dump0: No permission errors on read-only database
Warning: batch0: output differs between writable/readonly (but compliant)
✓ ___batch0: No permission errors on read-only database
✓ ___environment_inspect0: No permission errors on read-only database
✓ ___inspect0: No permission errors on read-only database
Warning: openvpn_create1: output differs between writable/readonly (but compliant)
✓ ___openvpn_create1: No permission errors on read-only database
✓ ___openvpn_stop0: No permission errors on read-only database
✓ ___openvpn_inspect0: No permission errors on read-only database
✓ ___openvpn_clean0: No permission errors on read-only database
✓ ___openvpn_dump0: No permission errors on read-only database
✓ ___session_dump0: No permission errors on read-only database
✓ ___session_inspect0: No permission errors on read-only database
✓ ___validate0: No permission errors on read-only database
Warning: wireguard_create1: output differs between writable/readonly (but compliant)
✓ ___wireguard_create1: No permission errors on read-only database
✓ ___wireguard_inspect0: No permission errors on read-only database
✓ ___wireguard_stop0: No permission errors on read-only database
✓ ___wireguard_clean0: No permission errors on read-only database
✓ ___wireguard_clean1: No permission errors on read-only database
✓ ___wireguard_dump0: No permission errors on read-only database
Summary: Tested 129 functions, skipped 8
========================================
Architecture Test Summary
========================================
Test Functions: 238
Total Assertions: 412
Passed Assertions: 412
Failed Assertions: 0
ALL TESTS PASSED
Cleaning up test databases...
Done.
=== vpn-switch Integration Tests ===
Profile: all
[0;34m▶ User Story 1:[0m Import → Organize → Dump → Restore → Idempotency (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-old.ahtbZ2
[0;32m✓[0m WG: Imported config 1
[0;32m✓[0m WG: Imported config 2
[0;32m✓[0m WG: Imported config 3
[0;32m✓[0m OVPN: Imported config 1
[0;32m✓[0m OVPN: Imported config 2
[0;32m✓[0m WG: Created category: privacy
[0;32m✓[0m WG: Created category: streaming
[0;32m✓[0m OVPN: Created group: work
[0;32m✓[0m WG: Protocol-level link: quick
[0;32m✓[0m WG: Category link: privacy/fast
[0;32m✓[0m WG: Category link: privacy/secure
[0;32m✓[0m WG: Category link: streaming/hd
[0;32m✓[0m OVPN: Protocol-level link: office
[0;32m✓[0m OVPN: Group link: work/primary
[0;32m✓[0m Dump stderr is clean
# ================================
# db: /tmp/vpn-integration-old.ahtbZ2
# ================================
[0;32m✓[0m Dump file created
[0;32m✓[0m Dump contains WG import
[0;32m✓[0m Dump contains OVPN import
[0;32m✓[0m Dump contains WG category
[0;32m✓[0m Dump contains OVPN group
[0;32m✓[0m Dump contains WG link
[0;32m✓[0m Dump contains OVPN link
[0;34mDatabase:[0m /tmp/vpn-integration-new.KkjL9r
[0;32m✓[0m NEW WG: Config 1 imported
[0;32m✓[0m NEW WG: Config 2 imported
[0;32m✓[0m NEW WG: Config 3 imported
[0;32m✓[0m NEW WG: Category privacy created
[0;32m✓[0m NEW WG: Category streaming created
[0;32m✓[0m NEW WG: Protocol-level link
[0;32m✓[0m NEW WG: Category link privacy/fast
[0;32m✓[0m NEW WG: Category link privacy/secure
[0;32m✓[0m NEW WG: Category link streaming/hd
[0;32m✓[0m NEW OVPN: Config 1 imported
[0;32m✓[0m NEW OVPN: Config 2 imported
[0;32m✓[0m NEW OVPN: Group work created
[0;32m✓[0m NEW OVPN: Protocol-level link
[0;32m✓[0m NEW OVPN: Group link work/primary
[0;32m✓[0m Idempotency dump stderr is clean
[0;32m✓[0m Idempotency: dump(restore(dump(OLD))) == dump(OLD) [multi-protocol]
[0;32m✓ Story 1 completed successfully[0m
[0;34m▶ User Story 2:[0m Session Management: Save → Dump → Restore → Verify (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-old.0xPnuc
[0;32m✓[0m WG: Named session created: work -> ../.session/15671
[0;32m✓[0m OVPN: Named session created: home -> ../.session/47619
[0;32m✓[0m Dump stderr is clean
[0;32m✓[0m Dump contains WG session patch
[0;32m✓[0m Dump contains OVPN session patch
[0;32m✓[0m Dump contains WG save command
[0;32m✓[0m Dump contains OVPN save command
[0;34mDatabase:[0m /tmp/vpn-integration-new.ZzeT48
[0;32m✓[0m NEW: WG config imported
[0;32m✓[0m NEW: OVPN config imported
[0;32m✓[0m NEW: WG session dump contains patch + save commands
[0;32m✓[0m NEW: OVPN session dump contains patch + save commands
[0;32m✓ Story 2 completed successfully[0m
[0;34m▶ User Story 3:[0m Config Expiry: Import → Organize → Check Status
[0;34mDatabase:[0m /tmp/vpn-integration-test.h1cUj6
[0;32m✓[0m Info output contains fresh config
[0;32m✓[0m Info output contains old config
[0;32m✓[0m Validate command found no issues (acceptable)
[0;32m✓ Story 3 completed successfully[0m
[0;34m▶ User Story 4:[0m Multi-Category Organization: Complex Structure (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-test.y57Eps
[0;32m✓[0m WG: Category: usa
[0;32m✓[0m WG: Category: europe
[0;32m✓[0m WG: Category: asia
[0;32m✓[0m WG: Category: work
[0;32m✓[0m WG: Category: personal
[0;32m✓[0m OVPN: Group: corporate
[0;32m✓[0m OVPN: Group: remote
[0;32m✓[0m WG: usa/ny → wg-us-ny.conf
[0;32m✓[0m WG: europe/uk → wg-eu-uk.conf
[0;32m✓[0m WG: asia/jp → wg-asia-jp.conf
[0;32m✓[0m WG: work/office → wg-us-ny.conf
[0;32m✓[0m WG: personal/home → wg-us-sf.conf
[0;32m✓[0m OVPN: corporate/us → us-office.ovpn
[0;32m✓[0m OVPN: corporate/eu → eu-office.ovpn
[0;32m✓[0m OVPN: remote/home → home-server.ovpn
[0;32m✓[0m WG: default → wg-us-ny.conf
[0;32m✓[0m WG: fast → wg-us-sf.conf
[0;32m✓[0m OVPN: quick → us-office.ovpn
[0;32m✓[0m WG: List shows usa category
[0;32m✓[0m WG: List shows europe category
[0;32m✓[0m WG: List shows work category
[0;32m✓[0m OVPN: List shows corporate group
[0;32m✓[0m OVPN: List shows remote group
[0;32m✓ Story 4 completed successfully[0m
[0;34m▶ User Story 5:[0m Completeness & Deletion Proof: Comprehensive State Tracking (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-test.wGKKcC
[0;32m✓[0m Dump stderr is clean
[0;32m✓[0m Completeness: All 26 operations present in dump (WG: 15, OVPN: 11)
[0;32m✓[0m Deletion phase 1 dump stderr is clean
[0;32m✓[0m Deletion: WG protocol link 'quick' removed from dump
[0;32m✓[0m Deletion: OVPN protocol link 'office' removed from dump
[0;32m✓[0m Deletion: WG protocol link 'default' still present
[0;32m✓[0m Deletion: WG category 'privacy' still present
[0;32m✓[0m Deletion: WG category 'work' still present
[0;32m✓[0m Deletion: OVPN group 'corporate' still present
[0;32m✓[0m Deletion phase 2 dump stderr is clean
[0;32m✓[0m Deletion: WG category link 'privacy/fast' removed from dump
[0;32m✓[0m Deletion: WG category link 'work/office' removed from dump
[0;32m✓[0m Deletion: OVPN group link 'corporate/primary' removed from dump
[0;32m✓[0m Deletion: WG category link 'privacy/secure' still present
[0;32m✓[0m Deletion: WG category link 'streaming/hd' still present
[0;32m✓[0m Deletion: OVPN group link 'corporate/secondary' still present
[0;32m✓[0m Deletion: WG config wg-us-101.conf still present
[0;32m✓[0m Deletion: WG config wg-de-303.conf still present
[0;32m✓[0m Deletion: OVPN config us-server.ovpn still present
[0;32m✓[0m Deletion phase 3 dump stderr is clean
[0;32m✓[0m Deletion: WG config wg-jp-404.conf removed from dump
[0;32m✓[0m Deletion: WG config wg-au-505.conf removed from dump
[0;32m✓[0m Deletion: OVPN config asia-server.ovpn removed from dump
[0;32m✓[0m Deletion: WG config wg-us-101.conf still present after removals
[0;32m✓[0m Deletion: WG config wg-uk-202.conf still present after removals
[0;32m✓[0m Deletion: WG config wg-de-303.conf still present after removals
[0;32m✓[0m Deletion: OVPN config us-server.ovpn still present after removals
[0;32m✓[0m Deletion: OVPN config eu-server.ovpn still present after removals
[0;32m✓[0m Deletion: Empty WG category 'privacy' still present
[0;32m✓[0m Deletion: Empty WG category 'work' still present
[0;32m✓[0m Deletion: Empty WG category 'streaming' still present
[0;32m✓[0m Deletion: OVPN group 'corporate' still present (has link)
[0;32m✓[0m Deletion: Empty OVPN group 'remote' still present
[0;32m✓ Story 5 completed successfully[0m
[0;34m▶ User Story 6:[0m Dump Quality: Cleanliness, Pipeability, Executability, Transcript Reproducibility
[0;34mDatabase:[0m /tmp/vpn-quality-test.bDuluq
[0;32m✓[0m Property 1: Dump stderr is completely empty
[0;32m✓[0m Property 2: Dump output is syntactically valid shell script
[0;32m✓[0m Property 3: Direct pipe works (exit code 0)
[0;32m✓[0m Property 3: Direct pipe produces identical output
[0;32m✓[0m Property 4: All informational output is properly commented
[0;32m✓[0m Property 5: All transcript commands present in dump (reproducibility)
[0;34mDatabase:[0m /tmp/vpn-quality-restore.jHtK1Z
[0;32m✓[0m Property 6: Dump is restorable (executable)
[0;32m✓[0m Property 6: WG config restored
[0;32m✓[0m Property 6: OVPN config restored
[0;32m✓[0m Property 6: WG category restored
[0;32m✓[0m Property 6: OVPN group restored
[0;32m✓[0m Property 6: WG link restored
[0;32m✓[0m Property 6: OVPN link restored
[0;32m✓[0m Property 7: Normalized idempotency verified (dump(restore(dump)) == dump)
[0;32m✓[0m Property 8: No duplicate protocol commands in dump (6 unique)
[0;32m✓ Story 6 completed successfully[0m
[0;34m▶ User Story 7:[0m Phase-Based Script Generation (WireGuard and OpenVPN)
[0;34mDatabase:[0m /tmp/vpn-phase-gen.GmzJ8U
[0;32m✓[0m WG: Extract session ID from start output
[0;32m✓[0m WG: connect.sh exists
[0;32m✓[0m WG: disconnect.sh exists
[0;32m✓[0m WG: connect.sh has correct permissions (0750)
[0;32m✓[0m WG: disconnect.sh has correct permissions (0750)
[0;32m✓[0m WG: connect.sh is executable
[0;32m✓[0m WG: disconnect.sh is executable
[0;32m✓[0m WG: connect.sh has shebang
[0;32m✓[0m WG: disconnect.sh has shebang
[0;32m✓[0m OVPN: Extract session ID from start output
[0;32m✓[0m OVPN: connect.sh exists
[0;32m✓[0m OVPN: disconnect.sh exists
[0;32m✓[0m OVPN: connect.sh has correct permissions (0750)
[0;32m✓[0m OVPN: disconnect.sh has correct permissions (0750)
[0;32m✓[0m OVPN: connect.sh is executable
[0;32m✓[0m OVPN: disconnect.sh is executable
[0;32m✓[0m OVPN: connect.sh has shebang
[0;32m✓[0m OVPN: disconnect.sh has shebang
[0;32m✓[0m WG: Session metadata exists (protocol)
[0;32m✓[0m WG: Session metadata exists (interface)
[0;32m✓[0m OVPN: Session metadata exists (protocol)
[0;32m✓[0m OVPN: Session metadata exists (interface)
[0;32m✓[0m WG and OVPN sessions are independent (different PIDs)
[0;32m✓ Story 7 completed successfully[0m
[0;34m▶ User Story 8:[0m Phase Script Content Verification (Structure and Commands)
[0;34mDatabase:[0m /tmp/vpn-phase-content.vJCsJu
[0;32m✓[0m WG connect: Has title
[0;32m✓[0m WG connect: Has generation timestamp
[0;32m✓[0m WG connect: Has session ID
[0;32m✓[0m WG connect: Has context documentation
[0;32m✓[0m WG connect: Has session_dir variable
[0;32m✓[0m WG connect: Has protocol variable
[0;32m✓[0m WG connect: Has interface variable
[0;32m✓[0m WG connect: Has config_path variable
[0;32m✓[0m WG connect: Has dns_server variable
[0;32m✓[0m WG connect: Has remote_ips variable
[0;32m✓[0m WG connect: Has firewall verify function
[0;32m✓[0m WG connect: Has vpn verify function
[0;32m✓[0m WG connect: Has dns verify function
[0;32m✓[0m WG connect: Firewall prepare phase
[0;32m✓[0m WG connect: Firewall execute phase
[0;32m✓[0m WG connect: VPN prepare phase
[0;32m✓[0m WG connect: VPN execute phase
[0;32m✓[0m WG connect: DNS prepare phase
[0;32m✓[0m WG connect: DNS execute phase
[0;32m✓[0m WG connect: Has wg-quick up command
[0;32m✓[0m WG connect: Correct phase order
[0;32m✓[0m WG disconnect: Has title
[0;32m✓[0m WG disconnect: Has session_dir variable
[0;32m✓[0m WG disconnect: Has dns verify function
[0;32m✓[0m WG disconnect: Has vpn verify function
[0;32m✓[0m WG disconnect: Has firewall verify function
[0;32m✓[0m WG disconnect: Has wg-quick down command
[0;32m✓[0m WG disconnect: Correct reversed phase order
[0;32m✓[0m OVPN connect: Has title
[0;32m✓[0m OVPN connect: Has generation timestamp
[0;32m✓[0m OVPN connect: Has session_dir variable
[0;32m✓[0m OVPN connect: Has protocol variable
[0;32m✓[0m OVPN connect: Has interface variable
[0;32m✓[0m OVPN connect: Has config_path variable
[0;32m✓[0m OVPN connect: Has firewall verify function
[0;32m✓[0m OVPN connect: Has vpn verify function
[0;32m✓[0m OVPN connect: Has dns verify function
[0;32m✓[0m OVPN connect: Has openvpn command
[0;32m✓[0m OVPN connect: Has daemon flag
[0;32m✓[0m OVPN connect: Correct phase order
[0;32m✓[0m OVPN disconnect: Has title
[0;32m✓[0m OVPN disconnect: Has session_dir variable
[0;32m✓[0m OVPN disconnect: Has process kill command
[0;32m✓[0m OVPN disconnect: Correct reversed phase order
[0;32m✓[0m WG connect: No OpenVPN commands
[0;32m✓[0m WG connect: No OpenVPN daemon flag
[0;32m✓[0m OVPN connect: No WireGuard commands
[0;32m✓ Story 8 completed successfully[0m
[0;34m▶ User Story 9:[0m Phase Customization (Reorder, Add, Skip)
[0;34mDatabase:[0m /tmp/vpn-phase-custom.b4Z842
[0;32m✓[0m Baseline: Default phase order
[0;32m✓[0m Reordered: Custom phase order
[0;32m✓[0m Custom phase: Has verify function
[0;32m✓[0m Custom phase: Has prepare section
[0;32m✓[0m Custom phase: Has execute section
[0;32m✓[0m Custom phase: Correct order with routing
[0;32m✓[0m Minimal: Has vpn verify function
[0;32m✓[0m Minimal: No firewall phase
[0;32m✓[0m Minimal: No dns phase
[0;32m✓[0m Minimal: Only VPN phase
[0;32m✓[0m Custom disconnect: Has dns phase
[0;32m✓[0m Custom disconnect: Has vpn phase
[0;32m✓[0m Custom disconnect: No firewall phase
[0;32m✓[0m Custom disconnect: Only dns and vpn
[0;32m✓[0m Multi-custom: Has logging phase
[0;32m✓[0m Multi-custom: Has monitoring phase
[0;32m✓[0m Multi-custom: Correct custom order
[0;32m✓ Story 9 completed successfully[0m
[0;34m▶ User Story 10:[0m Multi-Protocol Phase Support (Isolation and Simultaneous Operation)
[0;34mDatabase:[0m /tmp/vpn-phase-multi.bM8ARj
[0;32m✓[0m WG: Default phase order
[0;32m✓[0m OVPN: Default phase order
[0;32m✓[0m WG: Has WireGuard command
[0;32m✓[0m WG: No OpenVPN commands
[0;32m✓[0m OVPN: Has OpenVPN command
[0;32m✓[0m OVPN: No WireGuard commands
[0;32m✓[0m WG: Correct protocol variable
[0;32m✓[0m WG: WireGuard interface naming
[0;32m✓[0m WG: Has dns_server context
[0;32m✓[0m WG: Has remote_ips context
[0;32m✓[0m OVPN: Correct protocol variable
[0;32m✓[0m OVPN: OpenVPN interface naming
[0;32m✓[0m WG custom: Has custom phase
[0;32m✓[0m WG custom: Has custom phase in order
[0;32m✓[0m OVPN: No WireGuard custom phase
[0;32m✓[0m OVPN: Default phases only
[0;32m✓[0m WG: No OpenVPN custom phase
[0;32m✓[0m WG: Default phases only
[0;32m✓[0m OVPN: Protocol-specific phase config not yet supported
[0;32m✓[0m OVPN: Uses default phases (protocol-specific config not implemented)
[0;32m✓[0m Simultaneous: WG session exists
[0;32m✓[0m Simultaneous: OVPN session exists
[0;32m✓[0m Simultaneous: Different session IDs
[0;32m✓[0m Simultaneous: WG has correct protocol
[0;32m✓[0m Simultaneous: OVPN has correct protocol
[0;32m✓ Story 10 completed successfully[0m
[0;34m▶ User Story 11:[0m Multi-Protocol Edge Cases (Stress, Switching, Robustness)
[0;34mDatabase:[0m /tmp/vpn-edge-cases.CmjeiZ
[0;32m✓[0m Scenario 1.1: Duplicate WG import correctly rejected
[0;32m✓[0m Scenario 1.1: Duplicate OVPN import correctly rejected
[0;32m✓[0m Scenario 1.1: WG includes wg_custom phase
[0;32m✓[0m Scenario 1.1: WG excludes ovpn_custom phase
[0;32m✓[0m Scenario 1.1: OVPN includes ovpn_custom phase
[0;32m✓[0m Scenario 1.1: OVPN excludes wg_custom phase
[0;32m✓[0m Scenario 1.1: Phase order differs between protocols
[0;32m✓[0m Scenario 1.2: WireGuard test interface configured
[0;32m✓[0m Scenario 1.2: OpenVPN test interface configured
[0;32m✓[0m Scenario 1.2: Two sessions active simultaneously
[0;32m✓[0m Scenario 1.2: WG session uses wg_test* interface
[0;32m✓[0m Scenario 1.2: OVPN session uses tun_test* interface
[0;32m✓[0m Scenario 1.2: Unreferenced sessions cleaned, 'latest' preserved
[0;32m✓[0m Scenario 1.3: WG session has DNS config
[0;32m✓[0m Scenario 1.3: Connect scripts differ despite same DNS
[0;32m✓[0m Scenario 2.1: WG session created
[0;32m✓[0m Scenario 2.1: WG session stopped, 'latest' preserved
[0;32m✓[0m Scenario 2.1: OVPN session created after WG stop
[0;32m✓[0m Scenario 2.1: New session is OpenVPN protocol
[0;32m✓[0m Scenario 2.2: Both sessions coexist
[0;32m✓[0m Scenario 2.2: Both protocols running simultaneously
[0;32m✓[0m Scenario 2.3: Cycle 1 - WG started
[0;32m✓[0m Scenario 2.3: Cycle 1 - WG stopped, 'latest' preserved
[0;32m✓[0m Scenario 2.3: Cycle 2 - OVPN started (old session + new)
[0;32m✓[0m Scenario 2.3: Cycle 2 - OVPN stopped, unreferenced cleaned
[0;32m✓[0m Scenario 2.3: Cycle 3 - WG started (old session + new)
[0;32m✓[0m Scenario 2.3: Both sessions present (unreferenced + latest)
[0;32m✓[0m Scenario 3.1: WG session saved as wg_work
[0;32m✓[0m Scenario 3.1: Both sessions active after resume
[0;32m✓[0m Scenario 3.1: Correct protocols after resume
[0;32m✓[0m Scenario 3.2: Session 'work' points to WG session
[0;32m✓[0m Scenario 3.2: Session 'work' now points to OVPN (overwrite)
[0;32m✓[0m Scenario 3.2: Only one 'work' session exists (no duplicates)
[0;32m✓[0m Scenario 4.1: Two active sessions before dump
[0;32m✓[0m Scenario 4.1: Dump file created with active sessions
[0;32m✓[0m Scenario 4.1: Dump excludes .session directory (transient)
[0;32m✓[0m Scenario 4.1: Dump includes WG configs
[0;32m✓[0m Scenario 4.1: Dump includes OVPN configs
[0;34mDatabase:[0m /tmp/vpn-restore-a.tEN2Xn
[0;34mDatabase:[0m /tmp/vpn-restore-b.dylO8z
[0;32m✓[0m Scenario 4.2: Restored database has WG config
[0;32m✓[0m Scenario 4.2: Restored database has no active sessions
[0;32m✓[0m Scenario 5.1: Only 'latest' WG session after 10 cycles
[0;32m✓[0m Scenario 5.1: Only 'latest' OVPN session after 10 cycles
[0;32m✓[0m Scenario 5.1: Only latest session directory remains
[0;32m✓ Story 11 completed successfully[0m
[0;34m▶ User Story 12:[0m Phase Backend Selection (Strategy 7 - Automatic Template Lifting)
[0;34mDatabase:[0m /tmp/vpn-backend-selection.ZMgQgp
[0;32m✓[0m Backend template lifted: firewall/pf.sh
[0;32m✓[0m Backend template lifted: firewall/ipfw.sh
[0;32m✓[0m Backend template lifted: dns/resolvconf.sh
[0;32m✓[0m Backend template lifted: dns/unbound.sh
[0;32m✓[0m Scenario 1: Connect script generated
[0;32m✓[0m Scenario 1: PF firewall backend used (contains pfctl)
[0;32m✓[0m Scenario 1: Resolvconf DNS backend used
[0;32m✓[0m Scenario 2: IPFW firewall backend used (contains ipfw)
[0;32m✓[0m Scenario 2: Unbound DNS backend used
[0;32m✓[0m Scenario 2: PF firewall phase not used (backend isolated)
[0;32m✓[0m Scenario 3: Backward compat - connect script generated
[0;32m✓[0m Scenario 3: Backward compat - script not empty
[0;32m✓[0m Scenario 3: Uses protocol-specific phases (wireguard/)
[0;32m✓[0m Scenario 4: Both backends from @base profile used
[0;32m✓[0m Scenario 5: Variant-only syntax works (uses default profile)
[0;32m✓[0m Scenario 6: Mixed syntax - ipfw backend used
[0;32m✓[0m Scenario 6: Mixed syntax - vpn phase executed
[0;32m✓[0m Scenario 6: Mixed syntax - traditional dns phase used
[0;32m✓ Story 12 completed successfully[0m
========================================
Test Summary
========================================
User Stories: 12
Passed: 12
Failed: 0
Assertions: 296
Passed: 296
Failed: 0
[0;32mALL STORIES PASSED[0m
=== vpn-switch Integration Tests ===
Profile: minimal
[0;34m▶ User Story 1:[0m Import → Organize → Dump → Restore → Idempotency (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-old.cbW8p1
[0;32m✓[0m WG: Imported config 1
[0;32m✓[0m WG: Imported config 2
[0;32m✓[0m WG: Imported config 3
[0;32m✓[0m OVPN: Imported config 1
[0;32m✓[0m OVPN: Imported config 2
[0;32m✓[0m WG: Created category: privacy
[0;32m✓[0m WG: Created category: streaming
[0;32m✓[0m OVPN: Created group: work
[0;32m✓[0m WG: Protocol-level link: quick
[0;32m✓[0m WG: Category link: privacy/fast
[0;32m✓[0m WG: Category link: privacy/secure
[0;32m✓[0m WG: Category link: streaming/hd
[0;32m✓[0m OVPN: Protocol-level link: office
[0;32m✓[0m OVPN: Group link: work/primary
[0;32m✓[0m Dump stderr is clean
# ================================
# db: /tmp/vpn-integration-old.cbW8p1
# ================================
[0;32m✓[0m Dump file created
[0;32m✓[0m Dump contains WG import
[0;32m✓[0m Dump contains OVPN import
[0;32m✓[0m Dump contains WG category
[0;32m✓[0m Dump contains OVPN group
[0;32m✓[0m Dump contains WG link
[0;32m✓[0m Dump contains OVPN link
[0;34mDatabase:[0m /tmp/vpn-integration-new.O0PzTg
[0;32m✓[0m NEW WG: Config 1 imported
[0;32m✓[0m NEW WG: Config 2 imported
[0;32m✓[0m NEW WG: Config 3 imported
[0;32m✓[0m NEW WG: Category privacy created
[0;32m✓[0m NEW WG: Category streaming created
[0;32m✓[0m NEW WG: Protocol-level link
[0;32m✓[0m NEW WG: Category link privacy/fast
[0;32m✓[0m NEW WG: Category link privacy/secure
[0;32m✓[0m NEW WG: Category link streaming/hd
[0;32m✓[0m NEW OVPN: Config 1 imported
[0;32m✓[0m NEW OVPN: Config 2 imported
[0;32m✓[0m NEW OVPN: Group work created
[0;32m✓[0m NEW OVPN: Protocol-level link
[0;32m✓[0m NEW OVPN: Group link work/primary
[0;32m✓[0m Idempotency dump stderr is clean
[0;32m✓[0m Idempotency: dump(restore(dump(OLD))) == dump(OLD) [multi-protocol]
[0;32m✓ Story 1 completed successfully[0m
[0;34m▶ User Story 2:[0m Session Management: Save → Dump → Restore → Verify (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-old.cBtc1V
[0;32m✓[0m WG: Named session created: work -> ../.session/9607
[0;32m✓[0m OVPN: Named session created: home -> ../.session/24852
[0;32m✓[0m Dump stderr is clean
[0;32m✓[0m Dump contains WG session patch
[0;32m✓[0m Dump contains OVPN session patch
[0;32m✓[0m Dump contains WG save command
[0;32m✓[0m Dump contains OVPN save command
[0;34mDatabase:[0m /tmp/vpn-integration-new.eYaBz3
[0;32m✓[0m NEW: WG config imported
[0;32m✓[0m NEW: OVPN config imported
[0;32m✓[0m NEW: WG session dump contains patch + save commands
[0;32m✓[0m NEW: OVPN session dump contains patch + save commands
[0;32m✓ Story 2 completed successfully[0m
[0;34m▶ User Story 3:[0m Config Expiry: Import → Organize → Check Status
[0;34mDatabase:[0m /tmp/vpn-integration-test.bfqw9c
[0;32m✓[0m Info output contains fresh config
[0;32m✓[0m Info output contains old config
[0;32m✓[0m Validate command found no issues (acceptable)
[0;32m✓ Story 3 completed successfully[0m
[0;34m▶ User Story 4:[0m Multi-Category Organization: Complex Structure (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-test.fT3u1i
[0;32m✓[0m WG: Category: usa
[0;32m✓[0m WG: Category: europe
[0;32m✓[0m WG: Category: asia
[0;32m✓[0m WG: Category: work
[0;32m✓[0m WG: Category: personal
[0;32m✓[0m OVPN: Group: corporate
[0;32m✓[0m OVPN: Group: remote
[0;32m✓[0m WG: usa/ny → wg-us-ny.conf
[0;32m✓[0m WG: europe/uk → wg-eu-uk.conf
[0;32m✓[0m WG: asia/jp → wg-asia-jp.conf
[0;32m✓[0m WG: work/office → wg-us-ny.conf
[0;32m✓[0m WG: personal/home → wg-us-sf.conf
[0;32m✓[0m OVPN: corporate/us → us-office.ovpn
[0;32m✓[0m OVPN: corporate/eu → eu-office.ovpn
[0;32m✓[0m OVPN: remote/home → home-server.ovpn
[0;32m✓[0m WG: default → wg-us-ny.conf
[0;32m✓[0m WG: fast → wg-us-sf.conf
[0;32m✓[0m OVPN: quick → us-office.ovpn
[0;32m✓[0m WG: List shows usa category
[0;32m✓[0m WG: List shows europe category
[0;32m✓[0m WG: List shows work category
[0;32m✓[0m OVPN: List shows corporate group
[0;32m✓[0m OVPN: List shows remote group
[0;32m✓ Story 4 completed successfully[0m
[0;34m▶ User Story 5:[0m Completeness & Deletion Proof: Comprehensive State Tracking (Multi-Protocol)
[0;34mDatabase:[0m /tmp/vpn-integration-test.ycvIt0
[0;32m✓[0m Dump stderr is clean
[0;32m✓[0m Completeness: All 26 operations present in dump (WG: 15, OVPN: 11)
[0;32m✓[0m Deletion phase 1 dump stderr is clean
[0;32m✓[0m Deletion: WG protocol link 'quick' removed from dump
[0;32m✓[0m Deletion: OVPN protocol link 'office' removed from dump
[0;32m✓[0m Deletion: WG protocol link 'default' still present
[0;32m✓[0m Deletion: WG category 'privacy' still present
[0;32m✓[0m Deletion: WG category 'work' still present
[0;32m✓[0m Deletion: OVPN group 'corporate' still present
[0;32m✓[0m Deletion phase 2 dump stderr is clean
[0;32m✓[0m Deletion: WG category link 'privacy/fast' removed from dump
[0;32m✓[0m Deletion: WG category link 'work/office' removed from dump
[0;32m✓[0m Deletion: OVPN group link 'corporate/primary' removed from dump
[0;32m✓[0m Deletion: WG category link 'privacy/secure' still present
[0;32m✓[0m Deletion: WG category link 'streaming/hd' still present
[0;32m✓[0m Deletion: OVPN group link 'corporate/secondary' still present
[0;32m✓[0m Deletion: WG config wg-us-101.conf still present
[0;32m✓[0m Deletion: WG config wg-de-303.conf still present
[0;32m✓[0m Deletion: OVPN config us-server.ovpn still present
[0;32m✓[0m Deletion phase 3 dump stderr is clean
[0;32m✓[0m Deletion: WG config wg-jp-404.conf removed from dump
[0;32m✓[0m Deletion: WG config wg-au-505.conf removed from dump
[0;32m✓[0m Deletion: OVPN config asia-server.ovpn removed from dump
[0;32m✓[0m Deletion: WG config wg-us-101.conf still present after removals
[0;32m✓[0m Deletion: WG config wg-uk-202.conf still present after removals
[0;32m✓[0m Deletion: WG config wg-de-303.conf still present after removals
[0;32m✓[0m Deletion: OVPN config us-server.ovpn still present after removals
[0;32m✓[0m Deletion: OVPN config eu-server.ovpn still present after removals
[0;32m✓[0m Deletion: Empty WG category 'privacy' still present
[0;32m✓[0m Deletion: Empty WG category 'work' still present
[0;32m✓[0m Deletion: Empty WG category 'streaming' still present
[0;32m✓[0m Deletion: OVPN group 'corporate' still present (has link)
[0;32m✓[0m Deletion: Empty OVPN group 'remote' still present
[0;32m✓ Story 5 completed successfully[0m
[0;34m▶ User Story 6:[0m Dump Quality: Cleanliness, Pipeability, Executability, Transcript Reproducibility
[0;34mDatabase:[0m /tmp/vpn-quality-test.byNNK6
[0;32m✓[0m Property 1: Dump stderr is completely empty
[0;32m✓[0m Property 2: Dump output is syntactically valid shell script
[0;32m✓[0m Property 3: Direct pipe works (exit code 0)
[0;32m✓[0m Property 3: Direct pipe produces identical output
[0;32m✓[0m Property 4: All informational output is properly commented
[0;32m✓[0m Property 5: All transcript commands present in dump (reproducibility)
[0;34mDatabase:[0m /tmp/vpn-quality-restore.yvzHDW
[0;32m✓[0m Property 6: Dump is restorable (executable)
[0;32m✓[0m Property 6: WG config restored
[0;32m✓[0m Property 6: OVPN config restored
[0;32m✓[0m Property 6: WG category restored
[0;32m✓[0m Property 6: OVPN group restored
[0;32m✓[0m Property 6: WG link restored
[0;32m✓[0m Property 6: OVPN link restored
[0;32m✓[0m Property 7: Normalized idempotency verified (dump(restore(dump)) == dump)
[0;32m✓[0m Property 8: No duplicate protocol commands in dump (6 unique)
[0;32m✓ Story 6 completed successfully[0m
[0;34m▶ User Story 7:[0m Phase-Based Script Generation (WireGuard and OpenVPN)
[0;34mDatabase:[0m /tmp/vpn-phase-gen.M7IRB6
[0;32m✓[0m WG: Extract session ID from start output
[0;32m✓[0m WG: connect.sh exists
[0;32m✓[0m WG: disconnect.sh exists
[0;32m✓[0m WG: connect.sh has correct permissions (0750)
[0;32m✓[0m WG: disconnect.sh has correct permissions (0750)
[0;32m✓[0m WG: connect.sh is executable
[0;32m✓[0m WG: disconnect.sh is executable
[0;32m✓[0m WG: connect.sh has shebang
[0;32m✓[0m WG: disconnect.sh has shebang
[0;32m✓[0m OVPN: Extract session ID from start output
[0;32m✓[0m OVPN: connect.sh exists
[0;32m✓[0m OVPN: disconnect.sh exists
[0;32m✓[0m OVPN: connect.sh has correct permissions (0750)
[0;32m✓[0m OVPN: disconnect.sh has correct permissions (0750)
[0;32m✓[0m OVPN: connect.sh is executable
[0;32m✓[0m OVPN: disconnect.sh is executable
[0;32m✓[0m OVPN: connect.sh has shebang
[0;32m✓[0m OVPN: disconnect.sh has shebang
[0;32m✓[0m WG: Session metadata exists (protocol)
[0;32m✓[0m WG: Session metadata exists (interface)
[0;32m✓[0m OVPN: Session metadata exists (protocol)
[0;32m✓[0m OVPN: Session metadata exists (interface)
[0;32m✓[0m WG and OVPN sessions are independent (different PIDs)
[0;32m✓ Story 7 completed successfully[0m
[0;34m▶ User Story 8:[0m Phase Script Content Verification (Structure and Commands)
[0;34mDatabase:[0m /tmp/vpn-phase-content.DzfpTE
[0;32m✓[0m WG connect: Has title
[0;32m✓[0m WG connect: Has generation timestamp
[0;32m✓[0m WG connect: Has session ID
[0;32m✓[0m WG connect: Has context documentation
[0;32m✓[0m WG connect: Has session_dir variable
[0;32m✓[0m WG connect: Has protocol variable
[0;32m✓[0m WG connect: Has interface variable
[0;32m✓[0m WG connect: Has config_path variable
[0;32m✓[0m WG connect: Has dns_server variable
[0;32m✓[0m WG connect: Has remote_ips variable
[0;32m✓[0m WG connect: Has firewall verify function
[0;32m✓[0m WG connect: Has vpn verify function
[0;32m✓[0m WG connect: Has dns verify function
[0;32m✓[0m WG connect: Firewall prepare phase
[0;32m✓[0m WG connect: Firewall execute phase
[0;32m✓[0m WG connect: VPN prepare phase
[0;32m✓[0m WG connect: VPN execute phase
[0;32m✓[0m WG connect: DNS prepare phase
[0;32m✓[0m WG connect: DNS execute phase
[0;32m✓[0m WG connect: Has wg-quick up command
[0;32m✓[0m WG connect: Correct phase order
[0;32m✓[0m WG disconnect: Has title
[0;32m✓[0m WG disconnect: Has session_dir variable
[0;32m✓[0m WG disconnect: Has dns verify function
[0;32m✓[0m WG disconnect: Has vpn verify function
[0;32m✓[0m WG disconnect: Has firewall verify function
[0;32m✓[0m WG disconnect: Has wg-quick down command
[0;32m✓[0m WG disconnect: Correct reversed phase order
[0;32m✓[0m OVPN connect: Has title
[0;32m✓[0m OVPN connect: Has generation timestamp
[0;32m✓[0m OVPN connect: Has session_dir variable
[0;32m✓[0m OVPN connect: Has protocol variable
[0;32m✓[0m OVPN connect: Has interface variable
[0;32m✓[0m OVPN connect: Has config_path variable
[0;32m✓[0m OVPN connect: Has firewall verify function
[0;32m✓[0m OVPN connect: Has vpn verify function
[0;32m✓[0m OVPN connect: Has dns verify function
[0;32m✓[0m OVPN connect: Has openvpn command
[0;32m✓[0m OVPN connect: Has daemon flag
[0;32m✓[0m OVPN connect: Correct phase order
[0;32m✓[0m OVPN disconnect: Has title
[0;32m✓[0m OVPN disconnect: Has session_dir variable
[0;32m✓[0m OVPN disconnect: Has process kill command
[0;32m✓[0m OVPN disconnect: Correct reversed phase order
[0;32m✓[0m WG connect: No OpenVPN commands
[0;32m✓[0m WG connect: No OpenVPN daemon flag
[0;32m✓[0m OVPN connect: No WireGuard commands
[0;32m✓ Story 8 completed successfully[0m
[0;34m▶ User Story 9:[0m Phase Customization (Reorder, Add, Skip)
[0;34mDatabase:[0m /tmp/vpn-phase-custom.U8XhYA
[0;32m✓[0m Baseline: Default phase order
[0;32m✓[0m Reordered: Custom phase order
[0;32m✓[0m Custom phase: Has verify function
[0;32m✓[0m Custom phase: Has prepare section
[0;32m✓[0m Custom phase: Has execute section
[0;32m✓[0m Custom phase: Correct order with routing
[0;32m✓[0m Minimal: Has vpn verify function
[0;32m✓[0m Minimal: No firewall phase
[0;32m✓[0m Minimal: No dns phase
[0;32m✓[0m Minimal: Only VPN phase
[0;32m✓[0m Custom disconnect: Has dns phase
[0;32m✓[0m Custom disconnect: Has vpn phase
[0;32m✓[0m Custom disconnect: No firewall phase
[0;32m✓[0m Custom disconnect: Only dns and vpn
[0;32m✓[0m Multi-custom: Has logging phase
[0;32m✓[0m Multi-custom: Has monitoring phase
[0;32m✓[0m Multi-custom: Correct custom order
[0;32m✓ Story 9 completed successfully[0m
[0;34m▶ User Story 10:[0m Multi-Protocol Phase Support (Isolation and Simultaneous Operation)
[0;34mDatabase:[0m /tmp/vpn-phase-multi.RkI3Mk
[0;32m✓[0m WG: Default phase order
[0;32m✓[0m OVPN: Default phase order
[0;32m✓[0m WG: Has WireGuard command
[0;32m✓[0m WG: No OpenVPN commands
[0;32m✓[0m OVPN: Has OpenVPN command
[0;32m✓[0m OVPN: No WireGuard commands
[0;32m✓[0m WG: Correct protocol variable
[0;32m✓[0m WG: WireGuard interface naming
[0;32m✓[0m WG: Has dns_server context
[0;32m✓[0m WG: Has remote_ips context
[0;32m✓[0m OVPN: Correct protocol variable
[0;32m✓[0m OVPN: OpenVPN interface naming
[0;32m✓[0m WG custom: Has custom phase
[0;32m✓[0m WG custom: Has custom phase in order
[0;32m✓[0m OVPN: No WireGuard custom phase
[0;32m✓[0m OVPN: Default phases only
[0;32m✓[0m WG: No OpenVPN custom phase
[0;32m✓[0m WG: Default phases only
[0;32m✓[0m OVPN: Protocol-specific phase config not yet supported
[0;32m✓[0m OVPN: Uses default phases (protocol-specific config not implemented)
[0;32m✓[0m Simultaneous: WG session exists
[0;32m✓[0m Simultaneous: OVPN session exists
[0;32m✓[0m Simultaneous: Different session IDs
[0;32m✓[0m Simultaneous: WG has correct protocol
[0;32m✓[0m Simultaneous: OVPN has correct protocol
[0;32m✓ Story 10 completed successfully[0m
[0;34m▶ User Story 11:[0m Multi-Protocol Edge Cases (Stress, Switching, Robustness)
[0;34mDatabase:[0m /tmp/vpn-edge-cases.Bp7waY
[0;32m✓[0m Scenario 1.1: Duplicate WG import correctly rejected
[0;32m✓[0m Scenario 1.1: Duplicate OVPN import correctly rejected
[0;32m✓[0m Scenario 1.1: WG includes wg_custom phase
[0;32m✓[0m Scenario 1.1: WG excludes ovpn_custom phase
[0;32m✓[0m Scenario 1.1: OVPN includes ovpn_custom phase
[0;32m✓[0m Scenario 1.1: OVPN excludes wg_custom phase
[0;32m✓[0m Scenario 1.1: Phase order differs between protocols
[0;32m✓[0m Scenario 1.2: WireGuard test interface configured
[0;32m✓[0m Scenario 1.2: OpenVPN test interface configured
[0;32m✓[0m Scenario 1.2: Two sessions active simultaneously
[0;32m✓[0m Scenario 1.2: WG session uses wg_test* interface
[0;32m✓[0m Scenario 1.2: OVPN session uses tun_test* interface
[0;32m✓[0m Scenario 1.2: Unreferenced sessions cleaned, 'latest' preserved
[0;32m✓[0m Scenario 1.3: WG session has DNS config
[0;32m✓[0m Scenario 1.3: Connect scripts differ despite same DNS
[0;32m✓[0m Scenario 2.1: WG session created
[0;32m✓[0m Scenario 2.1: WG session stopped, 'latest' preserved
[0;32m✓[0m Scenario 2.1: OVPN session created after WG stop
[0;32m✓[0m Scenario 2.1: New session is OpenVPN protocol
[0;32m✓[0m Scenario 2.2: Both sessions coexist
[0;32m✓[0m Scenario 2.2: Both protocols running simultaneously
[0;32m✓[0m Scenario 2.3: Cycle 1 - WG started
[0;32m✓[0m Scenario 2.3: Cycle 1 - WG stopped, 'latest' preserved
[0;32m✓[0m Scenario 2.3: Cycle 2 - OVPN started (old session + new)
[0;32m✓[0m Scenario 2.3: Cycle 2 - OVPN stopped, unreferenced cleaned
[0;32m✓[0m Scenario 2.3: Cycle 3 - WG started (old session + new)
[0;32m✓[0m Scenario 2.3: Both sessions present (unreferenced + latest)
[0;32m✓[0m Scenario 3.1: WG session saved as wg_work
[0;32m✓[0m Scenario 3.1: Both sessions active after resume
[0;32m✓[0m Scenario 3.1: Correct protocols after resume
[0;32m✓[0m Scenario 3.2: Session 'work' points to WG session
[0;32m✓[0m Scenario 3.2: Session 'work' now points to OVPN (overwrite)
[0;32m✓[0m Scenario 3.2: Only one 'work' session exists (no duplicates)
[0;32m✓[0m Scenario 4.1: Two active sessions before dump
[0;32m✓[0m Scenario 4.1: Dump file created with active sessions
[0;32m✓[0m Scenario 4.1: Dump excludes .session directory (transient)
[0;32m✓[0m Scenario 4.1: Dump includes WG configs
[0;32m✓[0m Scenario 4.1: Dump includes OVPN configs
[0;34mDatabase:[0m /tmp/vpn-restore-a.krjTed
[0;34mDatabase:[0m /tmp/vpn-restore-b.VdLbBh
[0;32m✓[0m Scenario 4.2: Restored database has WG config
[0;32m✓[0m Scenario 4.2: Restored database has no active sessions
[0;32m✓[0m Scenario 5.1: Only 'latest' WG session after 10 cycles
[0;32m✓[0m Scenario 5.1: Only 'latest' OVPN session after 10 cycles
[0;32m✓[0m Scenario 5.1: Only latest session directory remains
[0;32m✓ Story 11 completed successfully[0m
[0;34m▶ User Story 12:[0m Phase Backend Selection (Strategy 7 - Automatic Template Lifting)
[0;34mDatabase:[0m /tmp/vpn-backend-selection.DWCW3o
[0;32m✓[0m Backend template lifted: firewall/pf.sh
[0;32m✓[0m Backend template lifted: firewall/ipfw.sh
[0;32m✓[0m Backend template lifted: dns/resolvconf.sh
[0;32m✓[0m Backend template lifted: dns/unbound.sh
[0;32m✓[0m Scenario 1: Connect script generated
[0;32m✓[0m Scenario 1: PF firewall backend used (contains pfctl)
[0;32m✓[0m Scenario 1: Resolvconf DNS backend used
[0;32m✓[0m Scenario 2: IPFW firewall backend used (contains ipfw)
[0;32m✓[0m Scenario 2: Unbound DNS backend used
[0;32m✓[0m Scenario 2: PF firewall phase not used (backend isolated)
[0;32m✓[0m Scenario 3: Backward compat - connect script generated
[0;32m✓[0m Scenario 3: Backward compat - script not empty
[0;32m✓[0m Scenario 3: Uses protocol-specific phases (wireguard/)
[0;32m✓[0m Scenario 4: Both backends from @base profile used
[0;32m✓[0m Scenario 5: Variant-only syntax works (uses default profile)
[0;32m✓[0m Scenario 6: Mixed syntax - ipfw backend used
[0;32m✓[0m Scenario 6: Mixed syntax - vpn phase executed
[0;32m✓[0m Scenario 6: Mixed syntax - traditional dns phase used
[0;32m✓ Story 12 completed successfully[0m
========================================
Test Summary
========================================
User Stories: 12
Passed: 12
Failed: 0
Assertions: 296
Passed: 296
Failed: 0
[0;32mALL STORIES PASSED[0m
[1;34m========================================[0m
[1;34mvpn-switch Unit Test Suite (Formalized)[0m
[1;34m========================================[0m
[1;34mRunning Tests[0m
========================================
[1;33mFilter active - running only:[0mtest_header test_summary test_setup test_printenv_command test_status_command test_wireguard_import_valid test_wireguard_add_category test_wireguard_link_create test_wireguard_list test_wireguard_validate test_wireguard_info test_wireguard_start_basic test_wireguard_connect_resume test_wireguard_stop_basic test_session_list test_session_show test_session_remove test_session_save_default test_session_save_named test_session_start_default test_session_start_named test_session_start_bypid test_session_stop_named test_session_stop_bypid test_session_stop_inactive test_wireguard_remove_config_in_use test_wireguard_remove_config_with_refs test_wireguard_remove_symlink test_wireguard_remove_category_link test_wireguard_clean_no_broken test_wireguard_clean_broken_protocol_link test_wireguard_clean_broken_category_link test_wireguard_clean_category_no_broken test_wireguard_clean_category_with_broken test_wireguard_validate_broken_symlink test_wireguard_validate_broken_category_symlink test_wireguard_validate_naming_conflict test_wireguard_validate_invalid_config test_stop_no_sessions test_stop_specific_interface test_wireguard_disconnect_interface test_stop_nonexistent_interface test_disconnect_without_session test_stop_twice_idempotent test_wireguard_import_nonexistent test_wireguard_import_duplicate test_wireguard_add_category_conflict test_wireguard_add_link_conflict test_wireguard_link_conflict test_error_invalid_category test_error_broken_symlink test_error_invalid_command test_edge_duplicate_instance_prevention test_edge_stale_session_cleanup test_wireguard_patch_valid test_wireguard_patch_nonexistent test_wireguard_patch_absolute test_wireguard_info_category test_session_save_default test_session_save_named test_session_start_default test_session_start_named test_session_start_by_pid test_protocol_agnostic_import_wireguard test_protocol_agnostic_list test_protocol_agnostic_link test_protocol_agnostic_remove test_protocol_agnostic_validate test_network_validate test_permissions_validate test_environment_validate test_batch_validate_includes_system test_interpreter_single_underscore test_interpreter_double_underscore test_interpreter_triple_underscore test_interpreter_resolution_priority test_start_wireguard_only test_start_openvpn_only test_start_not_found test_start_no_default test_start_with_default_wireguard test_start_with_default_openvpn test_start_default_invalid_target test_init_extension_links test_database_init test_environment_init test_phases_copy test_phases_lift test_phases_sync_single test_phases_sync_all test_init_batch_combinator test_init_combinator test_start_extension_link_fast_path test_start_multiple_matches test_openvpn_import_valid test_openvpn_list test_openvpn_add_group test_openvpn_link test_openvpn_remove test_openvpn_validate test_openvpn_info test_openvpn_dump test_openvpn_patch_valid test_openvpn_patch_nonexistent test_openvpn_patch_absolute test_openvpn_patch_credentials_bare test_openvpn_patch_credentials_existing test_openvpn_patch_credentials_missing test_openvpn_start_basic test_openvpn_stop_basic test_openvpn_disconnect_interface test_openvpn_clean test_setenv_basic test_setenv_invalid_name test_getenv_local_override test_getenv_fallback_chain test_unsetenv_existing test_unsetenv_not_set test_dumpenv_prologue test_dumpenv_epilogue test_dumpenv_profile_filtering test_environment_cache_on test_environment_cache_off test_environment_cache_status test_environment_cache_no_args test_cache_invalidation_setenv test_cache_invalidation_unsetenv test_cache_invalidation_environment_init test_dumpenv_cache_preservation test_dumpenv_cache_not_included_when_disabled test_cache_no_recursion test_inspect_batch_complete test_environment_inspect test_system_inspect test_batch_syntax_wireguard_clean test_combinators_literal_variable test_function_classification_correct test_no_terminal_output_vpnswitch_commands test_metadata_function_lists test_combinator_syntax_validation test_error_command_single_line test_error_command_two_lines test_error_command_three_lines test_error_command_ansi_colors test_batch_id_sequential test_store_batch_exits_basic test_store_batch_exits_references test_free_batch_id test_batch_infrastructure_lifecycle
[1;34mTEST 1 (test_batch_id_sequential):[0m get_batch_id - sequential allocation
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_1
[1;32m✓[0m First batch ID is 0
[1;32m✓[0m Second batch ID is 1
[1;32m✓[0m Third batch ID is 2
[1;32m✓[0m Counter file has correct value (3)
[1;34mTEST 2 (test_store_batch_exits_basic):[0m store_batch_exits - stores exit codes to file
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_2
[1;32m✓[0m Batch file created
[1;32m✓[0m Batch file has correct content
[1;34mTEST 3 (test_store_batch_exits_references):[0m store_batch_exits - stores exit codes with batch references
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_3
[1;32m✓[0m Batch file stores references correctly
[1;34mTEST 4 (test_free_batch_id):[0m free_batch_id - deletes batch file
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_4
[1;32m✓[0m Batch file exists before cleanup
[1;32m✓[0m Batch file deleted after cleanup
[1;34mTEST 5 (test_batch_infrastructure_lifecycle):[0m Batch infrastructure - full allocation/store/free lifecycle
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_5
[1;32m✓[0m Allocated batch ID: 0
[1;32m✓[0m Batch results stored
[1;32m✓[0m Batch results readable
[1;32m✓[0m Batch cleaned up successfully
[1;34mTEST 6 (test_printenv_command):[0m printenv - basic environment display
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_6
[1;32m✓[0m Printenv command executed and shows header
[1;32m✓[0m Printenv shows VPN_SWITCH_BASE variable
[1;34mTEST 7 (test_status_command):[0m status - VPN status display
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_7
[1;32m✓[0m Status command shows header
[1;32m✓[0m Status shows disconnected state
[1;32m✓[0m Status checks network interfaces
[1;34mTEST 8 (test_error_command_single_line):[0m error command - single line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_8
[1;32m✓[0m error command outputs printf with 'Error:' prefix
[1;32m✓[0m error command outputs exit 1
[1;32m✓[0m error command redirects to stderr
[1;34mTEST 9 (test_error_command_two_lines):[0m error command - two line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_9
[1;32m✓[0m error command first line has 'Error:' prefix
[1;32m✓[0m error command second line is indented without 'Error:' prefix
[1;32m✓[0m error command outputs exit 1
[1;34mTEST 10 (test_error_command_three_lines):[0m error command - three line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_10
[1;32m✓[0m error command first line has 'Error:' prefix
[1;32m✓[0m error command has properly indented continuation lines
[1;32m✓[0m error command includes all three message lines
[1;32m✓[0m error command outputs exit 1
[1;34mTEST 11 (test_error_command_ansi_colors):[0m error command - ANSI color support
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_11
[1;32m✓[0m error command includes ANSI escape codes when enabled
[1;32m✓[0m error command includes ANSI reset code
[1;34mTEST 12 (test_wireguard_list):[0m wireguard list - display configurations
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_12
[1;32m✓[0m Configuration section header displayed
[1;32m✓[0m Config files section displayed
[1;32m✓[0m Imported config file listed
[1;34mTEST 13 (test_wireguard_validate):[0m wireguard validate - validate clean configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_13
[1;32m✓[0m Validation header displayed
[1;32m✓[0m No issues found in clean configuration
[1;34mTEST 14 (test_wireguard_info):[0m wireguard info - display category information
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_14
[1;32m✓[0m Category header displayed
[1;32m✓[0m Category path displayed
[1;32m✓[0m Contents section displayed
[1;32m✓[0m Category contents listed with symlink arrows
[1;34mTEST 15 (test_wireguard_import_valid):[0m wireguard import - import valid config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_15
[1;32m✓[0m Config file imported to database
[1;32m✓[0m Permissions set to 0400 (read-only)
[1;34mTEST 16 (test_wireguard_add_category):[0m wireguard add - create category with permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_16
[1;32m✓[0m Category directory created
[1;32m✓[0m Permissions set to 0755
[1;34mTEST 17 (test_wireguard_link_create):[0m wireguard link - create symlink in protocol directory
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_17
[1;32m✓[0m Symlink created
[1;32m✓[0m Symlink points to correct relative path (./wg-TEST-RS-1.conf)
[1;34mTEST 18 (test_wireguard_start_basic):[0m wireguard start - create session and connect to VPN
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_18
[1;32m✓[0m Session creation logged
[1;32m✓[0m wg-quick command in connect.sh
[1;32m✓[0m Session directory created in .session/
[1;32m✓[0m Session metadata files created
[1;32m✓[0m connect.sh script generated
[1;32m✓[0m connect.sh is executable
[1;32m✓[0m connect.sh documents original config with relative path
[1;32m✓[0m Patched config (wg_test13.conf) created
[1;32m✓[0m Patched config correctly strips PostUp hook (phase-based DNS)
[1;32m✓[0m Patched config correctly strips PostDown hook (phase-based DNS)
[1;34mTEST 19 (test_wireguard_connect_resume):[0m wireguard connect - resume existing session by ID
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_19
[1;32m✓[0m wireguard connect generated wg-quick command in connect.sh
[1;32m✓[0m wireguard connect generated pfctl command in connect.sh
[1;32m✓[0m wireguard connect used session configuration
[1;32m✓[0m connect.sh preserved after connect
[1;34mTEST 20 (test_wireguard_stop_basic):[0m stop - disconnect active VPN session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_20
[1;32m✓[0m Session exists before stop
[1;32m✓[0m disconnect.sh contains wg-quick down command
[1;32m✓[0m Stop command executed
[1;32m✓[0m Session preserved after stop (has 'latest' link)
[1;34mTEST 21 (test_session_list):[0m session list - display active and stale sessions
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_21
[1;32m✓[0m Session list header displayed
[1;32m✓[0m Active session (PID 27440) listed
[1;32m✓[0m Stale session (PID 99997) listed
[1;32m✓[0m Stale session (dead process) marked as stopped
[1;34mTEST 22 (test_session_show):[0m session show - display connect script
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_22
[1;32m✓[0m Extracted session ID (89236) from start command output
[1;32m✓[0m Session ID displayed in header
[1;32m✓[0m Session protocol displayed
[1;32m✓[0m Connect script contents displayed
[1;34mTEST 23 (test_session_remove):[0m session remove - remove stale, refuse active
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_23
[1;32m✓[0m Stale session created for removal test
[1;32m✓[0m Removal operation logged for stale session
[1;32m✓[0m Active session (PID 88851) created for refusal test
[1;32m✓[0m Refuses to remove active session (PID 88851)
[1;34mTEST 24 (test_session_save_default):[0m session save - save current session as default
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_24
[1;32m✓[0m Default session symlink created
[1;32m✓[0m Default symlink points to correct session
[1;34mTEST 25 (test_session_save_named):[0m session save work - save with custom name
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_25
[1;32m✓[0m Named session symlink created
[1;32m✓[0m Named symlink points to correct session
[1;34mTEST 26 (test_session_start_default):[0m session start - resume default session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_26
[1;32m✓[0m Connect script created before stopping
[1;32m✓[0m Session directory kept for resumption (referenced)
[1;32m✓[0m Default symlink persists after stop
[1;32m✓[0m Session start executed successfully
[1;34mTEST 27 (test_session_start_named):[0m session start work - resume named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_27
[1;32m✓[0m Named symlink persists after stop
[1;32m✓[0m Named session start executed successfully
[1;34mTEST 28 (test_session_start_bypid):[0m session start <PID> - resume session by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_28
[1;32m✓[0m Mock session (PID 11111) created for PID resume test
[1;32m✓[0m Session start resumes by explicit PID (11111)
[1;34mTEST 29 (test_session_stop_named):[0m session stop work - stop active named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_29
[1;32m✓[0m Session stop resolves named session 'work'
[1;34mTEST 30 (test_session_stop_bypid):[0m session stop <PID> - stop active session by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_30
[1;32m✓[0m Session stop handles PID (88888)
[1;34mTEST 31 (test_session_stop_inactive):[0m session stop <PID> - inactive session should log (not error)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_31
[1;32m✓[0m Session stop handles inactive session gracefully
[1;34mTEST 32 (test_wireguard_remove_config_in_use):[0m wireguard remove - refuse removal when config in use
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_32
[1;32m✓[0m Active session (PID 88851) created using config
[1;32m✓[0m Error message when config in use by session
[1;32m✓[0m Error suggests removing session first
[1;34mTEST 33 (test_wireguard_remove_config_with_refs):[0m wireguard remove - refuse removal when config has symlink refs
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_33
[1;32m✓[0m Category symlink created (privacy/rm2)
[1;32m✓[0m Error message when config has symlink references
[1;32m✓[0m Error lists symlink references
[1;34mTEST 34 (test_wireguard_remove_symlink):[0m wireguard remove - remove symlink (no safety checks)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_34
[1;32m✓[0m Test symlink created
[1;32m✓[0m Symlink removal operation logged
[1;32m✓[0m Symlink was removed
[1;34mTEST 35 (test_wireguard_remove_category_link):[0m wireguard remove - remove link from category
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_35
[1;32m✓[0m Category link (privacy/rm4) created
[1;32m✓[0m Category link removal operation logged
[1;32m✓[0m Category link was removed
[1;34mTEST 36 (test_wireguard_clean_no_broken):[0m wireguard clean - no broken links found
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_36
[1;32m✓[0m Clean header displayed
[1;32m✓[0m No broken symlinks message displayed
[1;32m✓[0m Usage hint displayed
[1;34mTEST 37 (test_wireguard_clean_broken_protocol_link):[0m wireguard clean - detect and generate remove for broken protocol link
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_37
[1;32m✓[0m Broken protocol symlink created for testing
[1;32m✓[0m Remove command generated for broken protocol link
[1;32m✓[0m Command includes link name
[1;34mTEST 38 (test_wireguard_clean_broken_category_link):[0m wireguard clean - detect and generate remove for broken category link
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_38
[1;32m✓[0m Broken category symlink created for testing
[1;32m✓[0m Remove command generated for broken category link
[1;32m✓[0m Command includes category name
[1;34mTEST 39 (test_wireguard_clean_category_no_broken):[0m wireguard clean privacy - category with no broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_39
[1;32m✓[0m Category-specific header displayed
[1;32m✓[0m No broken symlinks message for category
[1;34mTEST 40 (test_wireguard_clean_category_with_broken):[0m wireguard clean privacy - category with broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_40
[1;32m✓[0m Broken symlink created in privacy category
[1;32m✓[0m Remove command generated for category link
[1;32m✓[0m Category-specific clean (not global)
[1;34mTEST 41 (test_wireguard_validate_broken_symlink):[0m wireguard validate - detect broken symlinks
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_41
[1;32m✓[0m Broken symlink created for validation test
[1;32m✓[0m Broken symlink detected in protocol directory
[1;32m✓[0m Error status reported
[1;34mTEST 42 (test_wireguard_validate_broken_category_symlink):[0m wireguard validate - detect broken symlinks in categories
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_42
[1;32m✓[0m Broken category symlink created for validation test
[1;32m✓[0m Broken symlink detected in category
[1;34mTEST 43 (test_wireguard_validate_naming_conflict):[0m wireguard validate - detect naming conflicts
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_43
[1;32m✓[0m Naming conflict created (file + directory)
[1;32m✓[0m Naming conflict detected
[1;34mTEST 44 (test_wireguard_validate_invalid_config):[0m wireguard validate - detect invalid config files
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_44
[1;32m✓[0m Empty config file created for validation test
[1;32m✓[0m Empty config file detected
[1;32m✓[0m Missing [Interface] section detected
[1;34mTEST 45 (test_stop_no_sessions):[0m stop - no sessions exist (empty output)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_45
[1;32m✓[0m No output or log message when no sessions exist
[1;34mTEST 46 (test_stop_specific_interface):[0m stop wg_test_safe - stop specific interface by name
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_46
[1;32m✓[0m Active session (PID 88851, interface wg_test_safe) created
[1;32m✓[0m Stopped specific interface wg_test_safe
[1;32m✓[0m Interface wg_test_safe disconnect command generated
[1;34mTEST 47 (test_wireguard_disconnect_interface):[0m wireguard disconnect wg_test_safe - direct disconnect command
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_47
[1;32m✓[0m Active session (PID 88851) created for disconnect test
[1;32m✓[0m Disconnect command executed for wg_test_safe
[1;32m✓[0m Session PID displayed correctly
[1;34mTEST 48 (test_stop_nonexistent_interface):[0m stop wg_test_other - error when interface not found
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_48
[1;32m✓[0m Active session with wg_test_safe interface created
[1;32m✓[0m Error message for nonexistent interface
[1;34mTEST 49 (test_disconnect_without_session):[0m disconnect without session - error handling
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_49
[1;32m✓[0m Error message when no session exists
[1;34mTEST 50 (test_stop_twice_idempotent):[0m stop twice - idempotent (safe to call multiple times)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_50
[1;32m✓[0m First stop: handles no sessions gracefully
[1;32m✓[0m Second stop: still handles no sessions (idempotent)
[1;34mTEST 51 (test_wireguard_import_nonexistent):[0m wireguard import - error when file doesn't exist
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_51
[1;32m✓[0m Error message for non-existent file
[1;34mTEST 52 (test_wireguard_import_duplicate):[0m wireguard import - error when config already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_52
[1;32m✓[0m First import succeeded
[1;32m✓[0m Error message when config already exists
[1;34mTEST 53 (test_wireguard_add_category_conflict):[0m wireguard add - error when category already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_53
[1;32m✓[0m First add succeeded (privacy category created)
[1;32m✓[0m Error message when category already exists
[1;34mTEST 54 (test_wireguard_add_link_conflict):[0m wireguard add - error when link already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_54
[1;32m✓[0m First link created successfully
[1;32m✓[0m Error message when link already exists
[1;34mTEST 55 (test_wireguard_link_conflict):[0m wireguard link - error when alias already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_55
[1;32m✓[0m Config imported successfully
[1;32m✓[0m Error message when alias already exists
[1;34mTEST 56 (test_error_invalid_category):[0m error handling - invalid category shows error
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_56
[1;32m✓[0m Error message for invalid category
[1;34mTEST 57 (test_error_broken_symlink):[0m error handling - broken symlink handled gracefully
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_57
[1;32m✓[0m Broken symlink created for testing
[1;32m✓[0m Handled broken symlink (error or skipped)
[1;34mTEST 58 (test_error_invalid_command):[0m error handling - invalid command shows usage
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_58
[1;32m✓[0m Usage/help shown for invalid command
[1;34mTEST 59 (test_edge_duplicate_instance_prevention):[0m edge case - prevent duplicate VPN instances
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_59
[1;32m✓[0m First VPN session created (PID 88851)
[1;32m✓[0m Detected existing VPN instance
[1;32m✓[0m No duplicate session created
[1;34mTEST 60 (test_edge_stale_session_cleanup):[0m edge case - stale sessions don't block new sessions
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_60
[1;32m✓[0m Stale session created for testing
[1;32m✓[0m Proceeded with new session (stale session didn't block)
[1;32m✓[0m Stale session preserved (manual cleanup via 'session clean' required)
[1;34mTEST 61 (test_wireguard_patch_valid):[0m wireguard patch - displays patched configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_61
[1;32m✓[0m Patch output correctly strips PostUp hook (phase-based DNS)
[1;32m✓[0m Patch output correctly strips PostDown hook (phase-based DNS)
[1;32m✓[0m Patch output preserves [Interface] section
[1;32m✓[0m Patch output preserves [Peer] section
[1;34mTEST 62 (test_wireguard_patch_nonexistent):[0m wireguard patch - handles nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_62
[1;32m✓[0m Patch rejects nonexistent config with error
[1;34mTEST 63 (test_wireguard_patch_absolute):[0m wireguard patch - handles absolute path
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_63
[1;32m✓[0m Patch works with absolute path (strips DNS hooks)
[1;34mTEST 64 (test_wireguard_info_category):[0m wireguard info - displays category information
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_64
[1;32m✓[0m Category header displayed
[1;32m✓[0m Config count displayed
[1;32m✓[0m Link count displayed
[1;32m✓[0m Category path displayed
[1;32m✓[0m Contents section header displayed
[1;32m✓[0m Category contents listed with symlink arrows
[1;34mTEST 65 (test_session_save_default):[0m session save - save current session as default
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_65
[1;32m✓[0m Default session symlink created
[1;32m✓[0m Default symlink points to correct session
[1;34mTEST 66 (test_session_save_named):[0m session save work - save with custom name
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_66
[1;32m✓[0m Named session symlink created
[1;32m✓[0m Named symlink points to correct session
[1;34mTEST 67 (test_session_start_default):[0m session start - resume default session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_67
[1;32m✓[0m Connect script created before stopping
[1;32m✓[0m Session directory kept for resumption (referenced)
[1;32m✓[0m Default symlink persists after stop
[1;32m✓[0m Session start executed successfully
[1;34mTEST 68 (test_session_start_named):[0m session start work - resume named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_68
[1;32m✓[0m Named symlink persists after stop
[1;32m✓[0m Named session start executed successfully
[1;34mTEST 69 (test_session_start_by_pid):[0m session start <PID> - resume by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_69
[1;32m✓[0m Session start by PID executed successfully
[1;34mTEST 70 (test_openvpn_import_valid):[0m openvpn import - import valid .ovpn config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_70
[1;32m✓[0m Config imported to openvpn/
[1;32m✓[0m Permissions set to 0400
[1;34mTEST 71 (test_openvpn_list):[0m openvpn list - list configs and groups
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_71
[1;32m✓[0m Lists config: us-server.ovpn
[1;32m✓[0m Lists group: work/
[1;32m✓[0m Lists group link with arity-1: work/office
[1;34mTEST 72 (test_openvpn_add_group):[0m openvpn add - create group
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_72
[1;32m✓[0m Group directory created
[1;32m✓[0m Group permissions correct (0700)
[1;34mTEST 73 (test_openvpn_link):[0m openvpn link - create protocol-level link
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_73
[1;32m✓[0m Protocol-level link created
[1;32m✓[0m Link target correct
[1;34mTEST 74 (test_openvpn_remove):[0m openvpn remove - remove config safely
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_74
[1;32m✓[0m Config removed
[1;32m✓[0m Other config preserved
[1;34mTEST 75 (test_openvpn_validate):[0m openvpn validate - detect broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_75
[1;32m✓[0m Broken symlink detected
[1;32m✓[0m Valid database passes validation
[1;34mTEST 76 (test_openvpn_info):[0m openvpn info - show group information
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_76
[1;32m✓[0m Shows group name
[1;32m✓[0m Shows correct link count
[1;32m✓[0m Shows link: office
[1;34mTEST 77 (test_openvpn_dump):[0m openvpn dump - export database
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_77
[1;32m✓[0m Dump includes import command
[1;32m✓[0m Dump includes group creation
[1;32m✓[0m Dump includes protocol link
[1;32m✓[0m Dump includes group link
[1;34mTEST 78 (test_openvpn_patch_valid):[0m openvpn patch - displays patched configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_78
[1;32m✓[0m Patch output correctly strips up script (phase-based DNS)
[1;32m✓[0m Patch output correctly strips down script (phase-based DNS)
[1;32m✓[0m Patch output contains daemon mode
[1;32m✓[0m Patch output contains device interface
[1;32m✓[0m Patch output contains writepid directive
[1;32m✓[0m Patch output preserves client directive
[1;32m✓[0m Patch output preserves remote server
[1;34mTEST 79 (test_openvpn_patch_nonexistent):[0m openvpn patch - handles nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_79
[1;32m✓[0m Error message for nonexistent config
[1;34mTEST 80 (test_openvpn_patch_absolute):[0m openvpn patch - handles absolute path
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_80
[1;32m✓[0m Absolute path patch works
[1;34mTEST 81 (test_openvpn_patch_credentials_bare):[0m openvpn patch - patches bare auth-user-pass with credentials
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_81
[1;32m✓[0m Bare auth-user-pass patched with credentials path
[1;32m✓[0m Bare auth-user-pass preserved when no credentials set
[1;34mTEST 82 (test_openvpn_patch_credentials_existing):[0m openvpn patch - preserves existing auth-user-pass path
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_82
[1;32m✓[0m Existing auth-user-pass path preserved (not overridden)
[1;34mTEST 83 (test_openvpn_patch_credentials_missing):[0m openvpn patch - handles config without auth-user-pass
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_83
[1;32m✓[0m Config without auth-user-pass remains unchanged
[1;34mTEST 84 (test_openvpn_start_basic):[0m openvpn start - create session and connect to VPN
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_84
[1;32m✓[0m Session creation logged
[1;32m✓[0m openvpn command in connect.sh
[1;32m✓[0m Session directory created in .session/
[1;32m✓[0m Session metadata files created
[1;32m✓[0m connect.sh script generated
[1;32m✓[0m connect.sh is executable
[1;32m✓[0m Patched config (tun_test80.ovpn) created
[1;32m✓[0m Patched config contains daemon mode
[1;32m✓[0m Patched config correctly strips up script (phase-based DNS)
[1;32m✓[0m Patched config correctly strips down script (phase-based DNS)
[1;34mTEST 85 (test_openvpn_stop_basic):[0m openvpn stop - cleanup commands for session
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_85
[1;32m✓[0m Session created via user interface
[1;32m✓[0m Disconnect commands reference correct interface (tun_test85)
[1;32m✓[0m Disconnect generates process kill commands
[1;34mTEST 86 (test_openvpn_disconnect_interface):[0m openvpn disconnect - tear down OpenVPN interface
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_86
[1;32m✓[0m Disconnect generates process termination commands
[1;34mTEST 87 (test_openvpn_clean):[0m openvpn clean - generate cleanup commands for broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_87
[1;32m✓[0m Clean generates remove commands
[1;32m✓[0m Clean detected broken symlink
[1;34mTEST 88 (test_protocol_agnostic_import_wireguard):[0m import (protocol-agnostic) - detects WireGuard .conf file
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_88
[1;32m✓[0m Protocol-agnostic import detected .conf and delegated to wireguard import
[1;32m✓[0m Protocol-agnostic import generates correct cp command
[1;34mTEST 89 (test_protocol_agnostic_list):[0m list (protocol-agnostic) - delegates to all protocols
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_89
[1;32m✓[0m Protocol-agnostic list delegated to wireguard list
[1;32m✓[0m Protocol-agnostic list shows wireguard config sections
[1;32m✓[0m Protocol-agnostic list has no duplicate lines (3 unique)
[1;34mTEST 90 (test_protocol_agnostic_link):[0m link (protocol-agnostic) - creates protocol-level alias
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_90
[1;32m✓[0m Protocol-agnostic link generates ln command
[1;32m✓[0m Protocol-agnostic link uses correct relative path (./wireguard)
[1;32m✓[0m Protocol-agnostic link includes correct alias name
[1;34mTEST 91 (test_protocol_agnostic_remove):[0m remove (protocol-agnostic) - removes protocol-level link
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_91
[1;32m✓[0m Protocol-agnostic remove generates rm command
[1;32m✓[0m Protocol-agnostic remove includes descriptive comment
[1;32m✓[0m Protocol-agnostic remove errors on non-existent link
[1;34mTEST 92 (test_protocol_agnostic_validate):[0m validate (protocol-agnostic) - delegates to all protocols
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_92
[1;32m✓[0m Protocol-agnostic validate delegated to wireguard validate
[1;32m✓[0m Protocol-agnostic validate shows validation output
[1;34mTEST 93 (test_network_validate):[0m network validate - check network prerequisites
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_93
[1;32m✓[0m Network validation header displayed
[1;32m✓[0m Network validate passed on clean configuration
[1;34mTEST 94 (test_permissions_validate):[0m permissions validate - check filesystem permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_94
[1;32m✓[0m Permissions validation header displayed
[1;32m✓[0m Permissions validate passed on clean configuration
[1;34mTEST 95 (test_environment_validate):[0m environment validate - check environment variables
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_95
[1;32m✓[0m Environment validation header displayed
[1;32m✓[0m Environment validate passed on clean configuration
[1;34mTEST 96 (test_batch_validate_includes_system):[0m validate (batch) - includes system validators
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_96
[1;32m✓[0m Batch validate includes database validator
[1;32m✓[0m Batch validate includes binaries validator
[1;32m✓[0m Batch validate includes phases validator
[1;32m✓[0m Batch validate includes network validator
[1;32m✓[0m Batch validate includes permissions validator
[1;32m✓[0m Batch validate includes environment validator
[1;34mTEST 97 (test_start_wireguard_only):[0m start - auto-detect WireGuard config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_97
[1;32m✓[0m Delegates to wireguard commands for WireGuard-only config
[1;34mTEST 98 (test_start_openvpn_only):[0m start - auto-detect OpenVPN config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_98
[1;32m✓[0m Delegates to openvpn commands for OpenVPN-only config
[1;34mTEST 99 (test_start_not_found):[0m start - error on nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_99
[1;32m✓[0m Error message for nonexistent config
[1;32m✓[0m Error shows both search locations
[1;34mTEST 100 (test_start_no_default):[0m start - error when no configs exist (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_100
[1;32m✓[0m Error message when no configs available
[1;32m✓[0m Error provides hint to import configs
[1;34mTEST 101 (test_start_with_default_wireguard):[0m start - use default link (WireGuard) via API
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_101
[1;32m✓[0m Default session link created via API
[1;32m✓[0m Start with no args resolves to default session
[1;34mTEST 102 (test_start_with_default_openvpn):[0m start - use default link (OpenVPN) via API
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_102
[1;32m✓[0m Default session link created via API
[1;32m✓[0m Start with no args resolves to default session
[1;34mTEST 103 (test_start_default_invalid_target):[0m start - error on invalid default link target
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_103
[1;32m✓[0m Error detected for invalid default session target
[1;34mTEST 104 (test_init_extension_links):[0m init - creates protocol extension links (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_104
[1;32m✓[0m conf link created
[1;32m✓[0m ovpn link created
[1;32m✓[0m conf → wireguard
[1;32m✓[0m ovpn → openvpn
[1;34mTEST 105 (test_start_extension_link_fast_path):[0m start - uses extension link for protocol resolution (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_105
[1;32m✓[0m Extension link used for fast protocol resolution (wireguard commands found)
[1;34mTEST 106 (test_start_multiple_matches):[0m start - error on multiple protocol matches (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_106
[1;32m✓[0m Multiple matches error shown
[1;32m✓[0m Both matches listed
[1;34mTEST 107 (test_database_init):[0m database init - creates directory structure (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_107
[1;32m✓[0m wireguard/ created
[1;32m✓[0m openvpn/ created
[1;32m✓[0m .session/ created
[1;32m✓[0m session/ created
[1;32m✓[0m .env/default/ created
[1;32m✓[0m .env/local/ created
[1;32m✓[0m .include/phase/ created
[1;34mTEST 108 (test_environment_init):[0m environment init - copies profile templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_108
[1;32m✓[0m minimal profile copied
[1;32m✓[0m profile has correct permissions (0600)
[1;34mTEST 109 (test_phases_copy):[0m phases copy - copies phase templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_109
[1;32m✓[0m wireguard phases copied
[1;32m✓[0m openvpn phases copied
[1;32m✓[0m wireguard phase subdirs exist
[1;34mTEST 110 (test_phases_lift):[0m phases lift - lifts phase:backend templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_110
[1;32m✓[0m generates lift command
[1;32m✓[0m output file is executable
[1;34mTEST 111 (test_phases_sync_single):[0m phases sync <phase> - discovers and lifts backends (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_111
[1;32m✓[0m delegates to phases lift
[1;34mTEST 112 (test_phases_sync_all):[0m phases sync - syncs all phases (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_112
[1;32m✓[0m delegates to single-phase sync
[1;34mTEST 113 (test_init_batch_combinator):[0m init - orchestrates full initialization (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_113
[1;32m✓[0m database init executed
[1;32m✓[0m environment init executed
[1;32m✓[0m phases copy executed
[1;34mTEST 114 (test_init_combinator):[0m init combinator - delegates to batch combinator (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_114
[1;32m✓[0m database created
[1;32m✓[0m profile installed
[1;34mTEST 115 (test_setenv_basic):[0m setenv - basic variable setting
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_115
[1;32m✓[0m .env/local directory created
[1;32m✓[0m Variable file created
[1;32m✓[0m Variable has correct value
[1;32m✓[0m File has correct permissions (0600 or 0640 for cross-user support)
[1;32m✓[0m Shows confirmation message
[1;34mTEST 116 (test_setenv_invalid_name):[0m setenv - invalid variable name
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_116
[1;32m✓[0m Rejects invalid variable name
[1;32m✓[0m No file created for invalid name
[1;34mTEST 117 (test_getenv_local_override):[0m getenv - shows local override
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_117
[1;32m✓[0m Shows local override source
[1;32m✓[0m Outputs correct value from local
[1;34mTEST 118 (test_getenv_fallback_chain):[0m getenv - fallback chain (local > default > template)
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_118
[1;32m✓[0m Shows error if variable not found
[1;32m✓[0m Falls back to .env/default
[1;32m✓[0m Falls back to template/environment
[1;34mTEST 119 (test_unsetenv_existing):[0m unsetenv - remove existing variable
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_119
[1;32m✓[0m Variable file was removed
[1;32m✓[0m Shows confirmation message
[1;34mTEST 120 (test_unsetenv_not_set):[0m unsetenv - variable not set in local
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_120
[1;32m✓[0m Shows informative message when not set
[1;34mTEST 121 (test_dumpenv_prologue):[0m dumpenv prologue - outputs safe minimal set
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_121
[1;32m✓[0m Prologue includes VPN_SWITCH_TERMINAL_INTERPRETER
[1;32m✓[0m Prologue includes VPN_SWITCH_DISPLAY_ANSI
[1;32m✓[0m Prologue excludes VPN_SWITCH_INTERPRETER_wireguard_list (epilogue-only)
[1;32m✓[0m Prologue excludes VPN_SWITCH_INTERPRETER_wireguard_import1 (epilogue-only)
[1;34mTEST 122 (test_dumpenv_epilogue):[0m dumpenv epilogue - outputs complete set
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_122
[1;32m✓[0m Epilogue includes VPN_SWITCH_TERMINAL_INTERPRETER
[1;32m✓[0m Epilogue includes VPN_SWITCH_DISPLAY_ANSI
[1;32m✓[0m Epilogue includes VPN_SWITCH_INTERPRETER_wireguard_list
[1;32m✓[0m Epilogue includes VPN_SWITCH_INTERPRETER_wireguard_import1
[1;34mTEST 123 (test_dumpenv_profile_filtering):[0m dumpenv - profile filtering prevents restore breakage
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_123
[1;32m✓[0m Prologue correctly excludes function-specific interpreter
[1;32m✓[0m Epilogue correctly includes function-specific interpreter
[1;34mTEST 124 (test_environment_cache_on):[0m environment cache on - creates cache file with correct permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_124
[1;32m✓[0m Cache file created
[1;32m✓[0m Cache file has correct permissions (0600)
[1;32m✓[0m Shows cache enabled message
[1;32m✓[0m Cache file has content
[1;34mTEST 125 (test_environment_cache_off):[0m environment cache off - removes cache file
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_125
[1;32m✓[0m Cache file removed
[1;32m✓[0m Shows cache disabled message
[1;34mTEST 126 (test_environment_cache_status):[0m environment cache status - shows correct status
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_126
[1;32m✓[0m Shows DISABLED status when cache off
[1;32m✓[0m Shows ENABLED status when cache on
[1;32m✓[0m Shows cached variable count
[1;34mTEST 127 (test_environment_cache_no_args):[0m environment cache (no args) - defaults to status
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_127
[1;32m✓[0m Shows status with no arguments
[1;34mTEST 128 (test_cache_invalidation_setenv):[0m setenv - rebuilds cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_128
[1;32m✓[0m Cache rebuilt automatically after setenv
[1;32m✓[0m Rebuilt cache contains new variable TEST_VAR
[1;34mTEST 129 (test_cache_invalidation_unsetenv):[0m unsetenv - rebuilds cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_129
[1;32m✓[0m Cache rebuilt automatically after unsetenv
[1;32m✓[0m Rebuilt cache no longer contains TEST_VAR
[1;34mTEST 130 (test_cache_invalidation_environment_init):[0m environment init - invalidates cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_130
[1;32m✓[0m Cache file removed after environment init
[1;32m✓[0m Shows cache invalidation warning
[1;34mTEST 131 (test_dumpenv_cache_preservation):[0m dumpenv epilogue - includes cache if enabled
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_131
[1;32m✓[0m Epilogue includes cache content
[1;32m✓[0m Epilogue includes cache restore comment
[1;34mTEST 132 (test_dumpenv_cache_not_included_when_disabled):[0m dumpenv epilogue - excludes cache when disabled
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_132
[1;32m✓[0m Epilogue correctly excludes cache when disabled
[1;34mTEST 133 (test_cache_no_recursion):[0m environment cache on - excludes cache file from scan
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_133
[1;32m✓[0m Cache correctly excludes itself
[1;34mTEST 134 (test_interpreter_single_underscore):[0m interpreter resolution - single underscore uses TERMINAL_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_134
# Set VPN_SWITCH_TERMINAL_INTERPRETER (effective next command)
[1;32m✓[0m Single underscore function used TERMINAL_INTERPRETER
[1;34mTEST 135 (test_interpreter_double_underscore):[0m interpreter resolution - double underscore uses COMBINATOR_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_135
# Set VPN_SWITCH_COMBINATOR_INTERPRETER (effective next command)
[1;32m✓[0m Double underscore function used COMBINATOR_INTERPRETER
[1;34mTEST 136 (test_interpreter_triple_underscore):[0m interpreter resolution - triple underscore uses BATCH_COMBINATOR_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_136
# Set VPN_SWITCH_BATCH_COMBINATOR_INTERPRETER (effective next command)
[1;32m✓[0m Triple underscore function used BATCH_COMBINATOR_INTERPRETER
[1;34mTEST 137 (test_interpreter_resolution_priority):[0m interpreter resolution - function-specific override beats intrinsic classification
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_137
# Set VPN_SWITCH_TERMINAL_INTERPRETER (effective next command)
[1;32m✓[0m Function-specific override takes priority over intrinsic classification
[1;32m✓[0m Intrinsic classification was correctly bypassed
[1;34mTEST 138 (test_inspect_batch_complete):[0m inspect (batch) - includes all inspection sections
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_138
[1;32m✓[0m Batch inspect includes environment section
[1;32m✓[0m Batch inspect includes system section
[1;32m✓[0m Batch inspect includes WireGuard section
[1;32m✓[0m Batch inspect includes OpenVPN section
[1;32m✓[0m Batch inspect includes session section
[1;32m✓[0m Batch inspect includes phases section
[1;34mTEST 139 (test_environment_inspect):[0m environment inspect - displays environment variables
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_139
[1;32m✓[0m Environment inspect shows header
[1;32m✓[0m Environment inspect shows VPN_SWITCH_BASE
[1;32m✓[0m Environment inspect shows database structure
[1;34mTEST 140 (test_system_inspect):[0m system inspect - displays system configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_140
[1;32m✓[0m System inspect shows header
[1;32m✓[0m System inspect shows system info section
[1;32m✓[0m System inspect shows network interfaces section
[1;34mTEST 141 (test_batch_syntax_wireguard_clean):[0m wireguard clean - validates batch syntax
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_141
[1;32m✓[0m wireguard clean outputs valid batch syntax
[1;32m✓[0m wireguard clean uses literal $VPN_SWITCH_CONTEXT_SCRIPT
[1;34mTEST 142 (test_combinators_literal_variable):[0m combinators - use literal $VPN_SWITCH_CONTEXT_SCRIPT
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_142
[1;32m✓[0m wireguard start uses literal variable
[1;32m✓[0m wireguard start variable not expanded
[1;34mTEST 143 (test_combinator_syntax_validation):[0m combinators - validate single-command output syntax
[1;34mDatabase:[0m /tmp/vpn-switch-test.88851/test_143
[1;32m✓[0m wireguard start outputs exactly one command
[1;32m✓[0m wireguard start uses literal variable
[1;32m✓[0m wireguard start variable not expanded
[1;32m✓[0m openvpn start outputs exactly one command
[1;32m✓[0m start (protocol-agnostic) outputs exactly one command
[1;34mTEST 144 (test_function_classification_correct):[0m function classification - naming matches behavior
[1;32m✓[0m wireguard add2 correctly classified as combinator (__)
[1;32m✓[0m wireguard clean0 correctly classified as batch (___)
[1;32m✓[0m openvpn clean0 correctly classified as batch (___)
[1;34mTEST 145 (test_no_terminal_output_vpnswitch_commands):[0m terminal functions - must not output vpn-switch commands
[1;32m✓[0m No terminal functions output vpn-switch commands
[1;34mTEST 146 (test_metadata_function_lists):[0m metadata - function lists accurate after renames
[1;32m✓[0m Metadata includes __wireguard_add2 in combinators
[1;32m✓[0m Metadata includes ___wireguard_clean0 in batch combinators
[1;32m✓[0m Metadata includes ___openvpn_clean0 in batch combinators
========================================
Test Summary
========================================
Test Functions: 146
Total Assertions: 371
[1;32mPassed Assertions: 371[0m
Failed Assertions: 0
[1;32mALL TESTS PASSED[0m
[1;34m========================================[0m
[1;34mvpn-switch Unit Test Suite (Formalized)[0m
[1;34m========================================[0m
[1;34mRunning Tests[0m
========================================
[1;33mFilter active - running only:[0mtest_header test_summary test_setup test_printenv_command test_status_command test_wireguard_import_valid test_wireguard_add_category test_wireguard_link_create test_wireguard_list test_wireguard_validate test_wireguard_info test_wireguard_start_basic test_wireguard_connect_resume test_wireguard_stop_basic test_session_list test_session_show test_session_remove test_session_save_default test_session_save_named test_session_start_default test_session_start_named test_session_start_bypid test_session_stop_named test_session_stop_bypid test_session_stop_inactive test_wireguard_remove_config_in_use test_wireguard_remove_config_with_refs test_wireguard_remove_symlink test_wireguard_remove_category_link test_wireguard_clean_no_broken test_wireguard_clean_broken_protocol_link test_wireguard_clean_broken_category_link test_wireguard_clean_category_no_broken test_wireguard_clean_category_with_broken test_wireguard_validate_broken_symlink test_wireguard_validate_broken_category_symlink test_wireguard_validate_naming_conflict test_wireguard_validate_invalid_config test_stop_no_sessions test_stop_specific_interface test_wireguard_disconnect_interface test_stop_nonexistent_interface test_disconnect_without_session test_stop_twice_idempotent test_wireguard_import_nonexistent test_wireguard_import_duplicate test_wireguard_add_category_conflict test_wireguard_add_link_conflict test_wireguard_link_conflict test_error_invalid_category test_error_broken_symlink test_error_invalid_command test_edge_duplicate_instance_prevention test_edge_stale_session_cleanup test_wireguard_patch_valid test_wireguard_patch_nonexistent test_wireguard_patch_absolute test_wireguard_info_category test_session_save_default test_session_save_named test_session_start_default test_session_start_named test_session_start_by_pid test_protocol_agnostic_import_wireguard test_protocol_agnostic_list test_protocol_agnostic_link test_protocol_agnostic_remove test_protocol_agnostic_validate test_network_validate test_permissions_validate test_environment_validate test_batch_validate_includes_system test_interpreter_single_underscore test_interpreter_double_underscore test_interpreter_triple_underscore test_interpreter_resolution_priority test_start_wireguard_only test_start_openvpn_only test_start_not_found test_start_no_default test_start_with_default_wireguard test_start_with_default_openvpn test_start_default_invalid_target test_init_extension_links test_database_init test_environment_init test_phases_copy test_phases_lift test_phases_sync_single test_phases_sync_all test_init_batch_combinator test_init_combinator test_start_extension_link_fast_path test_start_multiple_matches test_openvpn_import_valid test_openvpn_list test_openvpn_add_group test_openvpn_link test_openvpn_remove test_openvpn_validate test_openvpn_info test_openvpn_dump test_openvpn_patch_valid test_openvpn_patch_nonexistent test_openvpn_patch_absolute test_openvpn_patch_credentials_bare test_openvpn_patch_credentials_existing test_openvpn_patch_credentials_missing test_openvpn_start_basic test_openvpn_stop_basic test_openvpn_disconnect_interface test_openvpn_clean test_setenv_basic test_setenv_invalid_name test_getenv_local_override test_getenv_fallback_chain test_unsetenv_existing test_unsetenv_not_set test_dumpenv_prologue test_dumpenv_epilogue test_dumpenv_profile_filtering test_environment_cache_on test_environment_cache_off test_environment_cache_status test_environment_cache_no_args test_cache_invalidation_setenv test_cache_invalidation_unsetenv test_cache_invalidation_environment_init test_dumpenv_cache_preservation test_dumpenv_cache_not_included_when_disabled test_cache_no_recursion test_inspect_batch_complete test_environment_inspect test_system_inspect test_batch_syntax_wireguard_clean test_combinators_literal_variable test_function_classification_correct test_no_terminal_output_vpnswitch_commands test_metadata_function_lists test_combinator_syntax_validation test_error_command_single_line test_error_command_two_lines test_error_command_three_lines test_error_command_ansi_colors test_batch_id_sequential test_store_batch_exits_basic test_store_batch_exits_references test_free_batch_id test_batch_infrastructure_lifecycle
[1;34mTEST 1 (test_batch_id_sequential):[0m get_batch_id - sequential allocation
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_1
[1;32m✓[0m First batch ID is 0
[1;32m✓[0m Second batch ID is 1
[1;32m✓[0m Third batch ID is 2
[1;32m✓[0m Counter file has correct value (3)
[1;34mTEST 2 (test_store_batch_exits_basic):[0m store_batch_exits - stores exit codes to file
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_2
[1;32m✓[0m Batch file created
[1;32m✓[0m Batch file has correct content
[1;34mTEST 3 (test_store_batch_exits_references):[0m store_batch_exits - stores exit codes with batch references
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_3
[1;32m✓[0m Batch file stores references correctly
[1;34mTEST 4 (test_free_batch_id):[0m free_batch_id - deletes batch file
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_4
[1;32m✓[0m Batch file exists before cleanup
[1;32m✓[0m Batch file deleted after cleanup
[1;34mTEST 5 (test_batch_infrastructure_lifecycle):[0m Batch infrastructure - full allocation/store/free lifecycle
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_5
[1;32m✓[0m Allocated batch ID: 0
[1;32m✓[0m Batch results stored
[1;32m✓[0m Batch results readable
[1;32m✓[0m Batch cleaned up successfully
[1;34mTEST 6 (test_printenv_command):[0m printenv - basic environment display
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_6
[1;32m✓[0m Printenv command executed and shows header
[1;32m✓[0m Printenv shows VPN_SWITCH_BASE variable
[1;34mTEST 7 (test_status_command):[0m status - VPN status display
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_7
[1;32m✓[0m Status command shows header
[1;32m✓[0m Status shows disconnected state
[1;32m✓[0m Status checks network interfaces
[1;34mTEST 8 (test_error_command_single_line):[0m error command - single line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_8
[1;32m✓[0m error command outputs printf with 'Error:' prefix
[1;32m✓[0m error command outputs exit 1
[1;32m✓[0m error command redirects to stderr
[1;34mTEST 9 (test_error_command_two_lines):[0m error command - two line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_9
[1;32m✓[0m error command first line has 'Error:' prefix
[1;32m✓[0m error command second line is indented without 'Error:' prefix
[1;32m✓[0m error command outputs exit 1
[1;34mTEST 10 (test_error_command_three_lines):[0m error command - three line message
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_10
[1;32m✓[0m error command first line has 'Error:' prefix
[1;32m✓[0m error command has properly indented continuation lines
[1;32m✓[0m error command includes all three message lines
[1;32m✓[0m error command outputs exit 1
[1;34mTEST 11 (test_error_command_ansi_colors):[0m error command - ANSI color support
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_11
[1;32m✓[0m error command includes ANSI escape codes when enabled
[1;32m✓[0m error command includes ANSI reset code
[1;34mTEST 12 (test_wireguard_list):[0m wireguard list - display configurations
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_12
[1;32m✓[0m Configuration section header displayed
[1;32m✓[0m Config files section displayed
[1;32m✓[0m Imported config file listed
[1;34mTEST 13 (test_wireguard_validate):[0m wireguard validate - validate clean configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_13
[1;32m✓[0m Validation header displayed
[1;32m✓[0m No issues found in clean configuration
[1;34mTEST 14 (test_wireguard_info):[0m wireguard info - display category information
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_14
[1;32m✓[0m Category header displayed
[1;32m✓[0m Category path displayed
[1;32m✓[0m Contents section displayed
[1;32m✓[0m Category contents listed with symlink arrows
[1;34mTEST 15 (test_wireguard_import_valid):[0m wireguard import - import valid config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_15
[1;32m✓[0m Config file imported to database
[1;32m✓[0m Permissions set to 0400 (read-only)
[1;34mTEST 16 (test_wireguard_add_category):[0m wireguard add - create category with permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_16
[1;32m✓[0m Category directory created
[1;32m✓[0m Permissions set to 0755
[1;34mTEST 17 (test_wireguard_link_create):[0m wireguard link - create symlink in protocol directory
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_17
[1;32m✓[0m Symlink created
[1;32m✓[0m Symlink points to correct relative path (./wg-TEST-RS-1.conf)
[1;34mTEST 18 (test_wireguard_start_basic):[0m wireguard start - create session and connect to VPN
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_18
[1;32m✓[0m Session creation logged
[1;32m✓[0m wg-quick command in connect.sh
[1;32m✓[0m Session directory created in .session/
[1;32m✓[0m Session metadata files created
[1;32m✓[0m connect.sh script generated
[1;32m✓[0m connect.sh is executable
[1;32m✓[0m connect.sh documents original config with relative path
[1;32m✓[0m Patched config (wg_test13.conf) created
[1;32m✓[0m Patched config correctly strips PostUp hook (phase-based DNS)
[1;32m✓[0m Patched config correctly strips PostDown hook (phase-based DNS)
[1;34mTEST 19 (test_wireguard_connect_resume):[0m wireguard connect - resume existing session by ID
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_19
[1;32m✓[0m wireguard connect generated wg-quick command in connect.sh
[1;32m✓[0m wireguard connect generated pfctl command in connect.sh
[1;32m✓[0m wireguard connect used session configuration
[1;32m✓[0m connect.sh preserved after connect
[1;34mTEST 20 (test_wireguard_stop_basic):[0m stop - disconnect active VPN session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_20
[1;32m✓[0m Session exists before stop
[1;32m✓[0m disconnect.sh contains wg-quick down command
[1;32m✓[0m Stop command executed
[1;32m✓[0m Session preserved after stop (has 'latest' link)
[1;34mTEST 21 (test_session_list):[0m session list - display active and stale sessions
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_21
[1;32m✓[0m Session list header displayed
[1;32m✓[0m Active session (PID 91555) listed
[1;32m✓[0m Stale session (PID 99997) listed
[1;32m✓[0m Stale session (dead process) marked as stopped
[1;34mTEST 22 (test_session_show):[0m session show - display connect script
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_22
[1;32m✓[0m Extracted session ID (78522) from start command output
[1;32m✓[0m Session ID displayed in header
[1;32m✓[0m Session protocol displayed
[1;32m✓[0m Connect script contents displayed
[1;34mTEST 23 (test_session_remove):[0m session remove - remove stale, refuse active
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_23
[1;32m✓[0m Stale session created for removal test
[1;32m✓[0m Removal operation logged for stale session
[1;32m✓[0m Active session (PID 12000) created for refusal test
[1;32m✓[0m Refuses to remove active session (PID 12000)
[1;34mTEST 24 (test_session_save_default):[0m session save - save current session as default
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_24
[1;32m✓[0m Default session symlink created
[1;32m✓[0m Default symlink points to correct session
[1;34mTEST 25 (test_session_save_named):[0m session save work - save with custom name
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_25
[1;32m✓[0m Named session symlink created
[1;32m✓[0m Named symlink points to correct session
[1;34mTEST 26 (test_session_start_default):[0m session start - resume default session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_26
[1;32m✓[0m Connect script created before stopping
[1;32m✓[0m Session directory kept for resumption (referenced)
[1;32m✓[0m Default symlink persists after stop
[1;32m✓[0m Session start executed successfully
[1;34mTEST 27 (test_session_start_named):[0m session start work - resume named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_27
[1;32m✓[0m Named symlink persists after stop
[1;32m✓[0m Named session start executed successfully
[1;34mTEST 28 (test_session_start_bypid):[0m session start <PID> - resume session by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_28
[1;32m✓[0m Mock session (PID 11111) created for PID resume test
[1;32m✓[0m Session start resumes by explicit PID (11111)
[1;34mTEST 29 (test_session_stop_named):[0m session stop work - stop active named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_29
[1;32m✓[0m Session stop resolves named session 'work'
[1;34mTEST 30 (test_session_stop_bypid):[0m session stop <PID> - stop active session by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_30
[1;32m✓[0m Session stop handles PID (88888)
[1;34mTEST 31 (test_session_stop_inactive):[0m session stop <PID> - inactive session should log (not error)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_31
[1;32m✓[0m Session stop handles inactive session gracefully
[1;34mTEST 32 (test_wireguard_remove_config_in_use):[0m wireguard remove - refuse removal when config in use
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_32
[1;32m✓[0m Active session (PID 12000) created using config
[1;32m✓[0m Error message when config in use by session
[1;32m✓[0m Error suggests removing session first
[1;34mTEST 33 (test_wireguard_remove_config_with_refs):[0m wireguard remove - refuse removal when config has symlink refs
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_33
[1;32m✓[0m Category symlink created (privacy/rm2)
[1;32m✓[0m Error message when config has symlink references
[1;32m✓[0m Error lists symlink references
[1;34mTEST 34 (test_wireguard_remove_symlink):[0m wireguard remove - remove symlink (no safety checks)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_34
[1;32m✓[0m Test symlink created
[1;32m✓[0m Symlink removal operation logged
[1;32m✓[0m Symlink was removed
[1;34mTEST 35 (test_wireguard_remove_category_link):[0m wireguard remove - remove link from category
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_35
[1;32m✓[0m Category link (privacy/rm4) created
[1;32m✓[0m Category link removal operation logged
[1;32m✓[0m Category link was removed
[1;34mTEST 36 (test_wireguard_clean_no_broken):[0m wireguard clean - no broken links found
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_36
[1;32m✓[0m Clean header displayed
[1;32m✓[0m No broken symlinks message displayed
[1;32m✓[0m Usage hint displayed
[1;34mTEST 37 (test_wireguard_clean_broken_protocol_link):[0m wireguard clean - detect and generate remove for broken protocol link
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_37
[1;32m✓[0m Broken protocol symlink created for testing
[1;32m✓[0m Remove command generated for broken protocol link
[1;32m✓[0m Command includes link name
[1;34mTEST 38 (test_wireguard_clean_broken_category_link):[0m wireguard clean - detect and generate remove for broken category link
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_38
[1;32m✓[0m Broken category symlink created for testing
[1;32m✓[0m Remove command generated for broken category link
[1;32m✓[0m Command includes category name
[1;34mTEST 39 (test_wireguard_clean_category_no_broken):[0m wireguard clean privacy - category with no broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_39
[1;32m✓[0m Category-specific header displayed
[1;32m✓[0m No broken symlinks message for category
[1;34mTEST 40 (test_wireguard_clean_category_with_broken):[0m wireguard clean privacy - category with broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_40
[1;32m✓[0m Broken symlink created in privacy category
[1;32m✓[0m Remove command generated for category link
[1;32m✓[0m Category-specific clean (not global)
[1;34mTEST 41 (test_wireguard_validate_broken_symlink):[0m wireguard validate - detect broken symlinks
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_41
[1;32m✓[0m Broken symlink created for validation test
[1;32m✓[0m Broken symlink detected in protocol directory
[1;32m✓[0m Error status reported
[1;34mTEST 42 (test_wireguard_validate_broken_category_symlink):[0m wireguard validate - detect broken symlinks in categories
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_42
[1;32m✓[0m Broken category symlink created for validation test
[1;32m✓[0m Broken symlink detected in category
[1;34mTEST 43 (test_wireguard_validate_naming_conflict):[0m wireguard validate - detect naming conflicts
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_43
[1;32m✓[0m Naming conflict created (file + directory)
[1;32m✓[0m Naming conflict detected
[1;34mTEST 44 (test_wireguard_validate_invalid_config):[0m wireguard validate - detect invalid config files
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_44
[1;32m✓[0m Empty config file created for validation test
[1;32m✓[0m Empty config file detected
[1;32m✓[0m Missing [Interface] section detected
[1;34mTEST 45 (test_stop_no_sessions):[0m stop - no sessions exist (empty output)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_45
[1;32m✓[0m No output or log message when no sessions exist
[1;34mTEST 46 (test_stop_specific_interface):[0m stop wg_test_safe - stop specific interface by name
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_46
[1;32m✓[0m Active session (PID 12000, interface wg_test_safe) created
[1;32m✓[0m Stopped specific interface wg_test_safe
[1;32m✓[0m Interface wg_test_safe disconnect command generated
[1;34mTEST 47 (test_wireguard_disconnect_interface):[0m wireguard disconnect wg_test_safe - direct disconnect command
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_47
[1;32m✓[0m Active session (PID 12000) created for disconnect test
[1;32m✓[0m Disconnect command executed for wg_test_safe
[1;32m✓[0m Session PID displayed correctly
[1;34mTEST 48 (test_stop_nonexistent_interface):[0m stop wg_test_other - error when interface not found
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_48
[1;32m✓[0m Active session with wg_test_safe interface created
[1;32m✓[0m Error message for nonexistent interface
[1;34mTEST 49 (test_disconnect_without_session):[0m disconnect without session - error handling
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_49
[1;32m✓[0m Error message when no session exists
[1;34mTEST 50 (test_stop_twice_idempotent):[0m stop twice - idempotent (safe to call multiple times)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_50
[1;32m✓[0m First stop: handles no sessions gracefully
[1;32m✓[0m Second stop: still handles no sessions (idempotent)
[1;34mTEST 51 (test_wireguard_import_nonexistent):[0m wireguard import - error when file doesn't exist
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_51
[1;32m✓[0m Error message for non-existent file
[1;34mTEST 52 (test_wireguard_import_duplicate):[0m wireguard import - error when config already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_52
[1;32m✓[0m First import succeeded
[1;32m✓[0m Error message when config already exists
[1;34mTEST 53 (test_wireguard_add_category_conflict):[0m wireguard add - error when category already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_53
[1;32m✓[0m First add succeeded (privacy category created)
[1;32m✓[0m Error message when category already exists
[1;34mTEST 54 (test_wireguard_add_link_conflict):[0m wireguard add - error when link already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_54
[1;32m✓[0m First link created successfully
[1;32m✓[0m Error message when link already exists
[1;34mTEST 55 (test_wireguard_link_conflict):[0m wireguard link - error when alias already exists
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_55
[1;32m✓[0m Config imported successfully
[1;32m✓[0m Error message when alias already exists
[1;34mTEST 56 (test_error_invalid_category):[0m error handling - invalid category shows error
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_56
[1;32m✓[0m Error message for invalid category
[1;34mTEST 57 (test_error_broken_symlink):[0m error handling - broken symlink handled gracefully
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_57
[1;32m✓[0m Broken symlink created for testing
[1;32m✓[0m Handled broken symlink (error or skipped)
[1;34mTEST 58 (test_error_invalid_command):[0m error handling - invalid command shows usage
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_58
[1;32m✓[0m Usage/help shown for invalid command
[1;34mTEST 59 (test_edge_duplicate_instance_prevention):[0m edge case - prevent duplicate VPN instances
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_59
[1;32m✓[0m First VPN session created (PID 12000)
[1;32m✓[0m Detected existing VPN instance
[1;32m✓[0m No duplicate session created
[1;34mTEST 60 (test_edge_stale_session_cleanup):[0m edge case - stale sessions don't block new sessions
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_60
[1;32m✓[0m Stale session created for testing
[1;32m✓[0m Proceeded with new session (stale session didn't block)
[1;32m✓[0m Stale session preserved (manual cleanup via 'session clean' required)
[1;34mTEST 61 (test_wireguard_patch_valid):[0m wireguard patch - displays patched configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_61
[1;32m✓[0m Patch output correctly strips PostUp hook (phase-based DNS)
[1;32m✓[0m Patch output correctly strips PostDown hook (phase-based DNS)
[1;32m✓[0m Patch output preserves [Interface] section
[1;32m✓[0m Patch output preserves [Peer] section
[1;34mTEST 62 (test_wireguard_patch_nonexistent):[0m wireguard patch - handles nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_62
[1;32m✓[0m Patch rejects nonexistent config with error
[1;34mTEST 63 (test_wireguard_patch_absolute):[0m wireguard patch - handles absolute path
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_63
[1;32m✓[0m Patch works with absolute path (strips DNS hooks)
[1;34mTEST 64 (test_wireguard_info_category):[0m wireguard info - displays category information
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_64
[1;32m✓[0m Category header displayed
[1;32m✓[0m Config count displayed
[1;32m✓[0m Link count displayed
[1;32m✓[0m Category path displayed
[1;32m✓[0m Contents section header displayed
[1;32m✓[0m Category contents listed with symlink arrows
[1;34mTEST 65 (test_session_save_default):[0m session save - save current session as default
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_65
[1;32m✓[0m Default session symlink created
[1;32m✓[0m Default symlink points to correct session
[1;34mTEST 66 (test_session_save_named):[0m session save work - save with custom name
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_66
[1;32m✓[0m Named session symlink created
[1;32m✓[0m Named symlink points to correct session
[1;34mTEST 67 (test_session_start_default):[0m session start - resume default session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_67
[1;32m✓[0m Connect script created before stopping
[1;32m✓[0m Session directory kept for resumption (referenced)
[1;32m✓[0m Default symlink persists after stop
[1;32m✓[0m Session start executed successfully
[1;34mTEST 68 (test_session_start_named):[0m session start work - resume named session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_68
[1;32m✓[0m Named symlink persists after stop
[1;32m✓[0m Named session start executed successfully
[1;34mTEST 69 (test_session_start_by_pid):[0m session start <PID> - resume by PID
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_69
[1;32m✓[0m Session start by PID executed successfully
[1;34mTEST 70 (test_openvpn_import_valid):[0m openvpn import - import valid .ovpn config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_70
[1;32m✓[0m Config imported to openvpn/
[1;32m✓[0m Permissions set to 0400
[1;34mTEST 71 (test_openvpn_list):[0m openvpn list - list configs and groups
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_71
[1;32m✓[0m Lists config: us-server.ovpn
[1;32m✓[0m Lists group: work/
[1;32m✓[0m Lists group link with arity-1: work/office
[1;34mTEST 72 (test_openvpn_add_group):[0m openvpn add - create group
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_72
[1;32m✓[0m Group directory created
[1;32m✓[0m Group permissions correct (0700)
[1;34mTEST 73 (test_openvpn_link):[0m openvpn link - create protocol-level link
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_73
[1;32m✓[0m Protocol-level link created
[1;32m✓[0m Link target correct
[1;34mTEST 74 (test_openvpn_remove):[0m openvpn remove - remove config safely
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_74
[1;32m✓[0m Config removed
[1;32m✓[0m Other config preserved
[1;34mTEST 75 (test_openvpn_validate):[0m openvpn validate - detect broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_75
[1;32m✓[0m Broken symlink detected
[1;32m✓[0m Valid database passes validation
[1;34mTEST 76 (test_openvpn_info):[0m openvpn info - show group information
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_76
[1;32m✓[0m Shows group name
[1;32m✓[0m Shows correct link count
[1;32m✓[0m Shows link: office
[1;34mTEST 77 (test_openvpn_dump):[0m openvpn dump - export database
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_77
[1;32m✓[0m Dump includes import command
[1;32m✓[0m Dump includes group creation
[1;32m✓[0m Dump includes protocol link
[1;32m✓[0m Dump includes group link
[1;34mTEST 78 (test_openvpn_patch_valid):[0m openvpn patch - displays patched configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_78
[1;32m✓[0m Patch output correctly strips up script (phase-based DNS)
[1;32m✓[0m Patch output correctly strips down script (phase-based DNS)
[1;32m✓[0m Patch output contains daemon mode
[1;32m✓[0m Patch output contains device interface
[1;32m✓[0m Patch output contains writepid directive
[1;32m✓[0m Patch output preserves client directive
[1;32m✓[0m Patch output preserves remote server
[1;34mTEST 79 (test_openvpn_patch_nonexistent):[0m openvpn patch - handles nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_79
[1;32m✓[0m Error message for nonexistent config
[1;34mTEST 80 (test_openvpn_patch_absolute):[0m openvpn patch - handles absolute path
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_80
[1;32m✓[0m Absolute path patch works
[1;34mTEST 81 (test_openvpn_patch_credentials_bare):[0m openvpn patch - patches bare auth-user-pass with credentials
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_81
[1;32m✓[0m Bare auth-user-pass patched with credentials path
[1;32m✓[0m Bare auth-user-pass preserved when no credentials set
[1;34mTEST 82 (test_openvpn_patch_credentials_existing):[0m openvpn patch - preserves existing auth-user-pass path
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_82
[1;32m✓[0m Existing auth-user-pass path preserved (not overridden)
[1;34mTEST 83 (test_openvpn_patch_credentials_missing):[0m openvpn patch - handles config without auth-user-pass
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_83
[1;32m✓[0m Config without auth-user-pass remains unchanged
[1;34mTEST 84 (test_openvpn_start_basic):[0m openvpn start - create session and connect to VPN
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_84
[1;32m✓[0m Session creation logged
[1;32m✓[0m openvpn command in connect.sh
[1;32m✓[0m Session directory created in .session/
[1;32m✓[0m Session metadata files created
[1;32m✓[0m connect.sh script generated
[1;32m✓[0m connect.sh is executable
[1;32m✓[0m Patched config (tun_test80.ovpn) created
[1;32m✓[0m Patched config contains daemon mode
[1;32m✓[0m Patched config correctly strips up script (phase-based DNS)
[1;32m✓[0m Patched config correctly strips down script (phase-based DNS)
[1;34mTEST 85 (test_openvpn_stop_basic):[0m openvpn stop - cleanup commands for session
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_85
[1;32m✓[0m Session created via user interface
[1;32m✓[0m Disconnect commands reference correct interface (tun_test85)
[1;32m✓[0m Disconnect generates process kill commands
[1;34mTEST 86 (test_openvpn_disconnect_interface):[0m openvpn disconnect - tear down OpenVPN interface
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_86
[1;32m✓[0m Disconnect generates process termination commands
[1;34mTEST 87 (test_openvpn_clean):[0m openvpn clean - generate cleanup commands for broken links
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_87
[1;32m✓[0m Clean generates remove commands
[1;32m✓[0m Clean detected broken symlink
[1;34mTEST 88 (test_protocol_agnostic_import_wireguard):[0m import (protocol-agnostic) - detects WireGuard .conf file
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_88
[1;32m✓[0m Protocol-agnostic import detected .conf and delegated to wireguard import
[1;32m✓[0m Protocol-agnostic import generates correct cp command
[1;34mTEST 89 (test_protocol_agnostic_list):[0m list (protocol-agnostic) - delegates to all protocols
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_89
[1;32m✓[0m Protocol-agnostic list delegated to wireguard list
[1;32m✓[0m Protocol-agnostic list shows wireguard config sections
[1;32m✓[0m Protocol-agnostic list has no duplicate lines (3 unique)
[1;34mTEST 90 (test_protocol_agnostic_link):[0m link (protocol-agnostic) - creates protocol-level alias
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_90
[1;32m✓[0m Protocol-agnostic link generates ln command
[1;32m✓[0m Protocol-agnostic link uses correct relative path (./wireguard)
[1;32m✓[0m Protocol-agnostic link includes correct alias name
[1;34mTEST 91 (test_protocol_agnostic_remove):[0m remove (protocol-agnostic) - removes protocol-level link
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_91
[1;32m✓[0m Protocol-agnostic remove generates rm command
[1;32m✓[0m Protocol-agnostic remove includes descriptive comment
[1;32m✓[0m Protocol-agnostic remove errors on non-existent link
[1;34mTEST 92 (test_protocol_agnostic_validate):[0m validate (protocol-agnostic) - delegates to all protocols
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_92
[1;32m✓[0m Protocol-agnostic validate delegated to wireguard validate
[1;32m✓[0m Protocol-agnostic validate shows validation output
[1;34mTEST 93 (test_network_validate):[0m network validate - check network prerequisites
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_93
[1;32m✓[0m Network validation header displayed
[1;32m✓[0m Network validate passed on clean configuration
[1;34mTEST 94 (test_permissions_validate):[0m permissions validate - check filesystem permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_94
[1;32m✓[0m Permissions validation header displayed
[1;32m✓[0m Permissions validate passed on clean configuration
[1;34mTEST 95 (test_environment_validate):[0m environment validate - check environment variables
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_95
[1;32m✓[0m Environment validation header displayed
[1;32m✓[0m Environment validate passed on clean configuration
[1;34mTEST 96 (test_batch_validate_includes_system):[0m validate (batch) - includes system validators
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_96
[1;32m✓[0m Batch validate includes database validator
[1;32m✓[0m Batch validate includes binaries validator
[1;32m✓[0m Batch validate includes phases validator
[1;32m✓[0m Batch validate includes network validator
[1;32m✓[0m Batch validate includes permissions validator
[1;32m✓[0m Batch validate includes environment validator
[1;34mTEST 97 (test_start_wireguard_only):[0m start - auto-detect WireGuard config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_97
[1;32m✓[0m Delegates to wireguard commands for WireGuard-only config
[1;34mTEST 98 (test_start_openvpn_only):[0m start - auto-detect OpenVPN config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_98
[1;32m✓[0m Delegates to openvpn commands for OpenVPN-only config
[1;34mTEST 99 (test_start_not_found):[0m start - error on nonexistent config
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_99
[1;32m✓[0m Error message for nonexistent config
[1;32m✓[0m Error shows both search locations
[1;34mTEST 100 (test_start_no_default):[0m start - error when no configs exist (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_100
[1;32m✓[0m Error message when no configs available
[1;32m✓[0m Error provides hint to import configs
[1;34mTEST 101 (test_start_with_default_wireguard):[0m start - use default link (WireGuard) via API
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_101
[1;32m✓[0m Default session link created via API
[1;32m✓[0m Start with no args resolves to default session
[1;34mTEST 102 (test_start_with_default_openvpn):[0m start - use default link (OpenVPN) via API
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_102
[1;32m✓[0m Default session link created via API
[1;32m✓[0m Start with no args resolves to default session
[1;34mTEST 103 (test_start_default_invalid_target):[0m start - error on invalid default link target
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_103
[1;32m✓[0m Error detected for invalid default session target
[1;34mTEST 104 (test_init_extension_links):[0m init - creates protocol extension links (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_104
[1;32m✓[0m conf link created
[1;32m✓[0m ovpn link created
[1;32m✓[0m conf → wireguard
[1;32m✓[0m ovpn → openvpn
[1;34mTEST 105 (test_start_extension_link_fast_path):[0m start - uses extension link for protocol resolution (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_105
[1;32m✓[0m Extension link used for fast protocol resolution (wireguard commands found)
[1;34mTEST 106 (test_start_multiple_matches):[0m start - error on multiple protocol matches (Phase 3.4.1)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_106
[1;32m✓[0m Multiple matches error shown
[1;32m✓[0m Both matches listed
[1;34mTEST 107 (test_database_init):[0m database init - creates directory structure (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_107
[1;32m✓[0m wireguard/ created
[1;32m✓[0m openvpn/ created
[1;32m✓[0m .session/ created
[1;32m✓[0m session/ created
[1;32m✓[0m .env/default/ created
[1;32m✓[0m .env/local/ created
[1;32m✓[0m .include/phase/ created
[1;34mTEST 108 (test_environment_init):[0m environment init - copies profile templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_108
[1;32m✓[0m minimal profile copied
[1;32m✓[0m profile has correct permissions (0600)
[1;34mTEST 109 (test_phases_copy):[0m phases copy - copies phase templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_109
[1;32m✓[0m wireguard phases copied
[1;32m✓[0m openvpn phases copied
[1;32m✓[0m wireguard phase subdirs exist
[1;34mTEST 110 (test_phases_lift):[0m phases lift - lifts phase:backend templates (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_110
[1;32m✓[0m generates lift command
[1;32m✓[0m output file is executable
[1;34mTEST 111 (test_phases_sync_single):[0m phases sync <phase> - discovers and lifts backends (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_111
[1;32m✓[0m delegates to phases lift
[1;34mTEST 112 (test_phases_sync_all):[0m phases sync - syncs all phases (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_112
[1;32m✓[0m delegates to single-phase sync
[1;34mTEST 113 (test_init_batch_combinator):[0m init - orchestrates full initialization (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_113
[1;32m✓[0m database init executed
[1;32m✓[0m environment init executed
[1;32m✓[0m phases copy executed
[1;34mTEST 114 (test_init_combinator):[0m init combinator - delegates to batch combinator (Phase 4.4)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_114
[1;32m✓[0m database created
[1;32m✓[0m profile installed
[1;34mTEST 115 (test_setenv_basic):[0m setenv - basic variable setting
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_115
[1;32m✓[0m .env/local directory created
[1;32m✓[0m Variable file created
[1;32m✓[0m Variable has correct value
[1;32m✓[0m File has correct permissions (0600 or 0640 for cross-user support)
[1;32m✓[0m Shows confirmation message
[1;34mTEST 116 (test_setenv_invalid_name):[0m setenv - invalid variable name
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_116
[1;32m✓[0m Rejects invalid variable name
[1;32m✓[0m No file created for invalid name
[1;34mTEST 117 (test_getenv_local_override):[0m getenv - shows local override
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_117
[1;32m✓[0m Shows local override source
[1;32m✓[0m Outputs correct value from local
[1;34mTEST 118 (test_getenv_fallback_chain):[0m getenv - fallback chain (local > default > template)
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_118
[1;32m✓[0m Shows error if variable not found
[1;32m✓[0m Falls back to .env/default
[1;32m✓[0m Falls back to template/environment
[1;34mTEST 119 (test_unsetenv_existing):[0m unsetenv - remove existing variable
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_119
[1;32m✓[0m Variable file was removed
[1;32m✓[0m Shows confirmation message
[1;34mTEST 120 (test_unsetenv_not_set):[0m unsetenv - variable not set in local
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_120
[1;32m✓[0m Shows informative message when not set
[1;34mTEST 121 (test_dumpenv_prologue):[0m dumpenv prologue - outputs safe minimal set
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_121
[1;32m✓[0m Prologue includes VPN_SWITCH_TERMINAL_INTERPRETER
[1;32m✓[0m Prologue includes VPN_SWITCH_DISPLAY_ANSI
[1;32m✓[0m Prologue excludes VPN_SWITCH_INTERPRETER_wireguard_list (epilogue-only)
[1;32m✓[0m Prologue excludes VPN_SWITCH_INTERPRETER_wireguard_import1 (epilogue-only)
[1;34mTEST 122 (test_dumpenv_epilogue):[0m dumpenv epilogue - outputs complete set
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_122
[1;32m✓[0m Epilogue includes VPN_SWITCH_TERMINAL_INTERPRETER
[1;32m✓[0m Epilogue includes VPN_SWITCH_DISPLAY_ANSI
[1;32m✓[0m Epilogue includes VPN_SWITCH_INTERPRETER_wireguard_list
[1;32m✓[0m Epilogue includes VPN_SWITCH_INTERPRETER_wireguard_import1
[1;34mTEST 123 (test_dumpenv_profile_filtering):[0m dumpenv - profile filtering prevents restore breakage
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_123
[1;32m✓[0m Prologue correctly excludes function-specific interpreter
[1;32m✓[0m Epilogue correctly includes function-specific interpreter
[1;34mTEST 124 (test_environment_cache_on):[0m environment cache on - creates cache file with correct permissions
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_124
[1;32m✓[0m Cache file created
[1;32m✓[0m Cache file has correct permissions (0600)
[1;32m✓[0m Shows cache enabled message
[1;32m✓[0m Cache file has content
[1;34mTEST 125 (test_environment_cache_off):[0m environment cache off - removes cache file
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_125
[1;32m✓[0m Cache file removed
[1;32m✓[0m Shows cache disabled message
[1;34mTEST 126 (test_environment_cache_status):[0m environment cache status - shows correct status
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_126
[1;32m✓[0m Shows DISABLED status when cache off
[1;32m✓[0m Shows ENABLED status when cache on
[1;32m✓[0m Shows cached variable count
[1;34mTEST 127 (test_environment_cache_no_args):[0m environment cache (no args) - defaults to status
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_127
[1;32m✓[0m Shows status with no arguments
[1;34mTEST 128 (test_cache_invalidation_setenv):[0m setenv - rebuilds cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_128
[1;32m✓[0m Cache rebuilt automatically after setenv
[1;32m✓[0m Rebuilt cache contains new variable TEST_VAR
[1;34mTEST 129 (test_cache_invalidation_unsetenv):[0m unsetenv - rebuilds cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_129
[1;32m✓[0m Cache rebuilt automatically after unsetenv
[1;32m✓[0m Rebuilt cache no longer contains TEST_VAR
[1;34mTEST 130 (test_cache_invalidation_environment_init):[0m environment init - invalidates cache automatically
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_130
[1;32m✓[0m Cache file removed after environment init
[1;32m✓[0m Shows cache invalidation warning
[1;34mTEST 131 (test_dumpenv_cache_preservation):[0m dumpenv epilogue - includes cache if enabled
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_131
[1;32m✓[0m Epilogue includes cache content
[1;32m✓[0m Epilogue includes cache restore comment
[1;34mTEST 132 (test_dumpenv_cache_not_included_when_disabled):[0m dumpenv epilogue - excludes cache when disabled
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_132
[1;32m✓[0m Epilogue correctly excludes cache when disabled
[1;34mTEST 133 (test_cache_no_recursion):[0m environment cache on - excludes cache file from scan
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_133
[1;32m✓[0m Cache correctly excludes itself
[1;34mTEST 134 (test_interpreter_single_underscore):[0m interpreter resolution - single underscore uses TERMINAL_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_134
# Set VPN_SWITCH_TERMINAL_INTERPRETER (effective next command)
[1;32m✓[0m Single underscore function used TERMINAL_INTERPRETER
[1;34mTEST 135 (test_interpreter_double_underscore):[0m interpreter resolution - double underscore uses COMBINATOR_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_135
# Set VPN_SWITCH_COMBINATOR_INTERPRETER (effective next command)
[1;32m✓[0m Double underscore function used COMBINATOR_INTERPRETER
[1;34mTEST 136 (test_interpreter_triple_underscore):[0m interpreter resolution - triple underscore uses BATCH_COMBINATOR_INTERPRETER
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_136
# Set VPN_SWITCH_BATCH_COMBINATOR_INTERPRETER (effective next command)
[1;32m✓[0m Triple underscore function used BATCH_COMBINATOR_INTERPRETER
[1;34mTEST 137 (test_interpreter_resolution_priority):[0m interpreter resolution - function-specific override beats intrinsic classification
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_137
# Set VPN_SWITCH_TERMINAL_INTERPRETER (effective next command)
[1;32m✓[0m Function-specific override takes priority over intrinsic classification
[1;32m✓[0m Intrinsic classification was correctly bypassed
[1;34mTEST 138 (test_inspect_batch_complete):[0m inspect (batch) - includes all inspection sections
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_138
[1;32m✓[0m Batch inspect includes environment section
[1;32m✓[0m Batch inspect includes system section
[1;32m✓[0m Batch inspect includes WireGuard section
[1;32m✓[0m Batch inspect includes OpenVPN section
[1;32m✓[0m Batch inspect includes session section
[1;32m✓[0m Batch inspect includes phases section
[1;34mTEST 139 (test_environment_inspect):[0m environment inspect - displays environment variables
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_139
[1;32m✓[0m Environment inspect shows header
[1;32m✓[0m Environment inspect shows VPN_SWITCH_BASE
[1;32m✓[0m Environment inspect shows database structure
[1;34mTEST 140 (test_system_inspect):[0m system inspect - displays system configuration
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_140
[1;32m✓[0m System inspect shows header
[1;32m✓[0m System inspect shows system info section
[1;32m✓[0m System inspect shows network interfaces section
[1;34mTEST 141 (test_batch_syntax_wireguard_clean):[0m wireguard clean - validates batch syntax
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_141
[1;32m✓[0m wireguard clean outputs valid batch syntax
[1;32m✓[0m wireguard clean uses literal $VPN_SWITCH_CONTEXT_SCRIPT
[1;34mTEST 142 (test_combinators_literal_variable):[0m combinators - use literal $VPN_SWITCH_CONTEXT_SCRIPT
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_142
[1;32m✓[0m wireguard start uses literal variable
[1;32m✓[0m wireguard start variable not expanded
[1;34mTEST 143 (test_combinator_syntax_validation):[0m combinators - validate single-command output syntax
[1;34mDatabase:[0m /tmp/vpn-switch-test.12000/test_143
[1;32m✓[0m wireguard start outputs exactly one command
[1;32m✓[0m wireguard start uses literal variable
[1;32m✓[0m wireguard start variable not expanded
[1;32m✓[0m openvpn start outputs exactly one command
[1;32m✓[0m start (protocol-agnostic) outputs exactly one command
[1;34mTEST 144 (test_function_classification_correct):[0m function classification - naming matches behavior
[1;32m✓[0m wireguard add2 correctly classified as combinator (__)
[1;32m✓[0m wireguard clean0 correctly classified as batch (___)
[1;32m✓[0m openvpn clean0 correctly classified as batch (___)
[1;34mTEST 145 (test_no_terminal_output_vpnswitch_commands):[0m terminal functions - must not output vpn-switch commands
[1;32m✓[0m No terminal functions output vpn-switch commands
[1;34mTEST 146 (test_metadata_function_lists):[0m metadata - function lists accurate after renames
[1;32m✓[0m Metadata includes __wireguard_add2 in combinators
[1;32m✓[0m Metadata includes ___wireguard_clean0 in batch combinators
[1;32m✓[0m Metadata includes ___openvpn_clean0 in batch combinators
========================================
Test Summary
========================================
Test Functions: 146
Total Assertions: 371
[1;32mPassed Assertions: 371[0m
Failed Assertions: 0
[1;32mALL TESTS PASSED[0m
========================================
vpn-switch Architecture Test Suite
========================================
Testing architectural rules for combinator functions
Profile: all
Running Combinator Tests
========================================
Found 28 combinator functions
TEST 1: Combinator: __session_exists1 - validate syntax with variations
✓ __session_exists1: Valid combinator syntax (all variations)
TEST 2: Combinator: __session_conflicts2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-1]
✓ __session_conflicts2: Valid combinator syntax (all variations)
TEST 3: Combinator: __interface_check1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-2]
✓ __interface_check1: Valid combinator syntax (all variations)
TEST 4: Combinator: __stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-3]
✓ __stop1: Valid combinator syntax (all variations)
TEST 5: Combinator: __import1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-4]
✓ __import1: Valid combinator syntax (all variations)
TEST 6: Combinator: __start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-5]
✓ __start1: Valid combinator syntax (all variations)
TEST 7: Combinator: __start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-6]
✓ __start0: Valid combinator syntax (all variations)
TEST 8: Combinator: __bootstrap1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-7]
✓ __bootstrap1: Valid combinator syntax (all variations)
TEST 9: Combinator: __environment_cache0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-8]
✓ __environment_cache0: Valid combinator syntax (all variations)
TEST 10: Combinator: __phases_lift1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-9]
✓ __phases_lift1: Valid combinator syntax (all variations)
TEST 11: Combinator: __init0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-10]
✓ __init0: Valid combinator syntax (all variations)
TEST 12: Combinator: __batch1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-11]
✓ __batch1: Valid combinator syntax (all variations)
TEST 13: Combinator: __restore1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-12]
✓ __restore1: Valid combinator syntax (all variations)
TEST 14: Combinator: __openvpn_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-13]
✓ __openvpn_start0: Valid combinator syntax (all variations)
TEST 15: Combinator: __openvpn_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-14]
✓ __openvpn_start1: Valid combinator syntax (all variations)
TEST 16: Combinator: __openvpn_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-15]
✓ __openvpn_stop1: Valid combinator syntax (all variations)
TEST 17: Combinator: __openvpn_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-16]
✓ __openvpn_add2: Valid combinator syntax (all variations)
TEST 18: Combinator: __openvpn_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-17]
✓ __openvpn_help0: Valid combinator syntax (all variations)
TEST 19: Combinator: __session_disconnect1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-18]
✓ __session_disconnect1: Valid combinator syntax (all variations)
TEST 20: Combinator: __session_show0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-19]
✓ __session_show0: Valid combinator syntax (all variations)
TEST 21: Combinator: __session_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-20]
✓ __session_start0: Valid combinator syntax (all variations)
TEST 22: Combinator: __session_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-21]
✓ __session_start1: Valid combinator syntax (all variations)
TEST 23: Combinator: __session_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-22]
✓ __session_help0: Valid combinator syntax (all variations)
TEST 24: Combinator: __wireguard_start0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-23]
✓ __wireguard_start0: Valid combinator syntax (all variations)
TEST 25: Combinator: __wireguard_start1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-24]
✓ __wireguard_start1: Valid combinator syntax (all variations)
TEST 26: Combinator: __wireguard_stop1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-25]
✓ __wireguard_stop1: Valid combinator syntax (all variations)
TEST 27: Combinator: __wireguard_add2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-26]
✓ __wireguard_add2: Valid combinator syntax (all variations)
TEST 28: Combinator: __wireguard_help0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-27]
✓ __wireguard_help0: Valid combinator syntax (all variations)
Running Batch Combinator Tests
========================================
Found 26 batch combinator functions
TEST 29: Batch Combinator: ___session_prepare3 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-28]
✓ ___session_prepare3: Valid batch combinator syntax (all variations)
TEST 30: Batch Combinator: ___stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-29]
✓ ___stop0: Valid batch combinator syntax (all variations)
TEST 31: Batch Combinator: ___phases_sync1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-30]
✓ ___phases_sync1: Valid batch combinator syntax (all variations)
TEST 32: Batch Combinator: ___phases_sync0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-31]
✓ ___phases_sync0: Valid batch combinator syntax (all variations)
TEST 33: Batch Combinator: ___list0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-32]
✓ ___list0: Valid batch combinator syntax (all variations)
TEST 34: Batch Combinator: ___bootstrap2 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-33]
✓ ___bootstrap2: Valid batch combinator syntax (all variations)
TEST 35: Batch Combinator: ___init1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-34]
✓ ___init1: Valid batch combinator syntax (all variations)
TEST 36: Batch Combinator: ___dumpenv1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-35]
✓ ___dumpenv1: Valid batch combinator syntax (all variations)
TEST 37: Batch Combinator: ___dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-36]
✓ ___dump0: Valid batch combinator syntax (all variations)
TEST 38: Batch Combinator: ___batch0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-37]
✓ ___batch0: Valid batch combinator syntax (all variations)
TEST 39: Batch Combinator: ___environment_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-38]
✓ ___environment_inspect0: Valid batch combinator syntax (all variations)
TEST 40: Batch Combinator: ___inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-39]
✓ ___inspect0: Valid batch combinator syntax (all variations)
TEST 41: Batch Combinator: ___openvpn_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-40]
✓ ___openvpn_create1: Valid batch combinator syntax (all variations)
TEST 42: Batch Combinator: ___openvpn_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-41]
✓ ___openvpn_stop0: Valid batch combinator syntax (all variations)
TEST 43: Batch Combinator: ___openvpn_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-42]
✓ ___openvpn_inspect0: Valid batch combinator syntax (all variations)
TEST 44: Batch Combinator: ___openvpn_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-43]
✓ ___openvpn_clean0: Valid batch combinator syntax (all variations)
TEST 45: Batch Combinator: ___openvpn_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-44]
✓ ___openvpn_dump0: Valid batch combinator syntax (all variations)
TEST 46: Batch Combinator: ___session_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-45]
✓ ___session_dump0: Valid batch combinator syntax (all variations)
TEST 47: Batch Combinator: ___session_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-46]
✓ ___session_inspect0: Valid batch combinator syntax (all variations)
TEST 48: Batch Combinator: ___validate0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-47]
✓ ___validate0: Valid batch combinator syntax (all variations)
TEST 49: Batch Combinator: ___wireguard_create1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-48]
✓ ___wireguard_create1: Valid batch combinator syntax (all variations)
TEST 50: Batch Combinator: ___wireguard_inspect0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-49]
✓ ___wireguard_inspect0: Valid batch combinator syntax (all variations)
TEST 51: Batch Combinator: ___wireguard_stop0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-50]
✓ ___wireguard_stop0: Valid batch combinator syntax (all variations)
TEST 52: Batch Combinator: ___wireguard_clean0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-51]
✓ ___wireguard_clean0: Valid batch combinator syntax (all variations)
TEST 53: Batch Combinator: ___wireguard_clean1 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-52]
✓ ___wireguard_clean1: Valid batch combinator syntax (all variations)
TEST 54: Batch Combinator: ___wireguard_dump0 - validate syntax with variations [db: /tmp/vpn-switch-arch-test.483595/test-53]
✓ ___wireguard_dump0: Valid batch combinator syntax (all variations)
Running Terminal Function Tests
========================================
Found 83 terminal functions
TEST 55: Terminal: _session_create1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-54]
✓ _session_create1: Valid terminal function output (all variations)
TEST 56: Terminal: _interface_destroy1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-55]
✓ _interface_destroy1: Valid terminal function output (all variations)
TEST 57: Terminal: _session_populate3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-56]
✓ _session_populate3: Valid terminal function output (all variations)
TEST 58: Terminal: _phases_copy0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-57]
✓ _phases_copy0: Valid terminal function output (all variations)
TEST 59: Terminal: _link2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-58]
✓ _link2: Valid terminal function output (all variations)
TEST 60: Terminal: _remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-59]
✓ _remove1: Valid terminal function output (all variations)
TEST 61: Terminal: _error1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-60]
✓ _error1: Valid terminal function output (all variations)
TEST 62: Terminal: _error2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-61]
✓ _error2: Valid terminal function output (all variations)
TEST 63: Terminal: _error3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-62]
✓ _error3: Valid terminal function output (all variations)
TEST 64: Terminal: _fail2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-63]
✓ _fail2: Valid terminal function output (all variations)
TEST 65: Terminal: _log1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-64]
✓ _log1: Valid terminal function output (all variations)
TEST 66: Terminal: _log2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-65]
✓ _log2: Valid terminal function output (all variations)
TEST 67: Terminal: _log3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-66]
✓ _log3: Valid terminal function output (all variations)
TEST 68: Terminal: _lift1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-67]
✓ _lift1: Valid terminal function output (all variations)
TEST 69: Terminal: _database_init0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-68]
✓ _database_init0: Valid terminal function output (all variations)
TEST 70: Terminal: _environment_init1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-69]
✓ _environment_init1: Valid terminal function output (all variations)
TEST 71: Terminal: _environment_cache1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-70]
✓ _environment_cache1: Valid terminal function output (all variations)
TEST 72: Terminal: _lift3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-71]
✓ _lift3: Valid terminal function output (all variations)
TEST 73: Terminal: _setenv2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-72]
✓ _setenv2: Valid terminal function output (all variations)
TEST 74: Terminal: _getenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-73]
✓ _getenv1: Valid terminal function output (all variations)
TEST 75: Terminal: _unsetenv1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-74]
✓ _unsetenv1: Valid terminal function output (all variations)
Skipped: _cat1 (requires special setup)
TEST 76: Terminal: _batch2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-75]
✓ _batch2: Valid terminal function output (all variations)
TEST 77: Terminal: _printenv0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-76]
✓ _printenv0: Valid terminal function output (all variations)
TEST 78: Terminal: _status0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-77]
✓ _status0: Valid terminal function output (all variations)
TEST 79: Terminal: _help0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-78]
✓ _help0: Valid terminal function output (all variations)
TEST 80: Terminal: _help1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-79]
✓ _help1: Valid terminal function output (all variations)
TEST 81: Terminal: _database_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-80]
✓ _database_enumerate0: Valid terminal function output (all variations)
TEST 82: Terminal: _system_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-81]
✓ _system_inspect0: Valid terminal function output (all variations)
TEST 83: Terminal: _logs_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-82]
✓ _logs_inspect0: Valid terminal function output (all variations)
TEST 84: Terminal: _phases_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-83]
✓ _phases_inspect0: Valid terminal function output (all variations)
TEST 85: Terminal: _summary_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-84]
✓ _summary_inspect0: Valid terminal function output (all variations)
TEST 86: Terminal: _prologue_inspect0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-85]
✓ _prologue_inspect0: Valid terminal function output (all variations)
TEST 87: Terminal: _openvpn_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-86]
✓ _openvpn_patch2: Valid terminal function output (all variations)
TEST 88: Terminal: _openvpn_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-87]
✓ _openvpn_configure1: Valid terminal function output (all variations)
TEST 89: Terminal: _openvpn_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-88]
✓ _openvpn_connect1: Valid terminal function output (all variations)
TEST 90: Terminal: _openvpn_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-89]
✓ _openvpn_disconnect1: Valid terminal function output (all variations)
TEST 91: Terminal: _openvpn_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-90]
✓ _openvpn_patch1: Valid terminal function output (all variations)
TEST 92: Terminal: _openvpn_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-91]
✓ _openvpn_enumerate0: Valid terminal function output (all variations)
TEST 93: Terminal: _openvpn_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-92]
✓ _openvpn_import1: Valid terminal function output (all variations)
TEST 94: Terminal: _openvpn_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-93]
✓ _openvpn_list0: Valid terminal function output (all variations)
TEST 95: Terminal: _openvpn_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-94]
✓ _openvpn_list1: Valid terminal function output (all variations)
TEST 96: Terminal: _openvpn_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-95]
✓ _openvpn_add1: Valid terminal function output (all variations)
TEST 97: Terminal: _openvpn_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-96]
✓ _openvpn_add3: Valid terminal function output (all variations)
TEST 98: Terminal: _openvpn_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-97]
✓ _openvpn_link2: Valid terminal function output (all variations)
TEST 99: Terminal: _openvpn_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-98]
✓ _openvpn_remove1: Valid terminal function output (all variations)
TEST 100: Terminal: _openvpn_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-99]
✓ _openvpn_remove2: Valid terminal function output (all variations)
TEST 101: Terminal: _openvpn_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-100]
✓ _openvpn_validate0: Valid terminal function output (all variations)
TEST 102: Terminal: _openvpn_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-101]
✓ _openvpn_info1: Valid terminal function output (all variations)
TEST 103: Terminal: _session_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-102]
✓ _session_list0: Valid terminal function output (all variations)
TEST 104: Terminal: _session_show1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-103]
✓ _session_show1: Valid terminal function output (all variations)
TEST 105: Terminal: _session_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-104]
✓ _session_remove1: Valid terminal function output (all variations)
TEST 106: Terminal: _session_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-105]
✓ _session_connect1: Valid terminal function output (all variations)
TEST 107: Terminal: _session_save0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-106]
✓ _session_save0: Valid terminal function output (all variations)
TEST 108: Terminal: _session_save1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-107]
✓ _session_save1: Valid terminal function output (all variations)
TEST 109: Terminal: _session_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-108]
✓ _session_clean0: Valid terminal function output (all variations)
TEST 110: Terminal: _session_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-109]
✓ _session_validate0: Valid terminal function output (all variations)
TEST 111: Terminal: _session_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-110]
✓ _session_enumerate0: Valid terminal function output (all variations)
TEST 112: Terminal: _session_describe0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-111]
✓ _session_describe0: Valid terminal function output (all variations)
TEST 113: Terminal: _logs_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-112]
✓ _logs_validate0: Valid terminal function output (all variations)
TEST 114: Terminal: _logs_clean0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-113]
✓ _logs_clean0: Valid terminal function output (all variations)
TEST 115: Terminal: _phases_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-114]
✓ _phases_validate0: Valid terminal function output (all variations)
TEST 116: Terminal: _database_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-115]
✓ _database_validate0: Valid terminal function output (all variations)
TEST 117: Terminal: _binaries_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-116]
✓ _binaries_validate0: Valid terminal function output (all variations)
TEST 118: Terminal: _network_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-117]
✓ _network_validate0: Valid terminal function output (all variations)
TEST 119: Terminal: _permissions_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-118]
✓ _permissions_validate0: Valid terminal function output (all variations)
TEST 120: Terminal: _environment_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-119]
✓ _environment_validate0: Valid terminal function output (all variations)
TEST 121: Terminal: _wireguard_patch2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-120]
✓ _wireguard_patch2: Valid terminal function output (all variations)
TEST 122: Terminal: _wireguard_configure1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-121]
✓ _wireguard_configure1: Valid terminal function output (all variations)
TEST 123: Terminal: _wireguard_connect1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-122]
✓ _wireguard_connect1: Valid terminal function output (all variations)
TEST 124: Terminal: _wireguard_disconnect1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-123]
✓ _wireguard_disconnect1: Valid terminal function output (all variations)
TEST 125: Terminal: _wireguard_enumerate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-124]
✓ _wireguard_enumerate0: Valid terminal function output (all variations)
TEST 126: Terminal: _wireguard_import1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-125]
✓ _wireguard_import1: Valid terminal function output (all variations)
TEST 127: Terminal: _wireguard_list0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-126]
✓ _wireguard_list0: Valid terminal function output (all variations)
TEST 128: Terminal: _wireguard_list1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-127]
✓ _wireguard_list1: Valid terminal function output (all variations)
TEST 129: Terminal: _wireguard_add1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-128]
✓ _wireguard_add1: Valid terminal function output (all variations)
TEST 130: Terminal: _wireguard_add3 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-129]
✓ _wireguard_add3: Valid terminal function output (all variations)
TEST 131: Terminal: _wireguard_link2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-130]
✓ _wireguard_link2: Valid terminal function output (all variations)
TEST 132: Terminal: _wireguard_remove1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-131]
✓ _wireguard_remove1: Valid terminal function output (all variations)
TEST 133: Terminal: _wireguard_remove2 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-132]
✓ _wireguard_remove2: Valid terminal function output (all variations)
TEST 134: Terminal: _wireguard_validate0 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-133]
✓ _wireguard_validate0: Valid terminal function output (all variations)
TEST 135: Terminal: _wireguard_patch1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-134]
✓ _wireguard_patch1: Valid terminal function output (all variations)
TEST 136: Terminal: _wireguard_info1 - validate output rules [db: /tmp/vpn-switch-arch-test.483595/test-135]
✓ _wireguard_info1: Valid terminal function output (all variations)
Running Error Propagation Tests (KEEP_GOING)
========================================
TEST 137: Batch Error Propagation - test _batch2 with failing commands [db: /tmp/vpn-switch-arch-test.483595/test-136]
TEST 138: Sub-test: KEEP_GOING=0 (fail-fast mode) [db: /tmp/vpn-switch-arch-test.483595/test-137]
✓ KEEP_GOING=0: Batch execution stopped on first error
TEST 139: Sub-test: KEEP_GOING=1 (continue mode) [db: /tmp/vpn-switch-arch-test.483595/test-137]
✓ KEEP_GOING=1: Batch execution completed despite errors
✓ KEEP_GOING=1: All commands were executed (count=3)
TEST 140: Recursive Batch Error Propagation - test chained _batch2 calls [db: /tmp/vpn-switch-arch-test.483595/test-137]
✓ Recursive fail-fast: Command 3 in batch 3 was not executed
✓ Recursive fail-fast: Batch 2 stopped after error in batch 3
✓ Recursive fail-fast: Batch 1 stopped after error in nested batch
✓ Recursive continue: Batch 2 continued after error in batch 3
✓ Recursive continue: Batch 1 continued after error in nested batch
TEST 141: Batch KEEP_GOING with Realistic Dump File [db: /tmp/vpn-switch-arch-test.483595/test-140]
✓ Created realistic batch file with 8 commands
✓ Selected command at position 4/8 for failure injection
TEST 142: Sub-test: KEEP_GOING=0 at position 4/8 [db: /tmp/vpn-switch-arch-test.483595/test-141]
✓ KEEP_GOING=0: Stopped at or before position 4 (executed 4 commands)
✓ KEEP_GOING=0: Error stop message present
TEST 143: Sub-test: KEEP_GOING=1 at position 4/8 [db: /tmp/vpn-switch-arch-test.483595/test-141]
✓ KEEP_GOING=1: All commands executed (8/8)
✓ KEEP_GOING=1: Completion message present
✓ KEEP_GOING=1: Failure markers present in output
Running Batch Combinator Error Propagation Tests
========================================
Testing ALL batch combinators with error injection and KEEP_GOING validation
Found 26 batch combinator functions
TEST 144: Batch Transitive Hull: ___session_prepare3 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-141]
TEST 145: Sub-test: Walk command tree for '___session_prepare3' (command: session_prepare) [db: /tmp/vpn-switch-arch-test.483595/test-144]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 146: Batch Transitive Hull: ___stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-144]
TEST 147: Sub-test: Walk command tree for '___stop0' (command: stop) [db: /tmp/vpn-switch-arch-test.483595/test-146]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 148: Sub-test: Inject failure at node '___stop0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-146]
✓ KEEP_GOING affects output: fail-fast=4 lines, continue=4 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 149: Batch Transitive Hull: ___phases_sync1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-146]
TEST 150: Sub-test: Walk command tree for '___phases_sync1' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.483595/test-149]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 151: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-149]
✓ KEEP_GOING affects output: fail-fast=3 lines, continue=3 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 152: Batch Transitive Hull: ___phases_sync0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-149]
TEST 153: Sub-test: Walk command tree for '___phases_sync0' (command: phases_sync) [db: /tmp/vpn-switch-arch-test.483595/test-152]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 154: Sub-test: Inject failure at node '___phases_sync0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-152]
✓ KEEP_GOING affects output: fail-fast=3 lines, continue=3 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 155: Batch Transitive Hull: ___list0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-152]
TEST 156: Sub-test: Walk command tree for '___list0' (command: list) [db: /tmp/vpn-switch-arch-test.483595/test-155]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 157: Sub-test: Inject failure at node '___list0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-155]
✓ KEEP_GOING affects output: fail-fast=2 lines, continue=2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 158: Batch Transitive Hull: ___bootstrap2 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-155]
TEST 159: Sub-test: Walk command tree for '___bootstrap2' (command: bootstrap) [db: /tmp/vpn-switch-arch-test.483595/test-158]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 6 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 160: Batch Transitive Hull: ___init1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-158]
TEST 161: Sub-test: Walk command tree for '___init1' (command: init) [db: /tmp/vpn-switch-arch-test.483595/test-160]
✓ Command tree collected: 2 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 162: Sub-test: Inject failure at node '__init0' (node 1/1) [db: /tmp/vpn-switch-arch-test.483595/test-160]
✓ KEEP_GOING affects output: fail-fast=1 lines, continue=1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 163: Batch Transitive Hull: ___dumpenv1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-160]
TEST 164: Sub-test: Walk command tree for '___dumpenv1' (command: dumpenv) [db: /tmp/vpn-switch-arch-test.483595/test-163]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 165: Batch Transitive Hull: ___dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-163]
TEST 166: Sub-test: Walk command tree for '___dump0' (command: dump) [db: /tmp/vpn-switch-arch-test.483595/test-165]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 167: Sub-test: Inject failure at node '___dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-165]
✓ KEEP_GOING affects output: fail-fast=17 lines, continue=17 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
TEST 168: Batch Transitive Hull: ___batch0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-165]
TEST 169: Sub-test: Walk command tree for '___batch0' (command: batch) [db: /tmp/vpn-switch-arch-test.483595/test-168]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 170: Sub-test: Inject failure at node '___batch0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-168]
✓ KEEP_GOING affects output: fail-fast=2 lines, continue=2 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 171: Batch Transitive Hull: ___environment_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-168]
TEST 172: Sub-test: Walk command tree for '___environment_inspect0' (command: environment_inspect) [db: /tmp/vpn-switch-arch-test.483595/test-171]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 173: Sub-test: Inject failure at node '___environment_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-171]
✓ KEEP_GOING affects output: fail-fast=3 lines, continue=3 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 174: Batch Transitive Hull: ___inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-171]
TEST 175: Sub-test: Walk command tree for '___inspect0' (command: inspect) [db: /tmp/vpn-switch-arch-test.483595/test-174]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 176: Sub-test: Inject failure at node '___inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-174]
✓ KEEP_GOING affects output: fail-fast=12 lines, continue=12 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 177: Batch Transitive Hull: ___openvpn_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-174]
TEST 178: Sub-test: Walk command tree for '___openvpn_create1' (command: openvpn_create) [db: /tmp/vpn-switch-arch-test.483595/test-177]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 179: Batch Transitive Hull: ___openvpn_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-177]
TEST 180: Sub-test: Walk command tree for '___openvpn_stop0' (command: openvpn_stop) [db: /tmp/vpn-switch-arch-test.483595/test-179]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 181: Sub-test: Inject failure at node '___openvpn_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.483595/test-179]
✓ KEEP_GOING affects output: fail-fast=1 lines, continue=1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 182: Batch Transitive Hull: ___openvpn_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-179]
TEST 183: Sub-test: Walk command tree for '___openvpn_inspect0' (command: openvpn_inspect) [db: /tmp/vpn-switch-arch-test.483595/test-182]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 184: Sub-test: Inject failure at node '___openvpn_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-182]
✓ KEEP_GOING affects output: fail-fast=7 lines, continue=7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 185: Batch Transitive Hull: ___openvpn_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-182]
TEST 186: Sub-test: Walk command tree for '___openvpn_clean0' (command: openvpn_clean) [db: /tmp/vpn-switch-arch-test.483595/test-185]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 187: Batch Transitive Hull: ___openvpn_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-185]
TEST 188: Sub-test: Walk command tree for '___openvpn_dump0' (command: openvpn_dump) [db: /tmp/vpn-switch-arch-test.483595/test-187]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 189: Sub-test: Inject failure at node '___openvpn_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-187]
✓ KEEP_GOING affects output: fail-fast=20 lines, continue=20 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 190: Batch Transitive Hull: ___session_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-187]
TEST 191: Sub-test: Walk command tree for '___session_dump0' (command: session_dump) [db: /tmp/vpn-switch-arch-test.483595/test-190]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 192: Sub-test: Inject failure at node '___session_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-190]
✓ KEEP_GOING affects output: fail-fast=41 lines, continue=41 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 193: Batch Transitive Hull: ___session_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-190]
TEST 194: Sub-test: Walk command tree for '___session_inspect0' (command: session_inspect) [db: /tmp/vpn-switch-arch-test.483595/test-193]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 195: Sub-test: Inject failure at node '___session_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-193]
✓ KEEP_GOING affects output: fail-fast=5 lines, continue=5 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 196: Batch Transitive Hull: ___validate0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-193]
TEST 197: Sub-test: Walk command tree for '___validate0' (command: validate) [db: /tmp/vpn-switch-arch-test.483595/test-196]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 198: Sub-test: Inject failure at node '___validate0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-196]
✓ KEEP_GOING affects output: fail-fast=10 lines, continue=10 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 199: Batch Transitive Hull: ___wireguard_create1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-196]
TEST 200: Sub-test: Walk command tree for '___wireguard_create1' (command: wireguard_create) [db: /tmp/vpn-switch-arch-test.483595/test-199]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 8 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 201: Batch Transitive Hull: ___wireguard_inspect0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-199]
TEST 202: Sub-test: Walk command tree for '___wireguard_inspect0' (command: wireguard_inspect) [db: /tmp/vpn-switch-arch-test.483595/test-201]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 203: Sub-test: Inject failure at node '___wireguard_inspect0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-201]
✓ KEEP_GOING affects output: fail-fast=7 lines, continue=7 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 204: Batch Transitive Hull: ___wireguard_stop0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-201]
TEST 205: Sub-test: Walk command tree for '___wireguard_stop0' (command: wireguard_stop) [db: /tmp/vpn-switch-arch-test.483595/test-204]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 1 injectable nodes (combinators/batches) in tree
TEST 206: Sub-test: Inject failure at node '___wireguard_stop0' (node 1/1) [db: /tmp/vpn-switch-arch-test.483595/test-204]
✓ KEEP_GOING affects output: fail-fast=1 lines, continue=1 lines
Note: No clear error stop indicator in fail-fast mode
Note: No clear completion indicator in continue mode
TEST 207: Batch Transitive Hull: ___wireguard_clean0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-204]
TEST 208: Sub-test: Walk command tree for '___wireguard_clean0' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.483595/test-207]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 209: Batch Transitive Hull: ___wireguard_clean1 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-207]
TEST 210: Sub-test: Walk command tree for '___wireguard_clean1' (command: wireguard_clean) [db: /tmp/vpn-switch-arch-test.483595/test-209]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 3 injectable nodes (combinators/batches) in tree
Skipped: Could not select target node for injection
TEST 211: Batch Transitive Hull: ___wireguard_dump0 - walkthrough-based error injection [db: /tmp/vpn-switch-arch-test.483595/test-209]
TEST 212: Sub-test: Walk command tree for '___wireguard_dump0' (command: wireguard_dump) [db: /tmp/vpn-switch-arch-test.483595/test-211]
✓ Command tree collected: 1 nodes in transitive hull
✓ Found 2 injectable nodes (combinators/batches) in tree
TEST 213: Sub-test: Inject failure at node '___wireguard_dump0' (node 1/2) [db: /tmp/vpn-switch-arch-test.483595/test-211]
✓ KEEP_GOING affects output: fail-fast=42 lines, continue=42 lines
Note: No clear error stop indicator in fail-fast mode
✓ KEEP_GOING=1: Execution completed despite injected failure
Running Batch Combinator KEEP_GOING Precise Tests
========================================
Testing ALL batch combinators with precise architectural KEEP_GOING validation
Found 26 batch combinator functions
TEST 214: Batch KEEP_GOING Precise: ___session_prepare3 [db: /tmp/vpn-switch-arch-test.483595/test-211]
✓ Captured 175 command lines from ___session_prepare3
✓ Selected 65 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 215: Batch KEEP_GOING Precise: ___stop0 [db: /tmp/vpn-switch-arch-test.483595/test-214]
✓ Captured 2 command lines from ___stop0
✓ Selected 2 random line(s) for failure injection
✓ Injected failures into 2 function(s)
Note: Not all commands attempted (0/3)
Note: This may indicate KEEP_GOING=0 or execution stopped early
Skipped: ___phases_sync1 (requires phase template setup)
Skipped: ___phases_sync0 (requires phase template setup)
TEST 216: Batch KEEP_GOING Precise: ___list0 [db: /tmp/vpn-switch-arch-test.483595/test-215]
✓ Captured 2 command lines from ___list0
✓ Selected 1 random line(s) for failure injection
✓ Injected failures into 1 function(s)
✓ KEEP_GOING=1: All commands attempted (2/2)
TEST 217: Batch KEEP_GOING Precise: ___bootstrap2 [db: /tmp/vpn-switch-arch-test.483595/test-216]
✓ Captured 73 command lines from ___bootstrap2
✓ Selected 36 random line(s) for failure injection
Skipped: No functions were injected with failures
Skipped: ___init1 (complex initialization logic)
TEST 218: Batch KEEP_GOING Precise: ___dumpenv1 [db: /tmp/vpn-switch-arch-test.483595/test-217]
✓ Captured 175 command lines from ___dumpenv1
✓ Selected 133 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 219: Batch KEEP_GOING Precise: ___dump0 [db: /tmp/vpn-switch-arch-test.483595/test-218]
✓ Captured 5 command lines from ___dump0
✓ Selected 3 random line(s) for failure injection
✓ Injected failures into 1 function(s)
Note: Not all commands attempted (3/5)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 220: Batch KEEP_GOING Precise: ___batch0 [db: /tmp/vpn-switch-arch-test.483595/test-219]
✓ Captured 2 command lines from ___batch0
✓ Selected 2 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 221: Batch KEEP_GOING Precise: ___environment_inspect0 [db: /tmp/vpn-switch-arch-test.483595/test-220]
✓ Captured 2 command lines from ___environment_inspect0
✓ Selected 2 random line(s) for failure injection
✓ Injected failures into 2 function(s)
Note: Not all commands attempted (2/3)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 222: Batch KEEP_GOING Precise: ___inspect0 [db: /tmp/vpn-switch-arch-test.483595/test-221]
✓ Captured 12 command lines from ___inspect0
✓ Selected 6 random line(s) for failure injection
✓ Injected failures into 4 function(s)
Note: Not all commands attempted (10/12)
Note: This may indicate KEEP_GOING=0 or execution stopped early
TEST 223: Batch KEEP_GOING Precise: ___openvpn_create1 [db: /tmp/vpn-switch-arch-test.483595/test-222]
✓ Captured 175 command lines from ___openvpn_create1
✓ Selected 29 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 224: Batch KEEP_GOING Precise: ___openvpn_stop0 [db: /tmp/vpn-switch-arch-test.483595/test-223]
✓ Captured 1 command lines from ___openvpn_stop0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 225: Batch KEEP_GOING Precise: ___openvpn_inspect0 [db: /tmp/vpn-switch-arch-test.483595/test-224]
✓ Captured 3 command lines from ___openvpn_inspect0
✓ Selected 3 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 226: Batch KEEP_GOING Precise: ___openvpn_clean0 [db: /tmp/vpn-switch-arch-test.483595/test-225]
✓ Captured 3 command lines from ___openvpn_clean0
✓ Selected 1 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 227: Batch KEEP_GOING Precise: ___openvpn_dump0 [db: /tmp/vpn-switch-arch-test.483595/test-226]
✓ Captured 13 command lines from ___openvpn_dump0
✓ Selected 3 random line(s) for failure injection
Skipped: No functions were injected with failures
TEST 228: Batch KEEP_GOING Precise: ___session_dump0 [db: /tmp/vpn-switch-arch-test.483595/test-227]
✓ Captured 40 command lines from ___session_dump0
✓ Selected 23 random line(s) for failure inject