From 32105266ac8cad028967ade2a79094f7978a5f47 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 1 Dec 2026 05:44:20 +0800 Subject: [PATCH 1/3] feat(tinyhttps): bump mcpplibs.tinyhttps to 0.3.6 (Winsock started at the first socket) --- .../2026-12-01-bump-tinyhttps-0.3.6-plan.md | 57 +++++++++++++++++++ pkgs/t/tinyhttps.lua | 21 +++++++ tests/examples/tinyhttps/mcpp.toml | 2 +- tests/examples/tinyhttps/tests/api.cpp | 12 +++- 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 .agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md 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..d13bdf69 --- /dev/null +++ b/.agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md @@ -0,0 +1,57 @@ +# 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) | `174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4` | +| Wrap dir | `tinyhttps-0.3.6/` (GitHub names it after the tag object) | +| 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`: `tinyhttps = "0.3.6"`. +- `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: `174b4347…bd3ba4`, the same as + the GitHub archive. +- 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..4c37af6e 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + }, }, 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + }, }, 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + }, }, }, } diff --git a/tests/examples/tinyhttps/mcpp.toml b/tests/examples/tinyhttps/mcpp.toml index 4c5767cf..14d67156 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" +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; } From defa2b3e2cb1c84388e23df35b48600939e9a98b Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 1 Dec 2026 05:49:50 +0800 Subject: [PATCH 2/3] fix(tinyhttps): 0.3.6 sha256 is the archive/refs/tags form's, as the mirror now is --- .agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md | 11 +++++++---- pkgs/t/tinyhttps.lua | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) 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 index d13bdf69..5815fc86 100644 --- 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 @@ -14,8 +14,8 @@ the release commit for [#26](https://github.com/mcpplibs/tinyhttps/pull/26)); th | 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) | `174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4` | -| Wrap dir | `tinyhttps-0.3.6/` (GitHub names it after the tag object) | +| 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) | @@ -45,8 +45,11 @@ behaviour — every request on Windows working — is the end of a total failure ## 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: `174b4347…bd3ba4`, the same as - the GitHub archive. +- 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. diff --git a/pkgs/t/tinyhttps.lua b/pkgs/t/tinyhttps.lua index 4c37af6e..216c2844 100644 --- a/pkgs/t/tinyhttps.lua +++ b/pkgs/t/tinyhttps.lua @@ -129,7 +129,7 @@ package = { 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", }, }, macosx = { @@ -250,7 +250,7 @@ package = { 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", }, }, windows = { @@ -371,7 +371,7 @@ package = { 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 = "174b4347c8fc17ad42161e7b468a7995bfe7339d7baa10fdac58ab7ac9bd3ba4", + sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5", }, }, }, From c886b07924b146c93c683de3a4ec655018468adf Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 1 Dec 2026 05:57:52 +0800 Subject: [PATCH 3/3] fix(tinyhttps): the consumer names its dependency in full; scan finds consumers by full name --- .agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md | 4 +++- tests/examples/tinyhttps/mcpp.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 index 5815fc86..dac0ce0c 100644 --- 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 @@ -37,7 +37,9 @@ behaviour — every request on Windows working — is the end of a total failure - `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`: `tinyhttps = "0.3.6"`. +- `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. diff --git a/tests/examples/tinyhttps/mcpp.toml b/tests/examples/tinyhttps/mcpp.toml index 14d67156..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.6" +mcpplibs.tinyhttps = "0.3.6"