diff --git a/.agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md b/.agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md new file mode 100644 index 00000000..dac0ce0c --- /dev/null +++ b/.agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md @@ -0,0 +1,62 @@ +# Design doc: bump `mcpplibs.tinyhttps` to 0.3.6 + +Date: 2026-12-01 + +Follow-up to `.agents/docs/exec-plan-0.3.5.md` in `mcpplibs/tinyhttps` (the 0.3.5 release and +its index entry, mcpplibs/mcpp-index#517). Upstream published `0.3.6` ([#27](https://github.com/mcpplibs/tinyhttps/pull/27), +the release commit for [#26](https://github.com/mcpplibs/tinyhttps/pull/26)); this adds `0.3.6` to +`pkgs/t/tinyhttps.lua` on the three platforms and moves the consumer to it. + +## Source and versions + +| | `0.3.6` | +|---|---| +| Upstream | `https://github.com/mcpplibs/tinyhttps` | +| Tag | `0.3.6` (annotated, commit `9b57ebe`) | +| Tarball | `archive/refs/tags/0.3.6.tar.gz` | +| sha256 (checked twice, and against the mirror's download) | `a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5` | +| Wrap dir | `tinyhttps-0.3.6/` (the `archive/refs/tags` form, as every earlier entry) | +| CN mirror | `https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz` — the same tarball uploaded, same sha256 | +| License | Apache-2.0 (unchanged) | + +## What changed upstream + +`0.3.5` -> `0.3.6`: `Socket::platform_init()` (`WSAStartup`) existed and was never called, so on +Windows every request ended in `statusCode = 0`, `statusText = "Connection failed"`, with nothing +saying why. + +- `Socket::ensure_platform_started()` runs once per process at the top of `Socket::connect`, before + the first `socket()` or `getaddrinfo()`; `Socket::platform_started()` says whether it ran. +- `platform_init()` is unchanged and still public; `platform_cleanup()` as before. +- The module interface is `mcpplibs.tinyhttps` as before (Form A: the tarball's own `mcpp.toml`). + +A patch release: a dependency written as `tinyhttps = "^0.3.1"` resolves to it, and the one change in +behaviour — every request on Windows working — is the end of a total failure, not a new mode. + +## Descriptor and workspace changes + +- `pkgs/t/tinyhttps.lua`: added `["0.3.6"]` to `xpm.linux`, `xpm.macosx` and `xpm.windows` + (GLOBAL + CN table, one sha256), every earlier entry kept as it was. +- `tests/examples/tinyhttps/mcpp.toml`: the dependency is named in full, `mcpplibs.tinyhttps = "0.3.6"` + (it was the short `tinyhttps`): the updater's `scan` job finds a bump's consumer by the full name + (`tests/autoupdate/ci.py::direct_member`), and with the short key it reports "no candidate consumer". +- `tests/examples/tinyhttps/tests/api.cpp`: a 0.3.6 check, read before any request in the + program (the sends below it start Winsock too): `platform_started()` is false, then true after + `ensure_platform_started()`, called twice to show it is idempotent. + +## Verification + +- `mcpp xpkg parse pkgs/t/tinyhttps.lua` -> `parse OK`, `0.3.6` on the three platforms. +- The mirror asset was downloaded back from gitcode and hashed: `a9d72f53…950a5`, the same as + the GitHub archive, twice. +- Note: `api.github.com/repos/.../tarball/0.3.6` is a different byte stream (the root is named + after the tag object, `mcpplibs-tinyhttps-7079d6a/`); the descriptor names the `archive/refs/tags` + URL, so the hash and the mirror are that form's. The two trees compare equal. +- Upstream's own CI for the release commit (mcpplibs/tinyhttps#27): 10/10, gcc and llvm on Linux, + macOS and Windows, plus the OpenKal images; `tests/test_winsock_start.cpp` is the first socket of + its process and checks the flag both ways. +- Not run locally: `tests/run_members.sh tinyhttps` on this machine stopped at syncing the index + from GitHub (the host's route to it resets), so the consumer's build and run on the three + platforms is this PR's `workspace (linux|macos|windows)` jobs. + +Authorship: ai-and-human diff --git a/pkgs/t/tinyhttps.lua b/pkgs/t/tinyhttps.lua index f2ee76fe..216c2844 100644 --- a/pkgs/t/tinyhttps.lua +++ b/pkgs/t/tinyhttps.lua @@ -124,6 +124,13 @@ package = { }, sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3", }, + ["0.3.6"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz", + }, + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", + }, }, macosx = { ["0.2.1"] = { @@ -238,6 +245,13 @@ package = { }, sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3", }, + ["0.3.6"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz", + }, + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", + }, }, windows = { ["0.2.1"] = { @@ -352,6 +366,13 @@ package = { }, sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3", }, + ["0.3.6"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz", + }, + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", + }, }, }, } diff --git a/tests/examples/tinyhttps/mcpp.toml b/tests/examples/tinyhttps/mcpp.toml index 4c5767cf..97153fd7 100644 --- a/tests/examples/tinyhttps/mcpp.toml +++ b/tests/examples/tinyhttps/mcpp.toml @@ -10,4 +10,4 @@ name = "tinyhttps-tests" version = "0.1.0" [dependencies] -tinyhttps = "0.3.5" +mcpplibs.tinyhttps = "0.3.6" diff --git a/tests/examples/tinyhttps/tests/api.cpp b/tests/examples/tinyhttps/tests/api.cpp index 04dd382d..561bfc3e 100644 --- a/tests/examples/tinyhttps/tests/api.cpp +++ b/tests/examples/tinyhttps/tests/api.cpp @@ -3,6 +3,14 @@ import mcpplibs.tinyhttps; int main() { using namespace mcpplibs::tinyhttps; + // 0.3.6: Winsock is started at the first socket, wherever that is, so + // the first request on Windows no longer fails with nothing saying why. + // Read before any request runs (the sends below start it too): the flag + // is false, then true after the call, which is idempotent. + const bool notStarted = !Socket::platform_started(); + Socket::ensure_platform_started(); + Socket::ensure_platform_started(); + const bool started = Socket::platform_started(); const auto request = HttpRequest::post("https://example.invalid/data", "{\"ok\":true}"); const auto proxy = parse_proxy_url("http://127.0.0.1:8088/path"); @@ -62,6 +70,8 @@ int main() { && !cancelledDownload.ok() && extraUnset // 0.3.5 && extra.extraCaFile == "/etc/corp/root-ca.pem" - && connectOver != nullptr; + && connectOver != nullptr + && notStarted // 0.3.6 + && started; return ok ? 0 : 1; }