Skip to content

fix(ci): clang-format sweep + widen tool-timeout test margins#45

Merged
0xeb merged 2 commits into
mainfrom
fix/ci-format-and-macos-timeout
May 19, 2026
Merged

fix(ci): clang-format sweep + widen tool-timeout test margins#45
0xeb merged 2 commits into
mainfrom
fix/ci-format-and-macos-timeout

Conversation

@0xeb
Copy link
Copy Markdown
Owner

@0xeb 0xeb commented May 19, 2026

Fixes the two CI failures on main (post-PR #44 merge):

  • format-check: 7 files needed clang-format normalization (left over from the v3.1.0 -> v3.3.1 catch-up cycle and the community PR merges). Ran clang-format -i on the flagged set.
  • macos-latest (Debug): fastmcpp_tools_timeout::test_tool_timeout_triggers and test_manager_timeout_toggle could race on macOS Debug under CI load -- the 10ms timeout / 40-50ms worker-sleep window was tight enough that scheduling jitter occasionally let future::wait_for() return ready after the worker completed instead of timeout before it did. Widened both to 50ms timeout / 5s worker-sleep (100x margin) without significantly slowing the test (it still returns within ~100ms).

Local: fastmcpp Debug ctest 103/103 GREEN.

0xeb and others added 2 commits May 19, 2026 10:05
…OS Debug

Fixes the two CI failures on main (PR #44):
- format-check: 7 files needed clang-format normalization (left over from the
  v3.1.0->v3.3.1 catch-up cycle and community PR merges); ran clang-format -i
  on the flagged set.
- macos-latest (Debug): fastmcpp_tools_timeout::test_tool_timeout_triggers and
  test_manager_timeout_toggle could race on macOS Debug runners under load --
  the 10ms timeout / 40-50ms worker-sleep window was tight enough that
  scheduling jitter occasionally let future::wait_for() return 'ready' after
  the worker completed, instead of 'timeout' before it did. Widened both to
  50ms timeout / 5s worker-sleep -- 100x margin -- without slowing the test
  (it still returns within ~100ms).

Files formatted:
- include/fastmcpp/client/{client,types}.hpp
- include/fastmcpp/tools/tool_transform.hpp
- src/client/sampling_handlers.cpp
- src/providers/openapi_provider.cpp
- src/server/response_limiting_middleware.cpp
- src/util/json_schema_type.cpp
- tests/tools/test_tool_timeout.cpp (also widened; format swept)

Local verification: fastmcpp Debug ctest 103/103 GREEN.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test 1 ('server crash surfaces TransportError') launches sh -c \"exit 42\"
and then writes to the subprocess's stdin. On macOS Debug under CI load, the
subprocess can exit before our first write completes, causing the kernel to
raise SIGPIPE in the test binary -- which terminates the test process before
TransportError can propagate. Result: test #76 reports SIGPIPE***Exception in
0.03s with no useful diagnostic.

Fix: ignore SIGPIPE in main() on POSIX so write(2) returns -1/EPIPE instead
of killing the process. The C++ port code already handles EPIPE correctly;
this just stops the kernel from short-circuiting that path. Windows is
unaffected (no SIGPIPE).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@0xeb 0xeb merged commit 1cd32e0 into main May 19, 2026
7 checks passed
@0xeb 0xeb deleted the fix/ci-format-and-macos-timeout branch May 19, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant