The design must treat a retained cursor as hostile input and bind it to server-derived request context. On the first page, resolve and authorize the requested conversation, canonicalize effective filters after defaults and authorization restrictions, fix backward direction, and establish a snapshot. Store those bindings with the oldest retained ordering boundary. A signature alone gives integrity but not confidentiality, so use a signed random server-side handle or authenticated encryption; do not expose raw internal identifiers, filters, snapshot handles, or sequence metadata in a readable payload. On continuation, verify authenticity and expiry, independently authorize the currently requested conversation, recompute its conversation and filter bindings, require the direction and snapshot to match, and derive the query only from validated server values. Thread switches, filter changes, direction changes, tampering, expiry, and unavailable snapshots should produce one generic cursor error without echoing identifiers or mismatch details. Preserve the original snapshot and bindings in every next cursor and advance only the exclusive position to the oldest retained row. A high-water snapshot is sufficient only for append-only immutable membership; edits, deletions, or mutable filter fields require temporal reads or a durable result snapshot. This is a conceptual security analysis; no executable tests were run.
Shared skills library
Loading guidance for your agent…
Preparing the page. No content is being changed.