Skip to content

fix(tck): isolate HTTP diagnostics infrastructure - #243

Merged
MisterVVP merged 1 commit into
dev-optimize-streaming-response-latenciesfrom
dev-address-pr-#223-review-findings-and-refactor-tck_sut.cpp
Sep 9, 2026
Merged

MisterVVP merged 1 commit into
dev-optimize-streaming-response-latenciesfrom
dev-address-pr-#223-review-findings-and-refactor-tck_sut.cpp

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Prevent the internal diagnostics reset request from contaminating measured HTTP counters and simplify the TCK SUT bootstrap responsibilities.
  • Make the subscription-symbol-inspection test portable to MSVC/Windows toolchains instead of assuming GNU nm.
  • Reduce cognitive complexity in tck_sut.cpp by extracting store and HTTP server implementation details into focused components.

Description

  • Extracted HTTP server and diagnostics implementation into tests/sut/tck_sut_http_server.cpp/.h and introduced TckHttpServer as a small RAII-style helper that owns listener, accept loop, connection workers, FD bookkeeping, and diagnostic counters.
  • Moved store/environment parsing and store-bundle creation into tests/sut/tck_sut_store.cpp/.h and exposed only CreateStoreBundleFromEnvironment() to the bootstrap caller.
  • Implemented explicit detection of the diagnostics-reset request (kDiagnosticsResetPath) inside the HTTP server and handled it by executing the reset and returning 204 No Content while skipping all HTTP accounting for that request so per-connection measurement state is not corrupted.
  • Reworked tests/CMakeLists.txt to build the new sources into the tck_sut target and to select a platform-appropriate symbol-inspection tool in CMake; the selected tool and its arguments are passed to the Python test.
  • Rewrote tests/scripts/subscription_diagnostics_build_test.py to accept a --symbol-tool and --symbol-argument (no platform assumptions) and added tests/scripts/subscription_diagnostics_build_test_test.py unit tests for command construction.
  • Added an integration-style deterministic test tests/scripts/http_diagnostics_reset_test.py that opens a persistent connection, sends the internal diagnostics reset, then a measured RPC over the same connection and asserts the reset did not affect diagnostics counts.
  • Preserved SUT behavior and shutdown ordering: stop subscriptions → shutdown active sockets → join HTTP workers → emit HTTP diagnostics → emit subscription diagnostics → stop gRPC.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Sep 9, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Sep 9, 2026
@MisterVVP MisterVVP added AI agent AI agent contribution maintenance refactoring Constant technical improvements which are not necessarily related to any issue. and removed codex Automatic label added by codex agent. Should not be used maintenance labels Sep 9, 2026
@MisterVVP
MisterVVP merged commit 3002179 into dev-optimize-streaming-response-latencies Sep 9, 2026
17 checks passed
@MisterVVP
MisterVVP deleted the dev-address-pr-#223-review-findings-and-refactor-tck_sut.cpp branch September 9, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution refactoring Constant technical improvements which are not necessarily related to any issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant