Fix #157: index-first tray reads #163

Merged
crueber merged 2 commits from fix/issue-157 into main 2026-09-05 21:46:15 +00:00
Owner

Index-first tray serving: covered pages answer from the single unread-index GET (no LIST, O(page) memoized liveness probes, sort.Slice). LIST+GET overflow merge runs only past the hot window. Cost tests pin per-request calls (verified failing pre-fix). Coverage 96.1% (-race green). Doc Decisions entry appended.

Index-first tray serving: covered pages answer from the single unread-index GET (no LIST, O(page) memoized liveness probes, sort.Slice). LIST+GET overflow merge runs only past the hot window. Cost tests pin per-request calls (verified failing pre-fix). Coverage 96.1% (-race green). Doc Decisions entry appended.
Tray read path (internal/notify/http.go Tray): serve index-covered pages
from the single index GET with no LIST; LIST+GET overflow merge runs only
for pages past the hot window. Liveness probes are lazy (stop at n+1
live) and memoized per repo per request. sortNotifications is now
sort.Slice on (CreatedAt desc, ID asc).

Implements docs/features/06_notifications.md §1.2 index contract;
Decisions entry appended (law 12). Regression: tray_cost_test.go
counting-store tests (verified failing pre-fix: LIST + 80 HEADs).
Sign in to join this conversation.
No description provided.