test: harden offline semantic proof

This commit is contained in:
2026-08-08 20:42:14 +02:00
parent 8240fa4472
commit bff21507df
2 changed files with 133 additions and 6 deletions
+21
View File
@@ -1410,6 +1410,25 @@ task13_self_test_public_timeout_contract() {
|| task13_fail "direct internal semantic smoke invocation lacks an internal supervisor"
}
task13_self_test_internal_semantic_offline_contract() {
local root script
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
script="$root/scripts/internal-semantic-smoke.sh"
grep -Fq 'task13_write_offline_semantic_override' "$script" \
|| task13_fail "internal semantic smoke lacks a dedicated offline override"
grep -Fq 'task13_offline_semantic_compose_logged "offline semantic recreation" \' "$script" \
|| task13_fail "offline semantic recreation must use the isolated offline compose wrapper"
grep -Fq 'up --detach --wait --wait-timeout 120 --pull never qdrant embedding' "$script" \
|| task13_fail "offline semantic recreation must start only qdrant and embedding with --pull never"
grep -Eq 'down --remove-orphans --timeout 10$' "$script" \
|| task13_fail "offline semantic phase must stop the stack before isolated recreation"
grep -Fq 'internal: true' "$script" \
|| task13_fail "offline semantic override must disable network egress"
if grep -Eq 'offline semantic recreation.*embedding-model-init|offline semantic recreation.*core|offline semantic recreation.*frontend' "$script"; then
task13_fail "offline semantic recreation must exclude bootstrap and non-semantic services"
fi
}
task13_self_test_windows_release_contract() {
local root script workflow
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
@@ -1519,6 +1538,7 @@ task13_self_test() {
task13_self_test_timeout_process_group
task13_self_test_nested_timeout_process_group
task13_self_test_public_timeout_contract
task13_self_test_internal_semantic_offline_contract
task13_self_test_windows_release_contract
task13_self_test_server_release_contract
task13_self_test_server_auth_hop_contract
@@ -1535,6 +1555,7 @@ task13_self_test_case() {
timeout-group) task13_self_test_timeout_process_group ;;
timeout-nested) task13_self_test_nested_timeout_process_group ;;
timeout-public) task13_self_test_public_timeout_contract ;;
semantic-offline) task13_self_test_internal_semantic_offline_contract ;;
windows) task13_self_test_windows_release_contract ;;
server) task13_self_test_server_release_contract ;;
server-auth) task13_self_test_server_auth_hop_contract ;;