Artifact

// Fixed: CASE memory_tier WHEN 'persistent' THEN 1.3 WHEN 'long-term' THEN 1.0 WHEN 'short-term' THEN 1.0 ELSE 0.2 END AS tier_boost FROM ${schema}.events WHERE occurred_at > now() - ($2::text || ' days')::interval -- (hard exclusion removed; recency_score handles ranking) AND ( $1 = '' OR content ILIKE '%' || $6 || '%' ESCAPE '\\' OR tags && $3::text[] OR embedding IS NOT NULL )

402d16a8-f6f8-474d-a8f8-789e6c6666fe

// Fixed: CASE memory_tier WHEN 'persistent' THEN 1.3 WHEN 'long-term' THEN 1.0 WHEN 'short-term' THEN 1.0 ELSE 0.2 END AS tier_boost FROM ${schema}.events WHERE occurred_at > now() - ($2::text || ' days')::interval -- (hard exclusion removed; recency_score handles ranking) AND ( $1 = '' OR content ILIKE '%' || $6 || '%' ESCAPE '\' OR tags && $3::text[] OR embedding IS NOT NULL )