# Latest-message retrieval recipe

A deterministic specification for producing a current reading list from selected indexed Telegram sources.

## Calculation

- Mode: latest_n
- Formula: Select eligible logical posts, order by stored external_created_at descending, and return LIMIT N with one representative row per album.

## Query

Return the latest [N] logical posts from [selected channels], optionally after [date and time]. Sort strictly newest to oldest by stored publication time. Include source, timestamp and timezone, text or caption, message identifier, permalink, and selected-source coverage. Do not reorder by semantic relevance.

## Inputs

- **Selected sources:** Ready indexed Telegram channels included in the corpus.
- **Result limit:** The maximum number of logical posts to return overall or per source.
- **Lower time bound:** Optional publication date and timezone after which posts qualify.
- **Output detail:** Excerpt length and whether to group or interleave sources.

## Expected output

- Newest-to-oldest logical posts
- Exact publication timestamps
- Source labels and message identifiers
- Direct Telegram permalinks
- Selected-source coverage note

## Coverage checks

- [ ] Do not substitute relevance rank for chronology
- [ ] Use publication rather than ingestion time
- [ ] Deduplicate albums
- [ ] State the selected corpus
- [ ] Do not claim completeness beyond indexed sources
