Skip to content

Commit 663c0eb

Browse files
committed
Merge FEATURE-ci-windows-date: Select thread-safe Windows date conversion
2 parents 1c7e490 + 8c160f8 commit 663c0eb

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# FEATURE-ci-windows-date: portable HTTP date conversion
2+
3+
Status: Complete (local implementation, Groundwork validation and finalization). Native execution remains CI / v3 PR owned. Base: `v3` at `1c7e490721802c74fe023f8c0ffd637f85a47c21`.
4+
5+
Native Windows job120372343449 in run39941070929 failed to compile the actual framer because `gmtime_r` is unavailable. The compiler's MinGW header diagnostic declares `gmtime_s(struct tm*, const time_t*)`. The affected source is unchanged between failed CI commit56da7ec9 and this task's base. This actual native compiler failure is the accepted RED for the compile-only platform selection repair.
6+
7+
The framer now selects `gmtime_s(&tm_value, &t)` on `_WIN32` and preserves `gmtime_r(&t, &tm_value)` elsewhere. UTC conversion, thread safety, IMF-fixdate formatting, return semantics and existing error policy remain unchanged.
8+
9+
Action items:
10+
11+
- [x] Create the isolated task worktree from local v3 using Groundwork's identity helper; preserve unrelated bauth work.
12+
- [x] Retain original native compiler RED and bind its source to the task base.
13+
- [x] Add only the Windows/POSIX conversion selection with the correct Windows argument order.
14+
- [x] Run the existing focused framer/date tests against actual production translation units.
15+
- [x] Run changed-file cpplint and `git diff --check`.
16+
- [x] Preserve exact commands, raw outputs and verification limits in `.debug/FEATURE-ci-windows-date/` at the repository root.
17+
- [x] Caller: Groundwork validation and local finalization into v3. Three focused reviewers approved with zero findings.
18+
- [ ] CI / v3 PR: fresh native Windows compilation/execution.
19+
20+
Local verification: GNU C++20 compilation with `-Wall -Wextra` passes without warnings. The unchanged complete `http1_response_framer` executable passes64 tests/174 checks with `LC_ALL=C TZ=Pacific/Honolulu`, including exact RFC timestamp formatting, Date field order/omission/precedence and framing/corpus checks. cpplint and diff checks pass. No synthetic or source-text test was added. The first task-local link omitted actual parser dependencies; its failure is retained, and the corrected command links the real resource-charge, budget and target translation units. This was execution setup, not a production defect or native Windows GREEN.
21+
22+
Native Windows compilation/execution is unavailable locally: no installed Windows cross compiler/SDK was found. This remains CI / v3 PR owned under AGENTS.md and does not block local completion. No dependency installation, broad baseline/full suite, merge or publication was performed.
23+
24+
The separate Linux parity failure remains **UNCERTAIN**, as settled by the prior bounded check. Evidence and the LSan/ptrace process failure remain in `.debug/FEATURE-ci-native-runtime/journal.md`; a passing replay does not establish independence or a passed process gate. This task does not reopen, retry or repair that issue.
25+
26+
Project notes: Autotools/C++20, out-of-tree builds (`./bootstrap`, `configure --disable-v3-tls`, `make`); custom Littletest under `test/unit`. This task directly compiled the existing focused test with its actual production dependencies and parity helpers. `cpplint` uses root `CPPLINT.cfg`. Worktree creation required the existing Git sandbox escalation; branch/path came verbatim from Groundwork's helper.

‎src/detail/http1_response_framer.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ void append_decimal(std::string& out, std::uint64_t value) {
8787
std::string format_imf_fixdate(std::chrono::system_clock::time_point when) {
8888
const std::time_t t = std::chrono::system_clock::to_time_t(when);
8989
std::tm tm_value{};
90+
#if defined(_WIN32)
91+
gmtime_s(&tm_value, &t);
92+
#else
9093
gmtime_r(&t, &tm_value);
94+
#endif
9195
char buf[32];
9296
const std::size_t n = std::strftime(buf, sizeof buf, "%a, %d %b %Y %H:%M:%S GMT", &tm_value);
9397
return n > 0 ? std::string(buf, n) : std::string();

0 commit comments

Comments
 (0)