mova-seaspider-fetch
The groupant beside tools/seaspider/src/fetch.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.
Facts
Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.
Components
| component | label | where |
|---|---|---|
| approximant | partial | Forward approximant |
| ast | partial | syntax.json |
| composition | partial | Composition |
| cost | partial | Cost |
| descriptant | present | Descriptant |
| invariant | partial | Invariant |
| tests | finite evidence | tests |
Obernants
The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.
| id | type | label | where |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
Model text
model
mova-seaspider-fetch
Descriptant
One bounded HTTP(S) GET: rustls, gzip/brotli/deflate decoding, no cookies, no automatic redirects, bounded time and body, a fixed header subset. Source: tools/seaspider/src/fetch.rs.
Forward approximant
client(): User-Agent, Accept, connect and whole-request timeouts, Policy::none, no idle pool, pinned resolver. get(url, limit): send, keep status, remote address and the KEPT_HEADERS (each <= 1000 chars), read decoded chunks until limit bytes, cut and mark truncated; errors flattened with causes to <= 400 chars with a '(timed out)' mark.
Invariant
body.len() <= limit; truncated iff a chunk crossed the limit; no request follows a redirect by itself; no cookie store exists.
Cost
One TCP+TLS handshake per request (no pooling) plus O(min(body, limit)) bytes.
Composition
Called only through crawl::polite_get.
behavior_complement
Excluded: JavaScript, cookies, authentication, POST/forms, HTTP/3, conditional requests, content sniffing beyond headers. Counterexample: a server stalling 6 s against a 1.5 s timeout yields an error, not a partial body (body_size_timeout_gzip_and_redirect_bounds). Evidence status: source-derived model with finite checks, not a proof.
reverse_reconstruction
From Got one recovers status, kept headers and the decoded prefix; the encoded transfer, dropped headers and bytes past the limit are not recoverable. No unique inverse is claimed.
tests
Checks
End-to-end: truncation at 10000 bytes, timeout, gzip decoding, User-Agent seen by the server.
Command: cargo test --manifest-path tools/seaspider/Cargo.toml --offline --locked (27 unit + 9 end-to-end tests against a local 127.0.0.1 HTTP server; two identical runs on 2026-11-04). These are finite fixtures; the only live run was the 2026-11-04 smoke against the project's own site.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/seaspider/src/fetch.rs.groupant/