Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .agents/docs/2026-12-01-bump-tinyhttps-0.3.6-plan.md
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions pkgs/t/tinyhttps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = {
Expand Down Expand Up @@ -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"] = {
Expand Down Expand Up @@ -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",
},
},
},
}
2 changes: 1 addition & 1 deletion tests/examples/tinyhttps/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ name = "tinyhttps-tests"
version = "0.1.0"

[dependencies]
tinyhttps = "0.3.5"
mcpplibs.tinyhttps = "0.3.6"
12 changes: 11 additions & 1 deletion tests/examples/tinyhttps/tests/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}
Loading