fix(bridge): update call sites for Result<T> factory migration#963
fix(bridge): update call sites for Result<T> factory migration#963
Conversation
Fix compilation errors from the Result<T> migration in PR #962: - network_system_bridge.cpp: update from_thread_system(), from_common_system(), and with_custom() to handle Result returns - thread_system_adapter.cpp: update create_default() and from_service_or_default() to use create() factory
CI/CD Failure AnalysisAnalysis Time: 2026-04-13 20:30:00 UTC Failed Workflows
Root Cause AnalysisPrimary Error: Analysis: Identified Issues:
Proposed Fix
Next Steps
Automated failure analysis - Attempt #1 |
Replace direct std::make_shared<dtls_socket> calls with dtls_socket::create() factory method in secure_messaging_udp_client and secure_messaging_udp_server. The constructor was made private in the Result<T> migration (PR #962) but these call sites were missed.
CI/CD Failure Analysis - Attempt #2Previous Attempt Result: Failed (macOS Debug/Release) New Failure Analysis
What ChangedPrevious Fix:
Why It Still Fails:
New Root CauseError 1: Error 2: Updated Proposed Fix
Automated failure analysis - Attempt #2 of 3 |
Add ::kcenon::common:: namespace qualification to Result, error_codes, and ok in common_to_network_thread_adapter::create(). Update tests to use create() factory instead of private constructors for both adapter classes.
Replace remaining std::make_shared calls with create() factory in AdapterIntegrationTest for both network_to_common_thread_adapter and common_to_network_thread_adapter.
CI/CD Failure Analysis - Attempt #3Previous Attempt Result: Failed (macOS Debug/Release) What ChangedPrevious Fix (Attempt #2):
Why It Still Failed:
Fix AppliedUpdated all remaining
Verified: no Automated failure analysis - Attempt #3 of 3 (final) |
Auto-fix SummaryAttempted fixes: 3 Attempted Fixes
Current Failures (Attempt #3)The Result factory migration from PR #962 made constructors private across many bridge/adapter classes, but test files were not updated. The scope is significantly larger than the original 2-file fix:
Each instance needs:
RecommendationThis PR's scope should be expanded to cover all test files affected by the Result migration, or a follow-up PR should address the remaining ~42 test call sites. Please review manually. |
CI/CD Failure AnalysisAnalysis Time: 2026-04-14 06:30 UTC Failed Workflows
Root Cause AnalysisPrimary Error: Analysis:
The test file Identified Issues:
Proposed Fix
Next Steps
Automated failure analysis - Attempt #1 |
…ation Replace direct constructor calls and std::make_shared with ThreadPoolBridge::create() factory method. Update from_thread_system() and from_common_system() tests to handle Result<T> return types.
CI/CD Failure Analysis - Attempt #2Previous Attempt Result: Failed New Failure Analysis
What ChangedPrevious Fix:
Why It Still Fails:
New Root CauseError: Analysis: Updated Proposed Fix
Automated failure analysis - Attempt #2 of 3 |
Update test_network_system_bridge.cpp and test_observability_bridge.cpp to use create() factory methods instead of private constructors for ThreadPoolBridge and ObservabilityBridge.
Replace direct constructor calls with dtls_socket::create() factory method. Update null context test to check Result error instead of expecting exception.
CI/CD Failure Analysis - Attempt #3Previous Attempt Result: Failed New Failure Analysis
What ChangedPrevious Fix:
New Root Cause:
Fix Applied
All Test Files Updated in This PR
Automated failure analysis - Attempt #3 of 3 |
Update disconnection_callback_t, receive_callback_t, and error_callback_t lambda parameters from legacy types to std::string_view to match the updated i_protocol_server interface.
Remove session parameters from client adapter callback lambdas to match simplified i_protocol_client interface where callbacks no longer receive shared_ptr<i_session>.
Update on_disconnected to on_disconnect and accept_callback_t signature from string_view to unique_ptr<i_connection>.
CI/CD Failure AnalysisAnalysis Time: 2026-04-13 21:55 UTC Failed Workflows
Root Cause AnalysisPrimary Errors: Same errors in Analysis: The Fix Applied (Commit 0a04c66)
Automated failure analysis - Attempt #6 |
Remove bool-returning validate_size that conflicted with validation_result-returning version. Update test assertions to use validation_result comparisons.
CI/CD Failure AnalysisAnalysis Time: 2026-04-13 22:08 UTC Failed Workflows (Attempt #6)
Root Cause AnalysisPrimary Error: Analysis: Fix Applied (Commit fa2e9f2)
Automated failure analysis - Attempt #7 |
What
Summary
Fix compilation errors introduced by PR #962 (Result migration). Two call site files
were not updated to handle the new Result return types from bridge factory methods.
Change Type
Why
Related Issues
Root Cause
PR #962 changed bridge constructors to private and factory methods to return Result,
but missed updating callers in network_system_bridge.cpp and thread_system_adapter.cpp.
Where
How
Test Plan