Compact descriptor for drift-aware interest fusion.
(profile: Dict[str, Any])
| 329 | def _build_interest_vector_descriptor(profile: Dict[str, Any]) -> str: |
| 330 | """Compact descriptor for drift-aware interest fusion.""" |
| 331 | drift_state = (profile or {}).get("drift_state", {}) or {} |
| 332 | status = str(drift_state.get("status", "stable")) |
| 333 | weights = get_drift_blend_weights(status) |
| 334 | return ( |
| 335 | f"status={status}|" |
| 336 | f"explicit:{weights['explicit']:.2f}," |
| 337 | f"long:{weights['long']:.2f}," |
| 338 | f"short:{weights['short']:.2f}" |
| 339 | ) |
| 340 | |
| 341 | |
| 342 | def format_number_ranges(numbers: Set[int]) -> str: |
| 343 | """Format selected numbers as compact ranges such as 01-03, 07, 09.""" |
| 344 | if not numbers: |
no test coverage detected