fix(conformance): chainsaw checks use contains(), not unsupported =~

Every chainsaw `check` used the regex operator `=~` (`($stdout =~ 'X'): true`),
which chainsaw's expression engine rejects ('SyntaxError: Unknown char: ~') — so
EVERY such test failed on the assertion even when the behavior passed. Proven with
data-survival (R-STATE-01): the Longhorn canary genuinely SURVIVED pod destruction
(DATA_SURVIVED_OK) but the test FAILED on the `=~` syntax. Converted all 10 tests to
JMESPath `contains($stdout, 'X')` (data-survival's alternation → contains||contains).
data-survival now PASSES; the other 9 (later-phase components) are syntactically fixed
for when their phases deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
jakman85andClaude Opus 4.8 committed 2026-08-17 16:58:38 -05:00
1 parent 54fd963cc4
commit e0c5c58710
10 files changed
+17 -17

No files matched your search

@@ -40,7 +40,7 @@ spec:
content: |
set -euo pipefail
kubectl -n "$NAMESPACE" exec source -- nc -z -w 3 dest 80 && echo ALLOWED_OK
check: { ($stdout =~ 'ALLOWED_OK'): true }
check: { (contains($stdout, 'ALLOWED_OK')): true }
- name: when-revoke-allow-then-fail-closed
try:
# FAULT INJECTION: delete the allow policy; baseline default-deny remains.
@@ -56,13 +56,13 @@ spec:
echo "LEAK: still reachable after allow revoked" >&2; exit 1
fi
echo FAIL_CLOSED_OK
check: { ($stdout =~ 'FAIL_CLOSED_OK'): true }
check: { (contains($stdout, 'FAIL_CLOSED_OK')): true }
- script:
# DNS must still work (default-deny permits DNS egress).
content: |
set -euo pipefail
kubectl -n "$NAMESPACE" exec source -- nslookup kubernetes.default && echo DNS_OK
check: { ($stdout =~ 'DNS_OK'): true }
check: { (contains($stdout, 'DNS_OK')): true }
finally:
- script:
content: 'echo "cleanup via chainsaw namespace teardown"'