Mill votes: ranked, paged read and not-yet-voted-by-this-network filter #41
Loading…
Reference in a new issue
No description provided.
Delete branch "heimdall/mill-ranked-read"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
GET /public/concepts/{collection}/rankedbeside/tallies(unchanged) for collections of hundreds of ships.400 request_invalid):sort=net|total|newest(default net),limit=1..100(default 50, canonical decimal only),cursor,unvoted=network.{ items: [{ key, title, up, down, members: {up, down} }], next_cursor }. Order is largest first, ties by key ascending, so it is total.newestis registration time.unvoted=network: leaves out concepts whose stored network tag equals the caller's tag (derived from the connection address with the existingNetworkPrefix.Tag; never accepted from the request, never returned, absent from the cursor). With no client address it filters nothing. The stored tag is the last caster's, as for purge. Answer isprivate, no-store; the plain read ispublic, max-age=60. Same CORS policy andVary: Originas the map.ConceptRankedExportTests(78 cases: orders, paging walk, cap, closed query, 28 hostile cursors, hostile collections, no tag or voter identity anywhere, cursor binding, cache and CORS, read-only).unvoted=networktells a caller whether anyone on their own network (e.g. behind one NAT) has voted a concept, and the stored tag is the last caster's, so a voter moving networks reappears in the list. Each request loads the collection's subjects and counts (fine for hundreds; the unvoted answer is uncached and unthrottled, so tens of thousands would want a rate limit or a projection).Note: on a .NET 10 SDK the existing
Results.Jsontally tests fail onPipeWriter.UnflushedBytesunder TestServer (baseline fails the same 8); the new route writesResults.Text(JsonSerializer...)so it is testable there. CI on .NET 8 is unaffected.🤖 Generated with Claude Code