Skip to content

Commit eb3af35

Browse files
authored
feat(tinyhttps): bump mcpplibs.tinyhttps to 0.3.6 (#936)
* feat(tinyhttps): bump mcpplibs.tinyhttps to 0.3.6 (Winsock started at the first socket) * fix(tinyhttps): 0.3.6 sha256 is the archive/refs/tags form's, as the mirror now is * fix(tinyhttps): the consumer names its dependency in full; scan finds consumers by full name
1 parent 5e38c20 commit eb3af35

4 files changed

Lines changed: 95 additions & 2 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Design doc: bump `mcpplibs.tinyhttps` to 0.3.6
2+
3+
Date: 2026-12-01
4+
5+
Follow-up to `.agents/docs/exec-plan-0.3.5.md` in `mcpplibs/tinyhttps` (the 0.3.5 release and
6+
its index entry, mcpplibs/mcpp-index#517). Upstream published `0.3.6` ([#27](https://github.com/mcpplibs/tinyhttps/pull/27),
7+
the release commit for [#26](https://github.com/mcpplibs/tinyhttps/pull/26)); this adds `0.3.6` to
8+
`pkgs/t/tinyhttps.lua` on the three platforms and moves the consumer to it.
9+
10+
## Source and versions
11+
12+
| | `0.3.6` |
13+
|---|---|
14+
| Upstream | `https://github.com/mcpplibs/tinyhttps` |
15+
| Tag | `0.3.6` (annotated, commit `9b57ebe`) |
16+
| Tarball | `archive/refs/tags/0.3.6.tar.gz` |
17+
| sha256 (checked twice, and against the mirror's download) | `a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5` |
18+
| Wrap dir | `tinyhttps-0.3.6/` (the `archive/refs/tags` form, as every earlier entry) |
19+
| 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 |
20+
| License | Apache-2.0 (unchanged) |
21+
22+
## What changed upstream
23+
24+
`0.3.5` -> `0.3.6`: `Socket::platform_init()` (`WSAStartup`) existed and was never called, so on
25+
Windows every request ended in `statusCode = 0`, `statusText = "Connection failed"`, with nothing
26+
saying why.
27+
28+
- `Socket::ensure_platform_started()` runs once per process at the top of `Socket::connect`, before
29+
the first `socket()` or `getaddrinfo()`; `Socket::platform_started()` says whether it ran.
30+
- `platform_init()` is unchanged and still public; `platform_cleanup()` as before.
31+
- The module interface is `mcpplibs.tinyhttps` as before (Form A: the tarball's own `mcpp.toml`).
32+
33+
A patch release: a dependency written as `tinyhttps = "^0.3.1"` resolves to it, and the one change in
34+
behaviour — every request on Windows working — is the end of a total failure, not a new mode.
35+
36+
## Descriptor and workspace changes
37+
38+
- `pkgs/t/tinyhttps.lua`: added `["0.3.6"]` to `xpm.linux`, `xpm.macosx` and `xpm.windows`
39+
(GLOBAL + CN table, one sha256), every earlier entry kept as it was.
40+
- `tests/examples/tinyhttps/mcpp.toml`: the dependency is named in full, `mcpplibs.tinyhttps = "0.3.6"`
41+
(it was the short `tinyhttps`): the updater's `scan` job finds a bump's consumer by the full name
42+
(`tests/autoupdate/ci.py::direct_member`), and with the short key it reports "no candidate consumer".
43+
- `tests/examples/tinyhttps/tests/api.cpp`: a 0.3.6 check, read before any request in the
44+
program (the sends below it start Winsock too): `platform_started()` is false, then true after
45+
`ensure_platform_started()`, called twice to show it is idempotent.
46+
47+
## Verification
48+
49+
- `mcpp xpkg parse pkgs/t/tinyhttps.lua` -> `parse OK`, `0.3.6` on the three platforms.
50+
- The mirror asset was downloaded back from gitcode and hashed: `a9d72f53…950a5`, the same as
51+
the GitHub archive, twice.
52+
- Note: `api.github.com/repos/.../tarball/0.3.6` is a different byte stream (the root is named
53+
after the tag object, `mcpplibs-tinyhttps-7079d6a/`); the descriptor names the `archive/refs/tags`
54+
URL, so the hash and the mirror are that form's. The two trees compare equal.
55+
- Upstream's own CI for the release commit (mcpplibs/tinyhttps#27): 10/10, gcc and llvm on Linux,
56+
macOS and Windows, plus the OpenKal images; `tests/test_winsock_start.cpp` is the first socket of
57+
its process and checks the flag both ways.
58+
- Not run locally: `tests/run_members.sh tinyhttps` on this machine stopped at syncing the index
59+
from GitHub (the host's route to it resets), so the consumer's build and run on the three
60+
platforms is this PR's `workspace (linux|macos|windows)` jobs.
61+
62+
Authorship: ai-and-human

‎pkgs/t/tinyhttps.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ package = {
124124
},
125125
sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3",
126126
},
127+
["0.3.6"] = {
128+
url = {
129+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz",
130+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz",
131+
},
132+
sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5",
133+
},
127134
},
128135
macosx = {
129136
["0.2.1"] = {
@@ -238,6 +245,13 @@ package = {
238245
},
239246
sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3",
240247
},
248+
["0.3.6"] = {
249+
url = {
250+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz",
251+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz",
252+
},
253+
sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5",
254+
},
241255
},
242256
windows = {
243257
["0.2.1"] = {
@@ -352,6 +366,13 @@ package = {
352366
},
353367
sha256 = "6f75f9e6a630ee44df75b1c3e5af21791f449966999cabd778586834183558a3",
354368
},
369+
["0.3.6"] = {
370+
url = {
371+
GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.3.6.tar.gz",
372+
CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.3.6/tinyhttps-0.3.6.tar.gz",
373+
},
374+
sha256 = "a9d72f53a8ad88daff573657fdf3d90e8f0f877866ebbe7878cfd124894950a5",
375+
},
355376
},
356377
},
357378
}

‎tests/examples/tinyhttps/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ name = "tinyhttps-tests"
1010
version = "0.1.0"
1111

1212
[dependencies]
13-
tinyhttps = "0.3.5"
13+
mcpplibs.tinyhttps = "0.3.6"

‎tests/examples/tinyhttps/tests/api.cpp‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import mcpplibs.tinyhttps;
33

44
int main() {
55
using namespace mcpplibs::tinyhttps;
6+
// 0.3.6: Winsock is started at the first socket, wherever that is, so
7+
// the first request on Windows no longer fails with nothing saying why.
8+
// Read before any request runs (the sends below start it too): the flag
9+
// is false, then true after the call, which is idempotent.
10+
const bool notStarted = !Socket::platform_started();
11+
Socket::ensure_platform_started();
12+
Socket::ensure_platform_started();
13+
const bool started = Socket::platform_started();
614

715
const auto request = HttpRequest::post("https://example.invalid/data", "{\"ok\":true}");
816
const auto proxy = parse_proxy_url("http://127.0.0.1:8088/path");
@@ -62,6 +70,8 @@ int main() {
6270
&& !cancelledDownload.ok()
6371
&& extraUnset // 0.3.5
6472
&& extra.extraCaFile == "/etc/corp/root-ca.pem"
65-
&& connectOver != nullptr;
73+
&& connectOver != nullptr
74+
&& notStarted // 0.3.6
75+
&& started;
6676
return ok ? 0 : 1;
6777
}

0 commit comments

Comments
 (0)