fix(aihr): prevent strict gate bypass

This commit is contained in:
2026-07-14 16:22:47 +08:00
parent be150fc421
commit 5890770206
3 changed files with 11 additions and 0 deletions
@@ -32,6 +32,15 @@ assert_contains 'reviewed_time >='
assert_not_contains 'p.identity_key = o.ext_party_id OR p.identity_key = o.person_phone'
assert_not_contains 's.ext_party_id = o.ext_party_id OR s.ext_party_id = o.person_phone'
if (AIHR_DEMO_CHECK_LIBRARY_ONLY=true AIHR_PILOT_STRICT=true "$SCRIPT") >/tmp/wygj-pilot-library-strict.log 2>&1; then
echo "FAIL: library-only mode bypassed strict pilot checks" >&2
exit 1
fi
grep -Fq 'AIHR_DEMO_CHECK_LIBRARY_ONLY cannot bypass strict pilot checks' /tmp/wygj-pilot-library-strict.log || {
echo "FAIL: library-only strict guard is unclear" >&2
exit 1
}
if ! command -v docker >/dev/null || ! docker ps --format '{{.Names}}' | grep -qx 'wygj-mysql'; then
echo "SKIP: behavioral pilot gate test requires wygj-mysql"
exit 0