Add scoped semantic logging for WebSocket, MQTT, and Express#190
Open
VolkerChristian wants to merge 1 commit into
Open
Add scoped semantic logging for WebSocket, MQTT, and Express#190VolkerChristian wants to merge 1 commit into
VolkerChristian wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
FOLLOW_UP_SCOPED_HELPER_DESIGNaudit rows (CSI-P075–CSI-P084, CSI-P135–CSI-P142, CSI-P143–CSI-P150) by adding the smallest safe connection-scoped semantic-logging helpers and migrating only the audited call sites.inst=andconn=) is copied from the activeSocketConnectionbefore removing duplicated connection-name prefixes from free-text messages.LogScopeOwner,BoundaryLogger) while avoiding global/thread-local identity or exposing spdlog types.Description
core::socket::stream::SocketConnectionand produce aBoundaryLoggerviaLogScopeOwnerfor each surface:webSocketSubProtocolLog(const SocketConnection&),mqttWebSocketLog(const SocketConnection&), andexpressLog(const SocketConnection&), reusing existing logging primitives and owning only copied strings.ScopedSemanticLoggingMigrationTestthat emits scoped and unscoped records and verifies origin/boundary/component preservation,instance/connectionpopulation, message-text changes, multiline MQTT frame-data preservation, and zero-argument helper compatibility.docs/logging/semantic-identity-callsite-audit.mdwith a conciseResolution statustable documenting CSI-P075–CSI-P084, CSI-P135–CSI-P142, and CSI-P143–CSI-P150 as resolved by this branch; no unrelated KEEP/REMOVE_LATER rows were changed.Testing
cmake -S . -B build -DSNODEC_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug; summary:Configuring done;Generating done;Build files have been written to: /workspace/snode.c/build.cmake --build build --target websocket websocket-server websocket-client mqtt mqtt-client-websocket mqtt-server-websocket http-server-express ScopedSemanticLoggingMigrationTest WebSocketMigration07cTest MqttMigration08Test -j2; build completed and produced the expected targets (for example[100%] Built target MqttMigration08Test).ctest --test-dir build -R ScopedSemanticLoggingMigrationTest --output-on-failurewhich passed:100% tests passed, 0 tests failed out of 1.ctest --test-dir build -R "ScopedSemanticLoggingMigrationTest|WebSocketMigration07cTest|MqttMigration08Test|Semantic(LoggerRound2|CompatibilityRound9|BackendRound6|FilterRound7)|InetExpress(...)|WebSocketReceiverValidationTest|InetWebSocketServerClient(...)|Mqtt311PacketValidationTest" --output-on-failureand observed100% tests passed, 0 tests failed out of 22with several component tests reported as skipped by CTest in this container; the focused semantic tests and related migration tests passed.(Changed files and the focused test are included in the branch; build and test outputs above are the exact final summary lines produced during verification.)
Codex Task