You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TASK-081: Fill empty-on-correct-build unit suites; delete pthread detector
Six action items, six cycles:
1. New webserver_ws_available_test.cpp: HAVE_WEBSOCKET-on companion to
webserver_ws_unavailable_test (which is empty on classic /
flag-invariance-on lanes). Pins features().websocket==true and the
throw-type contrast: null unique_ptr/shared_ptr → invalid_argument
(NOT feature_unavailable). Body is empty on HAVE_WEBSOCKET-off
lanes where the off-path contracts live in the unavailable TU.
2. New webserver_dauth_available_test.cpp: same paired pattern for
HAVE_DAUTH. Pins features().digest_auth==true and that
digest_auth(true)/digest_auth(false) construct cleanly. Empty body
on HAVE_DAUTH-off (flag-invariance-off + Windows).
3. webserver_register_ws_smartptr_test: added HAVE_WEBSOCKET-off
runtime block (was previously runtime-empty on off lanes — only
the compile-time signature asserts fired). Pins features().websocket
==false and null unique_ptr → feature_unavailable (not invalid_argument
— the throw-type contrast against the HAVE_WEBSOCKET-on contract).
4. http_request_operator_stream_test: split credential-redaction into
HAVE_BAUTH-on (existing) and HAVE_BAUTH-off (new) variants. The
off variant pins that get_user/get_pass return empty (admin/hunter2
never leak) AND that Authorization-class header and cookie
redaction are independent of HAVE_BAUTH (the dumpers are
unconditional).
5. body / http_response_factories / iovec_entry Windows pipe/iovec
gates: documented the gap in test/PORTABILITY.md under a new
"Skipped in test/unit/" section (branch B per the plan). Each
#ifndef _WIN32 block gets a // reason: comment plus a PORTABILITY.md
entry; the iovec_entry POSIX-iovec gate is structurally
unfixable (no Windows equivalent), and pipe_body/file_body Windows
ports are flagged as a future follow-up. MHD_IoVec bridge test is
unconditional and covers the actual production cast path.
6. header_hygiene_test pthread detector: deleted (DELETE-PATH per the
plan's investigation gate). Both libc++ and libstdc++-with-threads
unconditionally pull <pthread.h> in from any STL container header.
The libhttpserver public surface uses STL containers, so the
detector cannot fire on any supported CI lane without rewriting
the public surface to drop std::string / std::vector / std::map.
The Makefile.am HEADER_HYGIENE_FORBIDDEN comment is updated and a
RELEASE_NOTES.md entry under "Test infrastructure" records the
deletion rationale. The remaining hygiene sentinels (microhttpd,
gnutls, sys/socket, sys/uio) still fire on every lane.
Acceptance criteria:
- AC-1 (every unit suite exercises non-trivial code on at least one
CI lane): satisfied by the paired ws/dauth on-path TUs + the new
smartptr off-path block + the new operator_stream off-path block.
- AC-2 (pthread detector works or is deleted): deleted with rationale.
- AC-3 (Windows lane runs body/response/iovec variants OR
PORTABILITY.md records the gap): PORTABILITY.md records all three
gaps with Symptom / Root cause / Restoration plan.
- Typecheck passes: verified by cross-flag compile of each touched
TU under HAVE_*=on and HAVE_*=off.
- Tests pass: all touched unit tests exit 0; no regressions in the
rest of the unit suite. (The 15 integ FAILs in local make check
are the pre-existing thread_safety / port-8080 flake on feature/v2.0,
unrelated to TASK-081.)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments