From b3f77d9788c60d0f349e440cf7efd4601dc427f3 Mon Sep 17 00:00:00 2001 From: Bretton Date: Sat, 8 Aug 2026 04:13:31 -0700 Subject: [PATCH] fix(routes): getStatus budget above the polling rate the product prescribes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 60/min sat below the T2 tier's own 600ms cadence AND below §7's documented poll-until-accepted UX — the endpoint was refusing its own use case (caught at the merge gate: a legitimate 36s wait died at poll 61). 120/min keeps a poll-a-second client comfortable for two minutes; enumeration still surfaces at operator-visible rates. Co-Authored-By: Claude Fable 5 --- internal/api/routes/post.go | 14 +++++++++----- internal/api/routes/registration_test.go | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/api/routes/post.go b/internal/api/routes/post.go index a89452b..bb60424 100644 --- a/internal/api/routes/post.go +++ b/internal/api/routes/post.go @@ -14,11 +14,15 @@ import ( // getStatusRateLimit is social.coves.community.post.getStatus' per-client // budget, per minute. // -// Sixty is chosen against the endpoint's own UX rather than copied from a -// neighbour: §7 has a client poll for the accepted transition, and a poll a -// second for a minute is comfortably inside this while a script enumerating a -// community's rejected posts is not. -const getStatusRateLimit = 60 +// Chosen against the endpoint's own UX rather than copied from a neighbour: +// §7 has a client poll for the accepted transition, so the budget must sit +// ABOVE any polling rate the product itself prescribes — an earlier 60 was +// below the T2 tier's own 600ms cadence (100/minute) and cut off the +// endpoint's documented use case mid-wait (caught at the task-5 merge gate: +// a legitimate wait died at poll 61). 120 keeps a poll-a-second client +// comfortable for two full minutes while a script enumerating a community's +// rejected posts still hits a rate an operator notices. +const getStatusRateLimit = 120 // PostRouteOption supplies a collaborator that only some of the post routes // need. diff --git a/internal/api/routes/registration_test.go b/internal/api/routes/registration_test.go index 5713051..e304ff4 100644 --- a/internal/api/routes/registration_test.go +++ b/internal/api/routes/registration_test.go @@ -200,7 +200,7 @@ var declaredRoutes = []declaredRoute{ // stranger can ask about any post URI they can name. The budget is what // bounds enumeration of a community's rejected posts to something an // operator would notice. - {http.MethodGet, "/xrpc/social.coves.community.post.getStatus", authNone, 60, false}, + {http.MethodGet, "/xrpc/social.coves.community.post.getStatus", authNone, 120, false}, // RegisterVoteRoutes — social.coves.feed.vote.* {http.MethodPost, "/xrpc/social.coves.feed.vote.create", authRequired, 0, false}, -- 2.51.2