# m6p3 — Full Sort Mode Coverage + Live Content + Engagement Filters (✅ COMPLETE 2026-02-23) Phase spec and acceptance criteria: [ROADMAP · Milestone 6 · Phase 3](../ROADMAP.md). Milestone index: [README.md](README.md). Backfilled record. ## What shipped 1. **The sort surface completed** (`tidal/src/ranking/profile.rs`, `Sort` enum). M6 added `AlphabeticalAsc`, `AlphabeticalDesc`, `Shortest`, `Longest`, `MostCommented { window }`, `MostShared { window }`, `LiveViewerCount`, and `DateSaved` alongside the pre-existing `Hot`, `Trending`, `Rising`, `Controversial`, `HiddenGems`, `Shuffle`, `New`, `TopWindow`, `MostViewed`, `MostLiked`, `MostFollowed`, `CreatorEngagementRate`, and `Ann`. Window parameterization is what lets ~20 variants cover the 27 sort modes in [USE_CASES.md](../../../USE_CASES.md) Appendix B. 2. **Metadata-driven ordering.** Alphabetical sorts read the `title` metadata field case-insensitively with missing titles last; `Shortest`/`Longest` read `duration` in seconds with missing durations last. `DateSaved` reads the querying user's save timestamp and therefore requires `for_user`. 3. **Live content.** A `viewer_count` signal (short half-life, no windows, no velocity — it represents a current concurrent count, not an accumulation) plus a `live` built-in profile sorting on `LiveViewerCount` (`tidal/src/ranking/builtins.rs`). 4. **Engagement and geographic filters.** `FilterExpr::MinSignal` / `MaxSignal` evaluate an AllTime windowed count against a threshold; `FilterExpr::NearLocation { lat, lng, radius_km }` is a Haversine post-filter over item `latitude`/`longitude` metadata — deliberately not index-backed. ## Evidence - `tidal/tests/m6p3_sorts.rs` (9), `m6p3_filters.rs` (3), `m6p3_edge_cases.rs` (3) — integration coverage. - `tidal/src/ranking/executor/tests/sort_tests.rs` — per-variant ordering unit tests, the "at least one test per Sort variant" criterion. - `tidal/benches/sort.rs` — sort benchmarks added by the same commit. ## Note on the "< 50 ms at 500 items" criterion Marked `[x]`; `tidal/benches/sort.rs` exists and targets it, but no run is recorded in `docs/`. Measurable on demand (`cargo bench -p tidaldb --bench sort`); not currently evidenced.