test: real HTTP-over-TCP loopback domain test (#3) #15

Merged
cflmy merged 1 commits from codex/issue-3-loopback-domain into main 2026-11-30 16:19:02 +08:00
1 Commits
Author SHA1 Message Date
cflmy a604405908 test: add a real HTTP-over-TCP loopback domain test
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
Implement marqdo-ext-http#3: the explicit @http package now owns a real
loopback domain test instead of only pure encode/parse cases.

- tests/loopback.mq.md performs two real HTTP/1.1 exchanges in one program
  through the CLI's generic resource.open("tcp")/read/write/close, building
  requests with http.构建请求字节 and parsing responses with
  http.解析响应字节; non-ASCII bodies, explicit --allow-net 127.0.0.1 and
  --allow-env HTTP_TEST_PORT only.
- scripts/loopback_server.py is a deterministic one-request-per-connection
  server that records method/path/body and returns fixed status/bodies.
- scripts/run_cases.py supports kind=loopback (server lifecycle, port env,
  grants, request-record assertions) without changing the pure case path.
- tests/cases/loopback.json asserts GET /one -> 200 第一个 and
  POST /two -> 201 第二个 plus the request records.
- Evidence: docs/evidence-2026-11-30-loopback-domain-test.md (real CLI rc.6
  candidate + Bundle 0.3.0: 2 cases PASS).

No CLI/Host/other-component change, no new Host request, no release.
2026-11-30 16:10:35 +08:00