Skip to content
open.blog documentation
open.blog

ADR 0158: Suggestions are sent through the one feedback route, behind their own opt-in, with the page as work

Context#

RD13.1 defined the record. RD13.2 lets a reader send one. Passage feedback and Third Perspectives already share one hosted route, one quota and replay design, one receipt and one set of rules for who is asked what; a second route would be a second way to get each of those wrong.

Decision#

  • The same route, read by its own contract. POST /feedback takes a body whose kind is future-suggestion and reads it with web/components/future-suggestion.js, which the build's Submission::from_json and a shared fixture (tests/fixtures/future-suggestion-submissions.json, generated by the Rust side) hold to the same codes, records and rows case by case. It is refused with 413 over 12 KiB and 422 with the code of the first broken rule, a message that names the field and never repeats what the reader wrote.
  • The page is the request's work, not part of the reader's submission. The version 1 record has no page (a reader does not say which page they are on; the receiver does). The route reads it from the query string, ?work=/posts/tides/, checks it is a site-relative published path, and then asks the site's own manifest (openblog-participation.json) whether that page has the kind open; a page the site does not publish with the kind open takes nothing (403), so a hostile work can only name a page where suggestions are already welcome.
  • Its own opt-in, on top of the receipts. OPENBLOG_SUGGESTIONS_ENABLED=true takes effect only with passage feedback, the inbox's schema and engagement protection on, because every hosted suggestion has a receipt so the reader can always take it back (the inbox's issues_receipts rule). Without it the route answers 404 unavailable and the reader gets the copy-and-send path. The only schema change is the loosened check of ADR 0154, with its rollback.
  • A quota and a replay bound of its own. Five suggestions an hour per client and 500 per site (bucket suggestions), and the same suggestion for the same page from the same client once an hour (bucket suggestions-repeat), whose claim is released if storing fails so a retry is never told it was already sent. Only hourly digests are kept, never the address.
  • Always pending, with a receipt. A suggestion is stored pending with reader_name and publish_name as given, clarification_consent false (the reader may agree through the receipt), the receiver's time and the digest of a receipt returned once. Through POST /receipt the reader reads it (their own text and contact are theirs to see), agrees to be asked, answers a clarification (the new text replaces the old as the next revision; the link, hints, page and contact stay) or withdraws it, which deletes its text, name and contact at once. Nothing is e-mailed.
  • Nothing is fetched. The route calls only the database and the site's own manifest; the link a reader gave is stored, never opened.

Consequences#

The route's refusals, quotas and replays are tested against the same fixture as the build, with the opt-in off, the page closed or hidden, a failing store and a reader who retries. A site whose function is older than this release answers a suggestion as it answers any unknown body (422 wrongKind from passage feedback's reader), and the form falls back to copy-and-send.

View this page's source