fix: cast usage provider body before jsonb type checks

This commit is contained in:
fawney19
2026-05-27 15:48:12 +08:00
parent 8606455355
commit d77a572dc7
3 changed files with 10 additions and 8 deletions
@@ -707,6 +707,8 @@ fn usage_sql_uses_json_null_placeholders_for_usage_payload_columns() {
super::LIST_RECENT_USAGE_AUDITS_PREFIX,
] {
assert!(sql.contains("jsonb_strip_nulls(jsonb_build_object("));
assert!(sql.contains("jsonb_typeof(\"usage\".provider_request_body::jsonb)"));
assert!(!sql.contains("jsonb_typeof(\"usage\".provider_request_body)"));
assert!(sql.contains("'client_ip'"));
assert!(sql.contains("request_metadata->>'client_ip'"));
assert!(sql.contains("'user_agent'"));