(user_id: str, query: str = "", node_type: Optional[str] = None, limit: int = 12)
| 3129 | normalized_user = str(user_id or "").strip() |
| 3130 | normalized_query = str(query or "").strip().lower() |
| 3131 | normalized_date = str(exact_date or "").strip() |
| 3132 | max_age_days = max(1, int(days or 30)) |
| 3133 | max_items = max(1, int(limit or 80)) |
| 3134 | cutoff = datetime.now() - timedelta(days=max_age_days) |
| 3135 | |
| 3136 | reports = [] |
| 3137 | for report in _all_report_records(): |
| 3138 | report_dt = datetime.fromtimestamp(report["_sort_ts"]) |
| 3139 | if normalized_date: |
| 3140 | report_date = str(report.get("saved_at") or report.get("updated_at") or "")[:10] |
| 3141 | if report_date != normalized_date: |
| 3142 | continue |
| 3143 | elif report_dt < cutoff: |
| 3144 | continue |
| 3145 | if normalized_user and report["user_id"] != normalized_user: |
| 3146 | continue |
| 3147 | haystack = " ".join( |
| 3148 | [ |
| 3149 | str(report.get("title") or ""), |
| 3150 | str(report.get("user_id") or ""), |
| 3151 | str(report.get("arxiv_id") or ""), |
| 3152 | str(report.get("snippet") or ""), |
| 3153 | str(report.get("report_path") or ""), |
| 3154 | ] |
| 3155 | ).lower() |
nothing calls this directly
no test coverage detected