From 43ca41bcf1390176504ea329c20287ce0c6a2b53 Mon Sep 17 00:00:00 2001 From: shum Date: Thu, 22 Oct 2026 02:12:26 +0000 Subject: [PATCH] plans: names search trims and caps record links --- plans/names-codes/2026-10-21-store-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plans/names-codes/2026-10-21-store-api.md b/plans/names-codes/2026-10-21-store-api.md index f5cd8a9cf6..558e7972af 100644 --- a/plans/names-codes/2026-10-21-store-api.md +++ b/plans/names-codes/2026-10-21-store-api.md @@ -131,7 +131,7 @@ Each limit counts requests per client per minute. It is taken after the route an | create (existing) | 5 | `POST /api/invoice`, `POST /api/invoice/:id/cancel`, `/name`, `/code`, `/retry` | Beyond these: -- **Link fetches** have two service-wide bounds, one for search answers (`searchFetchSlots`, 4 at a time) and one for previews (`previewFetchSlots`, 2 at a time), so previews cannot starve search. Each fetch has a 3-second timeout (`fetchTimeout`) and never waits for a slot longer than that: it gives up, and its profile is `unread` (section 2). Results are cached 10 minutes per link. +- **Link fetches** have two service-wide bounds, one for search answers (`searchFetchSlots`, 4 at a time) and one for previews (`previewFetchSlots`, 2 at a time), so previews cannot starve search. Each fetch has a 3-second timeout (`fetchTimeout`) and never waits for a slot longer than that: it gives up, and its profile is `unread` (section 2). Results are cached 10 minutes per link. A search reads the chain within 10 s, then its profiles within one more fetch timeout, so it answers within about 13 s. - **Record edits** have a per-name cap of 10 relayed edits per hour (section 10). Refused requests do not count. ## 2. Search @@ -182,7 +182,7 @@ A name that is paid for here but not yet `registering` (`queued` to `committed`) ``` - `records`: the raw text records, "" when unset. A record set elsewhere may hold several links joined with `;`. -- `entities`: one per link in the records, split on `;`, that is a short link of its key's kind; other values make no entity. Contact entities come first. +- `entities`: one per link in the records, split on `;` with spaces trimmed, that is a short link of its key's kind; other values make no entity. At most 5 per key (`maxEntitiesPerKey`), the first in the record; the rest make none. Contact entities come first. - An entity, as the app's connection-plan alert shows a chat: - `type`: the record it came from, `address` (`simplex.contact`) or `channel` (`simplex.channel`); - `kind`: what the link opens. For a contact address, `business` when the link data says so (`business`, or the profile's `peerType` business), `bot` for `peerType` bot, else `contact`. For a channel link, `channel`;