fix(app): collection's 15 s limit also covers the name lookup, TLS and headers

The name lookup runs on a daemon thread waited for only until the deadline, and a watchdog
shuts the connection down at the deadline, so a server that sends its status line or headers
byte by byte within the per-read limit is cut off too. A response cut short is a failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-13 21:46:10 +09:00
parent 9185265010
commit d0cb540fa0
3 changed files with 182 additions and 57 deletions

View File

@@ -335,8 +335,10 @@ still deleted (below).
- Every request checks its address like the web search (`web_search.spec.md`): only http(s), and
every address the name resolves to must be public; the connection goes only to the checked
addresses in their order (TLS still checks the name), so a second lookup cannot lead into the
local network. Every redirect is checked the same way. At most 1 MB and 15 s in all (redirects included); a server
that sends slowly is cut off. The check logs nothing about the address. The collected text is web
local network. Every redirect is checked the same way. At most 1 MB and 15 s in all: the name lookup,
connecting, TLS, the headers and the body of every redirect count, and a server that sends
slowly, even byte by byte within the per-read limit, is cut off at 15 s. A response cut short is a
failure. The check logs nothing about the address. The collected text is web
content: it goes only to `<dir>/<name>/<YYYY-MM-DD>.jsonl` (one JSON object per line: `at`, then
`title`, `url`, `text` as the kind has them), never to the brain or a log.
- Day files older than `keepDays` are deleted in every folder of `dir` at each check, also of